mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +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"
|
new.surface_style = style.Name or "Unnamed"
|
||||||
elif inverse.is_a("IfcPresentationLayerAssignment"):
|
elif inverse.is_a("IfcPresentationLayerAssignment"):
|
||||||
new.layer = inverse.Name or "Unnamed"
|
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):
|
class DisableEditingRepresentationItems(bpy.types.Operator, Operator):
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class RepresentationItem(PropertyGroup):
|
|||||||
surface_style: StringProperty(name="Surface Style")
|
surface_style: StringProperty(name="Surface Style")
|
||||||
layer: StringProperty(name="Layer")
|
layer: StringProperty(name="Layer")
|
||||||
ifc_definition_id: IntProperty(name="IFC Definition ID")
|
ifc_definition_id: IntProperty(name="IFC Definition ID")
|
||||||
|
shape_aspect: StringProperty(name="Shape Aspect")
|
||||||
|
|
||||||
|
|
||||||
class BIMObjectGeometryProperties(PropertyGroup):
|
class BIMObjectGeometryProperties(PropertyGroup):
|
||||||
|
|||||||
@@ -190,8 +190,9 @@ class BIM_PT_representation_items(Panel):
|
|||||||
if not item_is_active:
|
if not item_is_active:
|
||||||
return
|
return
|
||||||
|
|
||||||
surface_style = props.items[props.active_item_index].surface_style
|
active_item = props.items[props.active_item_index]
|
||||||
presentation_layer = props.items[props.active_item_index].layer
|
surface_style = active_item.surface_style
|
||||||
|
shape_aspect = active_item.shape_aspect
|
||||||
|
|
||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
if props.is_editing_item_style:
|
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.operator("bim.unassign_representation_item_style", icon="X", text="")
|
||||||
|
|
||||||
row = self.layout.row()
|
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):
|
class BIM_PT_connections(Panel):
|
||||||
|
|||||||
Reference in New Issue
Block a user