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:
authorJoshua Leung <aligorith@gmail.com>2016-08-28 17:04:06 +0300
committerJoshua Leung <aligorith@gmail.com>2016-08-29 05:51:29 +0300
commitdec7145032678a6d667e02a10cfeb6225120443e (patch)
treec1c49be8022b468dfb96a988a62c61611bcbec41
parent71eaa28d0e9e774d19a1db6442a93d81b8d3d259 (diff)
GPencil: Include basic brush settings in "Grease Pencil Settings" panel for 2D Editors
After the GP v2 changes, it wasn't possible to easily set the thickness of strokes if you didn't know about the pie menus already. This just exposes the same set of settings.
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py56
1 files changed, 33 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 65f1fdf1fd5..80ab4e4d14b 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -52,6 +52,34 @@ def gpencil_stroke_placement_settings(context, layout):
row.prop(ts, "use_gpencil_stroke_endpoints")
+def gpencil_active_brush_settings_simple(context, layout):
+ brush = context.active_gpencil_brush
+
+ col = layout.column()
+ col.label("Active Brush: ")
+
+ row = col.row(align=True)
+ row.operator_context = 'EXEC_REGION_WIN'
+ row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA')
+ row.prop(brush, "name", text="")
+
+ col.prop(brush, "line_width", slider=True)
+ row = col.row(align=True)
+ row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE')
+ row.prop(brush, "pen_sensitivity_factor", slider=True)
+ row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE')
+ row = col.row(align=True)
+ row.prop(brush, "use_random_strength", text='', icon='RNDCURVE')
+ row.prop(brush, "strength", slider=True)
+ row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE')
+ row = col.row(align=True)
+ row.prop(brush, "jitter", slider=True)
+ row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE')
+ row = col.row()
+ row.prop(brush, "angle", slider=True)
+ row.prop(brush, "angle_factor", text="Factor", slider=True)
+
+
class GreasePencilDrawingToolsPanel:
# subclass must set
# bl_space_type = 'IMAGE_EDITOR'
@@ -460,29 +488,7 @@ class GPENCIL_PIE_settings_palette(Menu):
col.prop(palcolor, "fill_alpha", text="", slider=True)
# S Brush settings
- col = pie.column()
- col.label("Active Brush: ")
-
- row = col.row()
- row.operator_context = 'EXEC_REGION_WIN'
- row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA')
- row.prop(brush, "name", text="")
-
- col.prop(brush, "line_width", slider=True)
- row = col.row(align=True)
- row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE')
- row.prop(brush, "pen_sensitivity_factor", slider=True)
- row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE')
- row = col.row(align=True)
- row.prop(brush, "use_random_strength", text='', icon='RNDCURVE')
- row.prop(brush, "strength", slider=True)
- row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE')
- row = col.row(align=True)
- row.prop(brush, "jitter", slider=True)
- row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE')
- row = col.row()
- row.prop(brush, "angle", slider=True)
- row.prop(brush, "angle_factor", text="Factor", slider=True)
+ gpencil_active_brush_settings_simple(context, pie)
# N - Active Layer
col = pie.column()
@@ -1034,4 +1040,8 @@ class GreasePencilToolsPanel:
layout.separator()
layout.separator()
+ gpencil_active_brush_settings_simple(context, layout)
+
+ layout.separator()
+
gpencil_stroke_placement_settings(context, layout)