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>2014-05-05 05:59:36 +0400
committerJoshua Leung <aligorith@gmail.com>2014-05-05 06:16:41 +0400
commit4e0aa0e7f23fae72c469262d4aab751fc6d642de (patch)
treebfbecbcd1c11a5e583fed60a3ef8e5fb5e27a9f6 /source/blender/editors/animation
parente5c306b101a093521368810202b4c826fecb18a1 (diff)
NLA Editor: Added dedicated operator for the pushdown operation
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 4a94d044194..746395cfe6f 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -3931,17 +3931,18 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
/* NLA Action "pushdown" */
if ((ale->type == ANIMTYPE_NLAACTION) && (ale->adt && ale->adt->action) && !(ale->adt->flag & ADT_NLA_EDIT_ON)) {
- //const char *opname = "NLA_OT_action_pushdown"; // XXX: this is the real one
- //const char *opname = "NLA_OT_channels_click";
+ uiBut *but;
+ PointerRNA *opptr_b;
- // FIXME: this needs to hook up to an operator
uiBlockSetEmboss(block, UI_EMBOSS);
offset += UI_UNIT_X;
- uiDefIconButO(block, BUT, "NLA_OT_channels_click", WM_OP_INVOKE_DEFAULT, ICON_NLA_PUSHDOWN,
- (int)v2d->cur.xmax - offset, ymid, UI_UNIT_X, UI_UNIT_X,
- "Push action on to the top of the NLA stack as a new NLA Strip");
- // TODO: pass channel index
+ but = uiDefIconButO(block, BUT, "NLA_OT_action_pushdown", WM_OP_INVOKE_DEFAULT, ICON_NLA_PUSHDOWN,
+ (int)v2d->cur.xmax - offset, ymid, UI_UNIT_X, UI_UNIT_X,
+ "Push action on to the top of the NLA stack as a new NLA Strip");
+
+ opptr_b = uiButGetOperatorPtrRNA(but);
+ RNA_int_set(opptr_b, "channel_index", channel_index);
uiBlockSetEmboss(block, UI_EMBOSSN);
}