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:
authorKent Mein <mein@cs.umn.edu>2007-01-24 20:55:53 +0300
committerKent Mein <mein@cs.umn.edu>2007-01-24 20:55:53 +0300
commitd553eeef5de0171536ea3526411cd9ddfe34d8e1 (patch)
tree3a76c296dd9adb46ea73ee5fc8aa4b7e52b2e874 /release/plugins
parent18fc6ca7621c74ee5950315c98fc7c725887eede (diff)
More fixes thanks to paprmh.
Kent
Diffstat (limited to 'release/plugins')
-rw-r--r--release/plugins/sequence/scatter.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/release/plugins/sequence/scatter.c b/release/plugins/sequence/scatter.c
index ea230256389..277529690c4 100644
--- a/release/plugins/sequence/scatter.c
+++ b/release/plugins/sequence/scatter.c
@@ -147,16 +147,16 @@ static void rectcpy(ImBuf *dbuf, ImBuf *sbuf,
drect = dbuf->rect;
dfrect = dbuf->rect_float;
- tmp = desty * dbuf->x + destx;
+ tmp = (desty * dbuf->x + destx);
- if (dbuf->rect_float) dfrect += tmp;
+ if (dbuf->rect_float) dfrect += 4 * tmp;
else drect += tmp;
destx = dbuf->x;
if (sbuf) {
- tmp = srcy * sbuf->x + srcx;
- if (dbuf->rect_float) sfrect += tmp;
+ tmp = (srcy * sbuf->x + srcx );
+ if (dbuf->rect_float) sfrect += 4 * tmp;
else srect += tmp;
srcx = sbuf->x;
} else{
@@ -167,11 +167,11 @@ static void rectcpy(ImBuf *dbuf, ImBuf *sbuf,
for (;height > 0; height--){
if (dbuf->rect_float) {
- memcpy(dfrect,sfrect, srcx * sizeof(float));
+ memcpy(dfrect,sfrect, 4 * width * sizeof(float));
dfrect += destx;
sfrect += srcx;
} else {
- memcpy(drect,srect, srcx * sizeof(int));
+ memcpy(drect,srect, width * sizeof(int));
drect += destx;
srect += srcx;
}
@@ -191,7 +191,7 @@ static void fill_out(ImBuf *out, float r, float g, float b, float a)
rectf[1] = g;
rectf[2] = b;
rectf[3] = a;
- rectf = rectf + 4;
+ rectf += 4;
}
} else {
for (x=0;x < tot;x++) {
@@ -213,6 +213,7 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int sx, int sy, ImBuf
/* fill imbuf 'out' with black */
fill_out(out, 0,0,0,0);
+
switch (cast->type) {
case 0:
srand48(cast->seed);