Fix T74095: crash deleting all faces in edit mode with Cycles rendering
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user