[Bf-blender-cvs] [7929e47e77c] greasepencil-object: GPencil: More tweaks to UI panels

Antonio Vazquez noreply at git.blender.org
Fri Nov 22 17:38:37 CET 2019


Commit: 7929e47e77ceaea01f2d44f748a0f1ffbe51c967
Author: Antonio Vazquez
Date:   Fri Nov 22 17:38:22 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB7929e47e77ceaea01f2d44f748a0f1ffbe51c967

GPencil: More tweaks to UI panels

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
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_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 8555ba222ac..4c9318235d2 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -225,7 +225,7 @@ class GreasePencilStrokeEditPanel:
 
 
 class GreasePencilSculptOptionsPanel:
-    bl_label = "Sculpt Strokes"
+    bl_label = "Options"
 
     @classmethod
     def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 87939cfd27e..9bee49cbdb1 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -465,7 +465,8 @@ def brush_basic_gpencil_sculpt_settings(layout, _context, brush, tool, *, compac
     if compact:
         if tool in {'THICKNESS', 'STRENGTH', 'PINCH', 'TWIST'}:
             row.separator()
-            row.prop(gp_settings, "direction", expand=True, text="")
+            row.prop_enum(gp_settings, "direction", value='ADD', text="")
+            row.prop_enum(gp_settings, "direction", value='SUBTRACT', text="")
     else:
         use_property_split_prev = layout.use_property_split
         layout.use_property_split = False
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 0f071f8d13d..6b64ba298b5 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -2256,6 +2256,9 @@ class VIEW3D_PT_tools_grease_pencil_vertex_brush(View3DPanel, Panel):
     def poll(cls, context):
         is_3d_view = context.space_data.type == 'VIEW_3D'
         if is_3d_view:
+            if context.region.type == 'TOOL_HEADER':
+                return False
+
             if context.gpencil_data is None:
                 return False
 
@@ -2477,6 +2480,12 @@ class VIEW3D_PT_tools_grease_pencil_sculpt(View3DPanel, Panel):
     def poll(cls, context):
         is_3d_view = context.space_data.type == 'VIEW_3D'
         if is_3d_view:
+            if context.region.type == 'TOOL_HEADER':
+                brush = context.tool_settings.gpencil_sculpt_paint.brush
+                tool = brush.gpencil_sculpt_tool
+                if tool not in {'SMOOTH', 'RANDOMIZE'}:
+                    return False
+            
             if context.gpencil_data is None:
                 return False
 
@@ -2519,6 +2528,9 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel):
     def poll(cls, context):
         is_3d_view = context.space_data.type == 'VIEW_3D'
         if is_3d_view:
+            if context.region.type == 'TOOL_HEADER':
+                return False
+
             if context.gpencil_data is None:
                 return False
 
@@ -2566,7 +2578,7 @@ class VIEW3D_PT_tools_grease_pencil_sculpt_appearance(GreasePencilAppearancePane
 
 class VIEW3D_PT_tools_grease_pencil_sculpt_options(GreasePencilSculptOptionsPanel, View3DPanel, Panel):
     bl_context = ".greasepencil_sculpt"
-    bl_label = "Sculpt Strokes"
+    bl_label = "Options"
     bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_sculpt'
     bl_category = "Tool"



More information about the Bf-blender-cvs mailing list