From 808bd3ea25ff99ffb845d981cb39f3bcdcd1aaf0 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Wed, 23 Nov 2011 19:05:52 +0000 Subject: 2.6 UI code: * Get rid of subrow/subcol variable names in the C UI code as well, use sub instead. This is shorter and sufficient. * Minor layout alignment fixes. * Greying out in NLA editor was doing nothing for "strip_time" property. --- source/blender/editors/space_nla/nla_buttons.c | 42 ++++++++++++-------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 7ba33e7e57e..79d11c956cd 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -294,7 +294,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa) { PointerRNA strip_ptr; uiLayout *layout= pa->layout; - uiLayout *column, *row, *subcol; + uiLayout *column, *row, *sub; uiBlock *block; short showEvalProps = 1; @@ -339,10 +339,10 @@ static void nla_panel_properties(const bContext *C, Panel *pa) uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence")==0); uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle? - subcol= uiLayoutColumn(column, 1); - uiLayoutSetActive(subcol, RNA_boolean_get(&strip_ptr, "use_auto_blend")==0); - uiItemR(subcol, &strip_ptr, "blend_in", 0, NULL, ICON_NONE); - uiItemR(subcol, &strip_ptr, "blend_out", 0, NULL, ICON_NONE); + sub= uiLayoutColumn(column, 1); + uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend")==0); + uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE); + uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE); /* settings */ column= uiLayoutColumn(layout, 1); @@ -395,7 +395,7 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) { PointerRNA strip_ptr; uiLayout *layout= pa->layout; - uiLayout *column, *subcolumn, *subrow; + uiLayout *col, *sub; uiBlock *block; /* check context and also validity of pointer */ @@ -405,23 +405,21 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) block= uiLayoutGetBlock(layout); uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL); - column= uiLayoutColumn(layout, 1); - uiItemR(column, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE); - - subcolumn= uiLayoutColumn(column, 1); - uiLayoutSetEnabled(subcolumn, RNA_boolean_get(&strip_ptr, "use_animated_influence")); - uiItemR(subcolumn, &strip_ptr, "influence", 0, NULL, ICON_NONE); - + col= uiLayoutColumn(layout, 1); + uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE); - column= uiLayoutColumn(layout, 1); - subrow= uiLayoutRow(column, 0); - uiItemR(subrow, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE); - uiItemR(subrow, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE); - - subcolumn= uiLayoutColumn(column, 1); - subrow= uiLayoutRow(subcolumn, 0); - uiLayoutSetEnabled(subrow, RNA_boolean_get(&strip_ptr, "use_animated_time")); - uiItemR(subcolumn, &strip_ptr, "strip_time", 0, NULL, ICON_NONE); + sub= uiLayoutColumn(col, 1); + uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence")); + uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE); + + col= uiLayoutColumn(layout, 1); + sub= uiLayoutRow(col, 0); + uiItemR(sub, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE); + uiItemR(sub, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE); + + sub= uiLayoutRow(col, 0); + uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_time")); + uiItemR(sub, &strip_ptr, "strip_time", 0, NULL, ICON_NONE); } /* F-Modifiers for active NLA-Strip */ -- cgit v1.2.3