Cycles: fix another race condition in Geometry synchronization

This was forgotten in the previous fix, we should not modify sockets
updated in a separated thread.
This commit is contained in:
Kévin Dietrich 2020-11-04 16:29:06 +01:00
parent 0802e9cf54
commit c937f9c4e7
2 changed files with 2 additions and 2 deletions

View File

@ -848,7 +848,7 @@ void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *ha
for (const SocketType &socket : new_hair.type->inputs) {
/* Those sockets are updated in sync_object, so do not modify them. */
if (socket.name == "use_motion_blur" || socket.name == "motion_steps") {
if (socket.name == "use_motion_blur" || socket.name == "motion_steps" || socket.name == "used_shaders") {
continue;
}
hair->set_value(socket, new_hair, socket);

View File

@ -1065,7 +1065,7 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *me
for (const SocketType &socket : new_mesh.type->inputs) {
/* Those sockets are updated in sync_object, so do not modify them. */
if (socket.name == "use_motion_blur" || socket.name == "motion_steps") {
if (socket.name == "use_motion_blur" || socket.name == "motion_steps" || socket.name == "used_shaders") {
continue;
}
mesh->set_value(socket, new_mesh, socket);