diff options
Diffstat (limited to 'intern/cycles/blender/blender_curves.cpp')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index b27de2081ae..9070c093492 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -819,8 +819,12 @@ void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motio void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *hair) { + /* make a copy of the shaders as the caller in the main thread still need them for syncing the + * attributes */ + array<Node *> used_shaders = hair->get_used_shaders(); + Hair new_hair; - new_hair.set_used_shaders(hair->get_used_shaders()); + new_hair.set_used_shaders(used_shaders); if (view_layer.use_hair) { if (b_ob.type() == BL::Object::type_HAIR) { |