mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
Allow aggregate to me moved while in aggregate mode without moving its parts.
This commit is contained in:
committed by
Bruno Perdigão
parent
87fee0b850
commit
3874d19caa
@@ -286,9 +286,11 @@ class AggregateModeDecorator:
|
|||||||
self.line_shader.bind()
|
self.line_shader.bind()
|
||||||
self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height))
|
self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height))
|
||||||
self.line_shader.uniform_float("lineWidth", 2.0)
|
self.line_shader.uniform_float("lineWidth", 2.0)
|
||||||
color = self.addon_prefs.decorator_color_selected
|
|
||||||
theme = context.preferences.themes.items()[0][1]
|
theme = context.preferences.themes.items()[0][1]
|
||||||
selected_object_color = (*theme.view_3d.object_active, 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
|
size = aggregate_obj.empty_display_size
|
||||||
location = aggregate_obj.location
|
location = aggregate_obj.location
|
||||||
line_x = (location - Vector((size, 0.0, 0.0)), location + Vector((size, 0.0, 0.0)))
|
line_x = (location - Vector((size, 0.0, 0.0)), location + Vector((size, 0.0, 0.0)))
|
||||||
|
|||||||
@@ -135,11 +135,7 @@ class Aggregate(bonsai.core.tool.Aggregate):
|
|||||||
objs.append(obj.original)
|
objs.append(obj.original)
|
||||||
for obj in objs:
|
for obj in objs:
|
||||||
if obj.original not in parts_objs:
|
if obj.original not in parts_objs:
|
||||||
try:
|
if obj == props.editing_aggregate:
|
||||||
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:
|
|
||||||
continue
|
continue
|
||||||
obj.original.display_type = "WIRE"
|
obj.original.display_type = "WIRE"
|
||||||
not_editing_obj = props.not_editing_objects.add()
|
not_editing_obj = props.not_editing_objects.add()
|
||||||
@@ -147,6 +143,7 @@ class Aggregate(bonsai.core.tool.Aggregate):
|
|||||||
else:
|
else:
|
||||||
editing_obj = props.editing_objects.add()
|
editing_obj = props.editing_objects.add()
|
||||||
editing_obj.obj = obj.original
|
editing_obj.obj = obj.original
|
||||||
|
tool.Aggregate.apply_constraints(obj.original)
|
||||||
|
|
||||||
props.in_aggregate_mode = True
|
props.in_aggregate_mode = True
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
@@ -162,6 +159,7 @@ class Aggregate(bonsai.core.tool.Aggregate):
|
|||||||
if not element:
|
if not element:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
tool.Aggregate.constrain_parts_to_aggregate(props.editing_aggregate)
|
||||||
props.in_aggregate_mode = False
|
props.in_aggregate_mode = False
|
||||||
props.not_editing_objects.clear()
|
props.not_editing_objects.clear()
|
||||||
props.editing_objects.clear()
|
props.editing_objects.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user