diff options
author | Matt Ebb <matt@mke3.net> | 2009-09-09 11:52:44 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-09-09 11:52:44 +0400 |
commit | c29780c12a2eeb53e905c5a5c38a4a5c226738a3 (patch) | |
tree | 2d691d3ab741596fddc028294b83a3a8f95afc4d | |
parent | 2e851fdc67a0613cb17436cfe28ebd69fff8c9c2 (diff) |
* Temporary fix to get fluid sim (and fluid control) working properly (without animated parameters). This just fills the fluid sim animation channels with default values for now, but will need to be updated to new animation system.
-rw-r--r-- | source/blender/editors/physics/ed_fluidsim.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/physics/ed_fluidsim.c b/source/blender/editors/physics/ed_fluidsim.c index 907d3f99f77..093fa3f0a49 100644 --- a/source/blender/editors/physics/ed_fluidsim.c +++ b/source/blender/editors/physics/ed_fluidsim.c @@ -200,6 +200,28 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char static void fluidsimInitChannel(Scene *scene, float **setchannel, int size, float *time, int *icuIds, float *defaults, Ipo* ipo, int entries) { + + int i, j; + char *cstr = NULL; + float *channel = NULL; + + cstr = "fluidsiminit_channelfloat"; + if(entries>1) cstr = "fluidsiminit_channelvec"; + channel = MEM_callocN( size* (entries+1)* sizeof(float), cstr ); + + /* defaults for now */ + for(j=0; j<entries; j++) { + for(i=1; i<=size; i++) { + channel[(i-1)*(entries+1) + j] = defaults[j]; + } + } + + for(i=1; i<=size; i++) { + channel[(i-1)*(entries+1) + entries] = time[i]; + } + + *setchannel = channel; + #if 0 /* goes away completely */ int i,j; |