Move versioning code under the subversion check

This commit is contained in:
Sergey Sharybin 2014-09-23 22:56:37 +06:00
parent c779f26a74
commit e422e56db0
2 changed files with 17 additions and 14 deletions

View File

@ -48,11 +48,12 @@ def do_versions(self):
cscene.volume_bounces = 1
# Caustics Reflective/Refractive separation in 272
for scene in bpy.data.scenes:
cscene = scene.cycles
if (cscene.get("no_caustics", False) and
not cscene.is_property_set("caustics_reflective") and
not cscene.is_property_set("caustics_refractive")):
if bpy.data.version <= (2, 71, 0):
for scene in bpy.data.scenes:
cscene = scene.cycles
if (cscene.get("no_caustics", False) and
not cscene.is_property_set("caustics_reflective") and
not cscene.is_property_set("caustics_refractive")):
cscene.caustics_reflective = False
cscene.caustics_refractive = False
cscene.caustics_reflective = False
cscene.caustics_refractive = False

View File

@ -352,13 +352,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "int", "preview_start_resolution")) {
Scene *scene;
for (scene = main->scene.first; scene; scene = scene->id.next) {
scene->r.preview_start_resolution = 64;
}
}
if (!MAIN_VERSION_ATLEAST(main, 271, 6)) {
Object *ob;
for (ob = main->object.first; ob; ob = ob->id.next) {
@ -374,4 +367,13 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
if (!MAIN_VERSION_ATLEAST(main, 272, 0)) {
if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "int", "preview_start_resolution")) {
Scene *scene;
for (scene = main->scene.first; scene; scene = scene->id.next) {
scene->r.preview_start_resolution = 64;
}
}
}
}