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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-02 06:36:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-02 06:58:32 +0300
commit46a6085c47aedaeb9838a8ce10ff488913a44d87 (patch)
tree9d6ec184743207fe503bb9dc41138361c4335c37 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py
parent939c751faa8eaaf65872aeb67216fd4e6f6f1874 (diff)
UI: de-duplicate top-bar and panel paint scripts
- Fixes missing check for unified brush in sculpt mode. - Re-orders material first in gpencil paint mode (matching color-first for other paint modes). - Avoid minor differences (missing tablet pressure options from topbar). - Don't repeat properties already displayed in the topbar when opening the brush popover.
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.py28
1 files changed, 5 insertions, 23 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 8e29e03a8f6..cefe6ca1a34 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -254,29 +254,11 @@ class GreasePencilStrokeSculptPanel:
layout.template_icon_view(settings, "sculpt_tool", show_labels=True)
- row = layout.row(align=True)
- row.prop(brush, "size", slider=True)
- sub = row.row(align=True)
- sub.enabled = tool not in {'GRAB', 'CLONE'}
- sub.prop(brush, "use_pressure_radius", text="")
-
- row = layout.row(align=True)
- row.prop(brush, "strength", slider=True)
- row.prop(brush, "use_pressure_strength", text="")
-
- layout.prop(brush, "use_falloff")
-
- layout.use_property_split = False
- if tool in {'THICKNESS', 'STRENGTH'}:
- layout.row().prop(brush, "direction", expand=True)
- elif tool == 'PINCH':
- row = layout.row(align=True)
- row.prop_enum(brush, "direction", value='ADD', text="Pinch")
- row.prop_enum(brush, "direction", value='SUBTRACT', text="Inflate")
- elif tool == 'TWIST':
- row = layout.row(align=True)
- row.prop_enum(brush, "direction", value='ADD', text="CCW")
- row.prop_enum(brush, "direction", value='SUBTRACT', text="CW")
+ if not self.is_popover:
+ from .properties_paint_common import (
+ brush_basic_gpencil_sculpt_settings,
+ )
+ brush_basic_gpencil_sculpt_settings(layout, context, brush)
class GreasePencilSculptOptionsPanel: