create_camera - small optimization with early return

This commit is contained in:
Andrej730
2025-04-24 18:49:01 +05:00
parent 82f25f50cc
commit fd30a6b5eb
+1 -1
View File
@@ -831,7 +831,7 @@ class Loader(bonsai.core.tool.Loader):
depth = max(z) - min(z)
camera_type = "ORTHO"
if "IfcRectangularPyramid" in {e.is_a() for e in tool.Ifc.get().traverse(representation)}:
if "IfcRectangularPyramid" in next(e.is_a() for e in tool.Ifc.get().traverse(representation)):
camera_type = "PERSP"
camera = bpy.data.cameras.new(tool.Loader.get_mesh_name_from_shape(geometry))