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:
authorAleksi Juvani <aleksijuvani>2022-01-07 19:45:06 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-01-07 20:05:03 +0300
commit1152caad3254d0d11d06fd01e55784f51d2a9b9a (patch)
treef0a219b979b3fa89f861d608d0e8395e5a95d3ce /source/blender/editors/physics
parent34d553671daeb5f38d8bbc69ebbdee0f93421000 (diff)
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
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 4f571fa6353..896a37c3984 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -746,7 +746,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 {