diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-07-26 10:11:58 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-07-26 10:11:58 +0400 |
commit | 29660ac778ceaad853ab2a464c7bb66aeeefe752 (patch) | |
tree | 6aca2831261a09ee125017628ebb38b1d7f88db0 /source/blender/python/api2_2x/Object.c | |
parent | 87402dbcbd4b26544f8f664413f7ae57c78db5d0 (diff) |
PyAPI Simple Bugfix:
This fixes a bug reported in IRC. getParentBoneName() was returning a string (most likely from an old bone-parent that got removed), even when the parent wasn't an Armature.
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 1b69df657fc..0620b156a0f 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -1329,7 +1329,7 @@ static PyObject *Object_getParent( BPy_Object * self ) static PyObject *Object_getParentBoneName( BPy_Object * self ) { - if( self->object->parent && self->object->parsubstr[0] != '\0' ) + if( self->object->parent && self->object->parent->type==OB_ARMATURE && self->object->parsubstr[0] != '\0' ) return PyString_FromString( self->object->parsubstr ); Py_RETURN_NONE; } |