Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_260.c
| Show First 20 Lines • Show All 1,868 Lines • ▼ Show 20 Lines | if (main->versionfile < 265 || (main->versionfile == 265 && main->subversionfile < 5)) { | ||||
| Tex *tex; | Tex *tex; | ||||
| for (scene = main->scene.first; scene; scene = scene->id.next) { | for (scene = main->scene.first; scene; scene = scene->id.next) { | ||||
| Sequence *seq; | Sequence *seq; | ||||
| bool set_premul = false; | bool set_premul = false; | ||||
| SEQ_BEGIN (scene->ed, seq) | SEQ_BEGIN (scene->ed, seq) | ||||
| { | { | ||||
| if (seq->flag & SEQ_MAKE_PREMUL) { | if (seq->flag & SEQ_MAKE_PREMUL_DEPRECATED) { | ||||
| seq->alpha_mode = SEQ_ALPHA_STRAIGHT; | seq->alpha_mode = SEQ_ALPHA_STRAIGHT; | ||||
| } | } | ||||
| else { | else { | ||||
| BKE_sequence_alpha_mode_from_extension(seq); | BKE_sequence_alpha_mode_from_extension(seq); | ||||
| } | } | ||||
| /* make sure we clear these deprecated bit-flags */ | |||||
| seq->flag &= ~(SEQ_MAKE_PREMUL_DEPRECATED | |||||
| | SEQ_FLAG_DEPRECATED_1 | |||||
| | SEQ_FLAG_DEPRECATED_2 | |||||
| | SEQ_FLAG_DEPRECATED_3); | |||||
campbellbarton: This only clears for old files. The flag may remain in files re-saved from 2.6x.
A reliable… | |||||
| } | } | ||||
| SEQ_END | SEQ_END | ||||
| if (scene->r.bake_samples == 0) | if (scene->r.bake_samples == 0) | ||||
| scene->r.bake_samples = 256; | scene->r.bake_samples = 256; | ||||
| if (scene->world) { | if (scene->world) { | ||||
| World *world = blo_do_versions_newlibadr(fd, scene->id.lib, scene->world); | World *world = blo_do_versions_newlibadr(fd, scene->id.lib, scene->world); | ||||
| ▲ Show 20 Lines • Show All 818 Lines • Show Last 20 Lines | |||||
This only clears for old files. The flag may remain in files re-saved from 2.6x.
A reliable way to handle this would be to check if "view_render" exists in "Sequence".
See: DNA_struct_elem_find use in versioning code for an example.
Doing so means this block of code is redundant.