Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-07-26 10:11:58 +0400
committerJoshua Leung <aligorith@gmail.com>2007-07-26 10:11:58 +0400
commit29660ac778ceaad853ab2a464c7bb66aeeefe752 (patch)
tree6aca2831261a09ee125017628ebb38b1d7f88db0
parent87402dbcbd4b26544f8f664413f7ae57c78db5d0 (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.
-rw-r--r--source/blender/python/api2_2x/Object.c2
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;
}