From 720d653b418bb5760c5891a2c8b74b72ea9889a9 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 10 Feb 2022 17:31:04 +0100 Subject: Fix T95624: video texture not refreshing when changing offset in node The main issue is that the image and image user is not updated correctly in `rna_ImageUser_update`. `BKE_image_user_frame_calc` does not set the correct frame, because the image is null. Also `IMA_GPU_REFRESH` is not set for the same reason. When gpu materials are first created, it is expected that the frame is set correctly, and the flag is set if necessary. Therefore, somewhere during depsgraph evaluation, those have to be updated. The depsgraph node to do the update existed already. Now there is a new relation so that it is executed when the node tree changed, not only when the frame changed. --- source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/depsgraph/intern') diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index cb43ef685d4..462e61c5671 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1486,6 +1486,10 @@ void DepsgraphRelationBuilder::build_animation_images(ID *id) OperationKey world_update_key(id, NodeType::SHADING, OperationCode::WORLD_UPDATE); add_relation(world_update_key, image_animation_key, "World Update -> Image Animation"); } + else if (GS(id->name) == ID_NT) { + OperationKey ntree_output_key(id, NodeType::NTREE_OUTPUT, OperationCode::NTREE_OUTPUT); + add_relation(ntree_output_key, image_animation_key, "NTree Output -> Image Animation"); + } } } -- cgit v1.2.3