mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +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
|
||||
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]:
|
||||
props = camera.data.BIMCameraProperties
|
||||
x = props.width
|
||||
@@ -1886,7 +1886,8 @@ class Drawing(bonsai.core.tool.Drawing):
|
||||
[
|
||||
tool.Ifc.get_entity(o)
|
||||
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)
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user