Fix error when trying to assign representation to non-mesh object

This commit is contained in:
Gorgious
2021-08-25 12:30:20 +02:00
parent 1d20f88053
commit d30333de24
@@ -95,7 +95,7 @@ class AddRepresentation(bpy.types.Operator):
if not obj.BIMObjectProperties.ifc_definition_id:
continue
bpy.ops.bim.edit_object_placement(obj=obj.name)
if not obj.data:
if not obj.data or not hasattr(obj.data, "polygons"):
continue
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)