diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-09-22 21:11:02 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-09-22 21:11:28 +0300 |
commit | 88970e3900f32d43cadd0f3b6809e71771612379 (patch) | |
tree | 50533757968c7cfd4b9c1bbb2bafcd2ed3fd2ff2 /release/scripts/startup/bl_ui | |
parent | dab50ad7183458aa5ad5b982097da844397be3d9 (diff) |
GPencil: Improve default brush draw mode
Mainly a UI adjustment, no functional changes
To have the default mode in the advanced panel as separated option is not the best solution.
Now, there is a pin option and when it is enabled, the brush keeps this mode.
Differential Revision: https://developer.blender.org/D8974
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 14 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 3 |
2 files changed, 11 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index d5f48876491..135ba802655 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1148,11 +1148,19 @@ def brush_basic__draw_color_selector(context, layout, brush, gp_settings, props) if brush.gpencil_tool in {'DRAW', 'FILL'}: row.separator(factor=1.0) - row.prop_enum(settings, "color_mode", 'MATERIAL', text="", icon='MATERIAL') - row.prop_enum(settings, "color_mode", 'VERTEXCOLOR', text="", icon='VPAINT_HLT') sub_row = row.row(align=True) - sub_row.enabled = settings.color_mode == 'VERTEXCOLOR' + sub_row.enabled = not gp_settings.pin_draw_mode + if gp_settings.pin_draw_mode: + sub_row.prop_enum(gp_settings, "brush_draw_mode", 'MATERIAL', text="", icon='MATERIAL') + sub_row.prop_enum(gp_settings, "brush_draw_mode", 'VERTEXCOLOR', text="", icon='VPAINT_HLT') + else: + sub_row.prop_enum(settings, "color_mode", 'MATERIAL', text="", icon='MATERIAL') + sub_row.prop_enum(settings, "color_mode", 'VERTEXCOLOR', text="", icon='VPAINT_HLT') + + sub_row = row.row(align=True) + sub_row.enabled = settings.color_mode == 'VERTEXCOLOR' or gp_settings.brush_draw_mode == 'VERTEXCOLOR' sub_row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor") + row.prop(gp_settings, "pin_draw_mode", text="") if props: row = layout.row(align=True) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 5a7d335ce3a..a8bb032f565 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1405,9 +1405,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): col = layout.column(align=True) if brush is not None: - col.prop(gp_settings, "brush_draw_mode") - col.separator() - if brush.gpencil_tool != 'FILL': col.prop(gp_settings, "input_samples") col.separator() |