mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Fix bug where you couldn't copy classes without representations.
This commit is contained in:
@@ -231,7 +231,7 @@ class CopyClass(bpy.types.Operator):
|
|||||||
self.file, {"product": self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)}
|
self.file, {"product": self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)}
|
||||||
).execute()
|
).execute()
|
||||||
IfcStore.link_element(result, obj)
|
IfcStore.link_element(result, obj)
|
||||||
if obj.data.users == 1:
|
if obj.data and obj.data.users == 1:
|
||||||
bpy.ops.bim.add_representation(obj=obj.name)
|
bpy.ops.bim.add_representation(obj=obj.name)
|
||||||
else:
|
else:
|
||||||
bpy.ops.bim.map_representations(
|
bpy.ops.bim.map_representations(
|
||||||
|
|||||||
Reference in New Issue
Block a user