diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-05-26 22:16:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-05-26 22:16:16 +0400 |
commit | ad02ae8e70f1ce1a6619cc6bcd4eecbacb057c20 (patch) | |
tree | bee46a34a80e7f1a21b3823cc749a10ec7c24e5d | |
parent | d17c4e2f91a289b56b91790e63ee924a90d76d6e (diff) |
display errors for mesh deform, useful to help find out why mdef isnt being applied.
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 4b53ac910d1..83fa544690b 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -208,8 +208,10 @@ static void meshdeformModifier_do( cagedm->needsFree= 1; } - if(!cagedm) + if(!cagedm) { + modifier_setError(md, "Can't get mesh from cage object."); return; + } /* compute matrices to go in and out of cage object space */ invert_m4_m4(imat, mmd->object->obmat); @@ -234,11 +236,21 @@ static void meshdeformModifier_do( totvert= numVerts; totcagevert= cagedm->getNumVerts(cagedm); - if(mmd->totvert!=totvert || mmd->totcagevert!=totcagevert || !mmd->bindcagecos) { + if(mmd->totvert != totvert) { + modifier_setError(md, "Verts changed from %d to %d.", mmd->totvert, totvert); cagedm->release(cagedm); return; } - + else if (mmd->totcagevert != totcagevert) { + modifier_setError(md, "Cage verts changed from %d to %d.", mmd->totcagevert, totcagevert); + cagedm->release(cagedm); + return; + } else if (mmd->bindcagecos == NULL) { + modifier_setError(md, "Bind data missing."); + cagedm->release(cagedm); + return; + } + /* setup deformation data */ cagemvert= cagedm->getVertArray(cagedm); influences= mmd->bindinfluences; |