Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_250.c
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "DNA_node_types.h" | #include "DNA_node_types.h" | ||||
| #include "DNA_object_fluidsim_types.h" | #include "DNA_object_fluidsim_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_sdna_types.h" | #include "DNA_sdna_types.h" | ||||
| #include "DNA_sequence_types.h" | #include "DNA_sequence_types.h" | ||||
| #include "DNA_smoke_types.h" | #include "DNA_manta_types.h" | ||||
| #include "DNA_sound_types.h" | #include "DNA_sound_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| ▲ Show 20 Lines • Show All 1,722 Lines • ▼ Show 20 Lines | |||||
| if (bmain->versionfile < 253 || (bmain->versionfile == 253 && bmain->subversionfile < 1)) { | if (bmain->versionfile < 253 || (bmain->versionfile == 253 && bmain->subversionfile < 1)) { | ||||
| Object *ob; | Object *ob; | ||||
| for (ob = bmain->objects.first; ob; ob = ob->id.next) { | for (ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| ModifierData *md; | ModifierData *md; | ||||
| for (md = ob->modifiers.first; md; md = md->next) { | for (md = ob->modifiers.first; md; md = md->next) { | ||||
| if (md->type == eModifierType_Smoke) { | if (md->type == eModifierType_Manta) { | ||||
| SmokeModifierData *smd = (SmokeModifierData *)md; | FluidModifierData *mmd = (FluidModifierData *)md; | ||||
| if ((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) { | if ((mmd->type & MOD_MANTA_TYPE_DOMAIN) && mmd->domain) { | ||||
| smd->domain->vorticity = 2.0f; | mmd->domain->vorticity = 2.0f; | ||||
| smd->domain->time_scale = 1.0f; | mmd->domain->time_scale = 1.0f; | ||||
| if (!(smd->domain->flags & (1 << 4))) { | if (!(mmd->domain->flags & (1 << 4))) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| /* delete old MOD_SMOKE_INITVELOCITY flag */ | /* delete old MOD_SMOKE_INITVELOCITY flag */ | ||||
| smd->domain->flags &= ~(1 << 4); | mmd->domain->flags &= ~(1 << 4); | ||||
| /* for now just add it to all flow objects in the scene */ | /* for now just add it to all flow objects in the scene */ | ||||
| { | { | ||||
| Object *ob2; | Object *ob2; | ||||
| for (ob2 = bmain->objects.first; ob2; ob2 = ob2->id.next) { | for (ob2 = bmain->objects.first; ob2; ob2 = ob2->id.next) { | ||||
| ModifierData *md2; | ModifierData *md2; | ||||
| for (md2 = ob2->modifiers.first; md2; md2 = md2->next) { | for (md2 = ob2->modifiers.first; md2; md2 = md2->next) { | ||||
| if (md2->type == eModifierType_Smoke) { | if (md2->type == eModifierType_Manta) { | ||||
| SmokeModifierData *smd2 = (SmokeModifierData *)md2; | FluidModifierData *mmd2 = (FluidModifierData *)md2; | ||||
| if ((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) { | if ((mmd2->type & MOD_MANTA_TYPE_FLOW) && mmd2->flow) { | ||||
| smd2->flow->flags |= MOD_SMOKE_FLOW_INITVELOCITY; | mmd2->flow->flags |= FLUID_FLOW_INITVELOCITY; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else if ((smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow) { | else if ((mmd->type & MOD_MANTA_TYPE_FLOW) && mmd->flow) { | ||||
| smd->flow->vel_multi = 1.0f; | mmd->flow->vel_multi = 1.0f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (bmain->versionfile < 255 || (bmain->versionfile == 255 && bmain->subversionfile < 1)) { | if (bmain->versionfile < 255 || (bmain->versionfile == 255 && bmain->subversionfile < 1)) { | ||||
| Brush *br; | Brush *br; | ||||
| ▲ Show 20 Lines • Show All 520 Lines • Show Last 20 Lines | |||||