Revision: 23402
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23402
Author:   dingto
Date:     2009-09-21 18:21:54 +0200 (Mon, 21 Sep 2009)

Log Message:
-----------
2.5 Nodes:

* Wrapped Color Key and Blur Node.
* Nodes using RNA properties can be animated. You can now choose if the Nodes 
Window should be updated while animation playback too. (Timeline>Playback Menu)

Modified Paths:
--------------
    trunk/blender/release/ui/space_time.py
    trunk/blender/source/blender/editors/screen/screen_ops.c
    trunk/blender/source/blender/editors/space_node/drawnode.c
    trunk/blender/source/blender/makesdna/DNA_space_types.h
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/ui/space_time.py
===================================================================
--- trunk/blender/release/ui/space_time.py      2009-09-21 16:08:38 UTC (rev 
23401)
+++ trunk/blender/release/ui/space_time.py      2009-09-21 16:21:54 UTC (rev 
23402)
@@ -119,6 +119,7 @@
                layout.itemR(st, "play_buttons")
                layout.itemR(st, "play_image")
                layout.itemR(st, "play_sequencer")
+               layout.itemR(st, "play_nodes")
                
                layout.itemS()
                

Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c    2009-09-21 
16:08:38 UTC (rev 23401)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c    2009-09-21 
16:21:54 UTC (rev 23402)
@@ -2176,6 +2176,10 @@
                                if(redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
                                        return 1;
                                break;
+                       case SPACE_NODE:
+                               if(redraws & (TIME_NODES))
+                                       return 1;
+                               break;
                        case SPACE_IMAGE:
                                if(redraws & TIME_ALL_IMAGE_WIN)
                                        return 1;

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2009-09-21 
16:08:38 UTC (rev 23401)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2009-09-21 
16:21:54 UTC (rev 23402)
@@ -1107,58 +1107,28 @@
 }
 static void node_composit_buts_blur(uiLayout *layout, PointerRNA *ptr)
 {
-       uiBlock *block= uiLayoutFreeBlock(layout);
-       bNode *node= ptr->data;
-       rctf *butr= &node->butr;
-       NodeBlurData *nbd= node->storage;
-       uiBut *bt;
-       short dy= butr->ymin+58;
-       short dx= (butr->xmax-butr->xmin)/2;
-       char str[256];
+       uiLayout *row, *col;
        
-       uiBlockBeginAlign(block);
-       sprintf(str, "Filter Type%%t|Flat %%x%d|Tent %%x%d|Quad %%x%d|Cubic 
%%x%d|Gauss %%x%d|Fast Gauss%%x%d|CatRom %%x%d|Mitch %%x%d", R_FILTER_BOX, 
R_FILTER_TENT, R_FILTER_QUAD, R_FILTER_CUBIC, R_FILTER_GAUSS, 
R_FILTER_FAST_GAUSS, R_FILTER_CATROM, R_FILTER_MITCH);
-       uiDefButS(block, MENU, B_NODE_EXEC,str,
-                         butr->xmin, dy, dx*2, 19, 
-                         &nbd->filtertype, 0, 0, 0, 0, "Set sampling filter 
for blur");
-       dy-=19;
-       if (nbd->filtertype != R_FILTER_FAST_GAUSS) { 
-               uiDefButC(block, TOG, B_NODE_EXEC, "Bokeh",
-                               butr->xmin, dy, dx, 19, 
-                               &nbd->bokeh, 0, 0, 0, 0, "Uses circular filter, 
warning it's slow!");
-               uiDefButC(block, TOG, B_NODE_EXEC, "Gamma",
-                               butr->xmin+dx, dy, dx, 19, 
-                               &nbd->gamma, 0, 0, 0, 0, "Applies filter on 
gamma corrected values");
-       } else {
-               uiBlockEndAlign(block);
-               uiBlockBeginAlign(block);
+       col= uiLayoutColumn(layout, 0);
+       
+       uiItemR(col, "", 0, ptr, "filter_type", 0);
+       /* Only for "Fast Gaussian" */
+       if (RNA_enum_get(ptr, "filter_type")!= 7) {
+               uiItemR(col, NULL, 0, ptr, "bokeh", 0);
+               uiItemR(col, NULL, 0, ptr, "gamma", 0);
        }
-       dy-=19;
-       bt= uiDefButS(block, TOG, B_NOP, "Relative",
-                         butr->xmin, dy, dx*2, 19,
-                         &nbd->relative, 0, 0, 0, 0, "Use relative (percent) 
values to define blur radius");
-       uiButSetFunc(bt, node_blur_relative_cb, node, NULL);
-
-       dy-=19;
-       if(nbd->relative) {
-               bt= uiDefButF(block, NUM, B_NODE_EXEC, "X:",
-                                        butr->xmin, dy, dx, 19, 
-                                        &nbd->percentx, 0.0f, 1.0f, 0, 0, "");
-               uiButSetFunc(bt, node_blur_update_sizex_cb, node, NULL);
-               bt= uiDefButF(block, NUM, B_NODE_EXEC, "Y:",
-                                        butr->xmin+dx, dy, dx, 19, 
-                                        &nbd->percenty, 0.0f, 1.0f, 0, 0, "");
-               uiButSetFunc(bt, node_blur_update_sizey_cb, node, NULL);
+       
+       uiItemR(col, NULL, 0, ptr, "relative", 0);
+       row= uiLayoutRow(col, 1);
+       if (RNA_boolean_get(ptr, "relative")== 1) {
+               uiItemR(row, "X", 0, ptr, "factor_x", 0);
+               uiItemR(row, "Y", 0, ptr, "factor_y", 0);
        }
+       
        else {
-               uiDefButS(block, NUM, B_NODE_EXEC, "X:",
-                                        butr->xmin, dy, dx, 19, 
-                                        &nbd->sizex, 0, 256, 0, 0, "");
-               uiDefButS(block, NUM, B_NODE_EXEC, "Y:",
-                                        butr->xmin+dx, dy, dx, 19, 
-                                        &nbd->sizey, 0, 256, 0, 0, "");
+               uiItemR(row, "X", 0, ptr, "sizex", 0);
+               uiItemR(row, "Y", 0, ptr, "sizey", 0);
        }
-       uiBlockEndAlign(block);
 }
 
 static void node_composit_buts_dblur(uiLayout *layout, PointerRNA *ptr)
@@ -1455,23 +1425,12 @@
 
 static void node_composit_buts_color_matte(uiLayout *layout, PointerRNA *ptr)
 {
-       uiBlock *block= uiLayoutFreeBlock(layout);
-       bNode *node= ptr->data;
-       rctf *butr= &node->butr;
-       NodeChroma *c= node->storage;
-       uiBlockBeginAlign(block);
-
-       uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "H: ",
-               butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20,
-               &c->t1, 0.0f, 0.25f, 100, 0, "Hue tolerance for colors to be 
considered a keying color");
-       uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "S: ",
-               butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
-               &c->t2, 0.0f, 1.0f, 100, 0, "Saturation Tolerance for the 
color");
-       uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "V: ",
-               butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
-               &c->t3, 0.0f, 1.0f, 100, 0, "Value Tolerance for the color");
-
-       uiBlockEndAlign(block);
+       uiLayout *col;
+       
+       col= uiLayoutColumn(layout, 1);
+       uiItemR(col, NULL, 0, ptr, "h", UI_ITEM_R_SLIDER);
+       uiItemR(col, NULL, 0, ptr, "s", UI_ITEM_R_SLIDER);
+       uiItemR(col, NULL, 0, ptr, "v", UI_ITEM_R_SLIDER);
 }
 
 static void node_composit_buts_channel_matte(uiLayout *layout, PointerRNA *ptr)

Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h     2009-09-21 
16:08:38 UTC (rev 23401)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h     2009-09-21 
16:21:54 UTC (rev 23402)
@@ -834,6 +834,7 @@
 #define TIME_SEQ                               32
 #define TIME_ALL_IMAGE_WIN             64
 #define TIME_CONTINUE_PHYSICS  128
+#define TIME_NODES                             256
 
 /* sseq->mainb */
 #define SEQ_DRAW_SEQUENCE         0

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c    2009-09-21 
16:08:38 UTC (rev 23401)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c    2009-09-21 
16:21:54 UTC (rev 23402)
@@ -1239,6 +1239,11 @@
        RNA_def_property_ui_text(prop, "Sequencer Windows", "");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, 
"rna_SpaceTime_redraw_update");
        
+       prop= RNA_def_property(srna, "play_nodes", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_NODES);
+       RNA_def_property_ui_text(prop, "Node Windows", "");
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, 
"rna_SpaceTime_redraw_update");
+       
        /* Other options */
        
        prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, 
PROP_NONE);


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to