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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-01-17 06:24:21 +0300
committerJoshua Leung <aligorith@gmail.com>2007-01-17 06:24:21 +0300
commita3c9ae8a8819d08f47234f0c065fbdb5fd385c59 (patch)
tree7dc10a9d9641fd8025dbfc3e160c016c04088b33 /source
parentffa0cfc9d9d6e2ff4134622f39b2467f96b0438c (diff)
== 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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_space_types.h6
-rw-r--r--source/blender/src/drawnla.c2
-rw-r--r--source/blender/src/header_nla.c12
3 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 1f5391d59b1..53a64fa574f 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -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
diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c
index 9c6870a9483..e9710ff52ba 100644
--- a/source/blender/src/drawnla.c
+++ b/source/blender/src/drawnla.c
@@ -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;
diff --git a/source/blender/src/header_nla.c b/source/blender/src/header_nla.c
index 2d33ee098de..918383478e5 100644
--- a/source/blender/src/header_nla.c
+++ b/source/blender/src/header_nla.c
@@ -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 {