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:
authorDaniel Genrich <daniel.genrich@gmx.net>2009-06-07 01:49:00 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2009-06-07 01:49:00 +0400
commit580e69b365a2b308bc5d8a2e7cc41b7f3ee5c248 (patch)
tree9b1ffd73b31504c241f0d4ef0de0c713866d168e /source/blender/blenloader
parent8ed66c5691c935ed944c05146bdc3302997be38f (diff)
Patch/Bugfix so wind noise got controlable seed and therefore redoable cloth sims - bug reported by istvan
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f0ec75dedd9..38b8bfaaa88 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -162,6 +162,8 @@
#include "mydevice.h"
#include "blendef.h"
+#include "PIL_time.h"
+
#include <errno.h>
/*
@@ -8144,6 +8146,16 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
+ // correct introduce of seed for wind force
+ if (main->versionfile < 249 && main->subversionfile < 1) {
+ Object *ob;
+ for(ob = main->object.first; ob; ob= ob->id.next) {
+ if(ob->pd)
+ ob->pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer()))+1) % 128;
+ }
+
+ }
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */