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:
authorAntonio Vazquez <blendergit@gmail.com>2019-12-17 19:14:05 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-12-17 19:14:16 +0300
commit7267d1fe30ed82462d57407f45948fb321b52ac5 (patch)
treee12c1de7d71459f778fa28af4768eb30693f8ea5 /release
parent5f79e0d8f7090cb1b6f456924d3f8124f5965c75 (diff)
GPencil: Fix brush panels after UI reorganization
With the brush reorganization included in D5928, the brush panels had covered the topbar and make impossible to use the drawing tools. Now, the options are grouped in Stroke popover, similar to Sculpt. Also fixed some missing or wrong texts.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py12
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py5
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py3
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py30
4 files changed, 32 insertions, 18 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 de08713c3e3..12ed14464f8 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -233,14 +233,14 @@ class GreasePencilDisplayPanel:
col.active = brush.use_cursor
if tool in {'THICKNESS', 'STRENGTH'}:
- col.prop(brush, "cursor_color_add", text="Add Cursor Color")
- col.prop(brush, "cursor_color_sub", text="Subtract Cursor Color")
+ col.prop(brush, "cursor_color_add", text="Cursor Color")
+ col.prop(brush, "cursor_color_sub", text="Inverse Cursor Color")
elif tool == 'PINCH':
- col.prop(brush, "cursor_color_add", text="Pinch Cursor Color")
- col.prop(brush, "cursor_color_sub", text="Inflate Cursor Color")
+ col.prop(brush, "cursor_color_add", text="Cursor Color")
+ col.prop(brush, "cursor_color_sub", text="Inverse Cursor Color")
elif tool == 'TWIST':
- col.prop(brush, "cursor_color_add", text="CCW Cursor Color")
- col.prop(brush, "cursor_color_sub", text="CW Cursor Color")
+ col.prop(brush, "cursor_color_add", text="Cursor Color")
+ col.prop(brush, "cursor_color_sub", text="Inverse Cursor Color")
else:
col.prop(brush, "cursor_color_add", text="Cursor Color")
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 3c30d3655e0..ee9fb3805b2 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -1007,7 +1007,7 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False)
row.prop(gp_settings, "eraser_thickness_factor")
row = layout.row(align=True)
- row.prop(gp_settings, "use_cursor", text="Show Brush")
+ row.prop(gp_settings, "use_cursor", text="Display Cursor")
# FIXME: tools must use their own UI drawing!
elif brush.gpencil_tool == 'FILL':
@@ -1017,9 +1017,6 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False)
row.prop(brush, "size", text="Thickness")
row = layout.row(align=True)
row.prop(gp_settings, "fill_simplify_level", text="Simplify")
- row = layout.row(align=True)
- row.prop(gp_settings, "fill_draw_mode", text="Boundary")
- row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
else: # brush.gpencil_tool == 'DRAW':
row = layout.row(align=True)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 6374b3af46d..1a71f381309 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -122,8 +122,7 @@ class VIEW3D_HT_tool_header(Header):
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced")
if brush.gpencil_tool != 'FILL':
- layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stabilizer")
- layout.popover("VIEW3D_PT_tools_grease_pencil_brush_random")
+ layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stroke")
layout.popover("VIEW3D_PT_tools_grease_pencil_brushcurves")
layout.popover("VIEW3D_PT_tools_grease_pencil_paint_appearance")
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 43e4aee34db..99e50f8ccef 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1379,8 +1379,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePenci
if brush.use_custom_icon:
layout.row().prop(brush, "icon_filepath", text="")
- else:
- layout.row().prop(gp_settings, "gp_icon", text="Icon")
class VIEW3D_PT_tools_grease_pencil_brush_settings(Panel, View3DPanel, GreasePencilPanel):
@@ -1470,15 +1468,34 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
subcol.prop(gp_settings, "gradient_shape")
elif brush.gpencil_tool == 'FILL':
+ row = col.row(align=True)
+ row.prop(gp_settings, "fill_draw_mode", text="Boundary")
+ row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
+ col.separator()
col.prop(gp_settings, "fill_factor", text="Resolution")
if gp_settings.fill_draw_mode != 'STROKE':
col.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes")
col.prop(gp_settings, "fill_threshold", text="Threshold")
+class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel):
+ bl_context = ".greasepencil_paint"
+ bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings'
+ bl_label = "Stroke"
+ bl_category = "Tool"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ brush = context.tool_settings.gpencil_paint.brush
+ return brush is not None and brush.gpencil_tool == 'DRAW'
+
+ def draw(self, context):
+ layout = self.layout
+
class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel):
bl_context = ".greasepencil_paint"
- bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings'
+ bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_stroke'
bl_label = "Stabilize Stroke"
bl_category = "Tool"
bl_options = {'DEFAULT_CLOSED'}
@@ -1518,7 +1535,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(Panel, View3DPanel):
class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel):
bl_context = ".greasepencil_paint"
- bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings'
+ bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_stroke'
bl_label = "Post-Processing"
bl_category = "Tool"
bl_options = {'DEFAULT_CLOSED'}
@@ -1573,7 +1590,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel):
class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
bl_context = ".greasepencil_paint"
- bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings'
+ bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_stroke'
bl_label = "Randomize"
bl_category = "Tool"
bl_options = {'DEFAULT_CLOSED'}
@@ -1903,9 +1920,10 @@ classes = (
VIEW3D_PT_tools_grease_pencil_brush_select,
VIEW3D_PT_tools_grease_pencil_brush_settings,
VIEW3D_PT_tools_grease_pencil_brush_advanced,
+ VIEW3D_PT_tools_grease_pencil_brush_stroke,
VIEW3D_PT_tools_grease_pencil_brush_post_processing,
- VIEW3D_PT_tools_grease_pencil_brush_stabilizer,
VIEW3D_PT_tools_grease_pencil_brush_random,
+ VIEW3D_PT_tools_grease_pencil_brush_stabilizer,
VIEW3D_PT_tools_grease_pencil_brushcurves,
VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity,
VIEW3D_PT_tools_grease_pencil_brushcurves_strength,