diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 4997639de5e..0d59845e934 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -57,6 +57,7 @@ #include "BKE_collection.h" #include "BKE_colortools.h" #include "BKE_cryptomatte.h" +#include "BKE_curve.h" #include "BKE_fcurve.h" #include "BKE_gpencil.h" #include "BKE_lib_id.h" @@ -1983,5 +1984,25 @@ 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; + } + } } } |