Avoid node tree update tag when changed nodes which are not affecting result

This was we don't have re-compo or viewport re-rendering happening when changing
nodes which are not connected to the output at all (for example when adding new
nodes or changing settings for unconnected nodes).

Only basic operations are covered for now. checks could be added to more tools
when needed.

Currently it's not fully optimal implementation, but seems to work fast enough.
Don't see reliable alternative to that -- keeping tag in the node wouldn't work
because of the node groups (which are probably already broken, but should be
easy to solve with current approach). So guess it's more matter of optimizing
path search from a node to output.

Before processing forward let's check whether it's indeed something we want
and whether the approach is indeed not fully bad.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1765
This commit is contained in:
2016-02-05 01:39:42 +05:00
parent 0d12e086f5
commit 83824947ba
11 changed files with 167 additions and 45 deletions

View File

@@ -80,7 +80,7 @@ void ED_node_draw_snap(struct View2D *v2d, const float cent[2], float size, Node
/* node_draw.c */
void ED_node_tree_update(const struct bContext *C);
void ED_node_tag_update_id(struct ID *id);
void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree);
void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
void ED_node_sort(struct bNodeTree *ntree);
float ED_node_grid_size(void);