From 29f3af95272590d26f610ae828b2eeee89c82a00 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 9 Mar 2020 16:27:24 +0100 Subject: 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 --- source/blender/blenkernel/intern/context.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'source/blender/blenkernel/intern/context.c') diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 48985932d87..b2c551a1752 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -1124,6 +1124,9 @@ enum eContextObjectMode CTX_data_mode_enum_ex(const Object *obedit, else if (object_mode & OB_MODE_WEIGHT_GPENCIL) { return CTX_MODE_WEIGHT_GPENCIL; } + else if (object_mode & OB_MODE_VERTEX_GPENCIL) { + return CTX_MODE_VERTEX_GPENCIL; + } } } @@ -1140,25 +1143,11 @@ enum eContextObjectMode CTX_data_mode_enum(const bContext *C) /* would prefer if we can use the enum version below over this one - Campbell */ /* must be aligned with above enum */ static const char *data_mode_strings[] = { - "mesh_edit", - "curve_edit", - "surface_edit", - "text_edit", - "armature_edit", - "mball_edit", - "lattice_edit", - "posemode", - "sculpt_mode", - "weightpaint", - "vertexpaint", - "imagepaint", - "particlemode", - "objectmode", - "greasepencil_paint", - "greasepencil_edit", - "greasepencil_sculpt", - "greasepencil_weight", - NULL, + "mesh_edit", "curve_edit", "surface_edit", "text_edit", + "armature_edit", "mball_edit", "lattice_edit", "posemode", + "sculpt_mode", "weightpaint", "vertexpaint", "imagepaint", + "particlemode", "objectmode", "greasepencil_paint", "greasepencil_edit", + "greasepencil_sculpt", "greasepencil_weight", "greasepencil_vertex", NULL, }; BLI_STATIC_ASSERT(ARRAY_SIZE(data_mode_strings) == CTX_MODE_NUM + 1, "Must have a string for each context mode") -- cgit v1.2.3