Cleanup: Remove unneeded compositor update function

Similar to previous commit.

Compositing with animation on socket values and image sequences
still works fine.
This commit is contained in:
Sergey Sharybin 2019-04-19 11:53:00 +02:00
parent 81e0973dec
commit fd05d7bbcb
5 changed files with 0 additions and 86 deletions

View File

@ -1144,7 +1144,6 @@ void ntreeCompositExecTree(struct Scene *scene,
const struct ColorManagedDisplaySettings *display_settings,
const char *view_name);
void ntreeCompositTagRender(struct Scene *sce);
int ntreeCompositTagAnimated(struct bNodeTree *ntree);
void ntreeCompositTagGenerators(struct bNodeTree *ntree);
void ntreeCompositUpdateRLayers(struct bNodeTree *ntree);
void ntreeCompositRegisterPass(struct bNodeTree *ntree,

View File

@ -1447,10 +1447,6 @@ void ED_update_for_newframe(Main *bmain, Depsgraph *depsgraph)
/* this function applies the changes too */
BKE_scene_graph_update_for_newframe(depsgraph, bmain);
/* composite */
if (scene->use_nodes && scene->nodetree)
ntreeCompositTagAnimated(scene->nodetree);
}
/*

View File

@ -3269,7 +3269,6 @@ static int image_record_composite_apply(bContext *C, wmOperator *op)
// XXX scene->nodetree->test_break = NULL;
BKE_image_all_free_anim_ibufs(scene->r.cfra);
ntreeCompositTagAnimated(scene->nodetree);
ntreeCompositExecTree(scene->nodetree,
&scene->r,
0,

View File

@ -299,85 +299,6 @@ void ntreeCompositTagRender(Scene *curscene)
}
}
static int node_animation_properties(bNodeTree *ntree, bNode *node)
{
bNodeSocket *sock;
const ListBase *lb;
Link *link;
PointerRNA ptr;
PropertyRNA *prop;
/* check to see if any of the node's properties have fcurves */
RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
lb = RNA_struct_type_properties(ptr.type);
for (link = lb->first; link; link = link->next) {
prop = (PropertyRNA *)link;
if (RNA_property_animated(&ptr, prop)) {
nodeUpdate(ntree, node);
return 1;
}
}
/* now check node sockets */
for (sock = node->inputs.first; sock; sock = sock->next) {
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
prop = RNA_struct_find_property(&ptr, "default_value");
if (RNA_property_animated(&ptr, prop)) {
nodeUpdate(ntree, node);
return 1;
}
}
return 0;
}
/* tags nodes that have animation capabilities */
int ntreeCompositTagAnimated(bNodeTree *ntree)
{
bNode *node;
int tagged = 0;
if (ntree == NULL)
return 0;
for (node = ntree->nodes.first; node; node = node->next) {
tagged = node_animation_properties(ntree, node);
/* otherwise always tag these node types */
if (node->type == CMP_NODE_IMAGE) {
Image *ima = (Image *)node->id;
if (ima && BKE_image_is_animated(ima)) {
nodeUpdate(ntree, node);
tagged = 1;
}
}
else if (node->type == CMP_NODE_TIME) {
nodeUpdate(ntree, node);
tagged = 1;
}
/* here was tag render layer, but this is called after a render, so re-composites fail */
else if (node->type == NODE_GROUP) {
if (ntreeCompositTagAnimated((bNodeTree *)node->id)) {
nodeUpdate(ntree, node);
}
}
else if (ELEM(node->type, CMP_NODE_MOVIECLIP, CMP_NODE_TRANSFORM)) {
nodeUpdate(ntree, node);
tagged = 1;
}
else if (node->type == CMP_NODE_MASK) {
nodeUpdate(ntree, node);
tagged = 1;
}
}
return tagged;
}
/* called from image window preview */
void ntreeCompositTagGenerators(bNodeTree *ntree)
{

View File

@ -1445,7 +1445,6 @@ static void do_render_composite(Render *re)
if (ntree) {
ntreeCompositTagRender(re->scene);
ntreeCompositTagAnimated(ntree);
}
if (ntree && re->scene->use_nodes && re->r.scemode & R_DOCOMP) {