[Bf-blender-cvs] [687d248486b] greasepencil-object: UI: Changes in sculpt brush panel

Antonio Vazquez noreply at git.blender.org
Sun Jun 17 16:29:34 CEST 2018


Commit: 687d248486b9160760e2bcf374dff04454c3c4fa
Author: Antonio Vazquez
Date:   Sun Jun 17 16:24:01 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB687d248486b9160760e2bcf374dff04454c3c4fa

UI: Changes in sculpt brush panel

* The direction is not expanded because enabling Expand=True rises an Assert.

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.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 71242f5e14f..d4939111854 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -246,13 +246,6 @@ class GreasePencilStrokeSculptPanel:
     bl_label = "Sculpt Strokes"
     bl_category = "Tools"
 
-    @classmethod
-    def get_icon(cls, brush, direction):
-        if brush.direction == direction:
-            return 'CHECKBOX_HLT'
-        else:
-            return 'CHECKBOX_DEHLT'
-
     @staticmethod
     def draw(self, context):
         layout = self.layout
@@ -271,26 +264,18 @@ class GreasePencilStrokeSculptPanel:
         layout.prop(brush, "use_falloff")
 
         if tool in {'SMOOTH', 'RANDOMIZE'}:
-            layout.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True)
-            layout.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True)
-            layout.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
-            layout.prop(settings, "affect_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
-
-        if tool == 'THICKNESS':
-            layout.prop_enum(brush, "direction", 'ADD', text="Increase", icon=self.get_icon(brush, 'ADD'))
-            layout.prop_enum(brush, "direction", 'SUBTRACT', text="Decrease", icon=self.get_icon(brush, 'SUBTRACT'))
-        elif tool == 'PINCH':
-            layout.prop_enum(brush, "direction", 'ADD', text="Pinch", icon=self.get_icon(brush, 'ADD'))
-            layout.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate", icon=self.get_icon(brush, 'SUBTRACT'))
-        elif settings.tool == 'TWIST':
-            layout.prop_enum(brush, "direction", 'SUBTRACT', text="Clockwise", icon=self.get_icon(brush, 'SUBTRACT'))
-            layout.prop_enum(brush, "direction", 'ADD', text="Counterclockwise", icon=self.get_icon(brush, 'ADD'))
-
-        layout.prop(settings, "use_select_mask")
-        layout.prop(settings, "selection_alpha", slider=True)
-
-        if tool == 'SMOOTH':
-            layout.prop(brush, "affect_pressure")
+            layout.prop(settings, "affect_position", text="Affect Position")
+            layout.prop(settings, "affect_strength", text="Affect Strength")
+            layout.prop(settings, "affect_thickness", text="Affect Thickness")
+
+            if tool == 'SMOOTH':
+                layout.prop(brush, "affect_pressure")
+
+            layout.prop(settings, "affect_uv", text="Affect UV")
+
+        if tool in {'THICKNESS', 'PINCH', 'TWIST'}:
+            layout.prop(brush, "direction")  # FIXME: Expand enable not supported yet
+
 
 
 class GreasePencilAppearancePanel:



More information about the Bf-blender-cvs mailing list