diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 1574fe9b548..ec39113c4d0 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1067,6 +1067,20 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) part->phystype = PART_PHYS_NO; } } + /* 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; + } + } } if (!MAIN_VERSION_ATLEAST(bmain, 291, 9)) { |