mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Change profile object UI #5796
example - https://imgchest.com/p/qb4zwj6ad4j 1) moved profile object selection to the same row as the profile type selection, so it will more noticable that they're related 2) added object requirements in the description 3) filtered only mesh objects to appear in the dropdown
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user