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:
Diffstat (limited to 'source/blender/python/api2_2x/Armature.c')
-rw-r--r--source/blender/python/api2_2x/Armature.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c
index 409a0b90643..49c7c6639d4 100644
--- a/source/blender/python/api2_2x/Armature.c
+++ b/source/blender/python/api2_2x/Armature.c
@@ -988,7 +988,7 @@ static PyObject *Armature_new(PyTypeObject *type, PyObject *args, PyObject *kwds
BPy_Armature *py_armature = NULL;
bArmature *bl_armature;
- bl_armature = add_armature();
+ bl_armature = add_armature("Armature");
if(bl_armature) {
bl_armature->id.us = 0; // return count to 0 - add_armature() inc'd it
@@ -1246,13 +1246,12 @@ static PyObject *M_Armature_New(PyObject * self, PyObject * args)
char *name = "Armature";
struct bArmature *armature;
BPy_Armature *obj;
- char buf[21];
if( !PyArg_ParseTuple( args, "|s", &name ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected nothing or a string as argument" );
- armature= add_armature();
+ armature= add_armature(name);
armature->id.us = 0;
obj = (BPy_Armature *)Armature_CreatePyObject(armature); /*new*/
@@ -1260,9 +1259,6 @@ static PyObject *M_Armature_New(PyObject * self, PyObject * args)
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"PyObject_New() failed" );
- PyOS_snprintf( buf, sizeof( buf ), "%s", name );
- rename_id( &armature->id, buf );
-
obj->armature = armature;
return (PyObject *)obj;
}