diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-13 12:28:30 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-13 12:28:59 +0300 |
commit | de9c7bae7b9e7c66584531953c5acae274c013c2 (patch) | |
tree | 737bb6e21a171f636ae2ae8d1fbeb2afb82f93b9 /source/blender/blenloader/intern/versioning_280.c | |
parent | df032580c170d9f5e508b34673b84a14f8808990 (diff) |
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
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 21 |
1 files changed, 2 insertions, 19 deletions
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); @@ -1096,13 +1096,6 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa 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; } |