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.
This commit is contained in:
2007-07-26 06:11:58 +00:00
parent 87402dbcbd
commit 29660ac778

View File

@@ -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;
}