mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 15:16:23 +00:00
Minor bugfix to allow unaggregation of hidden elements
This commit is contained in:
@@ -76,7 +76,7 @@ class BIM_OT_aggregate_unassign_object(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
for obj in bpy.context.selected_objects:
|
for obj in tool.Blender.get_selected_objects():
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not element:
|
if not element:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ from natsort import natsorted
|
|||||||
class Spatial(bonsai.core.tool.Spatial):
|
class Spatial(bonsai.core.tool.Spatial):
|
||||||
@classmethod
|
@classmethod
|
||||||
def can_contain(cls, container: ifcopenshell.entity_instance, element_obj: Union[bpy.types.Object, None]) -> bool:
|
def can_contain(cls, container: ifcopenshell.entity_instance, element_obj: Union[bpy.types.Object, None]) -> bool:
|
||||||
element = tool.Ifc.get_entity(element_obj)
|
if not (element := tool.Ifc.get_entity(element_obj)):
|
||||||
if not element:
|
|
||||||
return False
|
return False
|
||||||
if tool.Ifc.get_schema() == "IFC2X3":
|
if tool.Ifc.get_schema() == "IFC2X3":
|
||||||
if not container.is_a("IfcSpatialStructureElement"):
|
if not container.is_a("IfcSpatialStructureElement"):
|
||||||
|
|||||||
Reference in New Issue
Block a user