mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-05 20:06:25 +00:00
Small fix in aggregate move selection.
This commit is contained in:
committed by
Bruno Perdigão
parent
6d9ee8828e
commit
c48f50a67e
@@ -1877,12 +1877,16 @@ class OverrideModeSetEdit(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
selected_objs = context.selected_objects # Purposely exclude active object
|
selected_objs = context.selected_objects # Purposely exclude active object
|
||||||
|
|
||||||
if self.has_aggregates(selected_objs):
|
if self.has_aggregates(selected_objs):
|
||||||
self.report({"INFO"}, "One or more selected objects belong to an aggregate. Please enter Aggregate Mode to edit them.")
|
if not context.scene.BIMAggregateProperties.in_aggregate_mode:
|
||||||
return {"FINISHED"}
|
bonsai.core.aggregate.enable_aggregate_mode(tool.Aggregate, context.active_object)
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
if len(selected_objs) == 1 and context.active_object == selected_objs[0]:
|
if len(selected_objs) == 1 and context.active_object == selected_objs[0]:
|
||||||
self.handle_single_object(context, context.active_object)
|
self.handle_single_object(context, context.active_object)
|
||||||
elif len(selected_objs) == 0:
|
elif len(selected_objs) == 0:
|
||||||
|
if context.scene.BIMAggregateProperties.in_aggregate_mode:
|
||||||
|
bonsai.core.aggregate.disable_aggregate_mode(tool.Aggregate)
|
||||||
|
return {"FINISHED"}
|
||||||
tool.Geometry.disable_item_mode()
|
tool.Geometry.disable_item_mode()
|
||||||
elif len(selected_objs) > 1:
|
elif len(selected_objs) > 1:
|
||||||
self.handle_multiple_selected_objects(context)
|
self.handle_multiple_selected_objects(context)
|
||||||
@@ -2915,11 +2919,14 @@ class OverrideMoveAggregate(bpy.types.Operator):
|
|||||||
self.new_active_obj = None
|
self.new_active_obj = None
|
||||||
if obj in not_editing_objs:
|
if obj in not_editing_objs:
|
||||||
obj.select_set(False)
|
obj.select_set(False)
|
||||||
print("foi")
|
|
||||||
break
|
break
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not element or props.in_aggregate_mode:
|
if not element or props.in_aggregate_mode:
|
||||||
continue
|
continue
|
||||||
|
parts = ifcopenshell.util.element.get_parts(element)
|
||||||
|
if parts:
|
||||||
|
aggregates_to_move.append(tool.Ifc.get_object(element))
|
||||||
|
continue
|
||||||
aggregate = ifcopenshell.util.element.get_aggregate(element)
|
aggregate = ifcopenshell.util.element.get_aggregate(element)
|
||||||
if aggregate:
|
if aggregate:
|
||||||
aggregates_to_move.append(tool.Ifc.get_object(aggregate))
|
aggregates_to_move.append(tool.Ifc.get_object(aggregate))
|
||||||
|
|||||||
Reference in New Issue
Block a user