mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
assign_class - replace object with empty if no representation was added
Same goal as ffffcc576e - prevent user confusion when they reload IFC file and see the representation is gone.
This commit is contained in:
@@ -302,7 +302,11 @@ class AssignClass(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
context=ifc_context,
|
context=ifc_context,
|
||||||
ifc_representation_class=self.ifc_representation_class,
|
ifc_representation_class=self.ifc_representation_class,
|
||||||
)
|
)
|
||||||
tool.Geometry.reload_representation(obj)
|
representation = tool.Geometry.get_active_representation(obj)
|
||||||
|
if representation:
|
||||||
|
tool.Geometry.reload_representation(obj)
|
||||||
|
elif obj.data is not None:
|
||||||
|
new_obj = tool.Geometry.recreate_object_with_data(obj, None)
|
||||||
|
|
||||||
# TODO: reload representation might lead to the object being replaced by object of the other type.
|
# TODO: reload representation might lead to the object being replaced by object of the other type.
|
||||||
# We probably should track it somehow and keep the original selection.
|
# We probably should track it somehow and keep the original selection.
|
||||||
|
|||||||
Reference in New Issue
Block a user