NLA SoC: Added buttons for animating NLA-Strip Influence/Speed

These buttons are found in the Evaluation panel, but are currently disabled as I've yet to add the proper code to ensure that animating these will work correctly. They will hopefully be working before the end of the day.
This commit is contained in:
2009-07-02 23:36:16 +00:00
parent e9c85406e4
commit e55d90b340
2 changed files with 12 additions and 7 deletions

View File

@@ -215,7 +215,7 @@ static void draw_modifier__generator(uiLayout *layout, FModifier *fcm, short wid
/* draw controls for each pair of coefficients */
row= uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(row);
uiDefBut(block, LABEL, 1, "y = ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
uiDefBut(block, LABEL, 1, "y=", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
cp= data->coefficients;
for (i=0; (i < data->poly_order) && (cp); i++, cp+=2) {
@@ -225,7 +225,7 @@ static void draw_modifier__generator(uiLayout *layout, FModifier *fcm, short wid
/* coefficients */
uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient of x");
uiDefBut(block, LABEL, 1, "x + ", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
uiDefBut(block, LABEL, 1, "x+", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Second coefficient");

View File

@@ -289,7 +289,7 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
{
PointerRNA strip_ptr;
uiLayout *layout= pa->layout;
//uiLayout *column, *row, *subcol;
uiLayout *column;
uiBlock *block;
/* check context and also validity of pointer */
@@ -299,10 +299,15 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
block= uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
// influence
// strip_time
// animated_influence
// animated_time
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);
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);
}
/* F-Modifiers for active NLA-Strip */