== NLA Visibility Tweak ==

In a few cases, it may be helpful to turn off the 'only show objects that are
in visible scene layers in the nla' trick. By default though, this is still on. Find
the switch in the View menu of NLA editor.
This commit is contained in:
Joshua Leung
2007-01-17 03:24:21 +00:00
parent ffa0cfc9d9
commit a3c9ae8a88
3 changed files with 16 additions and 4 deletions

View File

@@ -251,7 +251,7 @@ typedef struct SpaceNla{
short blockhandler[8];
short menunr, lock;
int pad;
int flag;
View2D v2d;
} SpaceNla;
@@ -581,6 +581,10 @@ typedef struct SpaceImaSel {
#define IMS_INFILE 3
#define IMS_INFILESLI 4
/* nla->flag */
#define SNLA_ALLKEYED 1
#define SNLA_ACTIVELAYERS 2
/* time->flag */
#define TIME_DRAWFRAMES 1
#define TIME_CFRA_NUM 2

View File

@@ -761,7 +761,7 @@ int nla_filter (Base *base)
{
Object *ob = base->object;
if(base->lay & G.scene->lay) {
if ((G.snla->flag & SNLA_ALLKEYED) || (base->lay & G.scene->lay)) {
if(ob->action || ob->nlastrips.first)
return 1;

View File

@@ -114,11 +114,14 @@ static void do_nla_viewmenu(void *arg, int event)
case 4: /* Maximize Window */
/* using event B_FULL */
break;
case 5:
case 5: /* Update automatically */
G.v2d->flag ^= V2D_VIEWLOCK;
if(G.v2d->flag & V2D_VIEWLOCK)
view2d_do_locks(curarea, 0);
break;
break;
case 6: /* Show all objects that have keyframes? */
G.snla->flag ^= SNLA_ALLKEYED;
break;
}
}
@@ -131,6 +134,11 @@ static uiBlock *nla_viewmenu(void *arg_unused)
block= uiNewBlock(&curarea->uiblocks, "nla_viewmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
uiBlockSetButmFunc(block, do_nla_viewmenu, NULL);
uiDefIconTextBut(block, BUTM, 1, (G.snla->flag & SNLA_ALLKEYED)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
"Only Objects On Visible Layers|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
if(BTST(G.snla->lock, 0)) {
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Update Automatically|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
} else {