Fix T92980: missing Cycles video texture update with persistent data
This commit is contained in:
parent
f085c2bab5
commit
8322a4f6b7
Notes:
blender-bot
2023-02-14 10:32:59 +01:00
Referenced by issue #92980, Video textures not updating in Cycles renders when using persistent data
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue