diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_300.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 5d3bde428c0..dd5577283c5 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -21,6 +21,7 @@ #define DNA_DEPRECATED_ALLOW #include "BLI_listbase.h" +#include "BLI_math.h" #include "BLI_math_vector.h" #include "BLI_string.h" #include "BLI_utildefines.h" @@ -30,6 +31,7 @@ #include "DNA_brush_types.h" #include "DNA_collection_types.h" #include "DNA_genfile.h" +#include "DNA_gpencil_types.h" #include "DNA_listBase.h" #include "DNA_modifier_types.h" #include "DNA_text_types.h" @@ -303,6 +305,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Init grease pencil curve editing error threshold. */ + if (!DNA_struct_elem_find( + fd->filesdna, "ToolSettings", "float", "gpencil_curve_fit_threshold")) { + LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { + if (scene->toolsettings->sequencer_tool_settings == NULL) { + scene->toolsettings->gpencil_curve_fit_threshold = GP_DEFAULT_CURVE_ERROR; + scene->toolsettings->gpencil_curve_fit_corner_angle = GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE; + } + } + } } if (!MAIN_VERSION_ATLEAST(bmain, 300, 2)) { |