From de9c7bae7b9e7c66584531953c5acae274c013c2 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 13 Mar 2020 10:28:30 +0100 Subject: GPencil: Join Tint and Vertex Color modifier Both are doing almost the same and can be merged. This reduce complexity for user and less code to maintain. Reviewed By: mendio, pepeland, fclem Differential Revision: https://developer.blender.org/D7134 --- source/blender/blenloader/intern/versioning_280.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'source/blender/blenloader/intern/versioning_280.c') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index d0659bfd34c..7d727e81882 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1068,8 +1068,8 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa callback(gpmd->curve_intensity); } } - else if (md->type == eGpencilModifierType_Vertexcolor) { - VertexcolorGpencilModifierData *gpmd = (VertexcolorGpencilModifierData *)md; + else if (md->type == eGpencilModifierType_Tint) { + TintGpencilModifierData *gpmd = (TintGpencilModifierData *)md; if (gpmd->curve_intensity) { callback(gpmd->curve_intensity); @@ -1092,13 +1092,6 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa else if (md->type == eGpencilModifierType_Opacity) { OpacityGpencilModifierData *gpmd = (OpacityGpencilModifierData *)md; - if (gpmd->curve_intensity) { - callback(gpmd->curve_intensity); - } - } - else if (md->type == eGpencilModifierType_Tint) { - TintGpencilModifierData *gpmd = (TintGpencilModifierData *)md; - if (gpmd->curve_intensity) { callback(gpmd->curve_intensity); } @@ -4728,16 +4721,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } break; } - case eGpencilModifierType_Vertexcolor: { - VertexcolorGpencilModifierData *mmd = (VertexcolorGpencilModifierData *)md; - if (mmd->curve_intensity == NULL) { - mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); - if (mmd->curve_intensity) { - BKE_curvemapping_initialize(mmd->curve_intensity); - } - } - break; - } default: break; } -- cgit v1.2.3