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>2005-10-26 23:34:32 +0400
committerTon Roosendaal <ton@blender.org>2005-10-26 23:34:32 +0400
commitccfc8214126201bb6862804f8e3d8b89b67f63d5 (patch)
tree73825d6a44875a07e05021452b7d606695fd804b /source/blender
parentd5617f7f596b44994a2be381a8cde585eee25208 (diff)
Orange bugfixes in NLA editor;
- ALT+C "convert action into strip" didn't calculate the mouse position correct. Also changed menu a bit to tell which action it makes a strip - Select action strips now activates Object too - Icons in Object 'row' (denoting NLA override or not) now draw blended
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/drawnla.c6
-rw-r--r--source/blender/src/editnla.c35
2 files changed, 23 insertions, 18 deletions
diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c
index 5c8a9ade3d9..ed85e497dc2 100644
--- a/source/blender/src/drawnla.c
+++ b/source/blender/src/drawnla.c
@@ -126,10 +126,12 @@ static void draw_nla_channels(void)
/* icon to indicate nla or action */
if(ob->nlastrips.first && ob->action) {
+ glEnable(GL_BLEND);
if(ob->nlaflag & OB_NLA_OVERRIDE)
- BIF_draw_icon(x+5, y-8, ICON_NLA);
+ BIF_draw_icon_blended(x+5, y-8, ICON_NLA, TH_HEADER, 0);
else
- BIF_draw_icon(x+5, y-8, ICON_ACTION);
+ BIF_draw_icon_blended(x+5, y-8, ICON_ACTION, TH_HEADER, 0);
+ glDisable(GL_BLEND);
}
y-=NLACHANNELHEIGHT+NLACHANNELSKIP;
diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c
index d018e58bd13..a555686f1c9 100644
--- a/source/blender/src/editnla.c
+++ b/source/blender/src/editnla.c
@@ -373,12 +373,13 @@ static void set_active_strip(Object *ob, bActionStrip *act)
static void convert_nla(short mval[2])
{
- short event;
- float ymax, ymin;
+ bActionStrip *strip, *nstrip;
Base *base;
float x,y;
+ float ymax, ymin;
int sel=0;
- bActionStrip *strip, *nstrip;
+ short event;
+ char str[128];
/* Find out what strip we're over */
ymax = count_nla_levels() * (NLACHANNELSKIP+NLACHANNELHEIGHT);
@@ -388,17 +389,18 @@ static void convert_nla(short mval[2])
for (base=G.scene->base.first; base; base=base->next){
if (nla_filter(base)) {
- /* Check object ipo */
- ymin= ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT);
- if (y>=ymin && y<=ymax)
- break;
+
+ /* Area that encloses object name (or ipo) */
+ ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP);
ymax=ymin;
/* Check action ipo */
- ymin=ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT);
- if (y>=ymin && y<=ymax)
- break;
- ymax=ymin;
+ if (base->object->action) {
+ ymin=ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT);
+ if (y>=ymin && y<=ymax)
+ break;
+ ymax=ymin;
+ }
/* Check nlastrips */
for (strip=base->object->nlastrips.first; strip; strip=strip->next){
@@ -414,10 +416,12 @@ static void convert_nla(short mval[2])
}
}
- if (!base)
+ if (base==0 || base->object->action==NULL)
return;
- event = pupmenu("Convert%t|Action to NLA Strip%x1");
+ sprintf(str, "Convert Action%%t|%s to NLA Strip%%x1", base->object->action->id.name+2);
+ event = pupmenu(str);
+
switch (event){
case 1:
if (base->object->action){
@@ -439,9 +443,6 @@ static void convert_nla(short mval[2])
BLI_addtail(&base->object->nlastrips, nstrip);
- /* Unlink action */
- base->object->action = NULL;
-
BIF_undo_push("Convert NLA");
allqueue (REDRAWNLA, 0);
}
@@ -1278,6 +1279,8 @@ static void mouse_nla(int selectmode)
rstrip->flag |= ACTSTRIP_SELECT;
set_active_strip(base->object, rstrip);
+
+ if(base!=BASACT) set_active_base(base);
}
}
}