Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-02-10 19:31:04 +0300
committerJacques Lucke <jacques@blender.org>2022-02-10 19:31:25 +0300
commit720d653b418bb5760c5891a2c8b74b72ea9889a9 (patch)
treeeba7d92e1990a866eda34a205dfaa0f817ad0a06 /source/blender/blenkernel/BKE_node_tree_update.h
parentc0674aa1450555b99435b9d09f8d94ae856f23d5 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/BKE_node_tree_update.h')
-rw-r--r--source/blender/blenkernel/BKE_node_tree_update.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node_tree_update.h b/source/blender/blenkernel/BKE_node_tree_update.h
index 834445420ef..bfb8c337cdc 100644
--- a/source/blender/blenkernel/BKE_node_tree_update.h
+++ b/source/blender/blenkernel/BKE_node_tree_update.h
@@ -26,6 +26,7 @@ struct bNode;
struct bNodeLink;
struct bNodeSocket;
struct bNodeTree;
+struct ImageUser;
#ifdef __cplusplus
extern "C" {
@@ -68,6 +69,8 @@ void BKE_ntree_update_tag_missing_runtime_data(struct bNodeTree *ntree);
void BKE_ntree_update_tag_interface(struct bNodeTree *ntree);
/** Used when an id data block changed that might be used by nodes that need to be updated. */
void BKE_ntree_update_tag_id_changed(struct Main *bmain, struct ID *id);
+/** Used when an image user is updated that is used by any part of the node tree. */
+void BKE_ntree_update_tag_image_user_changed(struct bNodeTree *ntree, struct ImageUser *iuser);
typedef struct NodeTreeUpdateExtraParams {
/**