diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-08-23 07:55:07 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-08-23 08:07:39 +0300 |
commit | 0e09bfa0594ef64e5a1966280277330d65e874dd (patch) | |
tree | 909de8b69ac72008f9c91e80f98c617bf1cde756 /source/blender/depsgraph | |
parent | 3fa4e52657758b37698a6187764239560ff3d573 (diff) |
Depsgraph: Added note that the filtering function should NOT be called on a filtered graph
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 5 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query_filter.cc | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index b7ecd0544e4..a666100c6da 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -233,7 +233,10 @@ typedef struct DEG_FilterQuery { eDEG_FilterQuery_Granularity detail_level; } DEG_FilterQuery; -/* Obtain a new graph instance that only contains the subset of desired nodes */ +/* Obtain a new graph instance that only contains the subset of desired nodes + * WARNING: Do NOT pass an already filtered depsgraph through this function again, + * as we are currently unable to accurately recreate it. + */ Depsgraph *DEG_graph_filter(const Depsgraph *depsgraph, struct Main *bmain, DEG_FilterQuery *query); diff --git a/source/blender/depsgraph/intern/depsgraph_query_filter.cc b/source/blender/depsgraph/intern/depsgraph_query_filter.cc index 83ee350f300..cfa51ac0673 100644 --- a/source/blender/depsgraph/intern/depsgraph_query_filter.cc +++ b/source/blender/depsgraph/intern/depsgraph_query_filter.cc @@ -185,7 +185,10 @@ void deg_filter_remove_unwanted_ids(Depsgraph *graph, GSet *retained_ids) /* *************************************************** */ /* Graph Filtering API */ -/* Obtain a new graph instance that only contains the nodes needed */ +/* Obtain a new graph instance that only contains the subset of desired nodes + * WARNING: Do NOT pass an already filtered depsgraph through this function again, + * as we are currently unable to accurately recreate it. + */ Depsgraph *DEG_graph_filter(const Depsgraph *graph_src, Main *bmain, DEG_FilterQuery *query) { const DEG::Depsgraph *deg_graph_src = reinterpret_cast<const DEG::Depsgraph *>(graph_src); |