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-02 10:41:10 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-02 10:41:10 +0400
commit6b784a80f02deaca05e347dc2626dc92826f0944 (patch)
treec479db7ceb1b8a317f3bed9b8a199bbea1236f18 /source/blender/editors/space_nla/nla_buttons.c
parentf3c47a66b0cb3bb70505ed46522e6c557769eaa5 (diff)
NLA SoC: F-Modifiers working on NLA Strips
* Using the Ctrl-Shift-M hotkey, F-Modifiers can be added to all the selected strips. * F-Modifiers can also be added/tweaked from the NLA N-Key properties. The UI now uses the same code as for the graph editor ones. The UI drawing here is currently messed up from the NLA side, since it seems combining normal layout stuff and old-style uiBlocks doesn't seem to work too well (BUT! the buttons are at least functional). Next up, I'll need to recode the buttons panel for the Graph Editor so that all of the drawing can be migrated over to use the new layout engine.
Diffstat (limited to 'source/blender/editors/space_nla/nla_buttons.c')
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 003eba64ed9..1ef72760bfc 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -309,18 +309,28 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
static void nla_panel_modifiers(const bContext *C, Panel *pa)
{
PointerRNA strip_ptr;
+ NlaStrip *strip;
+ FModifier *fcm;
uiLayout *layout= pa->layout;
- //uiLayout *column, *row, *subcol;
uiBlock *block;
+ int yco = 190; // xxx old
/* check context and also validity of pointer */
if (!nla_panel_context(C, NULL, &strip_ptr))
return;
+ strip= strip_ptr.data;
block= uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
-
- // TODO...
+
+ /* 'add modifier' button at top of panel */
+ // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
+ // FIXME: we need to set the only-active property so that this will only add modifiers for the active strip (not all selected)
+ uiDefButO(block, BUT, "NLA_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 225, 150, 20, "Adds a new F-Modifier for the active NLA Strip");
+
+ /* draw each modifier */
+ for (fcm= strip->modifiers.first; fcm; fcm= fcm->next)
+ ANIM_uiTemplate_fmodifier_draw(block, &strip->modifiers, fcm, &yco);
}
/* ******************* general ******************************** */