GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions

This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.

Also, a huge code cleanup has been done at all levels.

Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.

Differential Revision: https://developer.blender.org/D6293
This commit is contained in:
Antonio Vazquez
2020-03-09 16:27:24 +01:00
parent dcb9312687
commit 29f3af9527
252 changed files with 21600 additions and 15192 deletions

View File

@@ -56,27 +56,30 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
def FX_BLUR(self, layout, fx):
layout.prop(fx, "factor", text="Factor")
layout.prop(fx, "use_dof_mode", text="Use as Depth Of Field")
layout.separator()
col = layout.column()
col.enabled = not fx.use_dof_mode
col.prop(fx, "size", text="Size")
col.separator()
col.prop(fx, "rotation")
layout.prop(fx, "samples", text="Samples")
layout.separator()
layout.prop(fx, "use_dof_mode")
if fx.use_dof_mode:
layout.prop(fx, "coc")
def FX_COLORIZE(self, layout, fx):
layout.prop(fx, "mode", text="Mode")
if fx.mode == 'BITONE':
if fx.mode == 'DUOTONE':
layout.prop(fx, "low_color", text="Low Color")
if fx.mode == 'CUSTOM':
layout.prop(fx, "low_color", text="Color")
if fx.mode == 'BITONE':
if fx.mode == 'DUOTONE':
layout.prop(fx, "high_color", text="High Color")
if fx.mode in {'BITONE', 'CUSTOM', 'TRANSPARENT'}:
layout.prop(fx, "factor")
layout.prop(fx, "factor")
def FX_WAVE(self, layout, fx):
row = layout.row(align=True)
@@ -127,16 +130,21 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
def FX_GLOW(self, layout, fx):
layout.prop(fx, "mode")
layout.prop(fx, "glow_color")
if fx.mode == 'LUMINANCE':
layout.prop(fx, "threshold")
else:
layout.prop(fx, "select_color")
layout.prop(fx, "glow_color")
layout.separator()
layout.prop(fx, "radius")
layout.prop(fx, "blend_mode", text="Blend")
layout.prop(fx, "opacity")
layout.prop(fx, "size")
layout.prop(fx, "rotation")
layout.prop(fx, "samples")
layout.prop(fx, "use_alpha_mode", text="Use Alpha Mode")
layout.prop(fx, "use_glow_under", text="Glow Under")
def FX_SWIRL(self, layout, fx):
layout.prop(fx, "object", text="Object")
@@ -144,18 +152,10 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
layout.prop(fx, "radius")
layout.prop(fx, "angle")
layout.prop(fx, "use_transparent")
def FX_FLIP(self, layout, fx):
layout.prop(fx, "flip_horizontal")
layout.prop(fx, "flip_vertical")
def FX_LIGHT(self, layout, fx):
layout.prop(fx, "object", text="Object")
layout.prop(fx, "energy")
layout.prop(fx, "ambient")
classes = (
DATA_PT_shader_fx,