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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-02-14 19:06:15 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2011-02-14 19:06:15 +0300
commit2b9c9e3ad91340389cecae35d68b8f95d084da80 (patch)
tree17325acd9a0cb2ee37f5c2453e9809d35d06e607 /source/blender/editors/util
parentd845d6308a241099f5816eed7e747c38762c4a02 (diff)
First modifiers with deformMatrices callback used to be applied twice when
building crazytspace. Not sure why this worked.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/crazyspace.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index 8b03f1826e4..7617e1d2066 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -363,7 +363,7 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
float (*deformedVerts)[3]= *deformcos;
float (*origVerts)[3]= MEM_dupallocN(deformedVerts);
float *quats= NULL;
- int i;
+ int i, deformed= 0;
ModifierData *md= modifiers_getVirtualModifierList(ob);
Mesh *me= (Mesh*)ob->data;
@@ -372,8 +372,15 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
if(!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
- if(mti->type==eModifierTypeType_OnlyDeform)
+ if(mti->type==eModifierTypeType_OnlyDeform) {
+ /* skip leading modifiers which have been alredy
+ handled in sculpt_get_first_deform_matrices */
+ if(mti->deformMatrices && !deformed)
+ continue;
+
mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0, 0);
+ deformed= 1;
+ }
}
quats= MEM_mallocN(me->totvert*sizeof(float)*4, "crazy quats");