[Bf-blender-cvs] [4235fcce38d] greasepencil-object: GPencil: Hide mix color in Topbar depending of material type
Antonio Vazquez
noreply at git.blender.org
Fri Nov 1 20:14:05 CET 2019
Commit: 4235fcce38de2cc2a3f99ee7f4ab03b99bdb8850
Author: Antonio Vazquez
Date: Fri Nov 1 20:13:53 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB4235fcce38de2cc2a3f99ee7f4ab03b99bdb8850
GPencil: Hide mix color in Topbar depending of material type
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 064063bf839..2a6b1b42e21 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -913,9 +913,10 @@ class GreasePencilMaterialsPanel:
# Mix color
if is_view3d and brush is not None:
- gp_settings = brush.gpencil_settings
- row = layout.row()
- row.prop(gp_settings, "mix_color", text="Mix Color")
+ if gpcolor.stroke_style == 'SOLID' or gpcolor.use_stroke_pattern:
+ gp_settings = brush.gpencil_settings
+ row = layout.row()
+ row.prop(gp_settings, "mix_color", text="Mix Color")
else:
space = context.space_data
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index b01104215e5..d6e47e4bee0 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -346,8 +346,10 @@ class _draw_tool_settings_context_mode:
)
row.prop(gp_settings, "use_material_pin", text="")
- row.separator(factor=0.4)
- row.prop(gp_settings, "mix_color", text="")
+
+ if ma and (ma.grease_pencil.stroke_style != 'TEXTURE' or ma.grease_pencil.use_stroke_pattern):
+ row.separator(factor=0.4)
+ row.prop(gp_settings, "mix_color", text="")
row = layout.row(align=True)
tool_settings = context.scene.tool_settings
More information about the Bf-blender-cvs
mailing list