mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
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:
@@ -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"
|
||||
|
||||
@@ -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="")
|
||||
|
||||
Reference in New Issue
Block a user