Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_300.c
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "BLO_readfile.h" | #include "BLO_readfile.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "readfile.h" | #include "readfile.h" | ||||
| #include "SEQ_iterator.h" | #include "SEQ_iterator.h" | ||||
| #include "SEQ_sequencer.h" | #include "SEQ_sequencer.h" | ||||
| #include "SEQ_time.h" | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "versioning_common.h" | #include "versioning_common.h" | ||||
| static IDProperty *idproperty_find_ui_container(IDProperty *idprop_group) | static IDProperty *idproperty_find_ui_container(IDProperty *idprop_group) | ||||
| { | { | ||||
| LISTBASE_FOREACH (IDProperty *, prop, &idprop_group->data.group) { | LISTBASE_FOREACH (IDProperty *, prop, &idprop_group->data.group) { | ||||
| ▲ Show 20 Lines • Show All 1,188 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { | ||||
| if (node->type != GEO_NODE_SET_POSITION) { | if (node->type != GEO_NODE_SET_POSITION) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| bNodeSocket *old_offset_socket = BLI_findlink(&node->inputs, 3); | bNodeSocket *old_offset_socket = BLI_findlink(&node->inputs, 3); | ||||
| nodeRemoveSocket(ntree, node, old_offset_socket); | nodeRemoveSocket(ntree, node, old_offset_socket); | ||||
| } | } | ||||
| } | } | ||||
| static bool version_fix_seq_meta_range(Sequence *seq, void *user_data) | |||||
| { | |||||
| Scene *scene = (Scene *)user_data; | |||||
| if (seq->type == SEQ_TYPE_META) { | |||||
| SEQ_time_update_meta_strip_range(scene, seq); | |||||
| } | |||||
| return true; | |||||
| } | |||||
| /* NOLINTNEXTLINE: readability-function-size */ | /* NOLINTNEXTLINE: readability-function-size */ | ||||
| void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) | void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) | ||||
| { | { | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 300, 1)) { | if (!MAIN_VERSION_ATLEAST(bmain, 300, 1)) { | ||||
| /* Set default value for the new bisect_threshold parameter in the mirror modifier. */ | /* Set default value for the new bisect_threshold parameter in the mirror modifier. */ | ||||
| if (!DNA_struct_elem_find(fd->filesdna, "MirrorModifierData", "float", "bisect_threshold")) { | if (!DNA_struct_elem_find(fd->filesdna, "MirrorModifierData", "float", "bisect_threshold")) { | ||||
| LISTBASE_FOREACH (Object *, ob, &bmain->objects) { | LISTBASE_FOREACH (Object *, ob, &bmain->objects) { | ||||
| LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { | LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { | ||||
| ▲ Show 20 Lines • Show All 905 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { | ||||
| if (region->regiontype == RGN_TYPE_WINDOW) { | if (region->regiontype == RGN_TYPE_WINDOW) { | ||||
| region->v2d.min[1] = 1.0f; | region->v2d.min[1] = 1.0f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { | |||||
sergey: Add a comment like:
/* Make sure range of meta strips is correct.
* It was possible to… | |||||
| Editing *ed = SEQ_editing_get(scene); | |||||
| /* Make sure range of meta strips is correct. | |||||
| * It was possible to save .blend file with incorrect state of meta strip | |||||
| * range. The root cause is expected to be fixed, but need to ensure files | |||||
| * with invalid meta strip range are corrected. */ | |||||
| SEQ_for_each_callback(&ed->seqbase, version_fix_seq_meta_range, scene); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
Add a comment like: