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>2006-06-08 23:05:58 +0400
committerPeter Schlaile <peter@schlaile.de>2006-06-08 23:05:58 +0400
commitaf3f454cd82b8214b3ce004d7cb852523f9063b2 (patch)
tree41d7ec47f50e4f367aff48c75114f10eca282f64 /source/blender/src/resources.c
parentf6854b4d8e935fa030f1b5424007d5c98e311266 (diff)
==Sequencer==
Added patch by Matt Ebb, that enhances the sequencer GUI in several ways: - It looks a lot better - Strip colours are themeable. - The drawing code is more readable. - The background of the timeline makes now distinguishing the channels easier by alternating between different shades of gray. - Handle-scaling is clamped to min and max-values, making it possible to grab strips at large zooming levels more easily. - Preview-images can be panned by dragging it with the middle mouse button. Home-Key resets the position. - Since some people can't grab the meaning of "C 0", it is renamed to "Chan: 0" - Effect strips have slightly different colors to distinguish them better. Additionally: - fixed an off by one error in Matt's patch - Scene-rendering saves CFRA to avoid jumping current-scene on scrub (might be academic fix, since most likely it only happens if you add the sequencer-scene to the timeline... But nevertheless it bugs you on testing the GUI ;-)
Diffstat (limited to 'source/blender/src/resources.c')
-rw-r--r--source/blender/src/resources.c74
1 files changed, 72 insertions, 2 deletions
diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c
index 443c4b62a41..6fc2f28f76b 100644
--- a/source/blender/src/resources.c
+++ b/source/blender/src/resources.c
@@ -290,6 +290,23 @@ char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case TH_NODE_GROUP:
cp= ts->syntaxc; break;
+ case TH_SEQ_MOVIE:
+ cp= ts->movie; break;
+ case TH_SEQ_IMAGE:
+ cp= ts->image; break;
+ case TH_SEQ_SCENE:
+ cp= ts->scene; break;
+ case TH_SEQ_AUDIO:
+ cp= ts->audio; break;
+ case TH_SEQ_EFFECT:
+ cp= ts->effect; break;
+ case TH_SEQ_PLUGIN:
+ cp= ts->plugin; break;
+ case TH_SEQ_TRANSITION:
+ cp= ts->transition; break;
+ case TH_SEQ_META:
+ cp= ts->meta; break;
+
}
}
@@ -437,7 +454,16 @@ void BIF_InitTheme(void)
/* space seq */
btheme->tseq= btheme->tv3d;
- SETCOL(btheme->tnla.back, 116, 116, 116, 255);
+ SETCOL(btheme->tseq.back, 116, 116, 116, 255);
+ SETCOL(btheme->tseq.movie, 81, 105, 135, 255);
+ SETCOL(btheme->tseq.image, 109, 88, 129, 255);
+ SETCOL(btheme->tseq.scene, 78, 152, 62, 255);
+ SETCOL(btheme->tseq.audio, 46, 143, 143, 255);
+ SETCOL(btheme->tseq.effect, 169, 84, 124, 255);
+ SETCOL(btheme->tseq.plugin, 126, 126, 80, 255);
+ SETCOL(btheme->tseq.transition, 162, 95, 111, 255);
+ SETCOL(btheme->tseq.meta, 109, 145, 131, 255);
+
/* space image */
btheme->tima= btheme->tv3d;
@@ -598,6 +624,15 @@ char *BIF_ThemeColorsPup(int spacetype)
case SPACE_SEQ:
str += sprintf(str, "Grid %%x%d|", TH_GRID);
str += sprintf(str, "Window Sliders %%x%d|", TH_SHADE1);
+ str += sprintf(str, "%%l|");
+ str += sprintf(str, "Movie Strip %%x%d|", TH_SEQ_MOVIE);
+ str += sprintf(str, "Image Strip %%x%d|", TH_SEQ_IMAGE);
+ str += sprintf(str, "Scene Strip %%x%d|", TH_SEQ_SCENE);
+ str += sprintf(str, "Audio Strip %%x%d|", TH_SEQ_AUDIO);
+ str += sprintf(str, "Effect Strip %%x%d|", TH_SEQ_EFFECT);
+ str += sprintf(str, "Plugin Strip %%x%d|", TH_SEQ_PLUGIN);
+ str += sprintf(str, "Transition Strip %%x%d|", TH_SEQ_TRANSITION);
+ str += sprintf(str, "Meta Strip %%x%d|", TH_SEQ_META);
break;
case SPACE_SOUND:
str += sprintf(str, "Grid %%x%d|", TH_GRID);
@@ -743,7 +778,6 @@ void BIF_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset)
glColor3ub(r, g, b);
}
-
// get individual values, not scaled
float BIF_GetThemeValuef(int colorid)
{
@@ -809,3 +843,39 @@ void BIF_GetThemeColorType4ubv(int colorid, int spacetype, char *col)
col[2]= cp[2];
col[3]= cp[3];
}
+
+// blends and shades between two char color pointers
+void BIF_ColorPtrBlendShade3ubv(char *cp1, char *cp2, float fac, int offset)
+{
+ int r, g, b;
+
+ if(fac<0.0) fac=0.0; else if(fac>1.0) fac= 1.0;
+ r= offset+floor((1.0-fac)*cp1[0] + fac*cp2[0]);
+ g= offset+floor((1.0-fac)*cp1[1] + fac*cp2[1]);
+ b= offset+floor((1.0-fac)*cp1[2] + fac*cp2[2]);
+
+ r= r<0?0:(r>255?255:r);
+ g= g<0?0:(g>255?255:g);
+ b= b<0?0:(b>255?255:b);
+
+ glColor3ub(r, g, b);
+}
+
+// get a 3 byte color, blended and shaded between two other char color pointers
+void BIF_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, int offset)
+{
+ int r, g, b;
+
+ if(fac<0.0) fac=0.0; else if(fac>1.0) fac= 1.0;
+ r= offset+floor((1.0-fac)*cp1[0] + fac*cp2[0]);
+ g= offset+floor((1.0-fac)*cp1[1] + fac*cp2[1]);
+ b= offset+floor((1.0-fac)*cp1[2] + fac*cp2[2]);
+
+ r= r<0?0:(r>255?255:r);
+ g= g<0?0:(g>255?255:g);
+ b= b<0?0:(b>255?255:b);
+
+ col[0] = r;
+ col[1] = g;
+ col[2] = b;
+}