Depsgraph: Remove no longer needed nodetree values copying on eval
Note: Depsgraph still calls the nodetree eval function that doesn't nothing in turn. We can remove it, but it is harmless though.
This commit is contained in:
@@ -1056,9 +1056,6 @@ void free_nodesystem(void);
|
|||||||
|
|
||||||
struct Depsgraph;
|
struct Depsgraph;
|
||||||
|
|
||||||
void BKE_nodetree_copy_default_values(struct bNodeTree *ntree_dst,
|
|
||||||
const struct bNodeTree *ntree_src);
|
|
||||||
|
|
||||||
void BKE_nodetree_shading_params_eval(struct Depsgraph *depsgraph,
|
void BKE_nodetree_shading_params_eval(struct Depsgraph *depsgraph,
|
||||||
struct bNodeTree *ntree_dst,
|
struct bNodeTree *ntree_dst,
|
||||||
const struct bNodeTree *ntree_src);
|
const struct bNodeTree *ntree_src);
|
||||||
|
|||||||
@@ -3739,43 +3739,9 @@ void BKE_nodetree_remove_layer_n(bNodeTree *ntree, Scene *scene, const int layer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void node_copy_default_values_list(ListBase *sockets_dst,
|
|
||||||
const ListBase *sockets_src)
|
|
||||||
{
|
|
||||||
bNodeSocket *sock_dst = sockets_dst->first;
|
|
||||||
const bNodeSocket *sock_src = sockets_src->first;
|
|
||||||
while (sock_dst != NULL) {
|
|
||||||
node_socket_copy_default_value(sock_dst, sock_src);
|
|
||||||
sock_dst = sock_dst->next;
|
|
||||||
sock_src = sock_src->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void node_copy_default_values(bNode *node_dst, const bNode *node_src)
|
|
||||||
{
|
|
||||||
node_copy_default_values_list(&node_dst->inputs, &node_src->inputs);
|
|
||||||
node_copy_default_values_list(&node_dst->outputs, &node_src->outputs);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BKE_nodetree_copy_default_values(bNodeTree *ntree_dst,
|
|
||||||
const bNodeTree *ntree_src)
|
|
||||||
{
|
|
||||||
if (ntree_dst == ntree_src) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bNode *node_dst = ntree_dst->nodes.first;
|
|
||||||
const bNode *node_src = ntree_src->nodes.first;
|
|
||||||
while (node_dst != NULL) {
|
|
||||||
node_copy_default_values(node_dst, node_src);
|
|
||||||
node_dst = node_dst->next;
|
|
||||||
node_src = node_src->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BKE_nodetree_shading_params_eval(struct Depsgraph *depsgraph,
|
void BKE_nodetree_shading_params_eval(struct Depsgraph *depsgraph,
|
||||||
bNodeTree *ntree_dst,
|
bNodeTree *ntree_dst,
|
||||||
const bNodeTree *ntree_src)
|
const bNodeTree *ntree_src)
|
||||||
{
|
{
|
||||||
DEG_debug_print_eval(depsgraph, __func__, ntree_src->id.name, ntree_dst);
|
DEG_debug_print_eval(depsgraph, __func__, ntree_src->id.name, ntree_dst);
|
||||||
BKE_nodetree_copy_default_values(ntree_dst, ntree_src);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,17 +449,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
|
|||||||
GHASH_FOREACH_BEGIN(ComponentDepsNode *, comp_node, id_node->components)
|
GHASH_FOREACH_BEGIN(ComponentDepsNode *, comp_node, id_node->components)
|
||||||
{
|
{
|
||||||
if (comp_node->type == DEG_NODE_TYPE_ANIMATION) {
|
if (comp_node->type == DEG_NODE_TYPE_ANIMATION) {
|
||||||
AnimData *adt = BKE_animdata_from_id(id);
|
continue;
|
||||||
/* NOTE: Animation data might be null if relations are tagged
|
|
||||||
* for update.
|
|
||||||
*/
|
|
||||||
if (adt == NULL || (adt->recalc & ADT_RECALC_ANIM) == 0) {
|
|
||||||
/* If there is no animation, or animation is not tagged for
|
|
||||||
* update yet, we don't force animation channel to be evaluated.
|
|
||||||
*/
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
id->recalc |= ID_RECALC_ANIMATION;
|
|
||||||
}
|
}
|
||||||
comp_node->tag_update(graph);
|
comp_node->tag_update(graph);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user