diff options
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 4 | ||||
-rw-r--r-- | source/blender/src/drawaction.c | 4 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_action.c | 9 |
4 files changed, 17 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 707460d0fb6..db6a2bda53c 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -154,7 +154,9 @@ typedef enum SACTION_FLAG { /* show sliders (if relevant) */ SACTION_SLIDERS = (1<<1), /* draw time in seconds instead of time in frames */ - SACTION_DRAWTIME = (1<<2) + SACTION_DRAWTIME = (1<<2), + /* don't filter action channels according to visibility */ + SACTION_NOHIDE = (1<<3) } SACTION_FLAG; /* SpaceAction AutoSnap Settings (also used by SpaceNLA) */ diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 6cda5e69ea7..58dfdd89df2 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -617,12 +617,12 @@ void check_action_context(SpaceAction *saction) { bActionChannel *achan; - if(saction->action==NULL) return; + if (saction->action==NULL) return; for (achan=saction->action->chanbase.first; achan; achan=achan->next) achan->flag &= ~ACHAN_HIDDEN; - if (G.saction->pin==0 && OBACT) { + if ((saction->pin==0) && ((saction->flag & SACTION_NOHIDE)==0) && (OBACT)) { Object *ob= OBACT; bPoseChannel *pchan; bArmature *arm= ob->data; diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index c9e2df8d9eb..cb032ddfb61 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -1158,8 +1158,8 @@ void free_actcopybuf () bActionChannel *achan, *anext; bConstraintChannel *conchan, *cnext; - for (achan= actcopybuf.first; achan; achan= next) { - next= achan->next; + for (achan= actcopybuf.first; achan; achan= anext) { + anext= achan->next; if (achan->ipo) { free_ipo(achan->ipo); @@ -1174,7 +1174,7 @@ void free_actcopybuf () MEM_freeN(conchan->ipo); } - BLI_freelistN(&achan->constraintChannels, conchan); + BLI_freelinkN(&achan->constraintChannels, conchan); } BLI_freelinkN(&actcopybuf, achan); diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 6d01dcf6bab..9e858cb8307 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -93,6 +93,7 @@ enum { ACTMENU_VIEW_NEXTMARKER, ACTMENU_VIEW_PREVMARKER, ACTMENU_VIEW_TIME, + ACTMENU_VIEW_NOHIDE }; enum { @@ -299,6 +300,9 @@ static void do_action_viewmenu(void *arg, int event) case ACTMENU_VIEW_TIME: /* switch between frames and seconds display */ G.saction->flag ^= SACTION_DRAWTIME; break; + case ACTMENU_VIEW_NOHIDE: /* Show hidden channels */ + G.saction->flag ^= SACTION_NOHIDE; + break; } allqueue(REDRAWVIEW3D, 0); } @@ -340,6 +344,11 @@ static uiBlock *action_viewmenu(void *arg_unused) menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_VIEW_SLIDERS, ""); + uiDefIconTextBut(block, BUTM, 1, (G.saction->flag & SACTION_NOHIDE)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT, + "Show Hidden Channels|", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, + ACTMENU_VIEW_NOHIDE, ""); + uiDefIconTextBut(block, BUTM, 1, (G.v2d->flag & V2D_VIEWLOCK)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT, "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, |