Commit: 1775565a06eb3cfb65275d9bf5b0124519bef1ec
Author: Antonio Vazquez
Date:   Mon Aug 24 19:20:29 2020 +0200
Branches: soc-2020-greasepencil-curve
https://developer.blender.org/rB1775565a06eb3cfb65275d9bf5b0124519bef1ec

GPencil: Fix angle initialization

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

M       source/blender/blenkernel/intern/gpencil.c
M       source/blender/blenloader/intern/versioning_290.c
M       source/blender/makesdna/DNA_gpencil_types.h

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

diff --git a/source/blender/blenkernel/intern/gpencil.c 
b/source/blender/blenkernel/intern/gpencil.c
index 1bf7429cbdb..78d77b2bd42 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -543,6 +543,8 @@ bGPdata *BKE_gpencil_data_addnew(Main *bmain, const char 
name[])
 
   gpd->curve_edit_resolution = GP_DEFAULT_CURVE_RESOLUTION;
   gpd->curve_edit_threshold = GP_DEFAULT_CURVE_ERROR;
+  gpd->curve_edit_corner_angle = GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE;
+
   /* use adaptive curve resolution by default */
   gpd->flag |= GP_DATA_CURVE_ADAPTIVE_RESOLUTION;
 
diff --git a/source/blender/blenloader/intern/versioning_290.c 
b/source/blender/blenloader/intern/versioning_290.c
index e79fc186503..edf2e0f7591 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -529,6 +529,7 @@ void blo_do_versions_290(FileData *fd, Library 
*UNUSED(lib), Main *bmain)
     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;
       }
     }
   }
diff --git a/source/blender/makesdna/DNA_gpencil_types.h 
b/source/blender/makesdna/DNA_gpencil_types.h
index 60d7c5f482f..76f10338f6f 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -39,7 +39,7 @@ struct Curve;
 
 #define GP_DEFAULT_CURVE_RESOLUTION 32
 #define GP_DEFAULT_CURVE_ERROR 0.1f
-#define GP_DEFAULT_curve_edit_corner_angle 1.57079632679489661923 /* pi/2 */
+#define GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE M_PI_2
 
 /* ***************************************** */
 /* GP Stroke Points */

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

Reply via email to