mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
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:
@@ -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]
|
||||
|
||||
|
||||
|
||||
@@ -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="")
|
||||
|
||||
Reference in New Issue
Block a user