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:
authorBrecht Van Lommel <brecht@blender.org>2022-03-01 21:45:36 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-01 21:51:30 +0300
commit8322a4f6b76960cb4983f8aaf5a74e694aed1384 (patch)
tree3e61013baa6a3a0d5af683124e58cd4b33f0e1a4
parentf085c2bab5b62a7ec188d7e5be93dfdd4b5418aa (diff)
Fix T92980: missing Cycles video texture update with persistent data
-rw-r--r--intern/cycles/blender/shader.cpp13
-rw-r--r--intern/cycles/blender/sync.cpp9
-rw-r--r--intern/cycles/blender/sync.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/intern/cycles/blender/shader.cpp b/intern/cycles/blender/shader.cpp
index 418393c2be7..65866525894 100644
--- a/intern/cycles/blender/shader.cpp
+++ b/intern/cycles/blender/shader.cpp
@@ -1587,18 +1587,13 @@ void BlenderSync::sync_lights(BL::Depsgraph &b_depsgraph, bool update_all)
}
}
-void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d)
+void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all)
{
- /* for auto refresh images */
- ImageManager *image_manager = scene->image_manager;
- const int frame = b_scene.frame_current();
- const bool auto_refresh_update = image_manager->set_animation_frame_update(frame);
-
shader_map.pre_sync();
- sync_world(b_depsgraph, b_v3d, auto_refresh_update);
- sync_lights(b_depsgraph, auto_refresh_update);
- sync_materials(b_depsgraph, auto_refresh_update);
+ sync_world(b_depsgraph, b_v3d, update_all);
+ sync_lights(b_depsgraph, update_all);
+ sync_materials(b_depsgraph, update_all);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index 7e6f1535d66..851e4751501 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -259,7 +259,12 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
int height,
void **python_thread_state)
{
- if (!has_updates_) {
+ /* For auto refresh images. */
+ ImageManager *image_manager = scene->image_manager;
+ const int frame = b_scene.frame_current();
+ const bool auto_refresh_update = image_manager->set_animation_frame_update(frame);
+
+ if (!has_updates_ && !auto_refresh_update) {
return;
}
@@ -274,7 +279,7 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
sync_view_layer(b_view_layer);
sync_integrator(b_view_layer, background);
sync_film(b_view_layer, b_v3d);
- sync_shaders(b_depsgraph, b_v3d);
+ sync_shaders(b_depsgraph, b_v3d, auto_refresh_update);
sync_images();
geometry_synced.clear(); /* use for objects and motion sync */
diff --git a/intern/cycles/blender/sync.h b/intern/cycles/blender/sync.h
index 3722b938863..01bb92331f6 100644
--- a/intern/cycles/blender/sync.h
+++ b/intern/cycles/blender/sync.h
@@ -127,7 +127,7 @@ class BlenderSync {
/* Shader */
array<Node *> find_used_shaders(BL::Object &b_ob);
void sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all);
- void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d);
+ void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all);
void sync_nodes(Shader *shader, BL::ShaderNodeTree &b_ntree);
/* Object */