[Bf-blender-cvs] [286ccc49b37] greasepencil-object: Merge branch 'master' into greasepencil-object
Antonio Vazquez
noreply at git.blender.org
Mon Dec 16 10:53:05 CET 2019
Commit: 286ccc49b37a520b82ea2c2bfbd66892f774d60e
Author: Antonio Vazquez
Date: Mon Dec 16 10:49:05 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB286ccc49b37a520b82ea2c2bfbd66892f774d60e
Merge branch 'master' into greasepencil-object
Conflicts:
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/properties_paint_common.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 33b042f1d2c,de08713c3e3..fb4e66e5dc5
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@@ -177,24 -174,24 +177,26 @@@ class GreasePencilDisplayPanel
if context.mode == 'PAINT_GPENCIL':
return brush.gpencil_tool != 'ERASE'
else:
- # GP Sculpt and Weight Paint always have Brush Tip panel.
+ # GP Sculpt, Vertex and Weight Paint always have Brush Tip panel.
return True
+ return False
def draw_header(self, context):
- if self.is_popover: return
+ if self.is_popover:
+ return
+ tool_settings = context.tool_settings
if context.mode == 'PAINT_GPENCIL':
- brush = context.tool_settings.gpencil_paint.brush
- gp_settings = brush.gpencil_settings
-
- self.layout.prop(gp_settings, "use_cursor", text="")
- elif context.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}:
- settings = context.tool_settings.gpencil_sculpt
- brush = settings.brush
-
- self.layout.prop(brush, "use_cursor", text="")
+ settings = tool_settings.gpencil_paint
+ elif context.mode == 'SCULPT_GPENCIL':
+ settings = tool_settings.gpencil_sculpt_paint
+ elif context.mode == 'WEIGHT_GPENCIL':
+ settings = tool_settings.gpencil_weight_paint
+ elif context.mode == 'VERTEX_GPENCIL':
+ settings = tool_settings.gpencil_vertex_paint
+ brush = settings.brush
+ if brush:
+ self.layout.prop(settings, "show_brush", text="")
def draw(self, context):
layout = self.layout
diff --cc release/scripts/startup/bl_ui/properties_paint_common.py
index da3ee419892,3c30d3655e0..e7467ea5d0e
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@@ -87,16 -89,25 +89,28 @@@ class UnifiedPaintPanel
# Grease Pencil settings
elif mode == 'PAINT_GPENCIL':
return tool_settings.gpencil_paint
- elif mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}:
- return tool_settings.gpencil_sculpt
- return False
+ elif mode == 'SCULPT_GPENCIL':
+ return tool_settings.gpencil_sculpt_paint
+ elif mode == 'WEIGHT_GPENCIL':
+ return tool_settings.gpencil_weight_paint
+ elif mode == 'VERTEX_GPENCIL':
+ return tool_settings.gpencil_vertex_paint
@staticmethod
- def prop_unified(layout, context, brush, prop_name, unified_name=None, pressure_name=None, icon='NONE', text=None, slider=False, display_unified_toggle=True):
- """ Generalized way of adding brush options to the UI, along with their pen pressure setting and global toggle, if they exist """
+ def prop_unified(
+ layout,
+ context,
+ brush,
+ prop_name,
+ unified_name=None,
+ pressure_name=None,
+ icon='NONE',
+ text=None,
+ slider=False,
+ display_unified_toggle=True,
+ ):
+ """ Generalized way of adding brush options to the UI,
+ along with their pen pressure setting and global toggle, if they exist. """
row = layout.row(align=True)
ups = context.tool_settings.unified_paint_settings
prop_owner = brush
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index 8d903330474,596b7b13e05..f71d847afa4
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -129,9 -128,9 +129,9 @@@ class VIEW3D_HT_tool_header(Header)
layout.popover("VIEW3D_PT_tools_grease_pencil_paint_appearance")
elif tool_mode == 'SCULPT_GPENCIL':
- settings = context.tool_settings.gpencil_sculpt
- tool = settings.sculpt_tool
- if tool in {'SMOOTH', 'RANDOMIZE', 'SMOOTH'}:
+ brush = context.tool_settings.gpencil_sculpt_paint.brush
+ tool = brush.gpencil_tool
- if tool in ('SMOOTH', 'RANDOMIZE', 'SMOOTH'):
++ if tool in ('SMOOTH', 'RANDOMIZE'):
layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_options")
layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_appearance")
elif tool_mode == 'WEIGHT_GPENCIL':
@@@ -7024,7 -7005,6 +7126,7 @@@ classes =
VIEW3D_MT_edit_gpencil_delete,
VIEW3D_MT_edit_gpencil_showhide,
VIEW3D_MT_weight_gpencil,
- VIEW3D_MT_vertex_gpencil,
++ VIEW3D_MT_vertex_gpencil,
VIEW3D_MT_gpencil_animation,
VIEW3D_MT_gpencil_simplify,
VIEW3D_MT_gpencil_copy_layer,
diff --cc release/scripts/startup/bl_ui/space_view3d_toolbar.py
index efaf97c2b1c,43e4aee34db..5e0f7b9b106
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@@ -1398,11 -1377,13 +1405,11 @@@ class VIEW3D_PT_tools_grease_pencil_bru
col.prop(brush, "use_custom_icon", toggle=True, icon='FILE_IMAGE', text="")
- if(brush.use_custom_icon):
+ 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):
+class VIEW3D_PT_tools_grease_pencil_brush_settings(Panel, View3DPanel, GreasePencilPaintPanel):
bl_label = "Brush Settings"
# What is the point of brush presets? Seems to serve the exact same purpose as brushes themselves??
More information about the Bf-blender-cvs
mailing list