Revision: 41567
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41567
Author:   nazgul
Date:     2011-11-05 15:14:28 +0000 (Sat, 05 Nov 2011)
Log Message:
-----------
Camera tracking integration
===========================

Hopefully last codereview issue fix: do not set movieclip ID block in init 
function of nodes.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
    
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_movieclip.c
    
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c

Modified: branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c      
2011-11-05 14:37:43 UTC (rev 41566)
+++ branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c      
2011-11-05 15:14:28 UTC (rev 41567)
@@ -2207,8 +2207,14 @@
                ED_node_set_active(bmain, snode->edittree, node);
                
                if(snode->nodetree->type==NTREE_COMPOSIT) {
-                       if(ELEM4(node->type, CMP_NODE_R_LAYERS, 
CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE))
+                       if(ELEM4(node->type, CMP_NODE_R_LAYERS, 
CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE)) {
                                node->id = &scene->id;
+                       }
+                       else if(ELEM3(node->type, CMP_NODE_MOVIECLIP, 
CMP_NODE_MOVIEDISTORTION, CMP_NODE_STABILIZE2D)) {
+                               if(G.main->movieclip.first == 
G.main->movieclip.last) {
+                                       node->id= G.main->movieclip.first;
+                               }
+                       }
                        
                        ntreeCompositForceHidden(snode->edittree, scene);
                }

Modified: 
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_movieclip.c
===================================================================
--- 
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_movieclip.c
    2011-11-05 14:37:43 UTC (rev 41566)
+++ 
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_movieclip.c
    2011-11-05 15:14:28 UTC (rev 41567)
@@ -140,10 +140,6 @@
 
        node->storage= user;
        user->framenr= 1;
-
-       if(G.main->movieclip.first == G.main->movieclip.last) {
-               node->id= G.main->movieclip.first;
-       }
 }
 
 void register_node_type_cmp_movieclip(ListBase *lb)

Modified: 
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
===================================================================
--- 
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
      2011-11-05 14:37:43 UTC (rev 41566)
+++ 
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
      2011-11-05 15:14:28 UTC (rev 41567)
@@ -98,13 +98,6 @@
        }
 }
 
-static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate 
*UNUSED(ntemp))
-{
-       if(G.main->movieclip.first == G.main->movieclip.last) {
-               node->id= G.main->movieclip.first;
-       }
-}
-
 static const char *label(bNode *node)
 {
        if(node->custom1==0)
@@ -134,7 +127,6 @@
        node_type_base(&ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", 
NODE_CLASS_DISTORT, NODE_OPTIONS);
        node_type_socket_templates(&ntype, cmp_node_moviedistortion_in, 
cmp_node_moviedistortion_out);
        node_type_size(&ntype, 140, 100, 320);
-       node_type_init(&ntype, init);
        node_type_label(&ntype, label);
        node_type_exec(&ntype, exec);
        node_type_storage(&ntype, NULL, storage_free, storage_copy);

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

Reply via email to