Fix T74095: crash deleting all faces in edit mode with Cycles rendering

This commit is contained in:
2020-02-25 11:52:32 +01:00
parent e0085bfd24
commit 7463da6c72
5 changed files with 30 additions and 11 deletions

View File

@@ -941,7 +941,10 @@ static void sync_mesh_fluid_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
}
}
void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *mesh)
void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph,
BL::Object b_ob,
Mesh *mesh,
const vector<Shader *> &used_shaders)
{
array<int> oldtriangles;
array<Mesh::SubdFace> oldsubd_faces;
@@ -950,6 +953,9 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *me
oldsubd_faces.steal_data(mesh->subd_faces);
oldsubd_face_corners.steal_data(mesh->subd_face_corners);
mesh->clear();
mesh->used_shaders = used_shaders;
mesh->subdivision_type = Mesh::SUBDIVISION_NONE;
if (view_layer.use_surfaces) {