mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Small styles UI tweaks
- fixed a typo in bim.select_by_style - added note to clarify what Shade/Render/Texture/Lighting/etc buttons do and moved style selection block at the beggining (maybe it's just me but when edit buttons are above selection ui it seemed like they affect all the styles somehow, not just the currently active one), so it will be more intuitive Before: https://i.imgur.com/jRSTLGI.png After: https://i.imgur.com/8ih4qSX.png
This commit is contained in:
@@ -401,7 +401,7 @@ class LoadStyles(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
class SelectByStyle(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.select_by_style"
|
||||
bl_label = "Select By Material"
|
||||
bl_label = "Select By Style"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
style: bpy.props.IntProperty()
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ class BIM_PT_styles(Panel):
|
||||
row.operator("bim.load_styles", text="", icon="IMPORT").style_type = self.props.style_type
|
||||
return
|
||||
|
||||
self.layout.template_list("BIM_UL_styles", "", self.props, "styles", self.props, "active_style_index")
|
||||
|
||||
if self.props.is_adding:
|
||||
box = self.layout.box()
|
||||
row = box.row()
|
||||
@@ -80,6 +82,7 @@ class BIM_PT_styles(Panel):
|
||||
row.operator("bim.remove_style", text="", icon="X").style = style.ifc_definition_id
|
||||
|
||||
if self.props.style_type == "IfcSurfaceStyle":
|
||||
self.layout.label(text="Choose current style's aspect to edit:")
|
||||
col = self.layout.column(align=True)
|
||||
|
||||
row = col.row(align=True)
|
||||
@@ -104,8 +107,6 @@ class BIM_PT_styles(Panel):
|
||||
op.ifc_class = "IfcExternallyDefinedSurfaceStyle"
|
||||
op.style = style.ifc_definition_id
|
||||
|
||||
self.layout.template_list("BIM_UL_styles", "", self.props, "styles", self.props, "active_style_index")
|
||||
|
||||
if self.props.is_editing_style:
|
||||
if self.props.is_editing_class == "IfcSurfaceStyle":
|
||||
blenderbim.bim.helper.draw_attributes(self.props.attributes, self.layout)
|
||||
@@ -118,6 +119,9 @@ class BIM_PT_styles(Panel):
|
||||
self.draw_surface_style_rendering()
|
||||
elif self.props.is_editing_class == "IfcExternallyDefinedSurfaceStyle":
|
||||
self.draw_externally_defined_surface_style()
|
||||
else:
|
||||
# TODO: UI for Texture, Lighting, Refract
|
||||
self.layout.label(text=f"{self.props.is_editing_class} UI is not yet supported.")
|
||||
|
||||
def draw_surface_style_shading(self):
|
||||
row = self.layout.row()
|
||||
|
||||
Reference in New Issue
Block a user