Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Show First 20 Lines • Show All 1,113 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 291, 1)) { | ||||
| /* Initialize additional velocity parameter for #CacheFile's. */ | /* Initialize additional velocity parameter for #CacheFile's. */ | ||||
| if (!DNA_struct_elem_find( | if (!DNA_struct_elem_find( | ||||
| fd->filesdna, "MeshSeqCacheModifierData", "float", "velocity_scale")) { | fd->filesdna, "MeshSeqCacheModifierData", "float", "velocity_scale")) { | ||||
| for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) { | for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) { | ||||
| LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { | LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { | ||||
| if (md->type == eModifierType_MeshSequenceCache) { | if (md->type == eModifierType_MeshSequenceCache) { | ||||
| MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; | MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; | ||||
| mcmd->velocity_scale = 1.0f; | mcmd->velocity_scale = 1.0f; | ||||
| mcmd->vertex_velocities = NULL; | |||||
| mcmd->num_vertices = 0; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!DNA_struct_elem_find(fd->filesdna, "CacheFile", "char", "velocity_unit")) { | if (!DNA_struct_elem_find(fd->filesdna, "CacheFile", "char", "velocity_unit")) { | ||||
| for (CacheFile *cache_file = bmain->cachefiles.first; cache_file != NULL; | for (CacheFile *cache_file = bmain->cachefiles.first; cache_file != NULL; | ||||
| cache_file = cache_file->id.next) { | cache_file = cache_file->id.next) { | ||||
| ▲ Show 20 Lines • Show All 963 Lines • Show Last 20 Lines | |||||