diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-01-22 14:26:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-01-22 14:26:55 +0300 |
commit | a03c8ba8a0c22de46e1b85c29f5df3c30e865f3e (patch) | |
tree | b49b542b0ec15556e568c85a10764443d34ad67c /source/blender/python/api2_2x/Scene.c | |
parent | 32676b66a4117c84f1f94d0203cbe73a76062e86 (diff) |
creating new objects from
ob = scn.objects.new(arm_data)
didnt work.
Also added docs to Pose - that make an armature, add an action and add pose keyframes
Diffstat (limited to 'source/blender/python/api2_2x/Scene.c')
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 221a2d1adba..6138e4f609f 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -1384,7 +1384,8 @@ static PyObject *SceneObSeq_link( BPy_SceneObSeq * self, PyObject *pyobj ) /* This is buggy with new object data not already linked to an object, for now use the above code */ static PyObject *SceneObSeq_new( BPy_SceneObSeq * self, PyObject *args ) -{ +{ + void *data = NULL; char *name = NULL; char *desc = NULL; @@ -1404,7 +1405,10 @@ static PyObject *SceneObSeq_new( BPy_SceneObSeq * self, PyObject *args ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected an object and optionally a string as arguments" ); - if( Camera_CheckPyObject( py_data ) ) { + if( Armature_CheckPyObject( py_data ) ) { + data = ( void * ) Armature_FromPyObject( py_data ); + type = OB_ARMATURE; + } else if( Camera_CheckPyObject( py_data ) ) { data = ( void * ) Camera_FromPyObject( py_data ); type = OB_CAMERA; } else if( Lamp_CheckPyObject( py_data ) ) { |