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 16:41:03 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-02 16:41:03 +0400
commit441bcaae2e63d3f757ee336fb051a9cb851e3e33 (patch)
tree31ef5e997b3dcfd56994386a22cb628b7775b5ae /source/blender/editors/space_nla
parent6b784a80f02deaca05e347dc2626dc92826f0944 (diff)
NLA SoC: FModifier drawing converted to use Layout Engine
* Most of the F-Modifiers have been ported to use the layout engine + RNA for drawing their buttons now. This plays much nicer with various button-layouts. --> As a nice demo, try adding a Noise Modifier to a NLA-strip, and change the 'size' setting to about 2 to see some effects. * Generator and Envelope modifiers haven't been ported yet since they're quite complex (requiring more time + energy), and as such, have been made to have some temporary error prints instead. Will check on this tomorrow. * Finished/cleaned up the RNA-wrapping of most FModifiers. TODO's (help requested... Brecht?): Generator modifier's UI cannot be wrapped yet using the layout engine (though I might try using the old system only), as I'm having some trouble wrapping the coefficients array for this (see rna_fcurve.c - rna_def_fmodifier_generator())
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 1ef72760bfc..67c4365ff49 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -311,26 +311,33 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
PointerRNA strip_ptr;
NlaStrip *strip;
FModifier *fcm;
- uiLayout *layout= pa->layout;
+ uiLayout *col, *row;
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);
+ block= uiLayoutGetBlock(pa->layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* '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");
+ {
+ row= uiLayoutRow(pa->layout, 0);
+ block= uiLayoutGetBlock(row);
+
+ // 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, 0, 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);
+ for (fcm= strip->modifiers.first; fcm; fcm= fcm->next) {
+ col= uiLayoutColumn(pa->layout, 1);
+
+ ANIM_uiTemplate_fmodifier_draw(col, &strip->modifiers, fcm);
+ }
}
/* ******************* general ******************************** */