Fix T68024: Crash from missing original-index mesh layer
Constructive modifiers were not initializing an original index layer in the case a previous deform modifier created 'mesh_final'. This happened in the case of multiple deform modifiers that deform along normals, as requesting normals caused the final mesh to be created. Ensure mapping data is created in the case only non-constructive modifiers have run.
This commit is contained in:
@@ -1104,7 +1104,11 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
|
||||
bool check_for_needs_mapping = false;
|
||||
/* apply vertex coordinates or build a Mesh as necessary */
|
||||
if (mesh_final != NULL) {
|
||||
/* pass */
|
||||
if (have_non_onlydeform_modifiers_appled == false) {
|
||||
/* If we only deformed, we won't have initialized #CD_ORIGINDEX.
|
||||
* as this is the only part of the function that initializes mapping. */
|
||||
check_for_needs_mapping = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mesh_final = BKE_mesh_copy_for_eval(mesh_input, true);
|
||||
|
||||
Reference in New Issue
Block a user