Fix: connecting hair fails on meshes with no generative modifiers

Fixes a bug introduced in rB5dedb39d447b. `mesh_original` is not set if the
mesh has no generative modifiers, in which case we can use `mesh_final`, which
would seem to be consistent with the rest of the particle code. An alternative
approach would be to make sure that `mesh_original` is always set in
`deformVerts`.

Differential Revision: https://developer.blender.org/D13754
This commit is contained in:
Aleksi Juvani 2022-01-07 17:45:06 +01:00 committed by Philipp Oeser
parent db9ddb8a45
commit e38a0eea5c
Notes: blender-bot 2023-02-14 07:40:56 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
1 changed files with 1 additions and 1 deletions

View File

@ -745,7 +745,7 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
const bool use_dm_final_indices = (target_psys->part->use_modifier_stack &&
!target_psmd->mesh_final->runtime.deformed_only);
if (use_dm_final_indices) {
if (use_dm_final_indices || !target_psmd->mesh_original) {
mesh = target_psmd->mesh_final;
}
else {