Revision: 21417
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21417
Author:   aligorith
Date:     2009-07-08 08:32:52 +0200 (Wed, 08 Jul 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    branches/soc-2009-aligorith/source/blender/editors/space_graph/space_graph.c
    branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c

Modified: 
branches/soc-2009-aligorith/source/blender/editors/space_graph/space_graph.c
===================================================================
--- 
branches/soc-2009-aligorith/source/blender/editors/space_graph/space_graph.c    
    2009-07-08 05:00:10 UTC (rev 21416)
+++ 
branches/soc-2009-aligorith/source/blender/editors/space_graph/space_graph.c    
    2009-07-08 06:32:52 UTC (rev 21417)
@@ -72,19 +72,19 @@
                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 @@
        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 @@
        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 @@
        /* 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;

Modified: 
branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c  
2009-07-08 05:00:10 UTC (rev 21416)
+++ branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c  
2009-07-08 06:32:52 UTC (rev 21417)
@@ -236,14 +236,17 @@
         *      - 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 @@
                
        /* 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);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to