diff options
author | Toni Alatalo <antont@kyperjokki.fi> | 2005-12-18 23:14:22 +0300 |
---|---|---|
committer | Toni Alatalo <antont@kyperjokki.fi> | 2005-12-18 23:14:22 +0300 |
commit | fae20e494e4d5d5f48a8a3c99938796d596537c2 (patch) | |
tree | ddce7c307c1e0b8b7c77ac985382b06dfe1401d4 /source/blender/python/api2_2x/NLA.c | |
parent | 3bba3813bde61d2bedfd1a2fa434c929ae12230a (diff) |
orange: animation baking code. also a patch to autokey, to only key the keys made.
Diffstat (limited to 'source/blender/python/api2_2x/NLA.c')
-rw-r--r-- | source/blender/python/api2_2x/NLA.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/NLA.c b/source/blender/python/api2_2x/NLA.c index a07f15b3cab..c1ed37bfe43 100644 --- a/source/blender/python/api2_2x/NLA.c +++ b/source/blender/python/api2_2x/NLA.c @@ -79,6 +79,7 @@ static PyObject *Action_getName( BPy_Action * self ); static PyObject *Action_setName( BPy_Action * self, PyObject * args ); static PyObject *Action_setActive( BPy_Action * self, PyObject * args ); static PyObject *Action_getChannelIpo( BPy_Action * self, PyObject * args ); +static PyObject *Action_verifyChannel( BPy_Action * self, PyObject * args ); static PyObject *Action_removeChannel( BPy_Action * self, PyObject * args ); static PyObject *Action_getAllChannelIpos( BPy_Action * self ); @@ -95,6 +96,8 @@ static PyMethodDef BPy_Action_methods[] = { "(str) -set this action as the active action for an object"}, {"getChannelIpo", ( PyCFunction ) Action_getChannelIpo, METH_VARARGS, "(str) -get the Ipo from a named action channel in this action"}, + {"verifyChannel", ( PyCFunction ) Action_verifyChannel, METH_VARARGS, + "(str) -verify the channel in this action"}, {"removeChannel", ( PyCFunction ) Action_removeChannel, METH_VARARGS, "(str) -remove the channel from the action"}, {"getAllChannelIpos", ( PyCFunction ) Action_getAllChannelIpos, @@ -317,6 +320,27 @@ static PyObject *Action_getChannelIpo( BPy_Action * self, PyObject * args ) return Ipo_CreatePyObject( chan->ipo ); } +//---------------------------------------------------------------------- +static PyObject *Action_verifyChannel( BPy_Action * self, PyObject * args ) +{ + char *chanName; + bActionChannel *chan; + + if( !self->action ) + ( EXPP_ReturnPyObjError( PyExc_RuntimeError, + "couldn't create channel for a NULL action" ) ); + + if( !PyArg_ParseTuple( args, "s", &chanName ) ) + return ( EXPP_ReturnPyObjError( PyExc_AttributeError, + "expected string argument" ) ); + + chan = verify_action_channel(self->action, chanName); + + Py_INCREF( Py_None ); + return Py_None; +} + + static PyObject *Action_removeChannel( BPy_Action * self, PyObject * args ) { char *chanName; |