Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 1,211 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Scene *scene = (Scene *)user_data; | Scene *scene = (Scene *)user_data; | ||||
| if (seq->type == SEQ_TYPE_META) { | if (seq->type == SEQ_TYPE_META) { | ||||
| SEQ_time_update_meta_strip_range(scene, seq); | SEQ_time_update_meta_strip_range(scene, seq); | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| static bool version_merge_still_offsets(Sequence *seq, void *UNUSED(user_data)) | |||||
| { | |||||
| seq->startofs -= seq->startstill; | |||||
| seq->endofs -= seq->endstill; | |||||
| seq->startstill = 0; | |||||
| seq->endstill = 0; | |||||
| return true; | |||||
| } | |||||
| /* Those `version_liboverride_rnacollections_*` functions mimic the old, pre-3.0 code to find | /* Those `version_liboverride_rnacollections_*` functions mimic the old, pre-3.0 code to find | ||||
| * anchor and source items in the given list of modifiers, constraints etc., using only the | * anchor and source items in the given list of modifiers, constraints etc., using only the | ||||
| * `subitem_local` data of the override property operation. | * `subitem_local` data of the override property operation. | ||||
| * | * | ||||
| * Then they convert it into the new, proper `subitem_reference` data for the anchor, and | * Then they convert it into the new, proper `subitem_reference` data for the anchor, and | ||||
| * `subitem_local` for the source. | * `subitem_local` for the source. | ||||
| * | * | ||||
| * NOTE: Here only the stored override ID is available, unlike in the `override_apply` functions. | * NOTE: Here only the stored override ID is available, unlike in the `override_apply` functions. | ||||
| ▲ Show 20 Lines • Show All 1,812 Lines • ▼ Show 20 Lines | if (!DNA_struct_elem_find(fd->filesdna, "ImagePackedFile", "int", "tile_number")) { | ||||
| for (Image *ima = bmain->images.first; ima; ima = ima->id.next) { | for (Image *ima = bmain->images.first; ima; ima = ima->id.next) { | ||||
| int view; | int view; | ||||
| LISTBASE_FOREACH_INDEX (ImagePackedFile *, imapf, &ima->packedfiles, view) { | LISTBASE_FOREACH_INDEX (ImagePackedFile *, imapf, &ima->packedfiles, view) { | ||||
| imapf->view = view; | imapf->view = view; | ||||
| imapf->tile_number = 1001; | imapf->tile_number = 1001; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Merge still offsets into start/end offsets. */ | |||||
| LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { | |||||
| Editing *ed = SEQ_editing_get(scene); | |||||
| if (ed != NULL) { | |||||
| SEQ_for_each_callback(&ed->seqbase, version_merge_still_offsets, NULL); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||