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:
authorPeter Schlaile <peter@schlaile.de>2008-03-30 18:23:15 +0400
committerPeter Schlaile <peter@schlaile.de>2008-03-30 18:23:15 +0400
commitcc4858cde045d17cef5ea9c847484e3168364bd4 (patch)
tree0cfa9ad7220ea8fbe7d408a6ca230ffd75196364 /source/blender/src/seqeffects.c
parent0eda26d126e840e621fd0341a88d45c48c1c74f8 (diff)
== Sequencer ==
Added IPO-support to color strip.
Diffstat (limited to 'source/blender/src/seqeffects.c')
-rw-r--r--source/blender/src/seqeffects.c55
1 files changed, 48 insertions, 7 deletions
diff --git a/source/blender/src/seqeffects.c b/source/blender/src/seqeffects.c
index 85693546789..4a9e934a691 100644
--- a/source/blender/src/seqeffects.c
+++ b/source/blender/src/seqeffects.c
@@ -2572,26 +2572,67 @@ static void do_solid_color(Sequence * seq,int cfra,
float *rect_float;
if (out->rect) {
+ unsigned char col0[3];
+ unsigned char col1[3];
+
+ col0[0] = facf0 * cv->col[0] * 255;
+ col0[1] = facf0 * cv->col[1] * 255;
+ col0[2] = facf0 * cv->col[2] * 255;
+
+ col1[0] = facf1 * cv->col[0] * 255;
+ col1[1] = facf1 * cv->col[1] * 255;
+ col1[2] = facf1 * cv->col[2] * 255;
+
rect = (unsigned char *)out->rect;
for(y=0; y<out->y; y++) {
for(x=0; x<out->x; x++, rect+=4) {
- rect[0]= (char)(cv->col[0]*255);
- rect[1]= (char)(cv->col[1]*255);
- rect[2]= (char)(cv->col[2]*255);
+ rect[0]= col0[0];
+ rect[1]= col0[1];
+ rect[2]= col0[2];
rect[3]= 255;
- }
+ }
+ y++;
+ if (y<out->y) {
+ for(x=0; x<out->x; x++, rect+=4) {
+ rect[0]= col1[0];
+ rect[1]= col1[1];
+ rect[2]= col1[2];
+ rect[3]= 255;
+ }
+ }
}
+
} else if (out->rect_float) {
+ float col0[3];
+ float col1[3];
+
+ col0[0] = facf0 * cv->col[0];
+ col0[1] = facf0 * cv->col[1];
+ col0[2] = facf0 * cv->col[2];
+
+ col1[0] = facf1 * cv->col[0];
+ col1[1] = facf1 * cv->col[1];
+ col1[2] = facf1 * cv->col[2];
+
rect_float = out->rect_float;
for(y=0; y<out->y; y++) {
for(x=0; x<out->x; x++, rect_float+=4) {
- rect_float[0]= cv->col[0];
- rect_float[1]= cv->col[1];
- rect_float[2]= cv->col[2];
+ rect_float[0]= col0[0];
+ rect_float[1]= col0[1];
+ rect_float[2]= col0[2];
rect_float[3]= 1.0;
}
+ y++;
+ if (y<out->y) {
+ for(x=0; x<out->x; x++, rect_float+=4) {
+ rect_float[0]= col1[0];
+ rect_float[1]= col1[1];
+ rect_float[2]= col1[2];
+ rect_float[3]= 1.0;
+ }
+ }
}
}
}