From caa4445eb0ddf5bf6cd82a27c4b402a5e1197b5e Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Thu, 17 Nov 2022 15:05:35 -0600 Subject: [PATCH] Added diffuse_color inside IFC Style panel --- src/blenderbim/blenderbim/bim/module/style/ui.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/style/ui.py b/src/blenderbim/blenderbim/bim/module/style/ui.py index b4e573d101..afcf053316 100644 --- a/src/blenderbim/blenderbim/bim/module/style/ui.py +++ b/src/blenderbim/blenderbim/bim/module/style/ui.py @@ -20,6 +20,9 @@ import blenderbim.bim.helper 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): @@ -64,7 +67,7 @@ class BIM_PT_styles(Panel): 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" @@ -81,12 +84,16 @@ class BIM_PT_style(Panel): 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")