diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index bd1b5f2c269..31b14692354 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -403,7 +403,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } - + if (!MAIN_VERSION_ATLEAST(main, 272, 1)) { Brush *br; for (br = main->brush.first; br; br = br->id.next) { @@ -412,25 +412,27 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } - if (!DNA_struct_elem_find(fd->filesdna, "Image", "float", "gen_color")) { - Image *image; - for (image = main->image.first; image != NULL; image = image->id.next) { - image->gen_color[3] = 1.0f; + if (!MAIN_VERSION_ATLEAST(main, 272, 2)) { + if (!DNA_struct_elem_find(fd->filesdna, "Image", "float", "gen_color")) { + Image *image; + for (image = main->image.first; image != NULL; image = image->id.next) { + image->gen_color[3] = 1.0f; + } } - } - if (!DNA_struct_elem_find(fd->filesdna, "bStretchToConstraint", "float", "bulge_min")) { - Object *ob; + if (!DNA_struct_elem_find(fd->filesdna, "bStretchToConstraint", "float", "bulge_min")) { + Object *ob; - /* Update Transform constraint (again :|). */ - for (ob = main->object.first; ob; ob = ob->id.next) { - do_version_constraints_stretch_to_limits(&ob->constraints); + /* Update Transform constraint (again :|). */ + for (ob = main->object.first; ob; ob = ob->id.next) { + do_version_constraints_stretch_to_limits(&ob->constraints); - if (ob->pose) { - /* Bones constraints! */ - bPoseChannel *pchan; - for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { - do_version_constraints_stretch_to_limits(&pchan->constraints); + if (ob->pose) { + /* Bones constraints! */ + bPoseChannel *pchan; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + do_version_constraints_stretch_to_limits(&pchan->constraints); + } } } }