See #5973. Only show shape aspect attributes if creating a new shape aspect to make it clearer how to use the UI.

Previously the UI for creating new aspects and reusing an existing
aspect showed simultaneously which was confusing.
This commit is contained in:
Dion Moult
2025-01-21 23:21:07 +11:00
parent 7de8427a28
commit 2452b1be50
2 changed files with 5 additions and 6 deletions
@@ -174,7 +174,7 @@ class RepresentationsData:
matching_shape_aspects.append(shape_aspect)
# blender enum items
new_shape_aspect = [("NEW", "Create A New Shape Aspect", "")]
new_shape_aspect = [("NEW", "New Shape Aspect", "")]
return new_shape_aspect + [(str(s.id()), s.Name or "Unnamed", "") for s in matching_shape_aspects]
+4 -5
View File
@@ -253,11 +253,10 @@ class BIM_PT_representation_items(Panel):
row.prop(props, "representation_item_shape_aspect", icon="SHAPEKEY_DATA", text="")
row.operator("bim.edit_representation_item_shape_aspect", icon="CHECKMARK", text="")
row.operator("bim.disable_editing_representation_item_shape_aspect", icon="CANCEL", text="")
shape_aspect_attrs = props.shape_aspect_attrs
self.layout.label(text="Shape Aspect Attributes:")
self.layout.prop(shape_aspect_attrs, "name")
self.layout.prop(shape_aspect_attrs, "description")
if props.representation_item_shape_aspect == "NEW":
shape_aspect_attrs = props.shape_aspect_attrs
self.layout.prop(shape_aspect_attrs, "name")
self.layout.prop(shape_aspect_attrs, "description")
else:
row.label(text=shape_aspect or "No Shape Aspect", icon="SHAPEKEY_DATA")
row.operator("bim.enable_editing_representation_item_shape_aspect", icon="GREASEPENCIL", text="")