[Bf-blender-cvs] [da43fde938a] greasepencil-object: Revert "GPencil: Move mix color to top of he panel"
Antonio Vazquez
noreply at git.blender.org
Fri Nov 1 19:53:48 CET 2019
Commit: da43fde938a7a0b0b3fc6effa603cbbe9cea9a94
Author: Antonio Vazquez
Date: Fri Nov 1 19:46:01 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBda43fde938a7a0b0b3fc6effa603cbbe9cea9a94
Revert "GPencil: Move mix color to top of he panel"
This reverts commit 9a252b5f5089901bd2368222f53912b8a1ef0e2f.
===================================================================
M release/scripts/startup/bl_ui/properties_paint_common.py
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index c1a3ae0dd32..98e812cf02d 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -420,13 +420,6 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact
row.prop(gp_settings, "pen_strength", slider=True)
row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
- if is_toolbar is False:
- row = layout.row(align=True)
- row.prop(gp_settings, "mix_color", text="")
- row = layout.row(align=True)
- row.template_color_picker(gp_settings, "mix_color", value_slider=True)
-
-
# FIXME: tools must use their own UI drawing!
if tool.idname in {
"builtin.arc",
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 1818950703e..2e7bdd5cc7d 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -2029,6 +2029,32 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
row.prop(gp_settings, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE')
+class VIEW3D_PT_tools_grease_pencil_brush_mixcolor(View3DPanel, Panel):
+ bl_context = ".greasepencil_paint"
+ bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_option'
+ bl_label = "Mix Color"
+ bl_category = "Tool"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ brush = context.tool_settings.gpencil_paint.brush
+ return brush is not None and brush.gpencil_tool == 'DRAW'
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ settings = context.tool_settings.gpencil_paint
+ brush = settings.brush
+ gp_settings = brush.gpencil_settings
+ row = layout.row(align=True)
+ row.prop(gp_settings, "mix_color", text="")
+ row = layout.row(align=True)
+ row.template_color_picker(gp_settings, "mix_color", value_slider=True)
+
+
# Grease Pencil drawingcurves
class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
bl_context = ".greasepencil_paint"
@@ -2275,6 +2301,7 @@ classes = (
VIEW3D_PT_gpencil_brush_presets,
VIEW3D_PT_tools_grease_pencil_brush,
VIEW3D_PT_tools_grease_pencil_brush_option,
+ VIEW3D_PT_tools_grease_pencil_brush_mixcolor,
VIEW3D_PT_tools_grease_pencil_brush_settings,
VIEW3D_PT_tools_grease_pencil_brush_stabilizer,
VIEW3D_PT_tools_grease_pencil_brush_random,
More information about the Bf-blender-cvs
mailing list