Internal node links are now cached in a per-node list, instead of being generated...
authorLukas Toenne <lukas.toenne@googlemail.com>
Thu, 25 Oct 2012 16:49:06 +0000 (16:49 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Thu, 25 Oct 2012 16:49:06 +0000 (16:49 +0000)
Storing this list in the node has the advantage of requiring far fewer calls to the potentially expensive internal_connect callback. This was called on every node redraw ...

Also it will allow Cycles to properly use the internal links for muted nodes, which ensures consistent behavior. The previous method was not applicable in Cycles because transient list return values are not supported well in the RNA and particularly the C++ API implementation.

24 files changed:
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/node.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/compositor/nodes/COM_MuteNode.cpp
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/makesdna/DNA_node_types.h
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/nodes/node_composite_composite.c
source/blender/nodes/composite/nodes/node_composite_splitViewer.c
source/blender/nodes/composite/nodes/node_composite_viewer.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/intern/node_exec.c
source/blender/nodes/intern/node_util.c
source/blender/nodes/intern/node_util.h
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/shader/nodes/node_shader_output.c
source/blender/nodes/shader/nodes/node_shader_output_lamp.c
source/blender/nodes/shader/nodes/node_shader_output_material.c
source/blender/nodes/shader/nodes/node_shader_output_world.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/nodes/texture/nodes/node_texture_output.c
source/blender/nodes/texture/nodes/node_texture_viewer.c

index d4b2755495e826e9548bc52197d730a4066f63a5..cd1875f848b169730036caff863e2e43e7b132a4 100644 (file)
@@ -193,10 +193,8 @@ typedef struct bNodeType {
        struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit);
        void (*group_edit_clear)(struct bNode *node);
        
-       /* Generate a temporary list of internal links (bNodeLink), for muting and disconnect operators.
-        * Result must be freed by caller!
-        */
-       ListBase (*internal_connect)(struct bNodeTree *, struct bNode *node);
+       /* Update the internal links list, for muting and disconnect operators. */
+       void (*update_internal_links)(struct bNodeTree *, struct bNode *node);
        
        /* **** execution callbacks **** */
        void *(*initexecfunc)(struct bNode *node);
@@ -293,7 +291,7 @@ typedef struct bNodeTreeType {
        int (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link);
 
        /* Default internal linking. */
-       ListBase (*internal_connect)(struct bNodeTree *, struct bNode *node);
+       void (*update_internal_links)(struct bNodeTree *, struct bNode *node);
 } bNodeTreeType;
 
 /* ************** GENERIC API, TREES *************** */
@@ -389,6 +387,7 @@ struct bNode   *nodeGetActiveTexture(struct bNodeTree *ntree);
 
 void            nodeUpdate(struct bNodeTree *ntree, struct bNode *node);
 int             nodeUpdateID(struct bNodeTree *ntree, struct ID *id);
+void            nodeUpdateInternalLinks(struct bNodeTree *ntree, struct bNode *node);
 
 void            nodeFreePreview(struct bNode *node);
 
@@ -445,7 +444,7 @@ void            node_type_exec_new(struct bNodeType *ntype,
                                    void (*freeexecfunc)(struct bNode *node, void *nodedata),
                                    void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata,
                                                        struct bNodeStack **, struct bNodeStack **));
-void            node_type_internal_connect(struct bNodeType *ntype, ListBase (*internal_connect)(struct bNodeTree *, struct bNode *));
+void            node_type_internal_links(struct bNodeType *ntype, void (*update_internal_links)(struct bNodeTree *, struct bNode *));
 void            node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node,
                                                                       struct GPUNodeStack *in, struct GPUNodeStack *out));
 void            node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node,
index 5361ae6e7692dccf4f8e7523c1c0c2950cc8b4a5..5613f25fca429f1d533f555c39c420d5cb8912f6 100644 (file)
@@ -347,6 +347,7 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
 {
        bNode *nnode = MEM_callocN(sizeof(bNode), "dupli node");
        bNodeSocket *sock, *oldsock;
+       bNodeLink *link, *oldlink;
 
        *nnode = *node;
        /* can be called for nodes outside a node tree (e.g. clipboard) */
@@ -386,6 +387,15 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
                sock->cache = NULL;
        }
        
+       BLI_duplicatelist(&nnode->internal_links, &node->internal_links);
+       oldlink = node->internal_links.first;
+       for (link = nnode->internal_links.first; link; link = link->next, oldlink = oldlink->next) {
+               link->fromnode = nnode;
+               link->tonode = nnode;
+               link->fromsock = link->fromsock->new_sock;
+               link->tosock = link->tosock->new_sock;
+       }
+       
        /* don't increase node->id users, freenode doesn't decrement either */
        
        if (node->typeinfo->copystoragefunc)
@@ -524,15 +534,12 @@ void nodeRemSocketLinks(bNodeTree *ntree, bNodeSocket *sock)
 void nodeInternalRelink(bNodeTree *ntree, bNode *node)
 {
        bNodeLink *link, *link_next;
-       ListBase intlinks;
        
-       if (!node->typeinfo->internal_connect)
+       if (node->internal_links.first == NULL)
                return;
        
-       intlinks = node->typeinfo->internal_connect(ntree, node);
-       
        /* store link pointers in output sockets, for efficient lookup */
-       for (link = intlinks.first; link; link = link->next)
+       for (link = node->internal_links.first; link; link = link->next)
                link->tosock->link = link;
        
        /* redirect downstream links */
@@ -566,8 +573,6 @@ void nodeInternalRelink(bNodeTree *ntree, bNode *node)
                if (link->tonode == node)
                        nodeRemLink(ntree, link);
        }
-       
-       BLI_freelistN(&intlinks);
 }
 
 void nodeToView(bNode *node, float x, float y, float *rx, float *ry)
@@ -989,6 +994,8 @@ void nodeFreeNode(bNodeTree *ntree, bNode *node)
                MEM_freeN(sock);
        }
 
+       BLI_freelistN(&node->internal_links);
+
        nodeFreePreview(node);
 
        MEM_freeN(node);
@@ -1817,6 +1824,8 @@ void ntreeUpdateTree(bNodeTree *ntree)
                                ntreetype->update_node(ntree, node);
                        else if (node->typeinfo->updatefunc)
                                node->typeinfo->updatefunc(ntree, node);
+                       
+                       nodeUpdateInternalLinks(ntree, node);
                }
        }
        
@@ -1854,6 +1863,9 @@ void nodeUpdate(bNodeTree *ntree, bNode *node)
                ntreetype->update_node(ntree, node);
        else if (node->typeinfo->updatefunc)
                node->typeinfo->updatefunc(ntree, node);
+       
+       nodeUpdateInternalLinks(ntree, node);
+       
        /* clear update flag */
        node->update = 0;
 }
@@ -1893,9 +1905,21 @@ int nodeUpdateID(bNodeTree *ntree, ID *id)
                }
        }
        
+       for (node = ntree->nodes.first; node; node = node->next) {
+               nodeUpdateInternalLinks(ntree, node);
+       }
+       
        return change;
 }
 
+void nodeUpdateInternalLinks(bNodeTree *ntree, bNode *node)
+{
+       BLI_freelistN(&node->internal_links);
+       
+       if (node->typeinfo && node->typeinfo->update_internal_links)
+               node->typeinfo->update_internal_links(ntree, node);
+}
+
 
 /* ************* node type access ********** */
 
@@ -1968,7 +1992,7 @@ void node_type_base(bNodeTreeType *ttype, bNodeType *ntype, int type, const char
 
        /* Default muting stuff. */
        if (ttype)
-               ntype->internal_connect = ttype->internal_connect;
+               ntype->update_internal_links = ttype->update_internal_links;
 
        /* default size values */
        ntype->width = 140;
@@ -2064,9 +2088,9 @@ void node_type_exec_new(struct bNodeType *ntype,
        ntype->newexecfunc = newexecfunc;
 }
 
-void node_type_internal_connect(bNodeType *ntype, ListBase (*internal_connect)(bNodeTree *, bNode *))
+void node_type_internal_links(bNodeType *ntype, void (*update_internal_links)(bNodeTree *, bNode *))
 {
-       ntype->internal_connect = internal_connect;
+       ntype->update_internal_links = update_internal_links;
 }
 
 void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out))
index 085424a27d266f20b576755703eb7e877e9bd790..0ae69bd2a56abc60b9e192b0bd31c0953249c907 100644 (file)
@@ -2413,6 +2413,8 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
                link_list(fd, &node->inputs);
                link_list(fd, &node->outputs);
                
+               link_list(fd, &node->internal_links);
+               
                if (node->type == CMP_NODE_MOVIEDISTORTION) {
                        node->storage = newmclipadr(fd, node->storage);
                }
index a162187e2cd9cca8d4b27166a89bf91ea6b73537..9588636789731e8b6eccdb87aa15b003209d691e 100644 (file)
@@ -720,7 +720,9 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
                        write_node_socket(wd, sock);
                for (sock= node->outputs.first; sock; sock= sock->next)
                        write_node_socket(wd, sock);
-
+               
+               for (link = node->internal_links.first; link; link = link->next)
+                       writestruct(wd, DATA, "bNodeLink", 1, link);
                
                if (node->storage) {
                        /* could be handlerized at some point, now only 1 exception still */
index 1821844c6f55eeeaf7689d165684ab75e34118f8..4502dcf469c5fbce95f0b04dee25aa9ad785577d 100644 (file)
@@ -108,27 +108,16 @@ void MuteNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
        /* mute node is also used for unknown nodes and couple of nodes in fast mode
         * can't use generic routines in that case
         */
-       if ((editorNode->flag & NODE_MUTED) && editorNode->typeinfo->internal_connect) {
+       if (editorNode->flag & NODE_MUTED) {
                vector<InputSocket *> &inputsockets = this->getInputSockets();
                vector<OutputSocket *> relinkedsockets;
-               bNodeTree *editorTree;
                SocketMap socketMap;
-               ListBase intlinks;
                bNodeLink *link;
 
-               if (this->getbNodeGroup()) {
-                       editorTree = (bNodeTree *) getbNodeGroup()->id;
-               }
-               else {
-                       editorTree = (bNodeTree *) context->getbNodeTree();
-               }
-
-               intlinks = editorNode->typeinfo->internal_connect(editorTree, editorNode);
-
                this->fillSocketMap<OutputSocket>(outputsockets, socketMap);
                this->fillSocketMap<InputSocket>(inputsockets, socketMap);
 
-               for (link = (bNodeLink *) intlinks.first; link; link = link->next) {
+               for (link = (bNodeLink *) editorNode->internal_links.first; link; link = link->next) {
                        if (link->fromnode == editorNode) {
                                InputSocket *fromSocket = (InputSocket *) socketMap.find(link->fromsock)->second;
                                OutputSocket *toSocket = (OutputSocket *) socketMap.find(link->tosock)->second;
@@ -170,8 +159,6 @@ void MuteNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
                                        createDefaultOutput(graph, output);
                        }
                }
-
-               BLI_freelistN(&intlinks);
        }
        else {
                for (unsigned int index = 0; index < outputsockets.size(); index++) {
index 20afbf7ce65eb4eeede0d7382796eea773db6d31..05dcd55270b7a5e050cec12cbb5c458683c4e4db 100644 (file)
@@ -506,25 +506,16 @@ int node_get_colorid(bNode *node)
 /* note: in node_edit.c is similar code, for untangle node */
 static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
 {
-       ListBase links;
        bNodeLink *link;
 
-       if (node->typeinfo->internal_connect == NULL)
-               return;
-
-       /* Get default muting links. */
-       links = node->typeinfo->internal_connect(snode->edittree, node);
-
        glEnable(GL_BLEND);
        glEnable(GL_LINE_SMOOTH);
 
-       for (link = links.first; link; link = link->next)
+       for (link = node->internal_links.first; link; link = link->next)
                node_draw_link_bezier(v2d, snode, link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
 
        glDisable(GL_BLEND);
        glDisable(GL_LINE_SMOOTH);
-
-       BLI_freelistN(&links);
 }
 
 /* this might have some more generic use */
index 3635c1d0f0348782f65010091e7d8dcc83466528..f21f343ea2b8f230078adadcacd52ba6598b3eb5 100644 (file)
@@ -1622,7 +1622,7 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
 
        for (node = snode->edittree->nodes.first; node; node = node->next) {
                /* Only allow muting of nodes having a mute func! */
-               if ((node->flag & SELECT) && node->typeinfo->internal_connect) {
+               if ((node->flag & SELECT) && node->typeinfo->update_internal_links) {
                        node->flag ^= NODE_MUTED;
                        snode_update(snode, node);
                }
index 3f1f49335859bd5fea3c587dce9e53d8f76e57d5..aa382632b7b13e9b2330bcacad86e1326b15e60e 100644 (file)
@@ -167,6 +167,7 @@ typedef struct bNode {
        struct ID *id;                  /* optional link to libdata */
        void *storage;                  /* custom data, must be struct, for storage in file */
        struct bNode *original; /* the original node in the tree (for localized tree) */
+       ListBase internal_links; /* list of cached internal links (input to output), for muted nodes and operators */
        
        float locx, locy;               /* root offset for drawing (parent space) */
        float width, height;    /* node custom width and height */
index 2d65d083131132d2b64ec3cd0c7d07b4d68ba583..9a7e587ff56b922155576f36f0bdba84b20d6c28 100644 (file)
@@ -273,7 +273,7 @@ bNodeTreeType ntreeType_Composite = {
        /* update */                    update,
        /* update_node */               update_node,
        /* validate_link */             NULL,
-       /* internal_connect */  node_internal_connect_default
+       /* update_internal_links */     node_update_internal_links_default
 };
 
 
index edbb627265d39f9482caf710af2b62826a3f4e38..cb932b6a8def45ba5fe6f438dc6c04125c5839a0 100644 (file)
@@ -110,7 +110,7 @@ void register_node_type_cmp_composite(bNodeTreeType *ttype)
 #endif
 
        /* Do not allow muting for this node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index 70c1bf8f23fe3186b1bce99fcbe856a6b3f97e80..73cf039c6df468f1c610ce599f8ef96ae2411d54 100644 (file)
@@ -167,7 +167,7 @@ void register_node_type_cmp_splitviewer(bNodeTreeType *ttype)
 #endif
 
        /* Do not allow muting for this node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index 6321b1def4d29d7085efea2325cd2446cead4157..938f75cf3f54350ad536e9e0776655e057e5f6d3 100644 (file)
@@ -149,7 +149,7 @@ void register_node_type_cmp_viewer(bNodeTreeType *ttype)
        node_type_exec(&ntype, node_composit_exec_viewer);
 #endif
 
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index 0a7f619d13c07e333470b0fc578deba888c9764e..86ef8a14c129576a1fe8852c206e0d988734a775 100644 (file)
@@ -385,16 +385,13 @@ void register_node_type_frame(bNodeTreeType *ttype)
 /* **************** REROUTE ******************** */
 
 /* simple, only a single input and output here */
-static ListBase node_reroute_internal_connect(bNodeTree *ntree, bNode *node)
+static void node_reroute_update_internal_links(bNodeTree *ntree, bNode *node)
 {
        bNodeLink *link;
-       ListBase ret;
-
-       ret.first = ret.last = NULL;
 
        /* Security check! */
        if (!ntree)
-               return ret;
+               return;
 
        link = MEM_callocN(sizeof(bNodeLink), "internal node link");
        link->fromnode = node;
@@ -403,9 +400,7 @@ static ListBase node_reroute_internal_connect(bNodeTree *ntree, bNode *node)
        link->tosock = node->outputs.first;
        /* internal link is always valid */
        link->flag |= NODE_LINK_VALID;
-       BLI_addtail(&ret, link);
-
-       return ret;
+       BLI_addtail(&node->internal_links, link);
 }
 
 static void node_reroute_init(bNodeTree *ntree, bNode *node, bNodeTemplate *UNUSED(ntemp))
@@ -424,7 +419,7 @@ void register_node_type_reroute(bNodeTreeType *ttype)
        
        node_type_base(ttype, ntype, NODE_REROUTE, "Reroute", NODE_CLASS_LAYOUT, 0);
        node_type_init(ntype, node_reroute_init);
-       node_type_internal_connect(ntype, node_reroute_internal_connect);
+       node_type_internal_links(ntype, node_reroute_update_internal_links);
        
        ntype->needs_free = 1;
        nodeRegisterType(ttype, ntype);
index 3040e8589fd26720073f83c7cb1cfcafb7e18368..3cc7ebf933799ec3eb7bf58f11e0275aa58b27f2 100644 (file)
@@ -177,15 +177,9 @@ bNodeTreeExec *ntree_exec_begin(bNodeTree *ntree)
                for (sock=node->inputs.first; sock; sock=sock->next)
                        node_init_input_index(sock, &index);
                
-               if ((node->flag & NODE_MUTED || node->type == NODE_REROUTE)
-                       && node->typeinfo->internal_connect) {
-                       
-                       ListBase internal_links = node->typeinfo->internal_connect(ntree, node);
-                       
+               if (node->flag & NODE_MUTED || node->type == NODE_REROUTE) {
                        for (sock=node->outputs.first; sock; sock=sock->next)
-                               node_init_output_index(sock, &index, &internal_links);
-                       
-                       BLI_freelistN(&internal_links);
+                               node_init_output_index(sock, &index, &node->internal_links);
                }
                else {
                        for (sock=node->outputs.first; sock; sock=sock->next)
index 27258c45fe528ff27cf96936d27a3c2001828a8a..342c366fb48738f4b923b55bf1c465d82019d63c 100644 (file)
@@ -109,18 +109,15 @@ const char *node_filter_label(bNode *node)
        return IFACE_(name);
 }
 
-ListBase node_internal_connect_default(bNodeTree *ntree, bNode *node)
+void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
 {
-       ListBase ret;
        bNodeSocket *fromsock_first=NULL, *tosock_first=NULL;   /* used for fallback link if no other reconnections are found */
        int datatype;
        int num_links_in = 0, num_links_out = 0, num_reconnect = 0;
 
-       ret.first = ret.last = NULL;
-
        /* Security check! */
        if (!ntree)
-               return ret;
+               return;
 
        for (datatype=0; datatype < NUM_SOCKET_TYPES; ++datatype) {
                bNodeSocket *fromsock, *tosock;
@@ -170,7 +167,7 @@ ListBase node_internal_connect_default(bNodeTree *ntree, bNode *node)
                                ilink->tosock = tosock;
                                /* internal link is always valid */
                                ilink->flag |= NODE_LINK_VALID;
-                               BLI_addtail(&ret, ilink);
+                               BLI_addtail(&node->internal_links, ilink);
                                
                                ++num_reconnect;
                        }
@@ -188,8 +185,6 @@ ListBase node_internal_connect_default(bNodeTree *ntree, bNode *node)
                ilink->tosock = tosock_first;
                /* internal link is always valid */
                ilink->flag |= NODE_LINK_VALID;
-               BLI_addtail(&ret, ilink);
+               BLI_addtail(&node->internal_links, ilink);
        }
-       
-       return ret;
 }
index 95104df5fedc5b53cb05d2c7f0e7d8d82441308a..3134baa283cc654f178ff214cb857ef16c72c076 100644 (file)
@@ -62,7 +62,7 @@ const char *node_math_label(struct bNode *node);
 const char *node_vect_math_label(struct bNode *node);
 const char *node_filter_label(struct bNode *node);
 
-ListBase node_internal_connect_default(struct bNodeTree *ntree, struct bNode *node);
+void node_update_internal_links_default(struct bNodeTree *ntree, struct bNode *node);
 
 #endif
 
index ad907c317f84170ec91ce9f8c93d2a045c509068..76bc3b126909afd804ce332d6b3fcb1450d97917 100644 (file)
@@ -153,7 +153,7 @@ bNodeTreeType ntreeType_Shader = {
        /* update */                    update,
        /* update_node */               NULL,
        /* validate_link */             NULL,
-       /* internal_connect */  node_internal_connect_default
+       /* update_internal_links */     node_update_internal_links_default
 };
 
 /* GPU material from shader nodes */
index 8d8c1a903a50d5fb8d40f086ea1352f94c04fb03..6f7f900aecded9f35f6c6443d5dfeeb6a18f49ca 100644 (file)
@@ -92,7 +92,7 @@ void register_node_type_sh_output(bNodeTreeType *ttype)
        node_type_gpu(&ntype, gpu_shader_output);
 
        /* Do not allow muting output node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index f24f5a85ff0fc2ccb1a671a981cf1c063624332d..ce406a8f5a17d3cbc16f24745abb9702eb389aec 100644 (file)
@@ -49,7 +49,7 @@ void register_node_type_sh_output_lamp(bNodeTreeType *ttype)
        node_type_gpu(&ntype, NULL);
 
        /* Do not allow muting output node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index 03b0559fd8e370c42d0efeb281d69e2a4a0567fb..f185e13010bc344c66b50a9b88e3ea1a5b3cab51 100644 (file)
@@ -62,7 +62,7 @@ void register_node_type_sh_output_material(bNodeTreeType *ttype)
        node_type_gpu(&ntype, node_shader_gpu_output_material);
 
        /* Do not allow muting output node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index 624805cd39f417aae49cb2d5652fdec5ddb8f3fc..953197ab2cdb5c79bc7b3fa4ad6492eab0daed95 100644 (file)
@@ -50,7 +50,7 @@ void register_node_type_sh_output_world(bNodeTreeType *ttype)
        node_type_gpu(&ntype, NULL);
 
        /* Do not allow muting output node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);
 }
index 1bfd88d3af793a037ac26badc988af16c21a97ee..ba94531c2595d829f6b8cf93bdb73a7cd43bf504 100644 (file)
@@ -134,7 +134,7 @@ bNodeTreeType ntreeType_Texture = {
        /* update */                    update,
        /* update_node */               NULL,
        /* validate_link */             NULL,
-       /* internal_connect */  node_internal_connect_default
+       /* update_internal_links */     node_update_internal_links_default
 };
 
 int ntreeTexTagAnimated(bNodeTree *ntree)
index 5867dc030502b009ecdc94f363214ea5d7af9571..2f5efe8c45ebfd6b36a2e870d7a027f079f987f2 100644 (file)
@@ -170,7 +170,7 @@ void register_node_type_tex_output(bNodeTreeType *ttype)
        node_type_exec(&ntype, exec);
        
        /* Do not allow muting output. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
        
        nodeRegisterType(ttype, &ntype);
 }
index bc31bef59d8884e6070e17c2b0366ee508d00ba0..5cb8d8c438c56f7878380bccbb98bbbc7b841dff 100644 (file)
@@ -66,7 +66,7 @@ void register_node_type_tex_viewer(bNodeTreeType *ttype)
        node_type_exec(&ntype, exec);
        
        /* Do not allow muting viewer node. */
-       node_type_internal_connect(&ntype, NULL);
+       node_type_internal_links(&ntype, NULL);
        
        nodeRegisterType(ttype, &ntype);
 }