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:
authorJoshua Leung <aligorith@gmail.com>2015-04-12 11:42:34 +0300
committerJoshua Leung <aligorith@gmail.com>2015-04-14 09:39:02 +0300
commit097801e701cec7ae1e388d201ca3426153616097 (patch)
tree06de60ef28519ff84cbf622a7602bb69ebf63596 /source/blender/editors/space_action/action_data.c
parentd841b75c5f1e6de60bc57804204b73f2c3de4530 (diff)
NLA: Shift-Tab toggles tweakmode AND makes that track solo
To help make it more convenient to edit stashed actions, Shift-Tab (i.e. holding down the Shift key, which "tabbing" into tweakmode as usual to edit the action referenced by the active NLA strip) now flags the NLA Track that the strip occupies as being "solo" too. This allows you to use the NLA to select a stashed action, then Shift-Tab to start editing it without any other actions in the NLA stack interfering. Like the "Next/Previous Layer" tools in the Action Editor, this is designed to help with checking on stashed actions.
Diffstat (limited to 'source/blender/editors/space_action/action_data.c')
-rw-r--r--source/blender/editors/space_action/action_data.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index 440201bd93e..11ccaee4146 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -625,36 +625,6 @@ void ACTION_OT_unlink(wmOperatorType *ot)
/* ************************************************************************** */
/* ACTION BROWSING */
-/* Get the NLA Track that the active action comes from, since this is not stored in AnimData */
-/* TODO: Move this to blenkernel/nla.c */
-static NlaTrack *nla_tweak_track_get(AnimData *adt)
-{
- NlaTrack *nlt;
-
- /* sanity check */
- if (adt == NULL)
- return NULL;
-
- /* Since the track itself gets disabled, we want the first disabled... */
- for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
- if (nlt->flag & (NLATRACK_ACTIVE | NLATRACK_DISABLED)) {
- /* For good measure, make sure that strip actually exists there */
- if (BLI_findindex(&nlt->strips, adt->actstrip) != -1) {
- return nlt;
- }
- else if (G.debug & G_DEBUG) {
- printf("%s: Active strip (%p, %s) not in NLA track found (%p, %s)\n",
- __func__,
- adt->actstrip, (adt->actstrip) ? adt->actstrip->name : "<None>",
- nlt, nlt->name);
- }
- }
- }
-
- /* Not found! */
- return NULL;
-}
-
/* Try to find NLA Strip to use for action layer up/down tool */
static NlaStrip *action_layer_get_nlastrip(ListBase *strips, float ctime)
{
@@ -774,7 +744,7 @@ static int action_layer_next_exec(bContext *C, wmOperator *op)
float ctime = BKE_scene_frame_get(scene);
/* Get active track */
- act_track = nla_tweak_track_get(adt);
+ act_track = BKE_nlatrack_find_tweaked(adt);
if (act_track == NULL) {
BKE_report(op->reports, RPT_ERROR, "Could not find current NLA Track");
@@ -891,7 +861,7 @@ static int action_layer_prev_exec(bContext *C, wmOperator *op)
}
/* Get active track */
- act_track = nla_tweak_track_get(adt);
+ act_track = BKE_nlatrack_find_tweaked(adt);
/* If there is no active track, that means we are using the active action... */
if (act_track) {