Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
| Show First 20 Lines • Show All 2,629 Lines • ▼ Show 20 Lines | GHASH_FOREACH_BEGIN(ComponentNode *, comp_node, id_node->components) | ||||
| * sure drivers are properly updated. | * sure drivers are properly updated. | ||||
| * This way, for example, changing ID property will properly poke | * This way, for example, changing ID property will properly poke | ||||
| * all drivers to be updated. | * all drivers to be updated. | ||||
| * | * | ||||
| * - View layers have cached array of bases in them, which is not | * - View layers have cached array of bases in them, which is not | ||||
| * copied by copy-on-write, and not preserved. PROBABLY it is better | * copied by copy-on-write, and not preserved. PROBABLY it is better | ||||
| * to preserve that cache in copy-on-write, but for the time being | * to preserve that cache in copy-on-write, but for the time being | ||||
| * we allow flush to layer collections component which will ensure | * we allow flush to layer collections component which will ensure | ||||
| * that cached array fo bases exists and is up-to-date. | * that cached array fo bases exists and is up-to-date. */ | ||||
| * | |||||
| * - Action is allowed to flush as well, this way it's possible to | |||||
| * keep current tagging in animation editors (which tags action for | |||||
| * CoW update when it's changed) but yet guarantee evaluation order | |||||
| * with objects which are using that action. */ | |||||
| if (comp_node->type == NodeType::PARAMETERS || | if (comp_node->type == NodeType::PARAMETERS || | ||||
| comp_node->type == NodeType::LAYER_COLLECTIONS) | comp_node->type == NodeType::LAYER_COLLECTIONS) | ||||
| { | { | ||||
| rel_flag &= ~RELATION_FLAG_NO_FLUSH; | rel_flag &= ~RELATION_FLAG_NO_FLUSH; | ||||
| } | } | ||||
| if (comp_node->type == NodeType::ANIMATION && id_type == ID_AC) { | |||||
| rel_flag &= ~RELATION_FLAG_NO_FLUSH; | |||||
| /* NOTE: We only allow flush on user edits. If the action block is | |||||
| * just brought into the dependency graph it is either due to | |||||
| * initial graph construction or due to some property got animated. | |||||
| * In first case all the related datablocks will be tagged for an | |||||
| * update as well. In the second case it is up to the editing | |||||
| * function to tag changed datablock. | |||||
| * | |||||
| * This logic allows to preserve unkeyed changes on file load and on | |||||
| * undo. */ | |||||
| rel_flag |= RELATION_FLAG_FLUSH_USER_EDIT_ONLY; | |||||
| } | |||||
| /* All entry operations of each component should wait for a proper | /* All entry operations of each component should wait for a proper | ||||
| * copy of ID. */ | * copy of ID. */ | ||||
| OperationNode *op_entry = comp_node->get_entry_operation(); | OperationNode *op_entry = comp_node->get_entry_operation(); | ||||
| if (op_entry != NULL) { | if (op_entry != NULL) { | ||||
| Relation *rel = graph_->add_new_relation( | Relation *rel = graph_->add_new_relation( | ||||
| op_cow, op_entry, "CoW Dependency"); | op_cow, op_entry, "CoW Dependency"); | ||||
| rel->flag |= rel_flag; | rel->flag |= rel_flag; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||