Add error message on representation type mismatch #5793

Instead of failing silently
This commit is contained in:
Andrej730
2024-11-26 11:51:03 +05:00
parent 3856b281ea
commit c228866f51
@@ -1693,7 +1693,12 @@ class OverrideJoin(bpy.types.Operator, tool.Ifc.Operator):
obj_rep = ifc_file.by_id(obj.data.BIMMeshProperties.ifc_definition_id)
if obj_rep.RepresentationType != representation_type:
obj.select_set(False)
continue
self.report(
{"ERROR"},
f"IFC join failed - object '{obj}' has a different representation type "
f"({obj_rep.RepresentationType}) than target '{self.target}' ({representation_type}).",
)
return
placement = np.array(obj.matrix_world)
placement[:, 3][:3] /= si_conversion