Allow aggregate to me moved while in aggregate mode without moving its parts.

This commit is contained in:
Bruno Perdigão
2024-12-12 11:49:22 -03:00
committed by Bruno Perdigão
parent 87fee0b850
commit 3874d19caa
2 changed files with 6 additions and 6 deletions
@@ -286,9 +286,11 @@ class AggregateModeDecorator:
self.line_shader.bind()
self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height))
self.line_shader.uniform_float("lineWidth", 2.0)
color = self.addon_prefs.decorator_color_selected
theme = context.preferences.themes.items()[0][1]
selected_object_color = (*theme.view_3d.object_active, 1)
color = self.addon_prefs.decorator_color_selected
if aggregate_obj in context.selected_objects:
color = selected_object_color
size = aggregate_obj.empty_display_size
location = aggregate_obj.location
line_x = (location - Vector((size, 0.0, 0.0)), location + Vector((size, 0.0, 0.0)))
+3 -5
View File
@@ -135,11 +135,7 @@ class Aggregate(bonsai.core.tool.Aggregate):
objs.append(obj.original)
for obj in objs:
if obj.original not in parts_objs:
try:
is_element_assembly = tool.Ifc.get_entity(obj.original).is_a("IfcElementAssembly")
except:
is_element_assembly = False
if not obj.data and not is_element_assembly:
if obj == props.editing_aggregate:
continue
obj.original.display_type = "WIRE"
not_editing_obj = props.not_editing_objects.add()
@@ -147,6 +143,7 @@ class Aggregate(bonsai.core.tool.Aggregate):
else:
editing_obj = props.editing_objects.add()
editing_obj.obj = obj.original
tool.Aggregate.apply_constraints(obj.original)
props.in_aggregate_mode = True
return {"FINISHED"}
@@ -162,6 +159,7 @@ class Aggregate(bonsai.core.tool.Aggregate):
if not element:
continue
tool.Aggregate.constrain_parts_to_aggregate(props.editing_aggregate)
props.in_aggregate_mode = False
props.not_editing_objects.clear()
props.editing_objects.clear()