mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Going in and out of AGGREGATE mode doesn't overwrite other objects' display type anymore
This commit is contained in:
@@ -101,6 +101,7 @@ class BIMObjectAggregateProperties(PropertyGroup):
|
|||||||
|
|
||||||
class Objects(bpy.types.PropertyGroup):
|
class Objects(bpy.types.PropertyGroup):
|
||||||
obj: PointerProperty(type=bpy.types.Object)
|
obj: PointerProperty(type=bpy.types.Object)
|
||||||
|
previous_display_type: bpy.props.StringProperty(default="TEXTURED")
|
||||||
|
|
||||||
|
|
||||||
class BIMAggregateProperties(PropertyGroup):
|
class BIMAggregateProperties(PropertyGroup):
|
||||||
|
|||||||
@@ -174,9 +174,10 @@ class Aggregate(bonsai.core.tool.Aggregate):
|
|||||||
if obj.original not in parts_objs:
|
if obj.original not in parts_objs:
|
||||||
if obj == props.editing_aggregate:
|
if obj == props.editing_aggregate:
|
||||||
continue
|
continue
|
||||||
obj.original.display_type = "WIRE"
|
|
||||||
not_editing_obj = props.not_editing_objects.add()
|
not_editing_obj = props.not_editing_objects.add()
|
||||||
not_editing_obj.obj = obj.original
|
not_editing_obj.obj = obj.original
|
||||||
|
not_editing_obj.previous_display_type = obj.original.display_type
|
||||||
|
obj.original.display_type = "WIRE"
|
||||||
else:
|
else:
|
||||||
editing_obj = props.editing_objects.add()
|
editing_obj = props.editing_objects.add()
|
||||||
editing_obj.obj = obj.original
|
editing_obj.obj = obj.original
|
||||||
@@ -190,9 +191,9 @@ class Aggregate(bonsai.core.tool.Aggregate):
|
|||||||
def disable_aggregate_mode(cls):
|
def disable_aggregate_mode(cls):
|
||||||
context = bpy.context
|
context = bpy.context
|
||||||
props = context.scene.BIMAggregateProperties
|
props = context.scene.BIMAggregateProperties
|
||||||
objs = [o.obj for o in props.not_editing_objects]
|
for obj_prop in props.not_editing_objects:
|
||||||
for obj in objs:
|
obj = obj_prop.obj
|
||||||
obj.original.display_type = "TEXTURED"
|
obj.original.display_type = obj_prop.previous_display_type
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not element:
|
if not element:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user