diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index c75d16ac7c6..57c3bf342b0 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -450,11 +450,11 @@ struct ListBase *which_libbase(struct Main *bmain, short type); */ int set_listbasepointers(struct Main *main, struct ListBase *lb[]); -#define MAIN_VERSION_ATLEAST(main, ver, subver) \ +#define MAIN_VERSION_FILE_ATLEAST(main, ver, subver) \ ((main)->versionfile > (ver) || \ ((main)->versionfile == (ver) && (main)->subversionfile >= (subver))) -#define MAIN_VERSION_OLDER(main, ver, subver) \ +#define MAIN_VERSION_FILE_OLDER(main, ver, subver) \ ((main)->versionfile < (ver) || \ ((main)->versionfile == (ver) && (main)->subversionfile < (subver))) diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index 6ed6b2408ff..f0498a03060 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -152,12 +152,12 @@ static bool blendfile_or_libraries_versions_atleast(Main *bmain, const short versionfile, const short subversionfile) { - if (!MAIN_VERSION_ATLEAST(bmain, versionfile, subversionfile)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, versionfile, subversionfile)) { return false; } LISTBASE_FOREACH (Library *, library, &bmain->libraries) { - if (!MAIN_VERSION_ATLEAST(library, versionfile, subversionfile)) { + if (!MAIN_VERSION_FILE_ATLEAST(library, versionfile, subversionfile)) { return false; } } diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index bb42c15cbad..5333c410364 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -772,7 +772,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 1)) { #if 0 ListBase pidlist; #endif @@ -825,7 +825,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 2)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { if (ob->flag & 8192) { /* OB_POSEMODE = 8192. */ ob->mode |= OB_MODE_POSE; @@ -833,7 +833,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 4)) { bool do_gravity = false; LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { @@ -921,7 +921,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 6)) { /* New variables for axis-angle rotations and/or quaternion rotations were added, * and need proper initialization */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -939,7 +939,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 7)) { Key *key; const float *data; int a, tot; @@ -1006,7 +1006,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 8)) { { Scene *sce = bmain->scenes.first; while (sce) { @@ -1100,7 +1100,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 9)) { LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { if (!sce->toolsettings->particle.selectmode) { sce->toolsettings->particle.selectmode = SCE_SELECT_PATH; @@ -1126,7 +1126,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 10)) { /* properly initialize hair clothsim data on old files */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1171,7 +1171,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 11)) { { /* fix for new view type in sequencer */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -1212,7 +1212,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 12)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 12)) { /* anim viz changes */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { /* initialize object defaults */ @@ -1271,7 +1271,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 13)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 13)) { /* NOTE: if you do more conversion, be sure to do it outside of this and * increase subversion again, otherwise it will not be correct */ /* convert degrees to radians for internal use */ @@ -1293,7 +1293,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 14)) { /* fix for bad View2D extents for Animation Editors */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1320,7 +1320,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 250, 17)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 17)) { /* initialize to sane default so toggling on border shows something */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { if (sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f && sce->r.border.xmax == 0.0f && @@ -1397,7 +1397,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 252, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 252, 1)) { LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { if (brush->curve) { brush->curve->preset = CURVE_PRESET_SMOOTH; @@ -1449,13 +1449,13 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } /* old-track -> constraints (this time we're really doing it!) */ - if (!MAIN_VERSION_ATLEAST(bmain, 252, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 252, 2)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { blo_do_version_old_trackto_to_constraints(ob); } } - if (!MAIN_VERSION_ATLEAST(bmain, 252, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 252, 5)) { /* Image editor scopes */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1631,7 +1631,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } /* New Settings */ - if (!MAIN_VERSION_ATLEAST(bmain, 252, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 252, 5)) { brush->flag |= BRUSH_SPACE_ATTEN; /* Explicitly enable adaptive space. */ /* spacing was originally in pixels, convert it to percentage for new version @@ -1671,7 +1671,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 253, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 253, 1)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Fluid) { @@ -1709,7 +1709,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 255, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 255, 1)) { LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { if (br->ob_mode == 0) { br->ob_mode = OB_MODE_ALL_PAINT; @@ -1751,7 +1751,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 255, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 255, 3)) { /* ocean res is now squared, reset old ones - will be massive */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1796,7 +1796,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 256, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 256, 1)) { /* fix for bones that didn't have arm_roll before */ LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) { LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) { @@ -1816,7 +1816,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 256, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 256, 2)) { /* node sockets are not exposed automatically any more, * this mimics the old behavior by adding all unlinked sockets to groups. */ @@ -1897,7 +1897,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 256, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 256, 3)) { /* redraws flag in SpaceTime has been moved to Screen level */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { if (screen->redraws_flag == 0) { @@ -1936,7 +1936,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (0) { - if (!MAIN_VERSION_ATLEAST(bmain, 256, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 256, 6)) { LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) { /* Vertex normal calculation from legacy 'MFace' has been removed. * update after calculating polygons in file reading code instead. */ @@ -1944,7 +1944,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 256, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 256, 2)) { /* update blur area sizes from 0..1 range to 0..100 percentage */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->nodetree) { @@ -1959,7 +1959,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 258, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 258, 1)) { /* screen view2d settings were not properly initialized #27164. * v2d->scroll caused the bug but best reset other values too * which are in old blend files only. @@ -1998,7 +1998,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 259, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 259, 1)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->r.ffcodecdata.audio_channels = 2; scene->audio.volume = 1.0f; @@ -2069,7 +2069,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 259, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 259, 2)) { { /* Convert default socket values from bNodeStack */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { @@ -2095,7 +2095,7 @@ void blo_do_versions_250(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 259, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 259, 4)) { { /* Adaptive time step for particle systems */ LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) { @@ -2141,7 +2141,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode) void do_versions_after_linking_250(Main *bmain) { - if (!MAIN_VERSION_ATLEAST(bmain, 256, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 256, 2)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { /* updates external links for all group nodes in a tree */ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -2156,7 +2156,7 @@ void do_versions_after_linking_250(Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 258, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 258, 0)) { /* Some very old (original comments claim pre-2.57) versioning that was wrongly done in * lib-linking code... Putting it here just to be sure (this is also checked at runtime anyway * by `action_idcode_patch_check`). */ diff --git a/source/blender/blenloader/intern/versioning_260.cc b/source/blender/blenloader/intern/versioning_260.cc index db6800d78d2..23bc933e4bc 100644 --- a/source/blender/blenloader/intern/versioning_260.cc +++ b/source/blender/blenloader/intern/versioning_260.cc @@ -691,7 +691,7 @@ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 260, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 260, 1)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { ob->collision_boundtype = ob->boundtype; } @@ -709,7 +709,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 260, 1)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 260, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 260, 2)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -725,7 +725,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 260, 2)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 260, 4)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 260, 4)) { {/* Convert node angles to radians! */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes){ if (sce->nodetree){do_versions_nodetree_convert_angle(sce->nodetree); @@ -803,7 +803,7 @@ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 260, 6)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 260, 6)) { LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { do_versions_image_settings_2_60(sce); } @@ -848,7 +848,7 @@ else if (bmain->versionfile == 260 && bmain->subversionfile == 6) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 260, 8)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 260, 8)) { LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { if (brush->sculpt_tool == SCULPT_TOOL_ROTATE) { brush->alpha = 1.0f; @@ -856,7 +856,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 260, 8)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 261, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 261, 1)) { {/* update use flags for node sockets (was only temporary before) */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes){ if (sce->nodetree){do_versions_nodetree_socket_use_flags_2_62(sce->nodetree); @@ -930,7 +930,7 @@ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 261, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 261, 2)) { { /* convert deprecated sculpt_paint_unified_* fields to * UnifiedPaintSettings */ @@ -945,7 +945,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 261, 2)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 261, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 261, 3)) { {/* convert extended ascii to utf-8 for text editor */ LISTBASE_FOREACH (Text *, text, &bmain->texts){ if (!(text->flags & TXT_ISEXT)){LISTBASE_FOREACH (TextLine *, tl, &text->lines){ @@ -1010,7 +1010,7 @@ if (bmain->versionfile < 263) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 262, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 262, 1)) { /* update use flags for node sockets (was only temporary before) */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { if (sce->nodetree) { @@ -1033,7 +1033,7 @@ if (bmain->versionfile == 262 && bmain->subversionfile == 1) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 262, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 262, 2)) { /* Set new idname of keyingsets from their now "label-only" name. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { LISTBASE_FOREACH (KeyingSet *, ks, &scene->keyingsets) { @@ -1044,7 +1044,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 262, 2)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 262, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 262, 3)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Lattice) { @@ -1055,7 +1055,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 262, 3)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 262, 4)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 262, 4)) { /* Read Viscosity presets from older files */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1081,7 +1081,7 @@ if (bmain->versionfile < 263) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 1)) { /* file output node paths are now stored in the file info struct instead socket name */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { if (sce->nodetree) { @@ -1093,7 +1093,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 1)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 3)) { /* For weight paint, each brush now gets its own weight; * unified paint settings also have weight. Update unified * paint settings and brushes with a default weight value. */ @@ -1110,7 +1110,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 3)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 2)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -1139,7 +1139,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 2)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 4)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 4)) { LISTBASE_FOREACH (Camera *, cam, &bmain->cameras) { if (cam->flag & CAM_PANORAMA) { cam->type = CAM_PANO; @@ -1155,7 +1155,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 4)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 5)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 5)) { { /* file output node paths are now stored in the file info struct instead socket name */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { @@ -1171,7 +1171,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 5)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 6)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 6)) { /* update use flags for node sockets (was only temporary before) */ LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { if (sce->nodetree) { @@ -1208,7 +1208,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 6)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 7)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 7)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Fluid) { @@ -1223,7 +1223,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 7)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 9)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 9)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1239,7 +1239,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 9)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 10)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 10)) { { /* composite redesign */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -1285,7 +1285,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 10)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 11)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 11)) { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { MovieTrackingTrack *track = static_cast( clip->tracking.tracks_legacy.first); @@ -1297,7 +1297,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 11)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 13)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 13)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1314,7 +1314,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 13)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 14)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 14)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1340,7 +1340,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 14)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 17)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 17)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1360,7 +1360,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 17)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 18)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 18)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->ed) { SEQ_for_each_callback(&scene->ed->seqbase, seq_colorbalance_update_cb, nullptr); @@ -1369,7 +1369,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 18)) { } /* color management pipeline changes compatibility code */ -if (!MAIN_VERSION_ATLEAST(bmain, 263, 19)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 19)) { bool colormanagement_disabled = false; /* make scenes which are not using color management have got None as display device, @@ -1405,13 +1405,13 @@ if (!MAIN_VERSION_ATLEAST(bmain, 263, 19)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 20)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 20)) { LISTBASE_FOREACH (Key *, key, &bmain->shapekeys) { blo_do_versions_key_uidgen(key); } } -if (!MAIN_VERSION_ATLEAST(bmain, 263, 21)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 263, 21)) { { LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) { CustomData_update_typemap(&me->vdata); @@ -1434,7 +1434,7 @@ if (bmain->versionfile < 264) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 264, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 264, 1)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1447,7 +1447,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 264, 1)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 264, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 264, 2)) { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { MovieTracking *tracking = &clip->tracking; LISTBASE_FOREACH (MovieTrackingObject *, tracking_object, &tracking->objects) { @@ -1459,7 +1459,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 264, 2)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 264, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 264, 3)) { /* smoke branch */ {LISTBASE_FOREACH (Object *, ob, &bmain->objects){ LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers){ @@ -1514,7 +1514,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 264, 3)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 264, 5)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 264, 5)) { /* set a unwrapping margin and ABF by default */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->toolsettings->uvcalc_margin == 0.0f) { @@ -1524,7 +1524,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 264, 5)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 264, 7)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 264, 7)) { /* convert tiles size from resolution and number of tiles */ {LISTBASE_FOREACH (Scene *, scene, &bmain->scenes){ if (scene->r.tilex == 0 || scene->r.tiley == 1){scene->r.tilex = scene->r.tiley = 64; @@ -1543,7 +1543,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 264, 7)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 264, 7)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 264, 7)) { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { LISTBASE_FOREACH (MovieTrackingTrack *, track, &clip->tracking.tracks_legacy) { do_versions_affine_tracker_track(track); @@ -1557,7 +1557,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 264, 7)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 265, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 265, 3)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -1593,7 +1593,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 265, 3)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 265, 5)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 265, 5)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->ed) { SEQ_for_each_callback(&scene->ed->seqbase, seq_set_alpha_mode_cb, nullptr); @@ -1643,7 +1643,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 265, 5)) { } FOREACH_NODETREE_END; } -else if (!MAIN_VERSION_ATLEAST(bmain, 266, 1)) { +else if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 1)) { /* texture use alpha was removed for 2.66 but added back again for 2.66a, * for compatibility all textures assumed it to be enabled */ LISTBASE_FOREACH (Tex *, tex, &bmain->textures) { @@ -1653,7 +1653,7 @@ else if (!MAIN_VERSION_ATLEAST(bmain, 266, 1)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 265, 7)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 265, 7)) { LISTBASE_FOREACH (Curve *, cu, &bmain->curves) { if (cu->flag & (CU_FRONT | CU_BACK)) { if (cu->extrude != 0.0f || cu->bevel_radius != 0.0f) { @@ -1684,13 +1684,13 @@ if (!MAIN_VERSION_ATLEAST(bmain, 265, 7)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 265, 9)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 265, 9)) { LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) { BKE_mesh_do_versions_cd_flag_init(me); } } -if (!MAIN_VERSION_ATLEAST(bmain, 265, 10)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 265, 10)) { LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { if (br->ob_mode & OB_MODE_TEXTURE_PAINT) { br->mtex.brush_map_mode = MTEX_MAP_MODE_TILED; @@ -1699,7 +1699,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 265, 10)) { } /* add storage for compositor translate nodes when not existing */ -if (!MAIN_VERSION_ATLEAST(bmain, 265, 11)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 265, 11)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1712,14 +1712,14 @@ if (!MAIN_VERSION_ATLEAST(bmain, 265, 11)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 266, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 2)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { do_versions_nodetree_customnodes(ntree, ((ID *)ntree == id)); } FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 266, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 2)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -1750,7 +1750,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 266, 2)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 266, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 3)) { { /* Fix for a very old issue: * Node names were nominally made unique in r24478 (2.50.8), but the do_versions check @@ -1771,7 +1771,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 266, 3)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 266, 4)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 4)) { LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { BKE_texture_mtex_default(&brush->mask_mtex); @@ -1781,7 +1781,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 266, 4)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 266, 6)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 6)) { #define BRUSH_TEXTURE_OVERLAY (1 << 21) LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { @@ -1916,7 +1916,7 @@ if (bmain->versionfile < 267) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 267, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 267, 1)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Fluid) { @@ -1934,13 +1934,13 @@ if (!MAIN_VERSION_ATLEAST(bmain, 267, 1)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 268, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 268, 1)) { LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { brush->spacing = MAX2(1, brush->spacing); } } -if (!MAIN_VERSION_ATLEAST(bmain, 268, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 268, 2)) { #define BRUSH_FIXED (1 << 6) LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { brush->flag &= ~BRUSH_FIXED; @@ -1958,7 +1958,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 268, 2)) { #undef BRUSH_FIXED } -if (!MAIN_VERSION_ATLEAST(bmain, 268, 4)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 268, 4)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (bConstraint *, con, &ob->constraints) { if (con->type == CONSTRAINT_TYPE_SHRINKWRAP) { @@ -2009,7 +2009,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 268, 4)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 268, 5)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 268, 5)) { /* add missing (+) expander in node editor */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -2040,7 +2040,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 268, 5)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 1)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 1)) { /* Removal of Cycles SSS Compatible falloff */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { @@ -2056,7 +2056,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 1)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 2)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 2)) { /* Initialize CDL settings for Color Balance nodes */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { @@ -2083,7 +2083,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 2)) { FOREACH_NODETREE_END; } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 3)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 3)) { /* Update files using invalid (outdated) outlinevis Outliner values. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -2153,7 +2153,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 3)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 4)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 4)) { /* Internal degrees to radians conversions... */ { LISTBASE_FOREACH (Light *, la, &bmain->lights) { @@ -2210,7 +2210,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 4)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 7)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 7)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { Sculpt *sd = scene->toolsettings->sculpt; @@ -2239,7 +2239,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 7)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 8)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 8)) { LISTBASE_FOREACH (Curve *, cu, &bmain->curves) { if (cu->str) { cu->len_char32 = BLI_strlen_utf8(cu->str); @@ -2247,7 +2247,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 8)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 9)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 9)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Build) { @@ -2260,7 +2260,7 @@ if (!MAIN_VERSION_ATLEAST(bmain, 269, 9)) { } } -if (!MAIN_VERSION_ATLEAST(bmain, 269, 11)) { +if (!MAIN_VERSION_FILE_ATLEAST(bmain, 269, 11)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, space_link, &area->spacedata) { @@ -2305,7 +2305,7 @@ void do_versions_after_linking_260(Main *bmain) * NOTE: this always runs, without it links with nullptr fromnode and tonode remain * which causes problems. */ - if (!MAIN_VERSION_ATLEAST(bmain, 266, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 266, 3)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { bNode *input_node = nullptr, *output_node = nullptr; int num_inputs = 0, num_outputs = 0; @@ -2314,7 +2314,7 @@ void do_versions_after_linking_260(Main *bmain) * New file versions already have input/output nodes with duplicate links, * in that case just remove the invalid links. */ - const bool create_io_nodes = MAIN_VERSION_OLDER(bmain, 266, 2); + const bool create_io_nodes = MAIN_VERSION_FILE_OLDER(bmain, 266, 2); float input_locx = 1000000.0f, input_locy = 0.0f; float output_locx = -1000000.0f, output_locy = 0.0f; @@ -2396,7 +2396,7 @@ void do_versions_after_linking_260(Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 60)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 60)) { /* From this point we no longer write incomplete links for forward * compatibility with 2.66, we have to clean them up for all previous * versions. */ diff --git a/source/blender/blenloader/intern/versioning_270.cc b/source/blender/blenloader/intern/versioning_270.cc index 041b57e0824..dd30f3291ba 100644 --- a/source/blender/blenloader/intern/versioning_270.cc +++ b/source/blender/blenloader/intern/versioning_270.cc @@ -458,7 +458,7 @@ static bool seq_update_effectdata_cb(Sequence *seq, void * /*user_data*/) /* NOLINTNEXTLINE: readability-function-size */ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) { - if (!MAIN_VERSION_ATLEAST(bmain, 270, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 270, 0)) { if (!DNA_struct_elem_find(fd->filesdna, "BevelModifierData", "float", "profile")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -504,7 +504,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 270, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 270, 1)) { /* Update Transform constraint (another deg -> rad stuff). */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { do_version_constraints_radians_degrees_270_1(&ob->constraints); @@ -518,14 +518,14 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 270, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 270, 2)) { /* Mesh smoothresh deg->rad. */ LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) { me->smoothresh = DEG2RADF(me->smoothresh); } } - if (!MAIN_VERSION_ATLEAST(bmain, 270, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 270, 3)) { LISTBASE_FOREACH (FreestyleLineStyle *, linestyle, &bmain->linestyles) { linestyle->flag |= LS_NO_SORTING; linestyle->sort_key = LS_SORT_KEY_DISTANCE_FROM_CAMERA; @@ -533,7 +533,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 270, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 270, 4)) { /* ui_previews were not handled correctly when copying areas, * leading to corrupted files (see #39847). * This will always reset situation to a valid state. @@ -550,7 +550,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 270, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 270, 5)) { /* Update Transform constraint (again :|). */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { do_version_constraints_radians_degrees_270_5(&ob->constraints); @@ -564,7 +564,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 271, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 271, 0)) { if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "BakeData", "bake")) { LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { sce->r.bake.flag = R_BAKE_CLEAR; @@ -600,7 +600,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 271, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 271, 1)) { if (!DNA_struct_elem_find(fd->filesdna, "Material", "float", "line_col[4]")) { LISTBASE_FOREACH (Material *, mat, &bmain->materials) { mat->line_col[0] = mat->line_col[1] = mat->line_col[2] = 0.0f; @@ -609,7 +609,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 271, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 271, 3)) { LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { br->fill_threshold = 0.2f; } @@ -626,7 +626,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 271, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 271, 6)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_ParticleSystem) { @@ -639,7 +639,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 272, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 272, 1)) { LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { if ((br->ob_mode & OB_MODE_SCULPT) && ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK)) @@ -649,7 +649,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 272, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 272, 2)) { if (!DNA_struct_elem_find(fd->filesdna, "Image", "float", "gen_color")) { LISTBASE_FOREACH (Image *, image, &bmain->images) { image->gen_color[3] = 1.0f; @@ -671,7 +671,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 273, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 1)) { #define BRUSH_RAKE (1 << 7) #define BRUSH_RANDOM_ROTATION (1 << 25) @@ -693,7 +693,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) #undef BRUSH_RANDOM_ROTATION /* Customizable Safe Areas */ - if (!MAIN_VERSION_ATLEAST(bmain, 273, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 2)) { if (!DNA_struct_elem_find(fd->filesdna, "Scene", "DisplaySafeAreas", "safe_areas")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { copy_v2_fl2(scene->safe_areas.title, 3.5f / 100.0f, 3.5f / 100.0f); @@ -704,7 +704,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 273, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 3)) { LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) { if (part->clumpcurve) { part->child_flag |= PART_CHILD_USE_CLUMP_CURVE; @@ -715,7 +715,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 273, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 6)) { if (!DNA_struct_elem_find(fd->filesdna, "ClothSimSettings", "float", "bending_damping")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -794,7 +794,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 273, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 8)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (BKE_modifier_unique_name(&ob->modifiers, md)) { @@ -808,7 +808,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 273, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 9)) { /* Make sure sequencer preview area limits zoom */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -828,7 +828,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 274, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 274, 1)) { /* particle systems need to be forced to redistribute for jitter mode fix */ { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -841,7 +841,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 274, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 274, 4)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { BKE_scene_add_render_view(scene, STEREO_LEFT_NAME); SceneRenderView *srv = static_cast(scene->r.views.first); @@ -906,7 +906,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 274, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 274, 6)) { if (!DNA_struct_elem_find(fd->filesdna, "FileSelectParams", "int", "thumbnail_size")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -942,7 +942,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 275, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 275, 3)) { #define BRUSH_TORUS (1 << 1) LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { br->flag &= ~BRUSH_TORUS; @@ -950,7 +950,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) #undef BRUSH_TORUS } - if (!MAIN_VERSION_ATLEAST(bmain, 276, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 2)) { if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "custom_scale")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { if (ob->pose) { @@ -993,7 +993,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) #undef LA_YF_PHOTON } - if (!MAIN_VERSION_ATLEAST(bmain, 276, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 3)) { if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "CurveMapping", "mblur_shutter_curve")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { CurveMapping *curve_mapping = &scene->r.mblur_shutter_curve; @@ -1005,7 +1005,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 276, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 4)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *ts = scene->toolsettings; if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "gpencil_v3d_align")) { @@ -1034,7 +1034,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } } - if (!MAIN_VERSION_ATLEAST(bmain, 276, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 5)) { ListBase *lbarray[INDEX_ID_MAX]; int a; @@ -1048,13 +1048,13 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 276, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 7)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->r.bake.pass_filter = R_BAKE_PASS_FILTER_ALL; } } - if (!MAIN_VERSION_ATLEAST(bmain, 277, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 277, 1)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ParticleEditSettings *pset = &scene->toolsettings->particle; for (int a = 0; a < ARRAY_SIZE(pset->brush); a++) { @@ -1134,7 +1134,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 277, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 277, 2)) { if (!DNA_struct_elem_find(fd->filesdna, "Bone", "float", "scaleIn")) { LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) { do_version_bones_super_bbone(&arm->bonebase); @@ -1215,7 +1215,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 277, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 277, 3)) { /* ------- init of grease pencil initialization --------------- */ if (!DNA_struct_elem_find(fd->filesdna, "bGPDstroke", "bGPDpalettecolor", "*palcolor")) { /* Convert Grease Pencil to new palettes/brushes @@ -1273,7 +1273,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) /* ------- end of grease pencil initialization --------------- */ } - if (!MAIN_VERSION_ATLEAST(bmain, 278, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 278, 0)) { if (!DNA_struct_elem_find(fd->filesdna, "MovieTrackingTrack", "float", "weight_stab")) { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { const MovieTracking *tracking = &clip->tracking; @@ -1308,7 +1308,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } } - if (!MAIN_VERSION_ATLEAST(bmain, 278, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 278, 2)) { if (!DNA_struct_elem_find(fd->filesdna, "FFMpegCodecData", "int", "ffmpeg_preset")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { /* "medium" is the preset FFmpeg uses when no presets are given. */ @@ -1338,7 +1338,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 278, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 278, 3)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->toolsettings != nullptr) { ToolSettings *ts = scene->toolsettings; @@ -1377,7 +1377,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 278, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 278, 4)) { const float sqrt_3 = float(M_SQRT3); LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { br->fill_threshold /= sqrt_3; @@ -1411,7 +1411,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 278, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 278, 5)) { /* Mask primitive adding code was not initializing correctly id_type of its points' parent. */ LISTBASE_FOREACH (Mask *, mask, &bmain->masks) { LISTBASE_FOREACH (MaskLayer *, mlayer, &mask->masklayers) { @@ -1471,7 +1471,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 0)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->r.im_format.exr_codec == R_IMF_EXR_CODEC_DWAB) { scene->r.im_format.exr_codec = R_IMF_EXR_CODEC_DWAA; @@ -1484,7 +1484,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 3)) { if (!DNA_struct_elem_find(fd->filesdna, "FluidDomainSettings", "float", "clipping")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1499,7 +1499,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 4)) { /* Fix for invalid state of screen due to bug in older versions. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1578,7 +1578,7 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) void do_versions_after_linking_270(Main *bmain) { /* To be added to next subversion bump! */ - if (!MAIN_VERSION_ATLEAST(bmain, 279, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 0)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { ntreeSetTypes(nullptr, ntree); @@ -1592,7 +1592,7 @@ void do_versions_after_linking_270(Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 2)) { /* B-Bones (bbone_in/out -> bbone_easein/out) + Stepped FMod Frame Start/End fix */ /* if (!DNA_struct_elem_find(fd->filesdna, "Bone", "float", "bbone_easein")) */ BKE_fcurves_main_cb(bmain, do_version_bbone_easing_fcurve_fix, nullptr); diff --git a/source/blender/blenloader/intern/versioning_280.cc b/source/blender/blenloader/intern/versioning_280.cc index d9b110c6306..a1596b396df 100644 --- a/source/blender/blenloader/intern/versioning_280.cc +++ b/source/blender/blenloader/intern/versioning_280.cc @@ -2368,7 +2368,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) { bool use_collection_compat_28 = true; - if (!MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { use_collection_compat_28 = false; /* Convert group layer visibility flags to hidden nested collection. */ @@ -2433,7 +2433,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { BLO_read_assert_message(screen->scene == nullptr, , @@ -2474,7 +2474,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { @@ -2499,11 +2499,11 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } /* New workspace design. */ - if (!MAIN_VERSION_ATLEAST(bmain, 280, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 1)) { do_version_workspaces_after_lib_link(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 2)) { /* Cleanup any remaining SceneRenderLayer data for files that were created * with Blender 2.8 before the SceneRenderLayer > RenderLayer refactor. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -2517,7 +2517,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 3)) { /* Due to several changes to particle RNA and draw code particles from older files may * no longer be visible. * Here we correct this by setting a default draw size for those files. */ @@ -2530,7 +2530,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 4)) { LISTBASE_FOREACH (Object *, object, &bmain->objects) { if (object->particlesystem.first) { object->duplicator_visibility_flag = OB_DUPLI_FLAG_VIEWPORT; @@ -2556,7 +2556,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } /* SpaceTime & SpaceLogic removal/replacing */ - if (!MAIN_VERSION_ATLEAST(bmain, 280, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 9)) { const wmWindowManager *wm = static_cast(bmain->wm.first); const Scene *scene = static_cast(bmain->scenes.first); @@ -2593,7 +2593,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } #ifdef USE_COLLECTION_COMPAT_28 - if (use_collection_compat_28 && !MAIN_VERSION_ATLEAST(bmain, 280, 14)) { + if (use_collection_compat_28 && !MAIN_VERSION_FILE_ATLEAST(bmain, 280, 14)) { LISTBASE_FOREACH (Collection *, group, &bmain->collections) { do_version_group_collection_to_collection(bmain, group); } @@ -2605,7 +2605,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) #endif /* Update Curve object Shape Key data layout to include the Radius property */ - if (!MAIN_VERSION_ATLEAST(bmain, 280, 23)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 23)) { LISTBASE_FOREACH (Curve *, cu, &bmain->curves) { if (!cu->key || cu->key->elemsize != sizeof(float[4])) { continue; @@ -2675,7 +2675,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } /* Move B-Bone custom handle settings from bPoseChannel to Bone. */ - if (!MAIN_VERSION_ATLEAST(bmain, 280, 25)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 25)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { bArmature *arm = static_cast(ob->data); @@ -2723,7 +2723,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 30)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 30)) { LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { if (brush->gpencil_settings != nullptr) { brush->gpencil_tool = brush->gpencil_settings->brush_type; @@ -2732,7 +2732,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) BKE_paint_toolslots_init_from_main(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 38)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 38)) { /* Ensure we get valid rigidbody object/constraint data in relevant collections' objects. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -2747,7 +2747,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 69)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 69)) { /* Unify DOF settings (EEVEE part only) */ enum { SCE_EEVEE_DOF_ENABLED = (1 << 7) }; LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -2773,7 +2773,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 66)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 66)) { /* Shader node tree changes. After lib linking so we have all the typeinfo * pointers and updated sockets and we can use the high level node API to * manipulate nodes. */ @@ -2782,43 +2782,43 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) continue; } - if (!MAIN_VERSION_ATLEAST(bmain, 273, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 273, 5)) { /* Euler order was ZYX in previous versions. */ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { mapping_node_order_flip(node); } } - if (!MAIN_VERSION_ATLEAST(bmain, 276, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 6)) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { vector_curve_node_remap(node); } } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 2) || - (MAIN_VERSION_ATLEAST(bmain, 280, 0) && !MAIN_VERSION_ATLEAST(bmain, 280, 4))) + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 2) || + (MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0) && !MAIN_VERSION_FILE_ATLEAST(bmain, 280, 4))) { displacement_node_insert(ntree); } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 3)) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { displacement_principled_nodes(node); } } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 4) || - (MAIN_VERSION_ATLEAST(bmain, 280, 0) && !MAIN_VERSION_ATLEAST(bmain, 280, 5))) + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 4) || + (MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0) && !MAIN_VERSION_FILE_ATLEAST(bmain, 280, 5))) { /* Switch to squared roughness convention */ square_roughness_node_insert(ntree); } - if (!MAIN_VERSION_ATLEAST(bmain, 279, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 279, 5)) { ambient_occlusion_node_relink(ntree); } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 66)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 66)) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { image_node_colorspace(node); } @@ -2827,7 +2827,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 64)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 64)) { /* Unify Cycles and Eevee settings. */ Scene *scene = static_cast(bmain->scenes.first); const char *engine = (scene) ? scene->r.engine : "CYCLES"; @@ -2837,7 +2837,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 69)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 69)) { /* Unify Cycles and Eevee depth of field. */ Scene *scene = static_cast(bmain->scenes.first); const char *engine = (scene) ? scene->r.engine : "CYCLES"; @@ -2884,7 +2884,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 2)) { /* Replace Multiply and Additive blend mode by Alpha Blend * now that we use dual-source blending. */ /* We take care of doing only node-trees that are always part of materials @@ -2941,7 +2941,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 2)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_math_node_single_operand_operators(ntree); @@ -2950,7 +2950,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 3)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_vector_math_node_add_and_subtract_operators(ntree); @@ -2963,7 +2963,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 7)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_noise_node_dimensions(ntree); @@ -2972,7 +2972,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 8)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_mapping_node_inputs_and_properties(ntree); @@ -2981,7 +2981,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 10)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_musgrave_node_dimensions(ntree); @@ -2990,7 +2990,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 11)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_voronoi_node_dimensions(ntree); @@ -3002,7 +3002,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 282, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 282, 2)) { /* Init all Vertex/Sculpt and Weight Paint brushes. */ Brush *brush; Material *ma; @@ -3060,7 +3060,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 282, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 282, 4)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_noise_and_wave_distortion(ntree); @@ -3069,7 +3069,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 4)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_wave_node_directions_and_offset(ntree); @@ -3078,7 +3078,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 8)) { /* During development of Blender 2.80 the "Object.hide" property was * removed, and reintroduced in 5e968a996a53 as "Object.hide_viewport". */ @@ -3096,7 +3096,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain) } /* Old forgotten versioning code. */ - if (!MAIN_VERSION_ATLEAST(bmain, 300, 39)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 39)) { /* Paint Brush. This ensure that the brush paints by default. Used during the development and * patch review of the initial Sculpt Vertex Colors implementation (D5975) */ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { @@ -3176,7 +3176,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) { bool use_collection_compat_28 = true; - if (!MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { use_collection_compat_28 = false; LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -3184,7 +3184,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 1)) { if (!DNA_struct_elem_find(fd->filesdna, "GPUDOFSettings", "float", "ratio")) { LISTBASE_FOREACH (Camera *, ca, &bmain->cameras) { ca->gpu_dof.ratio = 1.0f; @@ -3205,7 +3205,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 2)) { if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "cascade_max_dist")) { LISTBASE_FOREACH (Light *, la, &bmain->lights) { la->cascade_max_dist = 1000.0f; @@ -3359,7 +3359,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } #ifdef USE_COLLECTION_COMPAT_28 - if (use_collection_compat_28 && !MAIN_VERSION_ATLEAST(bmain, 280, 3)) { + if (use_collection_compat_28 && !MAIN_VERSION_FILE_ATLEAST(bmain, 280, 3)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { do_version_view_layer_visibility(view_layer); @@ -3376,7 +3376,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) /* Files from this version included do get a valid `win->screen` pointer written for backward * compatibility, however this should never be used nor needed, so clear these pointers here. */ - if (MAIN_VERSION_ATLEAST(bmain, 280, 1)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 280, 1)) { LISTBASE_FOREACH (wmWindowManager *, wm, &bmain->wm) { LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { win->screen = nullptr; @@ -3384,7 +3384,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 3)) { /* init grease pencil grids and paper */ if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "gpencil_paper_color[3]")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -3401,7 +3401,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 6)) { if (DNA_struct_elem_find(fd->filesdna, "SpaceOutliner", "int", "filter") == false) { /* Update files using invalid (outdated) outlinevis Outliner values. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -3454,7 +3454,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) /* Assume (demo) files written with 2.8 want to show * Eevee renders in the viewport. */ - if (MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { v3d->drawtype = OB_MATERIAL; } } @@ -3463,18 +3463,18 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 7)) { /* Render engine storage moved elsewhere and back during 2.8 * development, we assume any files saved in 2.8 had Eevee set * as scene render engine. */ - if (MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { STRNCPY(scene->r.engine, RE_engine_id_BLENDER_EEVEE); } } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 8)) { /* Blender Internal removal */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (STR_ELEM(scene->r.engine, "BLENDER_RENDER", "BLENDER_GAME")) { @@ -3492,7 +3492,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 11)) { /* Remove info editor, but only if at the top of the window. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -3528,7 +3528,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 11)) { LISTBASE_FOREACH (Light *, la, &bmain->lights) { if (la->mode & (1 << 13)) { /* LA_SHAD_RAY */ la->mode |= LA_SHADOW; @@ -3537,7 +3537,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 12)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 12)) { /* Remove tool property regions. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -3562,7 +3562,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 13)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 13)) { /* Initialize specular factor. */ if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "spec_fac")) { LISTBASE_FOREACH (Light *, la, &bmain->lights) { @@ -3590,7 +3590,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 14)) { if (!DNA_struct_elem_find(fd->filesdna, "Scene", "SceneDisplay", "display")) { /* Initialize new scene.SceneDisplay */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -3790,7 +3790,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 15)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 15)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->display.matcap_ssao_distance = 0.2f; scene->display.matcap_ssao_attenuation = 1.0f; @@ -3863,7 +3863,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } /* Particle shape shared with Eevee. */ - if (!MAIN_VERSION_ATLEAST(bmain, 280, 16)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 16)) { LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) { IDProperty *cpart = version_cycles_properties_from_ID(&part->id); @@ -3879,11 +3879,11 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 18)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 18)) { if (!DNA_struct_elem_find(fd->filesdna, "Material", "float", "roughness")) { LISTBASE_FOREACH (Material *, mat, &bmain->materials) { if (mat->use_nodes) { - if (MAIN_VERSION_ATLEAST(bmain, 280, 0)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 280, 0)) { mat->roughness = mat->gloss_mir; } else { @@ -3975,7 +3975,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 19)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 19)) { if (!DNA_struct_elem_find(fd->filesdna, "Image", "ListBase", "renderslot")) { LISTBASE_FOREACH (Image *, ima, &bmain->images) { if (ima->type == IMA_TYPE_R_RESULT) { @@ -4021,7 +4021,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 21)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 21)) { LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { if (sce->ed != nullptr && sce->ed->seqbase.first != nullptr) { do_versions_seq_unique_name_all_strips(sce, &sce->ed->seqbase); @@ -4153,7 +4153,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 22)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 22)) { if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "annotate_v3d_align")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->toolsettings->annotate_v3d_align = GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR; @@ -4320,7 +4320,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 24)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 24)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4379,7 +4379,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 25)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 25)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { UnitSettings *unit = &scene->unit; if (unit->system != USER_UNIT_NONE) { @@ -4397,7 +4397,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 29)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 29)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4420,7 +4420,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) * * From here on it should be fine to assume there always is a header. */ - if (!MAIN_VERSION_ATLEAST(bmain, 283, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 1)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4489,7 +4489,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 30)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 30)) { /* grease pencil main material show switches */ LISTBASE_FOREACH (Material *, mat, &bmain->materials) { if (mat->gp_style) { @@ -4499,7 +4499,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 33)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 33)) { if (!DNA_struct_elem_find(fd->filesdna, "SceneEEVEE", "float", "overscan")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { @@ -4680,7 +4680,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 34)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 34)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, slink, &area->spacedata) { @@ -4708,7 +4708,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 36)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 36)) { if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "curvature_ridge_factor")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -4765,7 +4765,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 37)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 37)) { LISTBASE_FOREACH (Camera *, ca, &bmain->cameras) { ca->drawsize *= 2.0f; } @@ -4787,7 +4787,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 38)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 38)) { if (DNA_struct_elem_find(fd->filesdna, "Object", "char", "empty_image_visibility_flag")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { ob->empty_image_visibility_flag ^= (OB_EMPTY_IMAGE_HIDE_PERSPECTIVE | @@ -4898,7 +4898,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 40)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 40)) { if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "snap_transform_mode_flag")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->toolsettings->snap_transform_mode_flag = SCE_SNAP_TRANSFORM_MODE_TRANSLATE; @@ -4976,12 +4976,12 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 43)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 43)) { ListBase *lb = which_libbase(bmain, ID_BR); BKE_main_id_repair_duplicate_names_listbase(bmain, lb); } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 44)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 44)) { if (!DNA_struct_elem_find(fd->filesdna, "Material", "float", "a")) { LISTBASE_FOREACH (Material *, mat, &bmain->materials) { mat->a = 1.0f; @@ -5005,7 +5005,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 46)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 46)) { /* Add wireframe color. */ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "wire_color_type")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -5031,7 +5031,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 47)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 47)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ParticleEditSettings *pset = &scene->toolsettings->particle; if (pset->brushtype < 0) { @@ -5070,7 +5070,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 48)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 48)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { /* Those are not currently used, but are accessible through RNA API and were not * properly initialized previously. This is mere copy of #scene_init_data code. */ @@ -5089,7 +5089,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 49)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 49)) { /* All tool names changed, reset to defaults. */ LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { while (!BLI_listbase_is_empty(&workspace->tools)) { @@ -5098,7 +5098,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 52)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 52)) { LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) { /* Replace deprecated PART_DRAW_BB by PART_DRAW_NOT */ if (part->ren_as == PART_DRAW_BB) { @@ -5136,7 +5136,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 53)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 53)) { LISTBASE_FOREACH (Material *, mat, &bmain->materials) { /* Eevee: Keep material appearance consistent with previous behavior. */ if (!mat->use_nodes || !mat->nodetree || mat->blend_method == MA_BM_SOLID) { @@ -5158,7 +5158,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 54)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 54)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { bool is_first_subdiv = true; LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -5186,7 +5186,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 55)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 55)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5209,7 +5209,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 56)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 56)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5226,7 +5226,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 57)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 57)) { /* Enable Show Interpolation in dopesheet by default. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -5310,7 +5310,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 60)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 60)) { if (!DNA_struct_elem_find(fd->filesdna, "bSplineIKConstraint", "short", "yScaleMode")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { if (ob->pose) { @@ -5381,7 +5381,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 61)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 61)) { /* Added a power option to Copy Scale. */ if (!DNA_struct_elem_find(fd->filesdna, "bSizeLikeConstraint", "float", "power")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -5434,7 +5434,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 68)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 68)) { /* Unify Cycles and Eevee film transparency. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (STREQ(scene->r.engine, RE_engine_id_CYCLES)) { @@ -5448,7 +5448,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 69)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 69)) { LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) { arm->flag &= ~(ARM_FLAG_UNUSED_7 | ARM_FLAG_UNUSED_9); } @@ -5461,7 +5461,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 70)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 70)) { /* New image alpha modes. */ LISTBASE_FOREACH (Image *, image, &bmain->images) { enum { IMA_IGNORE_ALPHA = (1 << 12) }; @@ -5472,7 +5472,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 71)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 71)) { /* This assumes the Blender builtin config. Depending on the OCIO * environment variable for versioning is weak, and these deprecated view * transforms and look names don't seem to exist in other commonly used @@ -5497,7 +5497,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 74)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 74)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->ed != nullptr) { do_versions_seq_alloc_transform_and_crop(&scene->ed->seqbase); @@ -5505,7 +5505,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 280, 75)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 75)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->master_collection != nullptr) { scene->master_collection->flag &= ~(COLLECTION_HIDE_VIEWPORT | COLLECTION_HIDE_SELECT | @@ -5542,7 +5542,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 1)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_DataTransfer) { @@ -5558,7 +5558,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 3)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5586,7 +5586,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 3)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_vector_math_node_operators_enum_mapping(ntree); @@ -5595,7 +5595,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 4)) { ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { bNodeTree *ntree = ntreeFromID(id); @@ -5606,7 +5606,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_MAIN_ID_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 5)) { LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { if (br->ob_mode & OB_MODE_SCULPT && br->normal_radius_factor == 0.0f) { br->normal_radius_factor = 0.5f; @@ -5622,7 +5622,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 6)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5644,7 +5644,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 9)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5722,7 +5722,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 10)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_musgrave_node_color_output(ntree); @@ -5731,7 +5731,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 11)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { update_voronoi_node_f3_and_f4(ntree); @@ -5741,7 +5741,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 281, 15)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 281, 15)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->toolsettings->snap_node_mode == SCE_SNAP_TO_NODE_X) { scene->toolsettings->snap_node_mode = SCE_SNAP_TO_GRID; @@ -5812,7 +5812,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 282, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 282, 2)) { do_version_curvemapping_walker(bmain, do_version_curvemapping_flag_extend_extrapolate); LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -5872,7 +5872,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 282, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 282, 3)) { /* Remove Unified pressure/size and pressure/alpha */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *ts = scene->toolsettings; @@ -5929,7 +5929,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 3)) { /* Color Management Look. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ColorManagedViewSettings *view_settings; @@ -6024,7 +6024,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 5)) { /* Alembic Transform Cache changed from world to local space. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (bConstraint *, con, &ob->constraints) { @@ -6061,7 +6061,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 7)) { /* Init default Grease Pencil Vertex paint mix factor for Viewport. */ if (!DNA_struct_elem_find( fd->filesdna, "View3DOverlay", "float", "gpencil_vertex_paint_opacity")) { @@ -6317,7 +6317,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 8)) { if (!DNA_struct_elem_find( fd->filesdna, "View3DOverlay", "float", "sculpt_mode_face_sets_opacity")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -6374,7 +6374,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 11)) { if (!DNA_struct_elem_find(fd->filesdna, "OceanModifierData", "float", "fetch_jonswap")) { LISTBASE_FOREACH (Object *, object, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { @@ -6413,7 +6413,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 12)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 12)) { /* Activate f-curve drawing in the sequencer. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -6440,7 +6440,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 14)) { /* Solidify modifier merge tolerance. */ if (!DNA_struct_elem_find(fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -6480,7 +6480,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } /* Match scale of fluid modifier gravity with scene gravity. */ - if (!MAIN_VERSION_ATLEAST(bmain, 283, 15)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 15)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Fluid) { @@ -6493,14 +6493,14 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 16)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 16)) { /* Init SMAA threshold for grease pencil render. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->grease_pencil_settings.smaa_threshold = 1.0f; } } - if (!MAIN_VERSION_ATLEAST(bmain, 283, 17)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 17)) { /* Reset the cloth mass to 1.0 in brushes with an invalid value. */ LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { if (br->sculpt_tool == SCULPT_TOOL_CLOTH) { @@ -6521,7 +6521,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } /* Old forgotten versioning code. */ - if (!MAIN_VERSION_ATLEAST(bmain, 300, 39)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 39)) { /* Set the cloth wind factor to 1 for old forces. */ if (!DNA_struct_elem_find(fd->filesdna, "PartDeflect", "float", "f_wind_factor")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { diff --git a/source/blender/blenloader/intern/versioning_290.cc b/source/blender/blenloader/intern/versioning_290.cc index 176595e4cf2..531eec4548e 100644 --- a/source/blender/blenloader/intern/versioning_290.cc +++ b/source/blender/blenloader/intern/versioning_290.cc @@ -415,7 +415,7 @@ static void version_node_socket_duplicate(bNodeTree *ntree, void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) { - if (!MAIN_VERSION_ATLEAST(bmain, 290, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 290, 1)) { /* Patch old grease pencil modifiers material filter. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) { @@ -572,7 +572,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 1)) { LISTBASE_FOREACH (Collection *, collection, &bmain->collections) { if (BKE_collection_cycles_fix(bmain, collection)) { printf( @@ -583,7 +583,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 8)) { /** * Make sure Emission Alpha fcurve and drivers is properly mapped after the Emission Strength * got introduced. @@ -600,7 +600,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } /* Convert all Multires displacement to Catmull-Clark subdivision limit surface. */ - if (!MAIN_VERSION_ATLEAST(bmain, 292, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 1)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Multires) { @@ -613,7 +613,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 2)) { eSpaceSeq_Proxy_RenderSize render_size = get_sequencer_render_size(bmain); @@ -624,7 +624,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 8)) { /* Systematically rebuild posebones to ensure consistent ordering matching the one of bones in * Armature obdata. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -648,7 +648,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 16)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 16)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { seq_update_meta_disp_range(scene); } @@ -662,7 +662,7 @@ void do_versions_after_linking_290(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 20)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 20)) { /* Set zero user text objects to have a fake user. */ LISTBASE_FOREACH (Text *, text, &bmain->texts) { if (text->id.us == 0) { @@ -816,7 +816,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) { UNUSED_VARS(fd); - if (MAIN_VERSION_ATLEAST(bmain, 290, 2) && MAIN_VERSION_OLDER(bmain, 291, 1)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 290, 2) && MAIN_VERSION_FILE_OLDER(bmain, 291, 1)) { /* In this range, the extrude manifold could generate meshes with degenerated face. */ LISTBASE_FOREACH (Mesh *, me, &bmain->meshes) { const MPoly *polys = static_cast(CustomData_get_layer(&me->pdata, CD_MPOLY)); @@ -849,7 +849,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } /** Repair files from duplicate brushes added to blend files, see: #76738. */ - if (!MAIN_VERSION_ATLEAST(bmain, 290, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 290, 2)) { { short id_codes[] = {ID_BR, ID_PAL}; for (int i = 0; i < ARRAY_SIZE(id_codes); i++) { @@ -892,7 +892,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 290, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 290, 4)) { /* Clear old deprecated bit-flag from edit weights modifiers, we now use it for something else. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -926,7 +926,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 290, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 290, 5)) { /* New denoiser settings. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { IDProperty *cscene = version_cycles_properties_from_ID(&scene->id); @@ -976,7 +976,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 290, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 290, 6)) { /* Transition to saving expansion for all of a modifier's sub-panels. */ if (!DNA_struct_elem_find(fd->filesdna, "ModifierData", "short", "ui_expand_flag")) { LISTBASE_FOREACH (Object *, object, &bmain->objects) { @@ -1073,7 +1073,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 1)) { /* Initialize additional parameter of the Nishita sky model and change altitude unit. */ if (!DNA_struct_elem_find(fd->filesdna, "NodeTexSky", "float", "sun_intensity")) { @@ -1148,7 +1148,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 2)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { RigidBodyWorld *rbw = scene->rigidbody_world; @@ -1195,7 +1195,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 4) && MAIN_VERSION_ATLEAST(bmain, 291, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 4) && MAIN_VERSION_FILE_ATLEAST(bmain, 291, 1)) { /* Due to a48d78ce07f4f, CustomData.totlayer and CustomData.maxlayer has been written * incorrectly. Fortunately, the size of the layers array has been written to the .blend file * as well, so we can reconstruct totlayer and maxlayer from that. */ @@ -1212,7 +1212,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 5)) { /* Fix fcurves to allow for new bezier handles behavior (#75881 and D8752). */ LISTBASE_FOREACH (bAction *, act, &bmain->actions) { LISTBASE_FOREACH (FCurve *, fcu, &act->curves) { @@ -1267,7 +1267,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 6)) { /* Darken Inactive Overlay. */ if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "fade_alpha")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -1305,13 +1305,13 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 7)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->r.simplify_volumes = 1.0f; } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 8)) { if (!DNA_struct_elem_find(fd->filesdna, "WorkSpaceDataRelation", "int", "parentid")) { LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { LISTBASE_FOREACH_MUTABLE ( @@ -1362,7 +1362,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 291, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 291, 9)) { /* Remove options of legacy UV/Image editor */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1392,7 +1392,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 1)) { { const int LEGACY_REFINE_RADIAL_DISTORTION_K1 = (1 << 2); @@ -1421,7 +1421,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 5)) { /* Initialize the opacity of the overlay wireframe */ if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "wireframe_opacity")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -1479,7 +1479,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 7)) { /* Make all IDProperties used as interface of geometry node trees overridable. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1549,7 +1549,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 8)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { if (STREQ(node->idname, "GeometryNodeRandomAttribute")) { @@ -1565,7 +1565,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 9)) { /* Default properties editors to auto outliner sync. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1593,7 +1593,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 10)) { if (!DNA_struct_find(fd->filesdna, "NodeSetAlpha")) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type != NTREE_COMPOSIT) { @@ -1623,7 +1623,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) /* Enable "Save as Render" option for file output node by default (apply view transform to image * on save) */ - if (!MAIN_VERSION_ATLEAST(bmain, 292, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 11)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1640,7 +1640,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 1)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_GEOMETRY) { version_node_socket_name(ntree, GEO_NODE_MESH_BOOLEAN, "Geometry A", "Geometry 1"); @@ -1665,8 +1665,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 292, 14) || - ((bmain->versionfile == 293) && !MAIN_VERSION_ATLEAST(bmain, 293, 1))) + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 292, 14) || + ((bmain->versionfile == 293) && !MAIN_VERSION_FILE_ATLEAST(bmain, 293, 1))) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type != NTREE_GEOMETRY) { @@ -1684,7 +1684,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 1)) { /* Grease pencil layer transform matrix. */ if (!DNA_struct_elem_find(fd->filesdna, "bGPDlayer", "float", "location[0]")) { LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) { @@ -1705,7 +1705,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 5)) { /* Change Nishita sky model Altitude unit. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { @@ -1720,7 +1720,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 6)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { @@ -1734,7 +1734,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 7)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_GEOMETRY) { version_node_join_geometry_for_multi_input_socket(ntree); @@ -1743,7 +1743,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 9)) { if (!DNA_struct_elem_find(fd->filesdna, "SceneEEVEE", "float", "bokeh_overblur")) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->eevee.bokeh_neighbor_max = 10.0f; @@ -1766,7 +1766,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 10)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { /* Fix old scene with too many samples that were not being used. * Now they are properly used and might produce a huge slowdown. @@ -1777,7 +1777,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 11)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1792,7 +1792,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 12)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 12)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -1834,7 +1834,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 13)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 13)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1846,7 +1846,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 14)) { if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "diff_fac")) { LISTBASE_FOREACH (Light *, light, &bmain->lights) { light->diff_fac = 1.0f; @@ -1855,7 +1855,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 15)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 15)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -1867,7 +1867,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 16)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 16)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_GEOMETRY) { version_node_socket_name(ntree, GEO_NODE_MESH_PRIMITIVE_GRID, "Size", "Size X"); @@ -1896,7 +1896,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 293, 18)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 18)) { if (!DNA_struct_elem_find(fd->filesdna, "bArmature", "float", "axes_position")) { /* Convert the axes draw position to its old default (tip of bone). */ LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) { @@ -1940,7 +1940,7 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } /* Set default value for the new bisect_threshold parameter in the mirror modifier. */ - if (!MAIN_VERSION_ATLEAST(bmain, 293, 19)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 293, 19)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Mirror) { diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 49c20b10ee0..de9e18209d8 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -1050,7 +1050,7 @@ static void version_geometry_nodes_extrude_smooth_propagation(bNodeTree &ntree) void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) { - if (MAIN_VERSION_ATLEAST(bmain, 300, 0) && !MAIN_VERSION_ATLEAST(bmain, 300, 1)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 300, 0) && !MAIN_VERSION_FILE_ATLEAST(bmain, 300, 1)) { /* Set zero user text objects to have a fake user. */ LISTBASE_FOREACH (Text *, text, &bmain->texts) { if (text->id.us == 0) { @@ -1059,20 +1059,20 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 3)) { sort_linked_ids(bmain); assert_sorted_ids(bmain); } - if (MAIN_VERSION_ATLEAST(bmain, 300, 3)) { + if (MAIN_VERSION_FILE_ATLEAST(bmain, 300, 3)) { assert_sorted_ids(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 11)) { move_vertex_group_names_to_object_data(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 13)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 13)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->ed != nullptr) { do_versions_sequencer_speed_effect_recursive(scene, &scene->ed->seqbase); @@ -1080,11 +1080,11 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 25)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 25)) { version_node_socket_index_animdata(bmain, NTREE_SHADER, SH_NODE_BSDF_PRINCIPLED, 4, 2, 25); } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 26)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 26)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *tool_settings = scene->toolsettings; ImagePaintSettings *imapaint = &tool_settings->imapaint; @@ -1114,7 +1114,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 28)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 28)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { version_geometry_nodes_add_realize_instance_nodes(ntree); @@ -1122,11 +1122,11 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 30)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 30)) { do_versions_idproperty_ui_data(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 32)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 32)) { /* Update Switch Node Non-Fields switch input to Switch_001. */ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { @@ -1153,7 +1153,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 33)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 33)) { /* This was missing from #move_vertex_group_names_to_object_data. */ LISTBASE_FOREACH (Object *, object, &bmain->objects) { if (ELEM(object->type, OB_MESH, OB_LATTICE, OB_GPENCIL_LEGACY)) { @@ -1165,7 +1165,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 35)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 35)) { /* Add a new modifier to realize instances from previous modifiers. * Previously that was done automatically by geometry nodes. */ bNodeTree *realize_instances_node_tree = nullptr; @@ -1197,7 +1197,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 37)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 37)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { LISTBASE_FOREACH_MUTABLE (bNode *, node, &ntree->nodes) { @@ -1210,7 +1210,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 301, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 301, 6)) { { /* Ensure driver variable names are unique within the driver. */ ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { @@ -1245,7 +1245,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 14)) { /* Sequencer channels region. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1276,7 +1276,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 5)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { Editing *ed = SEQ_editing_get(scene); if (ed == nullptr) { @@ -1287,7 +1287,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 6)) { /* In the Dope Sheet, for every mode other than Timeline, open the Properties panel. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1315,7 +1315,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 1)) { /* Split the transfer attribute node into multiple smaller nodes. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_GEOMETRY) { @@ -1325,7 +1325,7 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 6)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { Editing *ed = SEQ_editing_get(scene); if (ed == nullptr) { @@ -2359,7 +2359,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) * snap_flag member individually. */ enum { SCE_SNAP_SEQ = (1 << 7) }; - if (!MAIN_VERSION_ATLEAST(bmain, 300, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 1)) { /* Set default value for the new bisect_threshold parameter in the mirror modifier. */ if (!DNA_struct_elem_find(fd->filesdna, "MirrorModifierData", "float", "bisect_threshold")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -2382,7 +2382,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 2)) { version_switch_node_input_prefix(bmain); if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "custom_scale_xyz[3]")) { @@ -2397,7 +2397,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 4)) { /* Add a properties sidebar to the spreadsheet editor. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -2477,7 +2477,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 5)) { /* Add a dataset sidebar to the spreadsheet editor. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -2498,7 +2498,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 6)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { @@ -2512,7 +2512,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 7)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *tool_settings = scene->toolsettings; tool_settings->snap_flag |= SCE_SNAP_SEQ; @@ -2548,7 +2548,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 8)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->master_collection != nullptr) { BLI_strncpy(scene->master_collection->id.name + 2, @@ -2558,7 +2558,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 9)) { /* Fix a bug where reordering FCurves and bActionGroups could cause some corruption. Just * reconstruct all the action groups & ensure that the FCurves of a group are continuously * stored (i.e. not mixed with other groups) to be sure. See #89435. */ @@ -2578,7 +2578,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 10)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *tool_settings = scene->toolsettings; if (tool_settings->snap_uv_mode & (1 << 4)) { @@ -2593,7 +2593,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 13)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 13)) { /* Convert Surface Deform to sparse-capable bind structure. */ if (!DNA_struct_elem_find(fd->filesdna, "SurfaceDeformModifierData", "int", "num_mesh_verts")) { @@ -2654,14 +2654,14 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 14)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *tool_settings = scene->toolsettings; tool_settings->snap_flag &= ~SCE_SNAP_SEQ; } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 15)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 15)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -2675,12 +2675,12 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } /* Font names were copied directly into ID names, see: #90417. */ - if (!MAIN_VERSION_ATLEAST(bmain, 300, 16)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 16)) { ListBase *lb = which_libbase(bmain, ID_VF); BKE_main_id_repair_duplicate_names_listbase(bmain, lb); } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 17)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 17)) { if (!DNA_struct_elem_find( fd->filesdna, "View3DOverlay", "float", "normals_constant_screen_size")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -2709,7 +2709,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } /* Move visibility from Cycles to Blender. */ - if (!MAIN_VERSION_ATLEAST(bmain, 300, 17)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 17)) { LISTBASE_FOREACH (Object *, object, &bmain->objects) { IDProperty *cvisibility = version_cycles_visibility_properties_from_ID(&object->id); int flag = 0; @@ -2746,7 +2746,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 18)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 18)) { if (!DNA_struct_elem_find( fd->filesdna, "WorkSpace", "AssetLibraryReference", "asset_library_ref")) { LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { @@ -2784,7 +2784,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 19)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 19)) { /* Disable Fade Inactive Overlay by default as it is redundant after introducing flash on * mode transfer. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -2804,7 +2804,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 20)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 20)) { /* Use new vector Size socket in Cube Mesh Primitive node. */ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { @@ -2841,7 +2841,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 22)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 22)) { if (!DNA_struct_elem_find( fd->filesdna, "LineartGpencilModifierData", "bool", "use_crease_on_smooth")) { @@ -2858,7 +2858,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 23)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 23)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -2898,7 +2898,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 24)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 24)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { SequencerToolSettings *sequencer_tool_settings = SEQ_tool_settings_ensure(scene); sequencer_tool_settings->pivot_point = V3D_AROUND_CENTER_MEDIAN; @@ -2935,7 +2935,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 25)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 25)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -2954,7 +2954,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 25)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 25)) { enum { DENOISER_NLM = 1, DENOISER_OPENIMAGEDENOISE = 4, @@ -2972,7 +2972,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 26)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 26)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Nodes) { @@ -3006,7 +3006,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 29)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 29)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3027,7 +3027,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 31)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 31)) { /* Swap header with the tool header so the regular header is always on the edge. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -3081,7 +3081,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 33)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 33)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3105,7 +3105,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 36)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 36)) { /* Update the `idnames` for renamed geometry and function nodes. */ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { @@ -3133,7 +3133,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 37)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 37)) { /* Node Editor: toggle overlays on. */ if (!DNA_struct_find(fd->filesdna, "SpaceNodeOverlay")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -3150,7 +3150,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 38)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 38)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { @@ -3166,7 +3166,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 39)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 39)) { LISTBASE_FOREACH (wmWindowManager *, wm, &bmain->wm) { wm->xr.session_settings.base_scale = 1.0f; wm->xr.session_settings.draw_flags |= (V3D_OFSDRAW_SHOW_SELECTION | @@ -3175,7 +3175,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 40)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 40)) { /* Update the `idnames` for renamed geometry and function nodes. */ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { @@ -3238,7 +3238,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 300, 42)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 42)) { /* Use consistent socket identifiers for the math node. * The code to make unique identifiers from the names was inconsistent. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { @@ -3286,8 +3286,8 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) /* Special case to handle older in-development 3.1 files, before change from 3.0 branch gets * merged in master. */ - if (!MAIN_VERSION_ATLEAST(bmain, 300, 42) || - (bmain->versionfile == 301 && !MAIN_VERSION_ATLEAST(bmain, 301, 3))) + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 42) || + (bmain->versionfile == 301 && !MAIN_VERSION_FILE_ATLEAST(bmain, 301, 3))) { /* Update LibOverride operations regarding insertions in RNA collections (i.e. modifiers, * constraints and NLA tracks). */ @@ -3303,7 +3303,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_MAIN_ID_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 301, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 301, 4)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { continue; @@ -3342,7 +3342,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 301, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 301, 6)) { /* Add node storage for map range node. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -3420,8 +3420,8 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 301, 7) || - (bmain->versionfile == 302 && !MAIN_VERSION_ATLEAST(bmain, 302, 4))) + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 301, 7) || + (bmain->versionfile == 302 && !MAIN_VERSION_FILE_ATLEAST(bmain, 302, 4))) { /* Duplicate value for two flags that mistakenly had the same numeric value. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -3436,7 +3436,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 2)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->ed != nullptr) { SEQ_for_each_callback(&scene->ed->seqbase, seq_transform_filter_set, nullptr); @@ -3444,7 +3444,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 6)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *ts = scene->toolsettings; if (ts->uv_relax_method == 0) { @@ -3520,7 +3520,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } /* Rebuild active/render color attribute references. */ - if (!MAIN_VERSION_ATLEAST(bmain, 302, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 6)) { LISTBASE_FOREACH (Brush *, br, &bmain->brushes) { /* Buggy code in wm_toolsystem broke smear in old files, * reset to defaults. */ @@ -3567,7 +3567,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 7)) { /* Generate 'system' liboverrides IDs. * NOTE: This is a fairly rough process, based on very basic heuristics. Should be enough for a * do_version code though, this is a new optional feature, not a critical conversion. */ @@ -3613,7 +3613,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 9)) { /* Sequencer channels region. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -3668,7 +3668,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 10)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3751,7 +3751,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 12)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 12)) { /* UV/Image show background grid option. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -3788,7 +3788,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 13)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 13)) { /* Enable named attributes overlay in node editor. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -3820,14 +3820,14 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 302, 14)) { /* Compensate for previously wrong squared distance. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->r.bake.max_ray_distance = sasqrt(scene->r.bake.max_ray_distance); } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 1)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { versioning_replace_legacy_combined_and_separate_color_nodes(ntree); } @@ -3897,7 +3897,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 2)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3909,7 +3909,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 3)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3935,7 +3935,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 4)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -3962,7 +3962,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 5)) { /* Fix for #98925 - remove channels region, that was initialized in incorrect editor types. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -3983,7 +3983,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 303, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 303, 6)) { /* Initialize brush curves sculpt settings. */ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { if (brush->ob_mode != OB_MODE_SCULPT_CURVES) { @@ -4003,7 +4003,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) BKE_main_namemap_validate_and_fix(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 1)) { /* Image generation information transferred to tiles. */ if (!DNA_struct_elem_find(fd->filesdna, "ImageTile", "int", "gen_x")) { LISTBASE_FOREACH (Image *, ima, &bmain->images) { @@ -4051,14 +4051,14 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 2)) { /* Initialize brush curves sculpt settings. */ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { brush->automasking_cavity_factor = 0.5f; } } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 3)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4087,14 +4087,14 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 4)) { /* Update brush sculpt settings. */ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { brush->automasking_cavity_factor = 1.0f; } } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 5)) { /* Fix for #101622 - update flags of sequence editor regions that were not initialized * properly. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -4117,7 +4117,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 304, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 304, 6)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { continue; @@ -4136,7 +4136,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 2)) { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { MovieTracking *tracking = &clip->tracking; @@ -4152,7 +4152,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 4)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { version_node_socket_name(ntree, GEO_NODE_COLLECTION_INFO, "Geometry", "Instances"); @@ -4173,7 +4173,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 6)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4187,7 +4187,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 7)) { LISTBASE_FOREACH (Light *, light, &bmain->lights) { light->radius = light->area_size; } @@ -4208,7 +4208,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 8)) { const int CV_SCULPT_SELECTION_ENABLED = (1 << 1); LISTBASE_FOREACH (Curves *, curves_id, &bmain->hair_curves) { curves_id->flag &= ~CV_SCULPT_SELECTION_ENABLED; @@ -4250,7 +4250,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 9)) { /* Enable legacy normal and rotation outputs in Distribute Points on Faces node. */ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type != NTREE_GEOMETRY) { @@ -4265,7 +4265,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 305, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 305, 10)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4325,7 +4325,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 3)) { /* Z bias for retopology overlay. */ if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "retopology_offset")) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -4356,7 +4356,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 5)) { /* Some regions used to be added/removed dynamically. Ensure they are always there, there is a * `ARegionType.poll()` now. */ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { @@ -4418,7 +4418,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) * Now this property supports name editing. So assign value to name variable of F-modifier * otherwise modifier interface would show an empty name field. * Also ensure uniqueness when opening old files. */ - if (!MAIN_VERSION_ATLEAST(bmain, 306, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 7)) { LISTBASE_FOREACH (bAction *, act, &bmain->actions) { LISTBASE_FOREACH (FCurve *, fcu, &act->curves) { LISTBASE_FOREACH (FModifier *, fcm, &fcu->modifiers) { @@ -4428,13 +4428,13 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 8)) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { ob->flag |= OB_FLAG_USE_SIMULATION_CACHE; } } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 9)) { /* Fix sound strips with speed factor set to 0. See #107289. */ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { Editing *ed = SEQ_editing_get(scene); @@ -4469,7 +4469,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 10)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { /* Set default values for new members. */ scene->toolsettings->snap_mode_tools = SCE_SNAP_TO_GEOM; @@ -4477,7 +4477,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 306, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 306, 11)) { BKE_animdata_main_cb(bmain, version_liboverride_nla_frame_start_end, nullptr); /* Store simulation bake directory in geometry nodes modifier. */ diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index ee9c18afa44..a6e25386085 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -46,7 +46,7 @@ void do_versions_after_linking_400(FileData * /*fd*/, Main *bmain) { - if (!MAIN_VERSION_ATLEAST(bmain, 400, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 9)) { /* Fix area light scaling. */ LISTBASE_FOREACH (Light *, light, &bmain->lights) { light->energy = light->energy_deprecated; @@ -268,20 +268,20 @@ static void version_replace_texcoord_normal_socket(bNodeTree *ntree) void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) { - if (!MAIN_VERSION_ATLEAST(bmain, 400, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 1)) { LISTBASE_FOREACH (Mesh *, mesh, &bmain->meshes) { version_mesh_legacy_to_struct_of_array_format(*mesh); } version_movieclips_legacy_camera_object(bmain); } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 2)) { LISTBASE_FOREACH (Mesh *, mesh, &bmain->meshes) { BKE_mesh_legacy_bevel_weight_to_generic(mesh); } } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 3)) { LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { if (ntree->type == NTREE_GEOMETRY) { version_geometry_nodes_add_realize_instance_nodes(ntree); @@ -291,7 +291,7 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) /* 400 4 did not require any do_version here. */ - if (!MAIN_VERSION_ATLEAST(bmain, 400, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 5)) { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { ToolSettings *ts = scene->toolsettings; if (ts->snap_mode_tools != SCE_SNAP_TO_NONE) { @@ -307,7 +307,7 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 6)) { LISTBASE_FOREACH (Mesh *, mesh, &bmain->meshes) { BKE_mesh_legacy_face_map_to_generic(mesh); } @@ -318,20 +318,20 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) FOREACH_NODETREE_END; } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 7)) { LISTBASE_FOREACH (Mesh *, mesh, &bmain->meshes) { version_mesh_crease_generic(*bmain); } } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 8)) { LISTBASE_FOREACH (bAction *, act, &bmain->actions) { act->frame_start = max_ff(act->frame_start, MINAFRAMEF); act->frame_end = min_ff(act->frame_end, MAXFRAMEF); } } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 9)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 9)) { LISTBASE_FOREACH (Light *, light, &bmain->lights) { if (light->type == LA_SPOT && light->nodetree) { version_replace_texcoord_normal_socket(light->nodetree); @@ -346,7 +346,7 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 10)) { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { @@ -359,7 +359,7 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 400, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 11)) { version_vertex_weight_edit_preserve_threshold_exclusivity(bmain); } diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index be7f3186974..a9c615e220f 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -2078,7 +2078,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 2)) { Image *ima; /* initialize 1:1 Aspect */ @@ -2087,7 +2087,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 4)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 4)) { bArmature *arm; ModifierData *md; Object *ob; @@ -2105,7 +2105,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 5)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 5)) { /* foreground color needs to be something other than black */ Scene *sce; for (sce = bmain->scenes.first; sce; sce = sce->id.next) { @@ -2115,7 +2115,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 6)) { Scene *sce; /* fix frs_sec_base */ for (sce = bmain->scenes.first; sce; sce = sce->id.next) { @@ -2125,7 +2125,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 7)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 7)) { Object *ob; bPoseChannel *pchan; @@ -2155,7 +2155,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 8)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 8)) { Scene *sce; Object *ob; PartEff *paf = NULL; @@ -2319,7 +2319,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 10)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 10)) { Object *ob; /* dupliface scale */ @@ -2328,7 +2328,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 11)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 11)) { Object *ob; bActionStrip *strip; @@ -2362,7 +2362,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 245, 14)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 14)) { Scene *sce; for (sce = bmain->scenes.first; sce; sce = sce->id.next) { @@ -2373,7 +2373,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } /* fix broken group lengths in id properties */ - if (!MAIN_VERSION_ATLEAST(bmain, 245, 15)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 245, 15)) { idproperties_fix_group_lengths(bmain->scenes); idproperties_fix_group_lengths(bmain->libraries); idproperties_fix_group_lengths(bmain->objects); @@ -2402,7 +2402,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } /* convert fluids to modifier */ - if (!MAIN_VERSION_ATLEAST(bmain, 246, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 246, 1)) { Object *ob; for (ob = bmain->objects.first; ob; ob = ob->id.next) { @@ -2424,7 +2424,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 246, 1)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 246, 1)) { Object *ob; for (ob = bmain->objects.first; ob; ob = ob->id.next) { if (ob->pd && (ob->pd->forcefield == PFIELD_WIND)) { @@ -2434,7 +2434,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } /* set the curve radius interpolation to 2.47 default - easy */ - if (!MAIN_VERSION_ATLEAST(bmain, 247, 6)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 247, 6)) { Curve *cu; Nurb *nu; @@ -2454,7 +2454,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 248, 2)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 248, 2)) { Scene *sce; /* NOTE: these will need to be added for painting. */ @@ -2464,7 +2464,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } - if (!MAIN_VERSION_ATLEAST(bmain, 248, 3)) { + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 248, 3)) { bScreen *screen; /* adjust default settings for Animation Editors */ diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 90836a5a1d3..bc4f68544fd 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -62,7 +62,7 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) { -#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST(userdef, ver, subver) +#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_FILE_ATLEAST(userdef, ver, subver) #define FROM_DEFAULT_V4_UCHAR(member) copy_v4_v4_uchar(btheme->member, U_theme_default.member) if (!USER_VERSION_ATLEAST(300, 41)) { @@ -207,7 +207,7 @@ static bool keymap_item_update_tweak_event(wmKeyMapItem *kmi, void *UNUSED(user_ void blo_do_versions_userdef(UserDef *userdef) { /* #UserDef & #Main happen to have the same struct member. */ -#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST(userdef, ver, subver) +#define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_FILE_ATLEAST(userdef, ver, subver) /* the UserDef struct is not corrected with do_versions() .... ugh! */ if (userdef->menuthreshold1 == 0) {