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
parent4323ccfa6b9158cb32d56687c8f5c98bc5ca117d (diff)
GP: Initial changes in sculpt brush panel
Move some options to subpanels
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py30
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py10
2 files changed, 36 insertions, 4 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:
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 300cc2154b1..2e197b4ec5b 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -22,6 +22,7 @@ from bpy.types import Menu, Panel, UIList
from .properties_grease_pencil_common import (
GreasePencilStrokeEditPanel,
GreasePencilStrokeSculptPanel,
+ GreasePencilSculptOptionsPanel,
GreasePencilAppearancePanel,
)
from .properties_paint_common import (
@@ -1703,7 +1704,7 @@ class VIEW3D_PT_tools_grease_pencil_interpolate(Panel):
class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, View3DPanel, Panel):
bl_context = ".greasepencil_sculpt"
bl_category = "Tools"
- bl_label = "Sculpt Strokes"
+ bl_label = "Brush"
# Grease Pencil weight painting tools
@@ -1743,6 +1744,12 @@ class VIEW3D_PT_tools_grease_pencil_sculpt_appearance(GreasePencilAppearancePane
bl_label = "Appearance"
+class VIEW3D_PT_tools_grease_pencil_sculpt_options(GreasePencilSculptOptionsPanel, View3DPanel, Panel):
+ bl_context = ".greasepencil_sculpt"
+ bl_label = "Sculpt Strokes"
+ bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_sculpt'
+
+
class VIEW3D_PT_tools_grease_pencil_weight_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
bl_context = ".greasepencil_weight"
bl_label = "Appearance"
@@ -1796,6 +1803,7 @@ classes = (
VIEW3D_PT_tools_grease_pencil_sculpt,
VIEW3D_PT_tools_grease_pencil_weight_paint,
VIEW3D_PT_tools_grease_pencil_paint_appearance,
+ VIEW3D_PT_tools_grease_pencil_sculpt_options,
VIEW3D_PT_tools_grease_pencil_sculpt_appearance,
VIEW3D_PT_tools_grease_pencil_weight_appearance,
VIEW3D_PT_tools_grease_pencil_interpolate,