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>2009-07-03 08:48:44 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-03 08:48:44 +0400
commit66efea5e2d94ec7296efbe03ddeb7c6c4878c9ab (patch)
tree4e85dadb5e8a51c2f33ba9043ab0837b9f38bac6 /source/blender/editors/space_nla
parenta07d1ea3ea1875f938327d37fbb219717e325ada (diff)
NLA SoC: Toggle for 'Editing in Place'
The 'pin' icon beside the name of the active Action when tweaking some strip's action can be used to toggle between editing the Action's keyframes in 'mapped' time or in 'un-mapped' time.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_channels.c7
-rw-r--r--source/blender/editors/space_nla/nla_draw.c13
2 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 0a2c32b5f52..5a891a541cb 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -264,14 +264,17 @@ static void mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sh
{
AnimData *adt= BKE_animdata_from_id(ale->owner); /* this won't crash, right? */
- /* for now, only do something if user clicks on the 'push-down' button */
if (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) {
- /* activate push-down function - only usable when not in TweakMode */
if (nlaedit_is_tweakmode_on(ac) == 0) {
+ /* 'push-down' action - only usable when not in TweakMode */
// TODO: make this use the operator instead of calling the function directly
// however, calling the operator requires that we supply the args, and that works with proper buttons only
BKE_nla_action_pushdown(adt);
}
+ else {
+ /* when in tweakmode, this button becomes the toggle for mapped editing */
+ adt->flag ^= ADT_NLA_EDIT_NOMAP;
+ }
}
}
break;
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 6d4f65fe249..ab33434077e 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -886,7 +886,18 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
/* now draw some indicator icons */
if ((adt) && (adt->flag & ADT_NLA_EDIT_ON)) {
- /* 'tweaking action' - not a button */
+ /* toggle for tweaking with mapping/no-mapping (i.e. 'in place editing' toggle) */
+ // for now, use pin icon to symbolise this
+ if (adt->flag & ADT_NLA_EDIT_NOMAP)
+ UI_icon_draw((float)(NLACHANNEL_NAMEWIDTH-offset), ydatac, ICON_PINNED);
+ else
+ UI_icon_draw((float)(NLACHANNEL_NAMEWIDTH-offset), ydatac, ICON_UNPINNED);
+
+ fdrawline((float)(NLACHANNEL_NAMEWIDTH-offset), yminc,
+ (float)(NLACHANNEL_NAMEWIDTH-offset), ymaxc);
+ offset += 16;;
+
+ /* 'tweaking action' indicator - not a button */
UI_icon_draw((float)NLACHANNEL_NAMEWIDTH-offset, ydatac, ICON_EDIT);
}
else {