Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
| Show First 20 Lines • Show All 2,216 Lines • ▼ Show 20 Lines | void DepsgraphRelationBuilder::build_cachefile(CacheFile *cache_file) | ||||
| /* Animation. */ | /* Animation. */ | ||||
| build_animdata(&cache_file->id); | build_animdata(&cache_file->id); | ||||
| build_parameters(&cache_file->id); | build_parameters(&cache_file->id); | ||||
| if (check_id_has_anim_component(&cache_file->id)) { | if (check_id_has_anim_component(&cache_file->id)) { | ||||
| ComponentKey animation_key(&cache_file->id, NodeType::ANIMATION); | ComponentKey animation_key(&cache_file->id, NodeType::ANIMATION); | ||||
| ComponentKey datablock_key(&cache_file->id, NodeType::CACHE); | ComponentKey datablock_key(&cache_file->id, NodeType::CACHE); | ||||
| add_relation(animation_key, datablock_key, "Datablock Animation"); | add_relation(animation_key, datablock_key, "Datablock Animation"); | ||||
| } | } | ||||
| /* Cache file updates */ | |||||
| if (cache_file->is_sequence) { | |||||
| OperationKey cache_update_key( | |||||
| &cache_file->id, NodeType::CACHE, OperationCode::FILE_CACHE_UPDATE); | |||||
| TimeSourceKey time_src_key; | |||||
| add_relation(time_src_key, cache_update_key, "TimeSrc -> Cache File Eval"); | |||||
| } | |||||
| } | } | ||||
| void DepsgraphRelationBuilder::build_mask(Mask *mask) | void DepsgraphRelationBuilder::build_mask(Mask *mask) | ||||
| { | { | ||||
| if (built_map_.checkIsBuiltAndTag(mask)) { | if (built_map_.checkIsBuiltAndTag(mask)) { | ||||
| return; | return; | ||||
| } | } | ||||
| ID *mask_id = &mask->id; | ID *mask_id = &mask->id; | ||||
| ▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | if (comp_node->type == NodeType::COPY_ON_WRITE) { | ||||
| /* Copy-on-write component never depends on itself. */ | /* Copy-on-write component never depends on itself. */ | ||||
| continue; | continue; | ||||
| } | } | ||||
| if (!comp_node->depends_on_cow()) { | if (!comp_node->depends_on_cow()) { | ||||
| /* Component explicitly requests to not add relation. */ | /* Component explicitly requests to not add relation. */ | ||||
| continue; | continue; | ||||
| } | } | ||||
| int rel_flag = (RELATION_FLAG_NO_FLUSH | RELATION_FLAG_GODMODE); | int rel_flag = (RELATION_FLAG_NO_FLUSH | RELATION_FLAG_GODMODE); | ||||
| if (id_type == ID_ME && comp_node->type == NodeType::GEOMETRY) { | if ((id_type == ID_ME && comp_node->type == NodeType::GEOMETRY) || | ||||
| (id_type == ID_CF && comp_node->type == NodeType::CACHE)) { | |||||
| rel_flag &= ~RELATION_FLAG_NO_FLUSH; | rel_flag &= ~RELATION_FLAG_NO_FLUSH; | ||||
| } | } | ||||
| /* Notes on exceptions: | /* Notes on exceptions: | ||||
| * - Parameters component is where drivers are living. Changing any | * - Parameters component is where drivers are living. Changing any | ||||
| * of the (custom) properties in the original datablock (even the | * of the (custom) properties in the original datablock (even the | ||||
| * ones which do not imply other component update) need to make | * ones which do not imply other component update) need to make | ||||
| * 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 | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||