Depsgraph: Cleanup, more clear naming

This commit is contained in:
2019-07-04 15:15:02 +02:00
parent 97aa43c364
commit 16307d1e2a
4 changed files with 12 additions and 12 deletions

View File

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

View File

@@ -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,

View File

@@ -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:

View File

@@ -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. */