Followup to rB154af70f2b5b7b: always 'pack in' ongoing versionning code when bumping version.

This commit is contained in:
Bastien Montagne 2014-10-31 18:26:58 +01:00
parent a8ea35da05
commit 1070680a4b

@ -403,7 +403,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
} }
} }
} }
if (!MAIN_VERSION_ATLEAST(main, 272, 1)) { if (!MAIN_VERSION_ATLEAST(main, 272, 1)) {
Brush *br; Brush *br;
for (br = main->brush.first; br; br = br->id.next) { 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")) { if (!MAIN_VERSION_ATLEAST(main, 272, 2)) {
Image *image; if (!DNA_struct_elem_find(fd->filesdna, "Image", "float", "gen_color")) {
for (image = main->image.first; image != NULL; image = image->id.next) { Image *image;
image->gen_color[3] = 1.0f; 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")) { if (!DNA_struct_elem_find(fd->filesdna, "bStretchToConstraint", "float", "bulge_min")) {
Object *ob; Object *ob;
/* Update Transform constraint (again :|). */ /* Update Transform constraint (again :|). */
for (ob = main->object.first; ob; ob = ob->id.next) { for (ob = main->object.first; ob; ob = ob->id.next) {
do_version_constraints_stretch_to_limits(&ob->constraints); do_version_constraints_stretch_to_limits(&ob->constraints);
if (ob->pose) { if (ob->pose) {
/* Bones constraints! */ /* Bones constraints! */
bPoseChannel *pchan; bPoseChannel *pchan;
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
do_version_constraints_stretch_to_limits(&pchan->constraints); do_version_constraints_stretch_to_limits(&pchan->constraints);
}
} }
} }
} }