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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-04-07 23:55:57 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-04-08 00:03:10 +0300
commitb7b1b2325c1a280f1e038736406cf75c4c8b9a05 (patch)
treeff1f00a7ff09c973376558a569d2923abd441679 /source/blender/blenloader
parent79ba4fde1591ce20c23608276975c691cd3c9302 (diff)
Fix T87274: Curve 2D resets to 3D on reload
This code is incompatible with .blend files from subversion 16 and 17. The ideal would be to create a new subversion when landed rBf674976edd88. But for now, due to the delay, moving the code to the previous subversion can solve it.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index c9f93d35eb3..819d077bf0a 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1987,6 +1987,26 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
FOREACH_NODETREE_END;
}
+
+ /* The CU_2D flag has been removed. */
+ LISTBASE_FOREACH (Curve *, cu, &bmain->curves) {
+#define CU_2D (1 << 3)
+ ListBase *nurbs = BKE_curve_nurbs_get(cu);
+ bool is_2d = true;
+
+ LISTBASE_FOREACH (Nurb *, nu, nurbs) {
+ if (nu->flag & CU_2D) {
+ nu->flag &= ~CU_2D;
+ }
+ else {
+ is_2d = false;
+ }
+ }
+#undef CU_2D
+ if (!is_2d && CU_IS_2D(cu)) {
+ cu->flag |= CU_3D;
+ }
+ }
}
/**
@@ -2034,25 +2054,5 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
-
- /* The CU_2D flag has been removed. */
- LISTBASE_FOREACH (Curve *, cu, &bmain->curves) {
-#define CU_2D (1 << 3)
- ListBase *nurbs = BKE_curve_nurbs_get(cu);
- bool is_2d = true;
-
- LISTBASE_FOREACH (Nurb *, nu, nurbs) {
- if (nu->flag & CU_2D) {
- nu->flag &= ~CU_2D;
- }
- else {
- is_2d = false;
- }
- }
-#undef CU_2D
- if (!is_2d && CU_IS_2D(cu)) {
- cu->flag |= CU_3D;
- }
- }
}
}