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:
authorTon Roosendaal <ton@blender.org>2006-11-05 23:09:19 +0300
committerTon Roosendaal <ton@blender.org>2006-11-05 23:09:19 +0300
commit2d0c6040dad66696f064cdab8325f901f93b2acf (patch)
tree83268bba6d057b75ef8d79ba3770fc6b2ce9d3de /source/blender/src/drawnla.c
parent0d64b4a9f51b3033f240f606416e1c3f63b139d7 (diff)
Patch #4870, by Roland Hess
NLA window now follows visibility for scene layers, cleaning up complex files quite some. Only note we could make is if this could be optional, sometimes it's also nice to see the entire scene. Note for Roland: this is a recoded version, with about 10% of code :)
Diffstat (limited to 'source/blender/src/drawnla.c')
-rw-r--r--source/blender/src/drawnla.c72
1 files changed, 37 insertions, 35 deletions
diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c
index 39e6b24481d..e831a2ef4ed 100644
--- a/source/blender/src/drawnla.c
+++ b/source/blender/src/drawnla.c
@@ -245,35 +245,36 @@ static void draw_nla_strips_keys(SpaceNla *snla)
bActionStrip *strip;
int frame1_x, channel_y;
- if (nla_filter(base)) {
-
- /* Draw the field */
- glEnable (GL_BLEND);
- if (TESTBASE_SAFE(base))
- glColor4ub (col1[0], col1[1], col1[2], 0x22);
- else
- glColor4ub (col2[0], col2[1], col2[2], 0x22);
-
- gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y);
- glRectf(0, channel_y-NLACHANNELHEIGHT/2, frame1_x, channel_y+NLACHANNELHEIGHT/2);
-
-
- if (TESTBASE_SAFE(base))
- glColor4ub (col1[0], col1[1], col1[2], 0x44);
- else
- glColor4ub (col2[0], col2[1], col2[2], 0x44);
- glRectf(frame1_x, channel_y-NLACHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+NLACHANNELHEIGHT/2);
-
- glDisable (GL_BLEND);
-
- /* Draw the ipo keys */
- draw_object_channel(di, ob, 0, y);
-
- y-=NLACHANNELHEIGHT+NLACHANNELSKIP;
- }
+ if (nla_filter(base)==0)
+ continue;
+
+ /* Draw the field */
+ glEnable (GL_BLEND);
+ if (TESTBASE_SAFE(base))
+ glColor4ub (col1[0], col1[1], col1[2], 0x22);
+ else
+ glColor4ub (col2[0], col2[1], col2[2], 0x22);
+
+ gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y);
+ glRectf(0, channel_y-NLACHANNELHEIGHT/2, frame1_x, channel_y+NLACHANNELHEIGHT/2);
+
+
+ if (TESTBASE_SAFE(base))
+ glColor4ub (col1[0], col1[1], col1[2], 0x44);
+ else
+ glColor4ub (col2[0], col2[1], col2[2], 0x44);
+ glRectf(frame1_x, channel_y-NLACHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+NLACHANNELHEIGHT/2);
+
+ glDisable (GL_BLEND);
+
+ /* Draw the ipo keys */
+ draw_object_channel(di, ob, 0, y);
+
+ y-=NLACHANNELHEIGHT+NLACHANNELSKIP;
+
/* Draw the action strip */
- if (ob->action){
+ if (ob->action) {
/* Draw the field */
glEnable (GL_BLEND);
@@ -733,16 +734,17 @@ int nla_filter (Base *base)
{
Object *ob = base->object;
- if(ob->action || ob->nlastrips.first)
- return 1;
-
- /* should become option */
- if (ob->ipo)
- return 1;
+ if(base->lay & G.scene->lay) {
+ if(ob->action || ob->nlastrips.first)
+ return 1;
- if (ob->constraintChannels.first)
- return 1;
+ /* should become option */
+ if (ob->ipo)
+ return 1;
+ if (ob->constraintChannels.first)
+ return 1;
+ }
return 0;
}