NLA SoC: Minor UI-Tweaks

* When influence/time for NLA-strips are animated, settings in the other panels which used to control these are now greyed out to show that they won't have any impact over the result.

* NKey panel for Graph Editor now opens on Right-Hand Side, just like for NLA Editor. The small sub-region above the Channels region was too troublesome to work with.
This commit is contained in:
Joshua Leung
2009-07-08 06:32:52 +00:00
parent be5293d3ad
commit 665938191d
2 changed files with 16 additions and 12 deletions

View File

@@ -72,19 +72,19 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
if(ar->regiontype==RGN_TYPE_UI)
return ar;
/* add subdiv level; after channel */
/* add subdiv level; after main window */
for(ar= sa->regionbase.first; ar; ar= ar->next)
if(ar->regiontype==RGN_TYPE_CHANNELS)
if(ar->regiontype==RGN_TYPE_WINDOW)
break;
/* is error! */
if(ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "buttons for view3d");
arnew= MEM_callocN(sizeof(ARegion), "buttons for nla");
BLI_insertlinkafter(&sa->regionbase, ar, arnew);
arnew->regiontype= RGN_TYPE_UI;
arnew->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV;
arnew->alignment= RGN_ALIGN_RIGHT;
arnew->flag = RGN_FLAG_HIDDEN;
@@ -117,7 +117,7 @@ static SpaceLink *graph_new(const bContext *C)
ar->alignment= RGN_ALIGN_BOTTOM;
/* channels */
ar= MEM_callocN(sizeof(ARegion), "main area for graphedit");
ar= MEM_callocN(sizeof(ARegion), "channels area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
ar->regiontype= RGN_TYPE_CHANNELS;
@@ -126,11 +126,11 @@ static SpaceLink *graph_new(const bContext *C)
ar->v2d.scroll = (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
/* ui buttons */
ar= MEM_callocN(sizeof(ARegion), "main area for graphedit");
ar= MEM_callocN(sizeof(ARegion), "buttons area for graphedit");
BLI_addtail(&sipo->regionbase, ar);
ar->regiontype= RGN_TYPE_UI;
ar->alignment= RGN_ALIGN_TOP|RGN_SPLIT_PREV;
ar->alignment= RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
/* main area */
@@ -566,7 +566,7 @@ void ED_spacetype_ipo(void)
/* regions: UI buttons */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_UI;
art->minsizey= 200;
art->minsizex= 200;
art->keymapflag= ED_KEYMAP_UI;
art->listener= graph_region_listener;
art->init= graph_buttons_area_init;

View File

@@ -236,14 +236,17 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
* - blend in/out can only be set when autoblending is off
*/
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "animated_influence")==0);
uiItemR(column, NULL, 0, &strip_ptr, "auto_blending", 0, 0, 0); // XXX as toggle?
subcol= uiLayoutColumn(column, 1);
uiLayoutSetActive(subcol, RNA_boolean_get(&strip_ptr, "auto_blending")==0);
uiItemR(subcol, NULL, 0, &strip_ptr, "blend_in", 0, 0, 0);
uiItemR(subcol, NULL, 0, &strip_ptr, "blend_out", 0, 0, 0);
subcol= uiLayoutColumn(column, 1);
uiLayoutSetActive(subcol, RNA_boolean_get(&strip_ptr, "auto_blending")==0);
uiItemR(subcol, NULL, 0, &strip_ptr, "blend_in", 0, 0, 0);
uiItemR(subcol, NULL, 0, &strip_ptr, "blend_out", 0, 0, 0);
/* settings */
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "animated_influence") || RNA_boolean_get(&strip_ptr, "animated_time")));
uiItemL(column, "Playback Settings:", 0);
uiItemR(column, NULL, 0, &strip_ptr, "muted", 0, 0, 0);
uiItemR(column, NULL, 0, &strip_ptr, "reversed", 0, 0, 0);
@@ -279,6 +282,7 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
/* action usage */
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "animated_time")==0);
uiItemL(column, "Playback Settings:", 0);
uiItemR(column, NULL, 0, &strip_ptr, "scale", 0, 0, 0);
uiItemR(column, NULL, 0, &strip_ptr, "repeat", 0, 0, 0);