[Bf-blender-cvs] [89a66633f1d] blender2.8: UI: split grease pencil brush curves into subpanels.

William Reynish noreply at git.blender.org
Fri Nov 9 18:06:38 CET 2018


Commit: 89a66633f1d039b2adf11de320812f8524d246a7
Author: William Reynish
Date:   Fri Nov 9 18:03:34 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB89a66633f1d039b2adf11de320812f8524d246a7

UI: split grease pencil brush curves into subpanels.

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

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

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

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 07ebfb36f7d..9ac1023185a 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1692,6 +1692,16 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
         brush = context.active_gpencil_brush
         return brush is not None and brush.gpencil_tool != 'ERASE'
 
+    @staticmethod
+    def draw(self, context):
+        layout = self.layout
+
+
+class VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity(View3DPanel, Panel):
+    bl_context = ".greasepencil_paint"
+    bl_label = "Sensitivity"
+    bl_parent_id ="VIEW3D_PT_tools_grease_pencil_brushcurves"
+
     @staticmethod
     def draw(self, context):
         layout = self.layout
@@ -1700,14 +1710,38 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
         brush = context.active_gpencil_brush
         gp_settings = brush.gpencil_settings
 
-        # Brush
-        layout.label(text="Sensitivity")
         layout.template_curve_mapping(gp_settings, "curve_sensitivity", brush=True)
 
-        layout.label(text="Strength")
+
+class VIEW3D_PT_tools_grease_pencil_brushcurves_strength(View3DPanel, Panel):
+    bl_context = ".greasepencil_paint"
+    bl_label = "Strength"
+    bl_parent_id ="VIEW3D_PT_tools_grease_pencil_brushcurves"
+
+    @staticmethod
+    def draw(self, context):
+        layout = self.layout
+        layout.use_property_split = True
+
+        brush = context.active_gpencil_brush
+        gp_settings = brush.gpencil_settings
+
         layout.template_curve_mapping(gp_settings, "curve_strength", brush=True)
 
-        layout.label(text="Jitter")
+
+class VIEW3D_PT_tools_grease_pencil_brushcurves_jitter(View3DPanel, Panel):
+    bl_context = ".greasepencil_paint"
+    bl_label = "Jitter"
+    bl_parent_id ="VIEW3D_PT_tools_grease_pencil_brushcurves"
+
+    @staticmethod
+    def draw(self, context):
+        layout = self.layout
+        layout.use_property_split = True
+
+        brush = context.active_gpencil_brush
+        gp_settings = brush.gpencil_settings
+
         layout.template_curve_mapping(gp_settings, "curve_jitter", brush=True)
 
 
@@ -1894,6 +1928,9 @@ classes = (
     VIEW3D_PT_tools_grease_pencil_brush_stabilizer,
     VIEW3D_PT_tools_grease_pencil_brush_random,
     VIEW3D_PT_tools_grease_pencil_brushcurves,
+    VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity,
+    VIEW3D_PT_tools_grease_pencil_brushcurves_strength,
+    VIEW3D_PT_tools_grease_pencil_brushcurves_jitter,
     VIEW3D_PT_tools_grease_pencil_shapes,
     VIEW3D_PT_tools_grease_pencil_sculpt,
     VIEW3D_PT_tools_grease_pencil_weight_paint,



More information about the Bf-blender-cvs mailing list