[Bf-blender-cvs] [cca904081ee] greasepencil-edit-curve: Merge branch 'master' into greasepencil-edit-curve

Antonio Vazquez noreply at git.blender.org
Tue Sep 15 15:27:21 CEST 2020


Commit: cca904081ee485869a39ca10bb926a2e828b965c
Author: Antonio Vazquez
Date:   Tue Sep 15 15:27:14 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rBcca904081ee485869a39ca10bb926a2e828b965c

Merge branch 'master' into greasepencil-edit-curve

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



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

diff --cc source/blender/blenloader/intern/versioning_290.c
index f447713feb9,2db2bb3c29e..577dcdc7c13
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@@ -598,21 -638,28 +638,43 @@@ void blo_do_versions_290(FileData *fd, 
        }
      }
  
+     /* Fix fcurves to allow for new bezier handles behaviour (T75881 and D8752). */
+     for (bAction *act = bmain->actions.first; act; act = act->id.next) {
+       for (FCurve *fcu = act->curves.first; fcu; fcu = fcu->next) {
+         /* Only need to fix Bezier curves with at least 2 keyframes. */
+         if (fcu->totvert < 2 || fcu->bezt == NULL) {
+           return;
+         }
+         do_versions_291_fcurve_handles_limit(fcu);
+       }
+     }
+   }
+ 
+   /**
+    * Versioning code until next subversion bump goes here.
+    *
+    * \note Be sure to check when bumping the version:
+    * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend
+    * - "versioning_userdef.c", #do_versions_theme
+    *
+    * \note Keep this message at the bottom of the function.
+    */
+   {
      /* Keep this block, even when empty. */
 +
 +    /* Init grease pencil default curve resolution. */
 +    if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "int", "curve_edit_resolution")) {
 +      LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) {
 +        gpd->curve_edit_resolution = GP_DEFAULT_CURVE_RESOLUTION;
 +        gpd->flag |= GP_DATA_CURVE_ADAPTIVE_RESOLUTION;
 +      }
 +    }
 +    /* Init grease pencil curve editing error threshold. */
 +    if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "float", "curve_edit_threshold")) {
 +      LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) {
 +        gpd->curve_edit_threshold = GP_DEFAULT_CURVE_ERROR;
 +        gpd->curve_edit_corner_angle = GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE;
 +      }
 +    }
    }
  }



More information about the Bf-blender-cvs mailing list