mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
Fix ReferenceError in update_bbox_accumulation
Guard against objects that have already been removed from Blender's data (StructRNA removed) before the function runs. This occurs when switch_representation is called on temporary annotation objects that are freed before returning. Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -2477,7 +2477,10 @@ class Geometry(bonsai.core.tool.Geometry):
|
|||||||
Stores the union of all representation bboxes ever loaded for this object as
|
Stores the union of all representation bboxes ever loaded for this object as
|
||||||
``obj["ifc_bbox_min"]`` and ``obj["ifc_bbox_max"]`` in object-local space.
|
``obj["ifc_bbox_min"]`` and ``obj["ifc_bbox_max"]`` in object-local space.
|
||||||
"""
|
"""
|
||||||
if not obj.bound_box:
|
try:
|
||||||
|
if not obj.bound_box:
|
||||||
|
return
|
||||||
|
except ReferenceError:
|
||||||
return
|
return
|
||||||
corners = obj.bound_box
|
corners = obj.bound_box
|
||||||
xs = [v[0] for v in corners]
|
xs = [v[0] for v in corners]
|
||||||
|
|||||||
Reference in New Issue
Block a user