[Bf-blender-cvs] [c76d390c921] master: Mesh: Fix applying deform modifier up to index

Sergey Sharybin noreply at git.blender.org
Tue Mar 17 16:41:55 CET 2020


Commit: c76d390c921de4988a48a6d143a2ef08f2165a88
Author: Sergey Sharybin
Date:   Tue Mar 17 15:29:02 2020 +0100
Branches: master
https://developer.blender.org/rBc76d390c921de4988a48a6d143a2ef08f2165a88

Mesh: Fix applying deform modifier up to index

The code would have break the first (deform only) modifiers
once the index is reached, but it will not prevent second
loop (over remaining modifiers) from run.

This was applying deform modifier twice in some conditions:
having single deform modifier and calculating deformed mesh
up to the first modifier (index=0).

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

M	source/blender/blenkernel/intern/DerivedMesh.c

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

diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 2db48e1fb13..2113b184f01 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -981,6 +981,7 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
 
       /* grab modifiers until index i */
       if ((index != -1) && (BLI_findindex(&ob->modifiers, md) >= index)) {
+        md = NULL;
         break;
       }
     }



More information about the Bf-blender-cvs mailing list