From 20620a988a8919116c69b618af04a15535f89c4b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 2 Dec 2011 21:10:29 +0000 Subject: Fix #27620: improve mesh deform error message when it fails to bind. --- source/blender/editors/armature/meshlaplacian.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 40d2d80f2b7..502da1be8ac 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -1608,7 +1608,7 @@ static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y mdb->phi[acenter]= phi/totweight; } -static void meshdeform_matrix_solve(MeshDeformBind *mdb) +static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind *mdb) { NLContext *context; float vec[3], gridvec[3]; @@ -1710,7 +1710,8 @@ static void meshdeform_matrix_solve(MeshDeformBind *mdb) } } else { - error("Mesh Deform: failed to find solution"); + modifier_setError(&mmd->modifier, "Failed to find bind solution (increase precision?)."); + error("Mesh Deform: failed to find bind solution."); break; } @@ -1819,7 +1820,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa meshdeform_check_semibound(mdb, x, y, z); /* solve */ - meshdeform_matrix_solve(mdb); + meshdeform_matrix_solve(mmd, mdb); /* assign results */ if(mmd->flag & MOD_MDEF_DYNAMIC_BIND) { -- cgit v1.2.3