mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Simple UI to display repr item shape aspect
Example - https://i.imgur.com/YEAE9zU.png
This commit is contained in:
@@ -1597,6 +1597,10 @@ class EnableEditingRepresentationItems(bpy.types.Operator, Operator):
|
||||
new.surface_style = style.Name or "Unnamed"
|
||||
elif inverse.is_a("IfcPresentationLayerAssignment"):
|
||||
new.layer = inverse.Name or "Unnamed"
|
||||
elif inverse.is_a("IfcShapeRepresentation"):
|
||||
if inverse.OfShapeAspect:
|
||||
shape_aspect = inverse.OfShapeAspect[0]
|
||||
new.shape_aspect = shape_aspect.Name
|
||||
|
||||
|
||||
class DisableEditingRepresentationItems(bpy.types.Operator, Operator):
|
||||
|
||||
@@ -61,6 +61,7 @@ class RepresentationItem(PropertyGroup):
|
||||
surface_style: StringProperty(name="Surface Style")
|
||||
layer: StringProperty(name="Layer")
|
||||
ifc_definition_id: IntProperty(name="IFC Definition ID")
|
||||
shape_aspect: StringProperty(name="Shape Aspect")
|
||||
|
||||
|
||||
class BIMObjectGeometryProperties(PropertyGroup):
|
||||
|
||||
@@ -190,8 +190,9 @@ class BIM_PT_representation_items(Panel):
|
||||
if not item_is_active:
|
||||
return
|
||||
|
||||
surface_style = props.items[props.active_item_index].surface_style
|
||||
presentation_layer = props.items[props.active_item_index].layer
|
||||
active_item = props.items[props.active_item_index]
|
||||
surface_style = active_item.surface_style
|
||||
shape_aspect = active_item.shape_aspect
|
||||
|
||||
row = self.layout.row(align=True)
|
||||
if props.is_editing_item_style:
|
||||
@@ -210,7 +211,10 @@ class BIM_PT_representation_items(Panel):
|
||||
row.operator("bim.unassign_representation_item_style", icon="X", text="")
|
||||
|
||||
row = self.layout.row()
|
||||
row.label(text=presentation_layer or "No Presentation Layer", icon="STICKY_UVS_LOC")
|
||||
row.label(text=active_item.layer or "No Presentation Layer", icon="STICKY_UVS_LOC")
|
||||
|
||||
row = self.layout.row()
|
||||
row.label(text=shape_aspect or "No Shape Aspect", icon="SHAPEKEY_DATA")
|
||||
|
||||
|
||||
class BIM_PT_connections(Panel):
|
||||
|
||||
Reference in New Issue
Block a user