Fix #6513. Bug where OBJ not found when adding element.

This was actually fixed earlier already due to restructuring of
structural element authoring (i.e. the representation_template items now
always has OBJ unless it is a structural item)
This commit is contained in:
Dion Moult
2025-05-26 16:45:35 +10:00
parent 8766cad37e
commit a74f1c6e08
@@ -63,6 +63,13 @@ def refresh_classes(self: "BIMRootProperties", context: bpy.types.Context) -> No
self.representation_template = "EXTRUSION" self.representation_template = "EXTRUSION"
self.representation_obj = None self.representation_obj = None
elif (obj := tool.Blender.get_active_object(is_selected=True)) and obj.type == "MESH": elif (obj := tool.Blender.get_active_object(is_selected=True)) and obj.type == "MESH":
if (
self.ifc_class.startswith("IfcStructuralPoint")
or self.ifc_class.startswith("IfcStructuralCurve")
or self.ifc_class.startswith("IfcStructuralSurface")
):
pass # Implement auto association?
else:
self.representation_template = "OBJ" self.representation_template = "OBJ"
self.representation_obj = obj self.representation_obj = obj