Skip to content

Commit

Permalink
Added diffuse_color inside IFC Style panel
Browse files Browse the repository at this point in the history
  • Loading branch information
theoryshaw authored and Moult committed Nov 18, 2022
1 parent f850bd5 commit caa4445
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/blenderbim/blenderbim/bim/module/style/ui.py
Expand Up @@ -20,6 +20,9 @@
from bpy.types import Panel, UIList
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim.module.style.data import StylesData, StyleAttributesData
from bl_ui.properties_material import MaterialButtonsPanel




class BIM_PT_styles(Panel):
Expand Down Expand Up @@ -64,7 +67,7 @@ def draw(self, context):
self.layout.template_list("BIM_UL_styles", "", self.props, "styles", self.props, "active_style_index")


class BIM_PT_style(Panel):
class BIM_PT_style(MaterialButtonsPanel, Panel):
bl_label = "IFC Style"
bl_idname = "BIM_PT_style"
bl_space_type = "PROPERTIES"
Expand All @@ -81,12 +84,16 @@ def poll(cls, context):

def draw(self, context):
props = context.active_object.active_material.BIMMaterialProperties
mat = context.material
row = self.layout.row(align=True)
if props.ifc_style_id:
row.operator("bim.update_style_colours", icon="GREASEPENCIL")
row.operator("bim.update_style_textures", icon="TEXTURE", text="")
row.operator("bim.unlink_style", icon="UNLINKED", text="")
row.operator("bim.remove_style", icon="X", text="").style = props.ifc_style_id
row = self.layout.row(align=True)
row.prop(mat, "diffuse_color", text="Color")

else:
row.operator("bim.add_style", icon="ADD")

Expand Down

0 comments on commit caa4445

Please sign in to comment.