Commit: ec3f0b7336815c16eaf061dfd5dc85344e0f78ed
Author: Antonio Vazquez
Date:   Thu Dec 19 11:35:24 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rBec3f0b7336815c16eaf061dfd5dc85344e0f78ed

GPencil: Versioning patch for Colorize VFX

The old Gray and Sepia modes were not using the factor and now the blend is 
defined with that, so need to be set to 1.0f

===================================================================

M       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 c59b4a27b9f..657dc401a95 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -52,6 +52,7 @@
 #include "DNA_rigidbody_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
+#include "DNA_shader_fx_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_genfile.h"
 #include "DNA_workspace_types.h"
@@ -4374,5 +4375,23 @@ void blo_do_versions_280(FileData *fd, Library 
*UNUSED(lib), Main *bmain)
         }
       }
     }
+
+    /* Fix Grease Pencil VFX*/
+    {
+      LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+        LISTBASE_FOREACH (ShaderFxData *, fx, &ob->shader_fx) {
+          switch (fx->type) {
+            case eShaderFxType_Colorize:
+              ColorizeShaderFxData *vfx = (ColorizeShaderFxData *)fx;
+              if (ELEM(vfx->mode, eShaderFxColorizeMode_GrayScale, 
eShaderFxColorizeMode_Sepia)) {
+                vfx->factor = 1.0f;
+              }
+              break;
+            default:
+              break;
+          }
+        }
+      }
+    }
   }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to