Modifier stack: Use evaluated mesh to check normals
This commit is contained in:
@@ -1990,6 +1990,14 @@ static void mesh_build_extra_data(struct Depsgraph *depsgraph, Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
static void mesh_runtime_check_normals_valid(const Mesh* mesh)
|
||||
{
|
||||
UNUSED_VARS_NDEBUG(mesh);
|
||||
BLI_assert(!(mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL));
|
||||
BLI_assert(!(mesh->runtime.cd_dirty_loop & CD_MASK_NORMAL));
|
||||
BLI_assert(!(mesh->runtime.cd_dirty_poly & CD_MASK_NORMAL));
|
||||
}
|
||||
|
||||
static void mesh_build_data(
|
||||
struct Depsgraph *depsgraph, Scene *scene, Object *ob, CustomDataMask dataMask,
|
||||
const bool build_shapekey_layers, const bool need_mapping)
|
||||
@@ -2025,8 +2033,7 @@ static void mesh_build_data(
|
||||
// BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false);
|
||||
}
|
||||
|
||||
BLI_assert(!(ob->derivedFinal->dirty & DM_DIRTY_NORMALS));
|
||||
|
||||
mesh_runtime_check_normals_valid(ob->runtime.mesh_eval);
|
||||
mesh_build_extra_data(depsgraph, ob);
|
||||
}
|
||||
|
||||
@@ -2053,7 +2060,7 @@ static void editbmesh_build_data(
|
||||
|
||||
em->lastDataMask = dataMask;
|
||||
|
||||
BLI_assert(!(em->mesh_eval_final->runtime.cd_dirty_vert & DM_DIRTY_NORMALS));
|
||||
mesh_runtime_check_normals_valid(em->mesh_eval_final);
|
||||
}
|
||||
|
||||
static CustomDataMask object_get_datamask(const Depsgraph *depsgraph, Object *ob, bool *r_need_mapping)
|
||||
|
||||
Reference in New Issue
Block a user