[Bf-blender-cvs] [1b7a2a85633] temp-lineart-contained: LineArt: Versioning for smooth surface crease.

YimingWu noreply at git.blender.org
Wed Jun 23 10:04:11 CEST 2021


Commit: 1b7a2a85633f6de4b570c5681472e6d941e787fc
Author: YimingWu
Date:   Wed Jun 23 16:03:53 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rB1b7a2a85633f6de4b570c5681472e6d941e787fc

LineArt: Versioning for smooth surface crease.

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

M	source/blender/blenloader/intern/versioning_300.c

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

diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 0fe1267b871..90be756f377 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -29,6 +29,8 @@
 #include "DNA_armature_types.h"
 #include "DNA_brush_types.h"
 #include "DNA_genfile.h"
+#include "DNA_gpencil_modifier_types.h"
+#include "DNA_lineart_types.h"
 #include "DNA_listBase.h"
 #include "DNA_modifier_types.h"
 #include "DNA_text_types.h"
@@ -390,6 +392,19 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
 
       BKE_animdata_main_cb(bmain, do_version_bbone_len_scale_animdata_cb, NULL);
     }
+    if (!DNA_struct_elem_find(
+            fd->filesdna, "LineartGpencilModifierData", "bool", "use_crease_on_smooth")) {
+      LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+        if (ob->type == OB_GPENCIL) {
+          LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {
+            if (md->type == eGpencilModifierType_Lineart) {
+              LineartGpencilModifierData *lmd = (LineartGpencilModifierData *)md;
+              lmd->calculation_flags |= LRT_USE_CREASE_ON_SMOOTH_SURFACES;
+            }
+          }
+        }
+      }
+    }
   }
 
   /**



More information about the Bf-blender-cvs mailing list