Depsgraph: Localize synchronization component visibility handling
Move it from generic visibility handling to the synchronization component node implementation. Should be no functional changes.
This commit is contained in:
parent
73f8a7ca0a
commit
835203fde8
|
@ -138,19 +138,6 @@ void deg_graph_build_flush_visibility(Depsgraph *graph)
|
|||
for (IDNode *id_node : graph->id_nodes) {
|
||||
for (ComponentNode *comp_node : id_node->components.values()) {
|
||||
comp_node->affects_directly_visible |= id_node->is_directly_visible;
|
||||
|
||||
/* Enforce "visibility" of the synchronization component.
|
||||
*
|
||||
* This component is never connected to other ID nodes, and hence can not be handled in the
|
||||
* same way as other components needed for evaluation. It is only needed for proper
|
||||
* evaluation of the ID node it belongs to.
|
||||
*
|
||||
* The design is such that the synchronization is supposed to happen whenever any part of the
|
||||
* ID changed/evaluated. Here we mark the component as "visible" so that genetic recalc flag
|
||||
* flushing and scheduling will handle the component in a generic manner. */
|
||||
if (comp_node->type == NodeType::SYNCHRONIZATION) {
|
||||
comp_node->affects_directly_visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,6 @@ DEG_COMPONENT_NODE_DECLARE_GENERIC(ShadingParameters);
|
|||
DEG_COMPONENT_NODE_DECLARE_GENERIC(Transform);
|
||||
DEG_COMPONENT_NODE_DECLARE_NO_COW_TAG_ON_UPDATE(ObjectFromLayer);
|
||||
DEG_COMPONENT_NODE_DECLARE_GENERIC(Dupli);
|
||||
DEG_COMPONENT_NODE_DECLARE_GENERIC(Synchronization);
|
||||
DEG_COMPONENT_NODE_DECLARE_GENERIC(Audio);
|
||||
DEG_COMPONENT_NODE_DECLARE_GENERIC(Armature);
|
||||
DEG_COMPONENT_NODE_DECLARE_GENERIC(GenericDatablock);
|
||||
|
@ -203,6 +202,25 @@ DEG_COMPONENT_NODE_DECLARE_NO_COW(Visibility);
|
|||
DEG_COMPONENT_NODE_DECLARE_GENERIC(Simulation);
|
||||
DEG_COMPONENT_NODE_DECLARE_GENERIC(NTreeOutput);
|
||||
|
||||
/* Synchronization Component. */
|
||||
struct SynchronizationComponentNode : public ComponentNode {
|
||||
SynchronizationComponentNode()
|
||||
{
|
||||
/* Enforce "visibility" of the synchronization component.
|
||||
*
|
||||
* This component is never connected to other ID nodes, and hence can not be handled in the
|
||||
* same way as other components needed for evaluation. It is only needed for proper
|
||||
* evaluation of the ID node it belongs to.
|
||||
*
|
||||
* The design is such that the synchronization is supposed to happen whenever any part of the
|
||||
* ID changed/evaluated. Here we mark the component as "visible" so that genetic recalc flag
|
||||
* flushing and scheduling will handle the component in a generic manner. */
|
||||
affects_directly_visible = true;
|
||||
}
|
||||
|
||||
DEG_COMPONENT_NODE_DECLARE;
|
||||
};
|
||||
|
||||
/* Bone Component */
|
||||
struct BoneComponentNode : public ComponentNode {
|
||||
/** Initialize 'bone component' node - from pointer data given. */
|
||||
|
|
Loading…
Reference in New Issue