Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFalk David <falkdavid@gmx.de>2021-01-18 18:15:50 +0300
committerFalk David <falkdavid@gmx.de>2021-01-18 18:23:13 +0300
commit5e0ef4ef85e61d4714e1ee1b2c9714142067a664 (patch)
treeef2db3f30aac128360dc75d6701f292e949b49d4 /source/blender/blenloader
parent0d8948387e8d9f47e1a2c7f9dd701c81df331bb8 (diff)
Fix T84719: Doversion for curve edit settings
Make sure default values for curve edit mode are filled for older files. Reviewed By: antoniov Maniphest Tasks: T84719 Differential Revision: https://developer.blender.org/D10136
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 743985e7650..86f18a98654 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1244,20 +1244,6 @@ 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)) {
@@ -1569,6 +1555,21 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
FOREACH_NODETREE_END;
+
+ /* 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;
+ }
+ }
}
/**