From 86cbb9f7cb85d3bf3cf440c702a266da1460dccb Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 30 Jan 2008 09:29:40 +0000 Subject: [PATCH] PyConstraint Bugfix: Uncommented armature weakrefs stuff for PyConstraints. This should fix some erratic error messages a user found with these a few months ago. --- source/blender/python/BPY_interface.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 770fbf13931..acede12244f 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -1318,14 +1318,10 @@ void BPY_pyconstraint_eval(bPythonConstraint *con, bConstraintOb *cob, ListBase PyList_SET_ITEM(tarmats, index, tarmat); } - -/* since I can't remember what the armature weakrefs do, I'll just leave this here - commented out. This function was based on pydrivers, and it might still be relevent. - if( !setup_armature_weakrefs()){ - fprintf( stderr, "Oops - weakref dict setup\n"); - return result; + if (!setup_armature_weakrefs()) { + fprintf(stderr, "Oops - weakref dict setup\n"); + return; } -*/ retval = RunPython(con->text, globals); @@ -1471,13 +1467,11 @@ void BPY_pyconstraint_target(bPythonConstraint *con, bConstraintTarget *ct) tarmat = newMatrixObject((float *)ct->matrix, 4, 4, Py_NEW); idprop = BPy_Wrap_IDProperty( NULL, con->prop, NULL); -/* since I can't remember what the armature weakrefs do, I'll just leave this here - commented out. This function was based on pydrivers, and it might still be relevent. - if( !setup_armature_weakrefs()){ - fprintf( stderr, "Oops - weakref dict setup\n"); - return result; + if (!setup_armature_weakrefs()) { + fprintf(stderr, "Oops - weakref dict setup\n"); + return; } -*/ + retval = RunPython(con->text, globals); if (retval == NULL) {