[Bf-blender-cvs] [0e09bfa0594] blender2.8: Depsgraph: Added note that the filtering function should NOT be called on a filtered graph

Joshua Leung noreply at git.blender.org
Thu Aug 23 07:11:31 CEST 2018


Commit: 0e09bfa0594ef64e5a1966280277330d65e874dd
Author: Joshua Leung
Date:   Thu Aug 23 16:55:07 2018 +1200
Branches: blender2.8
https://developer.blender.org/rB0e09bfa0594ef64e5a1966280277330d65e874dd

Depsgraph: Added note that the filtering function should NOT be called on a filtered graph

===================================================================

M	source/blender/depsgraph/DEG_depsgraph_query.h
M	source/blender/depsgraph/intern/depsgraph_query_filter.cc

===================================================================

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);



More information about the Bf-blender-cvs mailing list