mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
create_camera - small optimization with early return
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user