Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
| Show First 20 Lines • Show All 1,440 Lines • ▼ Show 20 Lines | if (adt->action || adt->nla_tracks.first) { | ||||
| add_relation(adt_key, driver_key, "AnimData Before Drivers"); | add_relation(adt_key, driver_key, "AnimData Before Drivers"); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void DepsgraphRelationBuilder::build_animation_images(ID *id) | void DepsgraphRelationBuilder::build_animation_images(ID *id) | ||||
| { | { | ||||
| /* See #DepsgraphNodeBuilder::build_animation_images. */ | /* See #DepsgraphNodeBuilder::build_animation_images. */ | ||||
| const bool can_have_gpu_material = ELEM(GS(id->name), ID_MA, ID_WO); | bool has_image_animation = false; | ||||
| if (ELEM(GS(id->name), ID_MA, ID_WO)) { | |||||
| bNodeTree *ntree = *BKE_ntree_ptr_from_id(id); | |||||
| if (ntree != nullptr && ntree->runtime_flag & NTREE_RUNTIME_FLAG_HAS_IMAGE_ANIMATION) { | |||||
| has_image_animation = true; | |||||
| } | |||||
| } | |||||
| /* TODO: can we check for existence of node for performance? */ | if (has_image_animation || BKE_image_user_id_has_animation(id)) { | ||||
| if (can_have_gpu_material || BKE_image_user_id_has_animation(id)) { | |||||
| OperationKey image_animation_key( | OperationKey image_animation_key( | ||||
| id, NodeType::IMAGE_ANIMATION, OperationCode::IMAGE_ANIMATION); | id, NodeType::IMAGE_ANIMATION, OperationCode::IMAGE_ANIMATION); | ||||
| TimeSourceKey time_src_key; | TimeSourceKey time_src_key; | ||||
| add_relation(time_src_key, image_animation_key, "TimeSrc -> Image Animation"); | add_relation(time_src_key, image_animation_key, "TimeSrc -> Image Animation"); | ||||
| /* The image users of these ids may change during evaluation. Make sure that the image | /* The image users of these ids may change during evaluation. Make sure that the image | ||||
| * animation update happens after evaluation. */ | * animation update happens after evaluation. */ | ||||
| if (GS(id->name) == ID_MA) { | if (GS(id->name) == ID_MA) { | ||||
| ▲ Show 20 Lines • Show All 1,641 Lines • Show Last 20 Lines | |||||