Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Stopford <philstopford>2020-03-12 05:35:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-12 07:48:20 +0300
commit6ce709dceb8db65ec6baae21100a7ce93829b1f6 (patch)
tree15ffc300239a2344ebd445d4316d55a51a3a350c /source/blender/blenloader/intern/versioning_280.c
parent1aebcdbb3a75b8c59ea211bb1ea6cc8573b0ea0f (diff)
Ocean: add new spectra modes to the ocean modifier
This extends the ocean modifier to add new spectra (Pierson-Moskowitz, Jonswap, TMA). These models are very different to the Phillips spectrum. They are intended for more established, large area, oceans and/or shallow water situations.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 77eed5be223..d0659bfd34c 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4849,5 +4849,16 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/
{
/* Keep this block, even when empty. */
+
+ if (!DNA_struct_elem_find(fd->filesdna, "OceanModifierData", "float", "fetch_jonswap")) {
+ for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
+ for (ModifierData *md = object->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Ocean) {
+ OceanModifierData *omd = (OceanModifierData *)md;
+ omd->fetch_jonswap = 120.0f;
+ }
+ }
+ }
+ }
}
}