diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-11-12 10:55:18 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-11-12 11:17:38 +0300 |
commit | 88bb29dea668df8cc46aa7f55895f229748bdbb4 (patch) | |
tree | 5341fc7b7a342d0f24b0afe7d3f3d4dc19210280 /intern/cycles/blender/blender_mesh.cpp | |
parent | 08452d995664f6e5605d282374746c305f28fa52 (diff) |
Fix T82617: artifacts in Cycles viewport when changing subdivision attributes
The old attributes were not cleared when synchronizing the geometries, this could also lead to crashes in other cases.
Ref T82608.
Diffstat (limited to 'intern/cycles/blender/blender_mesh.cpp')
-rw-r--r-- | intern/cycles/blender/blender_mesh.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 4bd4baec2e4..e85b4ee1fc6 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -1073,10 +1073,12 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *me mesh->set_value(socket, new_mesh, socket); } + mesh->attributes.clear(); foreach (Attribute &attr, new_mesh.attributes.attributes) { mesh->attributes.attributes.push_back(std::move(attr)); } + mesh->subd_attributes.clear(); foreach (Attribute &attr, new_mesh.subd_attributes.attributes) { mesh->subd_attributes.attributes.push_back(std::move(attr)); } |