[Bf-blender-cvs] [e38a0eea5c9] blender-v2.93-release: Fix: connecting hair fails on meshes with no generative modifiers

Aleksi Juvani noreply at git.blender.org
Tue Jan 11 16:00:23 CET 2022


Commit: e38a0eea5c99147d53844e9d586dd6617f857741
Author: Aleksi Juvani
Date:   Fri Jan 7 17:45:06 2022 +0100
Branches: blender-v2.93-release
https://developer.blender.org/rBe38a0eea5c99147d53844e9d586dd6617f857741

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

===================================================================

M	source/blender/editors/physics/particle_object.c

===================================================================

diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 9ccbcf93b09..8ba600d3a7d 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -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 {



More information about the Bf-blender-cvs mailing list