Fix bim.profiles_ui_select button in profiles set ui

It was using IfcMaterialProfile id instead of IfcProfileDef id, so profile was never selected
Example - https://imgur.com/a/Sf1ghPO
This commit is contained in:
Andrej730
2025-03-06 17:03:48 +05:00
parent b5260d3005
commit 188ca3e402
2 changed files with 3 additions and 1 deletions
@@ -274,6 +274,8 @@ class ObjectMaterialData:
"icon": icon,
"material_id": material_id,
}
if item.is_a("IfcMaterialProfile"):
data["profile_id"] = item.Profile.id()
if item.is_a("IfcMaterialProfile") and not item.Name:
if item.Profile:
data["name"] = item.Profile.ProfileName or "Unnamed"
+1 -1
View File
@@ -318,7 +318,7 @@ class BIM_PT_object_material(Panel):
):
if "Profile" in ObjectMaterialData.data["material_class"]:
op = row.operator("bim.profiles_ui_select", icon="ZOOM_SELECTED", text="")
op.profile_id = set_item["id"]
op.profile_id = set_item["profile_id"]
op = row.operator("bim.enable_editing_material_set_item_profile", icon="ITALIC", text="")
op.material_set_item = set_item["id"]
op = row.operator("bim.enable_editing_material_set_item", icon="GREASEPENCIL", text="")