Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2018-05-30 20:53:46 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-05-30 20:57:51 +0300
commiteb0fcd4574aaac732045058dce71a17f6900384c (patch)
tree9ffde9d78dae0bb6588f45a459307389ef09877f /release
parent1f693aefca052918d308082f752f388d487f39b6 (diff)
Generic Viewport Panel for Materials
Is enabled for all render engines as workbench will be rendering SOLID/Texture modes and uses these settings.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 9b70c8f22d4..56e87f3799e 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -215,6 +215,25 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
row.prop(mat, "use_sss_translucency")
+class MATERIAL_PT_viewport(MaterialButtonsPanel, Panel):
+ bl_label = "Viewport"
+ bl_context = "material"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.material
+
+ def draw(self, context):
+ mat = context.material
+
+ layout = self.layout
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.prop(mat, "diffuse_color")
+
+
classes = (
MATERIAL_MT_specials,
MATERIAL_UL_matslots,
@@ -223,8 +242,10 @@ classes = (
EEVEE_MATERIAL_PT_context_material,
EEVEE_MATERIAL_PT_surface,
EEVEE_MATERIAL_PT_options,
+ MATERIAL_PT_viewport,
)
+
if __name__ == "__main__": # only for live edit.
from bpy.utils import register_class
for cls in classes: