mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Don't create orientation slots for all spaces
Trying to create orientation slots for all spaces could potentially involve a lot of duplicate method calls because blender has no way to query the list of existing orientation slots, so we can't check to see if setting a slot is necessary. So this patch now simply creates/overwrites and uses a single orientation slot whenever the user switches the default spatial container, and then only if the spatial orientation is non-world.
This commit is contained in:
@@ -239,7 +239,6 @@ class ImportSpatialDecomposition(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
core.import_spatial_decomposition(tool.Spatial)
|
||||
core.create_orientation_slots(ifc=tool.Ifc, spatial=tool.Spatial)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
@@ -121,11 +121,6 @@ def import_spatial_decomposition(spatial: tool.Spatial) -> None:
|
||||
spatial.import_spatial_decomposition()
|
||||
|
||||
|
||||
def create_orientation_slots(ifc: tool.Ifc, spatial: tool.Spatial) -> None:
|
||||
products = ifc.get().by_type("IfcSpatialElement")
|
||||
spatial.create_orientation_slots(products, use=False)
|
||||
|
||||
|
||||
def set_orientation_slot(spatial: tool.Spatial, product: ifcopenshell.entity_instance) -> None:
|
||||
spatial.create_orientation_slots([product], use=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user