diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-01-30 12:29:40 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-01-30 12:29:40 +0300 |
commit | 86cbb9f7cb85d3bf3cf440c702a266da1460dccb (patch) | |
tree | 76e7b0442c462c7fb59c5240f1f83256ed4afdd1 /source/blender/python/BPY_interface.c | |
parent | 856b40af563a31b5f346748a1396d2fb039772dc (diff) |
PyConstraint Bugfix:
Uncommented armature weakrefs stuff for PyConstraints. This should fix some erratic error messages a user found with these a few months ago.
Diffstat (limited to 'source/blender/python/BPY_interface.c')
-rw-r--r-- | source/blender/python/BPY_interface.c | 20 |
1 files 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) { |