diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-08 09:00:10 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-08 09:00:10 +0400 |
commit | be5293d3ad38ba5f9f32ac8585d012bc44a9e684 (patch) | |
tree | 34cb07a2e3271dd4b9d1b6a430fd46ae95036755 /source/blender/editors/space_nla/nla_buttons.c | |
parent | 823bf891a113cc0d1893706cf374aceec2715b8f (diff) |
NLA SoC: Influence/Time properties for strips can now be animated
* These settings can now be edited + keyframed (using IKEY over the button only for now... other cases will fail)
* Reshuffled some of the keyframing code to make this sort of thing easier to do. Also, restored corrections for NLA-mapping when inserting/removing keyframes.
TODOS:
* animation editors don't show these keyframes yet
* the buttons don't change colour yet to reflect this state. How to do this efficiently?
* allow keyframing of these in more places
* more robust UI handling for this.
Diffstat (limited to 'source/blender/editors/space_nla/nla_buttons.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_buttons.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 38ac59cbc9e..d09cc6a1e53 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -271,7 +271,7 @@ static void nla_panel_actclip(const bContext *C, Panel *pa) uiItemR(row, NULL, ICON_ACTION, &strip_ptr, "action", 0, 0, 0); /* action extents */ - // XXX custom names were used here... probably not necessary in future? + // XXX custom names were used here (to avoid the prefixes)... probably not necessary in future? column= uiLayoutColumn(layout, 1); uiItemL(column, "Action Extents:", 0); uiItemR(column, "Start Frame", 0, &strip_ptr, "action_start_frame", 0, 0, 0); @@ -289,7 +289,7 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) { PointerRNA strip_ptr; uiLayout *layout= pa->layout; - uiLayout *column; + uiLayout *column, *subcolumn; uiBlock *block; /* check context and also validity of pointer */ @@ -300,14 +300,19 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL); column= uiLayoutColumn(layout, 1); - uiLayoutSetEnabled(column, 0); // XXX for now, don't allow user to edit uiItemR(column, NULL, 0, &strip_ptr, "animated_influence", 0, 0, 0); - uiItemR(column, NULL, 0, &strip_ptr, "influence", 0, 0, 0); + subcolumn= uiLayoutColumn(column, 1); + uiLayoutSetEnabled(subcolumn, RNA_boolean_get(&strip_ptr, "animated_influence")); + uiItemR(subcolumn, NULL, 0, &strip_ptr, "influence", 0, 0, 0); + + column= uiLayoutColumn(layout, 1); - uiLayoutSetEnabled(column, 0); // XXX for now, don't allow user to edit uiItemR(column, NULL, 0, &strip_ptr, "animated_time", 0, 0, 0); - uiItemR(column, NULL, 0, &strip_ptr, "strip_time", 0, 0, 0); + + subcolumn= uiLayoutColumn(column, 1); + uiLayoutSetEnabled(subcolumn, RNA_boolean_get(&strip_ptr, "animated_time")); + uiItemR(subcolumn, NULL, 0, &strip_ptr, "strip_time", 0, 0, 0); } /* F-Modifiers for active NLA-Strip */ |