diff --git a/src/bonsai/bonsai/bim/module/profile/prop.py b/src/bonsai/bonsai/bim/module/profile/prop.py index 222868e67c..391ddc75c5 100644 --- a/src/bonsai/bonsai/bim/module/profile/prop.py +++ b/src/bonsai/bonsai/bim/module/profile/prop.py @@ -73,7 +73,13 @@ class BIMProfileProperties(PropertyGroup): update=lambda self, context: bpy.ops.bim.load_profiles(), ) object_to_profile: PointerProperty( - name="Object to profile", type=bpy.types.Object, description="Object to copy the mesh to a profile" + name="Object to profile", + type=bpy.types.Object, + description=( + "Optional mesh object to use as a source for a new arbitrary profile.\n" + "Object must be a closed mesh and have at least 1 face" + ), + poll=lambda self, obj: obj.type == "MESH", ) diff --git a/src/bonsai/bonsai/bim/module/profile/ui.py b/src/bonsai/bonsai/bim/module/profile/ui.py index 410bf625b6..421ac3fc59 100644 --- a/src/bonsai/bonsai/bim/module/profile/ui.py +++ b/src/bonsai/bonsai/bim/module/profile/ui.py @@ -71,12 +71,16 @@ class BIM_PT_profiles(Panel): return row = self.layout.row(align=True) - row.prop(self.props, "profile_classes", text="") + if self.props.profile_classes == "IfcArbitraryClosedProfileDef": + split = row.split(factor=0.5, align=True) + row = split.row(align=True) + row.prop(self.props, "profile_classes", text="") + row = split.row(align=True) + row.prop(self.props, "object_to_profile", text="") + else: + row.prop(self.props, "profile_classes", text="") row.operator("bim.add_profile_def", text="", icon="ADD") row.operator("bim.duplicate_profile_def", icon="DUPLICATE", text="") - if self.props.profile_classes == "IfcArbitraryClosedProfileDef": - row = self.layout.row(align=True) - row.prop(self.props, "object_to_profile", text="Create From") self.layout.template_list( "BIM_UL_profiles",