[Bf-blender-cvs] [16307d1e2ae] master: Depsgraph: Cleanup, more clear naming

Sergey Sharybin noreply at git.blender.org
Fri Jul 5 16:09:12 CEST 2019


Commit: 16307d1e2ae90cc99f4809e5abd710bbc39dc167
Author: Sergey Sharybin
Date:   Thu Jul 4 15:15:02 2019 +0200
Branches: master
https://developer.blender.org/rB16307d1e2ae90cc99f4809e5abd710bbc39dc167

Depsgraph: Cleanup, more clear naming

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

M	source/blender/depsgraph/DEG_depsgraph_query.h
M	source/blender/depsgraph/intern/depsgraph_query_foreach.cc
M	source/blender/depsgraph/intern/node/deg_node.cc
M	source/blender/depsgraph/intern/node/deg_node.h

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

diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 27891acb666..e3381e79e9c 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -239,7 +239,7 @@ void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
  * component  which is directly on indirectly dependent on the source one. */
 void DEG_foreach_dependent_ID_component(const Depsgraph *depsgraph,
                                         const ID *id,
-                                        eDepsObjectComponentType source_component,
+                                        eDepsObjectComponentType source_component_type,
                                         DEGForeachIDComponentCallback callback,
                                         void *user_data);
 
diff --git a/source/blender/depsgraph/intern/depsgraph_query_foreach.cc b/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
index 7bc55b52172..33cb1ba7416 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
@@ -70,7 +70,7 @@ void deg_foreach_clear_flags(const Depsgraph *graph)
 
 void deg_foreach_dependent_operation(const Depsgraph *graph,
                                      const ID *id,
-                                     eDepsObjectComponentType source_component,
+                                     eDepsObjectComponentType source_component_type,
                                      DEGForeachOperation callback,
                                      void *user_data)
 {
@@ -86,8 +86,8 @@ void deg_foreach_dependent_operation(const Depsgraph *graph,
   /* Start with scheduling all operations from ID node. */
   TraversalQueue queue;
   GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, target_id_node->components) {
-    if (source_component != DEG_OB_COMP_ANY &&
-        nodeTypeToObjectComponent(comp_node->type) != source_component) {
+    if (source_component_type != DEG_OB_COMP_ANY &&
+        nodeTypeToObjectComponent(comp_node->type) != source_component_type) {
       continue;
     }
     for (OperationNode *op_node : comp_node->operations) {
@@ -149,7 +149,7 @@ void deg_foreach_dependent_component_callback(OperationNode *op_node, void *user
 
 void deg_foreach_dependent_ID_component(const Depsgraph *graph,
                                         const ID *id,
-                                        eDepsObjectComponentType source_component,
+                                        eDepsObjectComponentType source_component_type,
                                         DEGForeachIDComponentCallback callback,
                                         void *user_data)
 {
@@ -157,7 +157,7 @@ void deg_foreach_dependent_ID_component(const Depsgraph *graph,
   data.callback = callback;
   data.user_data = user_data;
   deg_foreach_dependent_operation(
-      graph, id, source_component, deg_foreach_dependent_component_callback, &data);
+      graph, id, source_component_type, deg_foreach_dependent_component_callback, &data);
 }
 
 struct ForeachIDData {
@@ -277,12 +277,12 @@ void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
 
 void DEG_foreach_dependent_ID_component(const Depsgraph *depsgraph,
                                         const ID *id,
-                                        eDepsObjectComponentType source_component,
+                                        eDepsObjectComponentType source_component_type,
                                         DEGForeachIDComponentCallback callback,
                                         void *user_data)
 {
   DEG::deg_foreach_dependent_ID_component(
-      (const DEG::Depsgraph *)depsgraph, id, source_component, callback, user_data);
+      (const DEG::Depsgraph *)depsgraph, id, source_component_type, callback, user_data);
 }
 
 void DEG_foreach_ancestor_ID(const Depsgraph *depsgraph,
diff --git a/source/blender/depsgraph/intern/node/deg_node.cc b/source/blender/depsgraph/intern/node/deg_node.cc
index 701344c2405..16c934e72fe 100644
--- a/source/blender/depsgraph/intern/node/deg_node.cc
+++ b/source/blender/depsgraph/intern/node/deg_node.cc
@@ -174,9 +174,9 @@ eDepsSceneComponentType nodeTypeToSceneComponent(NodeType type)
   return DEG_SCENE_COMP_PARAMETERS;
 }
 
-NodeType nodeTypeFromObjectComponent(eDepsObjectComponentType component)
+NodeType nodeTypeFromObjectComponent(eDepsObjectComponentType component_type)
 {
-  switch (component) {
+  switch (component_type) {
     case DEG_OB_COMP_ANY:
       return NodeType::UNDEFINED;
     case DEG_OB_COMP_PARAMETERS:
diff --git a/source/blender/depsgraph/intern/node/deg_node.h b/source/blender/depsgraph/intern/node/deg_node.h
index 3ebc5ec8125..eea69502baa 100644
--- a/source/blender/depsgraph/intern/node/deg_node.h
+++ b/source/blender/depsgraph/intern/node/deg_node.h
@@ -132,10 +132,10 @@ enum class NodeType {
 };
 const char *nodeTypeAsString(NodeType type);
 
-NodeType nodeTypeFromSceneComponent(eDepsSceneComponentType component);
+NodeType nodeTypeFromSceneComponent(eDepsSceneComponentType component_type);
 eDepsSceneComponentType nodeTypeToSceneComponent(NodeType type);
 
-NodeType nodeTypeFromObjectComponent(eDepsObjectComponentType component);
+NodeType nodeTypeFromObjectComponent(eDepsObjectComponentType component_type);
 eDepsObjectComponentType nodeTypeToObjectComponent(NodeType type);
 
 /* All nodes in Depsgraph are descended from this. */



More information about the Bf-blender-cvs mailing list