Minor bugfix to allow unaggregation of hidden elements

This commit is contained in:
Dion Moult
2024-09-11 13:45:11 +10:00
parent bad6931a84
commit f8f3519a68
2 changed files with 2 additions and 3 deletions
@@ -76,7 +76,7 @@ class BIM_OT_aggregate_unassign_object(bpy.types.Operator, tool.Ifc.Operator):
bl_options = {"REGISTER", "UNDO"}
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)
if not element:
continue
+1 -2
View File
@@ -48,8 +48,7 @@ from natsort import natsorted
class Spatial(bonsai.core.tool.Spatial):
@classmethod
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:
if not (element := tool.Ifc.get_entity(element_obj)):
return False
if tool.Ifc.get_schema() == "IFC2X3":
if not container.is_a("IfcSpatialStructureElement"):