Material set profile attributes now show a description on right click

+ added link to docs to Material set profile attributes and Material set item
This commit is contained in:
Gorgious56
2022-10-28 14:39:36 +02:00
parent b984268b5d
commit 37a0854d40
@@ -625,6 +625,7 @@ class EnableEditingMaterialSetItem(bpy.types.Operator):
elif data_type == "boolean":
new.bool_value = False if new.is_null else material_set_item_data[attribute.name()]
blenderbim.bim.helper.add_attribute_description(material_set_item.is_a(), new)
new.ifc_class = material_set_item.is_a()
def load_profile_attributes(self, material_set_item, material_set_item_data):
self.props.material_set_item_profile_attributes.clear()
@@ -658,6 +659,9 @@ class EnableEditingMaterialSetItem(bpy.types.Operator):
if profile_data[attribute.name()]:
new.enum_value = profile_data[attribute.name()]
blenderbim.bim.helper.add_attribute_description(profile.is_a(), new)
new.ifc_class = profile.is_a()
# Force null to be false if the attribute is mandatory because when we first assign a profile, all of
# its fields are null (which is illegal).
# TODO: find a better solution.