diff --git a/src/blenderbim/blenderbim/bim/module/profile/prop.py b/src/blenderbim/blenderbim/bim/module/profile/prop.py index 2939173ffe..89f7ed401c 100644 --- a/src/blenderbim/blenderbim/bim/module/profile/prop.py +++ b/src/blenderbim/blenderbim/bim/module/profile/prop.py @@ -43,8 +43,13 @@ def get_profile_classes(self, context): return ProfileData.data["profile_classes"] +def update_profile_name(self: "Profile", context: bpy.types.Context) -> None: + profile = tool.Ifc.get().by_id(self.ifc_definition_id) + profile.ProfileName = self.name + + class Profile(PropertyGroup): - name: StringProperty(name="Name") + name: StringProperty(name="Name", update=update_profile_name) ifc_class: StringProperty(name="IFC Class") ifc_definition_id: IntProperty(name="IFC Definition ID") diff --git a/src/blenderbim/blenderbim/bim/module/profile/ui.py b/src/blenderbim/blenderbim/bim/module/profile/ui.py index f1bce17c83..9ce74affdb 100644 --- a/src/blenderbim/blenderbim/bim/module/profile/ui.py +++ b/src/blenderbim/blenderbim/bim/module/profile/ui.py @@ -110,7 +110,7 @@ class BIM_UL_profiles(UIList): props = context.scene.BIMProfileProperties if item: row = layout.row(align=True) - row.label(text=item.name or "Unnamed") + row.prop(item, "name", text="", emboss=False) row.label(text=item.ifc_class) if props.active_profile_id == item.ifc_definition_id: