Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-09-21 21:15:25 +0300
committerAntonioya <blendergit@gmail.com>2018-09-21 21:15:41 +0300
commit529e22d6e20d0991401301f7b581ac821bf07f1d (patch)
tree143591eb904fa330acb23a81c267f8c854cb8000 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py
parent4323ccfa6b9158cb32d56687c8f5c98bc5ca117d (diff)
GP: Initial changes in sculpt brush panel
Move some options to subpanels
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py30
1 files changed, 27 insertions, 3 deletions
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 f5b95981d66..3020f71d1e7 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -259,6 +259,33 @@ class GreasePencilStrokeSculptPanel:
layout.prop(brush, "use_falloff")
+ if tool in {'THICKNESS', 'PINCH', 'TWIST'}:
+ col = layout.column()
+ col.separator()
+ col.row().prop(brush, "direction", expand=True)
+
+
+
+class GreasePencilSculptOptionsPanel:
+ bl_label = "Sculpt Strokes"
+
+ @classmethod
+ def poll(cls, context):
+ settings = context.tool_settings.gpencil_sculpt
+ tool = settings.tool
+
+ return bool(tool in {'SMOOTH', 'RANDOMIZE', 'SMOOTH'})
+
+ @staticmethod
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ settings = context.tool_settings.gpencil_sculpt
+ tool = settings.tool
+ brush = settings.brush
+
if tool in {'SMOOTH', 'RANDOMIZE'}:
layout.prop(settings, "affect_position", text="Affect Position")
layout.prop(settings, "affect_strength", text="Affect Strength")
@@ -269,9 +296,6 @@ class GreasePencilStrokeSculptPanel:
layout.prop(settings, "affect_uv", text="Affect UV")
- if tool in {'THICKNESS', 'PINCH', 'TWIST'}:
- layout.prop(brush, "direction", expand=True)
-
# GP Object Tool Settings
class GreasePencilAppearancePanel: