Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-23 08:12:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-23 08:26:29 +0300
commit02a204fe67eeefbe9c1485e109a21c786645585b (patch)
tree544110fa2dc77a1252f88e12900b21ddc2b0c908
parentea5c8c4e844f29772f9b4381ead04b0be68df30d (diff)
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.
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 2f910f66cce..ecc0413b8cc 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -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);