mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Fix #5245. Consider situation where object may not be loaded due to partial loading.
This commit is contained in:
@@ -1875,7 +1875,7 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_elements_in_camera_view(
|
def get_elements_in_camera_view(
|
||||||
cls, camera: bpy.types.Object, objs: list[ifcopenshell.entity_instance]
|
cls, camera: bpy.types.Object, objs: list[bpy.types.Object]
|
||||||
) -> set[ifcopenshell.entity_instance]:
|
) -> set[ifcopenshell.entity_instance]:
|
||||||
props = camera.data.BIMCameraProperties
|
props = camera.data.BIMCameraProperties
|
||||||
x = props.width
|
x = props.width
|
||||||
@@ -1886,7 +1886,8 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
[
|
[
|
||||||
tool.Ifc.get_entity(o)
|
tool.Ifc.get_entity(o)
|
||||||
for o in objs
|
for o in objs
|
||||||
if cls.is_in_camera_view(o, camera_inverse_matrix, x, y, camera.data.clip_start, camera.data.clip_end)
|
if o
|
||||||
|
and cls.is_in_camera_view(o, camera_inverse_matrix, x, y, camera.data.clip_start, camera.data.clip_end)
|
||||||
and tool.Ifc.get_entity(o)
|
and tool.Ifc.get_entity(o)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user