Cleanup: Remove unneeded texture nodes update function
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 19 Apr 2019 09:11:27 +0000 (11:11 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 19 Apr 2019 13:16:33 +0000 (15:16 +0200)
The function was calling update() on the time curve, but there
is no update callback on that node. So, effectively the function
was doing nothing.

source/blender/blenkernel/BKE_node.h
source/blender/editors/screen/screen_edit.c
source/blender/nodes/texture/node_texture_tree.c

index 48b5856..17ea7c8 100644 (file)
@@ -1220,7 +1220,6 @@ struct TexResult;
 #define TEX_NODE_PROC_MAX 600
 
 /* API */
-int ntreeTexTagAnimated(struct bNodeTree *ntree);
 void ntreeTexCheckCyclics(struct bNodeTree *ntree);
 
 struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree);
index 259076f..8916577 100644 (file)
@@ -1451,16 +1451,6 @@ void ED_update_for_newframe(Main *bmain, Depsgraph *depsgraph)
   /* composite */
   if (scene->use_nodes && scene->nodetree)
     ntreeCompositTagAnimated(scene->nodetree);
-
-  /* update animated texture nodes */
-  {
-    Tex *tex;
-    for (tex = bmain->textures.first; tex; tex = tex->id.next) {
-      if (tex->use_nodes && tex->nodetree) {
-        ntreeTexTagAnimated(tex->nodetree);
-      }
-    }
-  }
 }
 
 /*
index 76b906f..519ae4f 100644 (file)
@@ -175,28 +175,6 @@ void register_node_tree_type_tex(void)
   ntreeTypeAdd(tt);
 }
 
-int ntreeTexTagAnimated(bNodeTree *ntree)
-{
-  bNode *node;
-
-  if (ntree == NULL)
-    return 0;
-
-  for (node = ntree->nodes.first; node; node = node->next) {
-    if (node->type == TEX_NODE_CURVE_TIME) {
-      nodeUpdate(ntree, node);
-      return 1;
-    }
-    else if (node->type == NODE_GROUP) {
-      if (ntreeTexTagAnimated((bNodeTree *)node->id)) {
-        return 1;
-      }
-    }
-  }
-
-  return 0;
-}
-
 bNodeTreeExec *ntreeTexBeginExecTree_internal(bNodeExecContext *context,
                                               bNodeTree *ntree,
                                               bNodeInstanceKey parent_key)