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:
authorCampbell Barton <ideasman42@gmail.com>2007-05-05 10:09:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-05-05 10:09:03 +0400
commit66ffd1d2075dcc7a8fc9f197d3643d0cd26a9b79 (patch)
treef4792e485e46d81e12f41e9f1bfeec028e858aed /source/blender/python/api2_2x/Object.c
parentdf8cb37e1eeac4b846459378859f7eb8ff369e06 (diff)
more epy doc updates
added a constant dict "Blender.Object.IpoKeyTypes" to pass to ob.insertIpoKey(keytype), previously these constants were not documented well and added to Blender.Object directly
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r--source/blender/python/api2_2x/Object.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index 810748e21a3..8404945485b 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -5220,6 +5220,27 @@ static PyObject *M_Object_RBShapeBoundDict( void )
return M;
}
+static PyObject *M_Object_IpoKeyTypesDict( void )
+{
+ PyObject *M = PyConstant_New( );
+
+ if( M ) {
+ BPy_constant *d = ( BPy_constant * ) M;
+ PyConstant_Insert( d, "LOC", PyInt_FromLong( IPOKEY_LOC ) );
+ PyConstant_Insert( d, "ROT", PyInt_FromLong( IPOKEY_ROT ) );
+ PyConstant_Insert( d, "SIZE", PyInt_FromLong( IPOKEY_SIZE ) );
+ PyConstant_Insert( d, "LOCROT", PyInt_FromLong( IPOKEY_LOCROT ) );
+ PyConstant_Insert( d, "LOCROTSIZE", PyInt_FromLong( IPOKEY_LOCROTSIZE ) );
+
+ PyConstant_Insert( d, "PI_STRENGTH", PyInt_FromLong( IPOKEY_PI_STRENGTH ) );
+ PyConstant_Insert( d, "PI_FALLOFF", PyInt_FromLong( IPOKEY_PI_FALLOFF ) );
+ PyConstant_Insert( d, "PI_SURFACEDAMP", PyInt_FromLong( IPOKEY_PI_SURFACEDAMP ) );
+ PyConstant_Insert( d, "PI_RANDOMDAMP", PyInt_FromLong( IPOKEY_PI_RANDOMDAMP ) );
+ PyConstant_Insert( d, "PI_PERM", PyInt_FromLong( IPOKEY_PI_PERM ) );
+ }
+ return M;
+}
+
/*****************************************************************************/
/* Function: initObject */
/*****************************************************************************/
@@ -5233,12 +5254,15 @@ PyObject *Object_Init( void )
PyObject *PITypesDict = M_Object_PITypesDict( );
PyObject *RBFlagsDict = M_Object_RBFlagsDict( );
PyObject *RBShapesDict = M_Object_RBShapeBoundDict( );
+ PyObject *IpoKeyTypesDict = M_Object_IpoKeyTypesDict( );
PyType_Ready( &Object_Type ) ;
module = Py_InitModule3( "Blender.Object", M_Object_methods,
M_Object_doc );
-
+
+
+ /* We Should Remove these!!!! */
PyModule_AddIntConstant( module, "LOC", IPOKEY_LOC );
PyModule_AddIntConstant( module, "ROT", IPOKEY_ROT );
PyModule_AddIntConstant( module, "SIZE", IPOKEY_SIZE );
@@ -5256,7 +5280,9 @@ PyObject *Object_Init( void )
PyModule_AddIntConstant( module, "VORTEX",PFIELD_VORTEX );
PyModule_AddIntConstant( module, "MAGNET",PFIELD_MAGNET );
PyModule_AddIntConstant( module, "WIND",PFIELD_WIND );
-
+ /* Only keeping above so as not to break compat */
+
+
if( DrawModesDict )
PyModule_AddObject( module, "DrawModes", DrawModesDict );
if( DrawTypesDict )
@@ -5271,7 +5297,8 @@ PyObject *Object_Init( void )
PyModule_AddObject( module, "RBFlags", RBFlagsDict );
if( RBShapesDict )
PyModule_AddObject( module, "RBShapes", RBShapesDict );
-
+ if( IpoKeyTypesDict )
+ PyModule_AddObject( module, "IpoKeyTypes", IpoKeyTypesDict );
/*Add SUBMODULES to the module*/
dict = PyModule_GetDict( module ); /*borrowed*/