mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
Fix error when trying to assign representation to non-mesh object
This commit is contained in:
@@ -95,7 +95,7 @@ class AddRepresentation(bpy.types.Operator):
|
|||||||
if not obj.BIMObjectProperties.ifc_definition_id:
|
if not obj.BIMObjectProperties.ifc_definition_id:
|
||||||
continue
|
continue
|
||||||
bpy.ops.bim.edit_object_placement(obj=obj.name)
|
bpy.ops.bim.edit_object_placement(obj=obj.name)
|
||||||
if not obj.data:
|
if not obj.data or not hasattr(obj.data, "polygons"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user