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:
authorStephen Swaney <sswaney@centurytel.net>2004-09-26 00:30:40 +0400
committerStephen Swaney <sswaney@centurytel.net>2004-09-26 00:30:40 +0400
commita509b8adc9b8952cdb395c69406e821f57a9a6c7 (patch)
tree7c0e3c7b81007acc6b3e268e59a6af5fcb4bd93f /source/blender/python/api2_2x/Types.c
parentbd371ddb9ff947d4e598ad04af9402d89fa80d5e (diff)
Another round in the Great BPy Cleanup:
Run everything thru indent to cleanup spaces vs tabs. Clean up some of the comments by hand. BGL.c was not touched due to all that macro wackyness. There are no functional changes to the code. Pre-indent versions of source are tagged with tag bpy-cleanup-20040925 , just in case.
Diffstat (limited to 'source/blender/python/api2_2x/Types.c')
-rw-r--r--source/blender/python/api2_2x/Types.c113
1 files changed, 67 insertions, 46 deletions
diff --git a/source/blender/python/api2_2x/Types.c b/source/blender/python/api2_2x/Types.c
index 3aa425101fb..6647071013f 100644
--- a/source/blender/python/api2_2x/Types.c
+++ b/source/blender/python/api2_2x/Types.c
@@ -31,19 +31,18 @@
#include "Types.h"
-char M_Types_doc[] =
-"The Blender Types module\n\n\
+char M_Types_doc[] = "The Blender Types module\n\n\
This module is a dictionary of all Blender Python types";
-struct PyMethodDef Null_methods[] = {{NULL, NULL, 0, NULL}};
+struct PyMethodDef Null_methods[] = { {NULL, NULL, 0, NULL} };
-void types_InitAll(void)
+void types_InitAll( void )
{
- /* The internal types (lowercase first letter, like constant_Type) are only
- * set when some object initializes them. But unless we do it early, we get
- * some easy and unpredictable (varies with platform, even distro) ways to
- * crash Blender. Some modules also need this early up, so let's generalize
- * and init all our pytypes here. */
+ /* The internal types (lowercase first letter, like constant_Type) are only
+ * set when some object initializes them. But unless we do it early, we get
+ * some easy and unpredictable (varies with platform, even distro) ways to
+ * crash Blender. Some modules also need this early up, so let's generalize
+ * and init all our pytypes here. */
Action_Type.ob_type = &PyType_Type;
Armature_Type.ob_type = &PyType_Type;
@@ -86,64 +85,86 @@ void types_InitAll(void)
}
/*****************************************************************************/
-/* Function: Types_Init */
+/* Function: Types_Init */
/*****************************************************************************/
-PyObject *Types_Init (void)
+PyObject *Types_Init( void )
{
- PyObject *submodule, *dict;
+ PyObject *submodule, *dict;
- submodule = Py_InitModule3 ("Blender.Types", Null_methods, M_Types_doc);
+ submodule =
+ Py_InitModule3( "Blender.Types", Null_methods, M_Types_doc );
- dict = PyModule_GetDict(submodule);
+ dict = PyModule_GetDict( submodule );
/* The Blender Object Type */
- PyDict_SetItemString(dict, "ObjectType", (PyObject *)&Object_Type);
+ PyDict_SetItemString( dict, "ObjectType",
+ ( PyObject * ) & Object_Type );
/* Blender Object Data Types */
- PyDict_SetItemString(dict, "SceneType", (PyObject *)&Scene_Type);
- PyDict_SetItemString(dict, "RenderDataType", (PyObject *)&RenderData_Type);
+ PyDict_SetItemString( dict, "SceneType", ( PyObject * ) & Scene_Type );
+ PyDict_SetItemString( dict, "RenderDataType",
+ ( PyObject * ) & RenderData_Type );
- PyDict_SetItemString(dict, "NMeshType", (PyObject *)&NMesh_Type);
- PyDict_SetItemString(dict, "NMFaceType", (PyObject *)&NMFace_Type);
- PyDict_SetItemString(dict, "NMVertType", (PyObject *)&NMVert_Type);
- PyDict_SetItemString(dict, "NMColType", (PyObject *)&NMCol_Type);
+ PyDict_SetItemString( dict, "NMeshType", ( PyObject * ) & NMesh_Type );
+ PyDict_SetItemString( dict, "NMFaceType",
+ ( PyObject * ) & NMFace_Type );
+ PyDict_SetItemString( dict, "NMVertType",
+ ( PyObject * ) & NMVert_Type );
+ PyDict_SetItemString( dict, "NMColType", ( PyObject * ) & NMCol_Type );
- PyDict_SetItemString(dict, "ArmatureType", (PyObject *)&Armature_Type);
- PyDict_SetItemString(dict, "BoneType", (PyObject *)&Bone_Type);
+ PyDict_SetItemString( dict, "ArmatureType",
+ ( PyObject * ) & Armature_Type );
+ PyDict_SetItemString( dict, "BoneType", ( PyObject * ) & Bone_Type );
- PyDict_SetItemString(dict, "CurNurb_Type", (PyObject *)&CurNurb_Type);
- PyDict_SetItemString(dict, "CurveType", (PyObject *)&Curve_Type);
+ PyDict_SetItemString( dict, "CurNurb_Type",
+ ( PyObject * ) & CurNurb_Type );
+ PyDict_SetItemString( dict, "CurveType", ( PyObject * ) & Curve_Type );
- PyDict_SetItemString(dict, "IpoType", (PyObject *)&Ipo_Type);
- PyDict_SetItemString(dict, "MetaballType", (PyObject *)&Metaball_Type);
+ PyDict_SetItemString( dict, "IpoType", ( PyObject * ) & Ipo_Type );
+ PyDict_SetItemString( dict, "MetaballType",
+ ( PyObject * ) & Metaball_Type );
- PyDict_SetItemString(dict, "CameraType", (PyObject *)&Camera_Type);
- PyDict_SetItemString(dict, "ImageType", (PyObject *)&Image_Type);
- PyDict_SetItemString(dict, "LampType", (PyObject *)&Lamp_Type);
- PyDict_SetItemString(dict, "TextType", (PyObject *)&Text_Type);
- PyDict_SetItemString(dict, "MaterialType", (PyObject *)&Material_Type);
+ PyDict_SetItemString( dict, "CameraType",
+ ( PyObject * ) & Camera_Type );
+ PyDict_SetItemString( dict, "ImageType", ( PyObject * ) & Image_Type );
+ PyDict_SetItemString( dict, "LampType", ( PyObject * ) & Lamp_Type );
+ PyDict_SetItemString( dict, "TextType", ( PyObject * ) & Text_Type );
+ PyDict_SetItemString( dict, "MaterialType",
+ ( PyObject * ) & Material_Type );
- PyDict_SetItemString(dict, "ButtonType", (PyObject *)&Button_Type);
+ PyDict_SetItemString( dict, "ButtonType",
+ ( PyObject * ) & Button_Type );
- PyDict_SetItemString(dict, "LatticeType", (PyObject *)&Lattice_Type);
+ PyDict_SetItemString( dict, "LatticeType",
+ ( PyObject * ) & Lattice_Type );
- PyDict_SetItemString(dict, "TextureType", (PyObject *)&Texture_Type);
- PyDict_SetItemString(dict, "MTexType", (PyObject *)&MTex_Type);
+ PyDict_SetItemString( dict, "TextureType",
+ ( PyObject * ) & Texture_Type );
+ PyDict_SetItemString( dict, "MTexType", ( PyObject * ) & MTex_Type );
/* External helper Types available to the main ones above */
- PyDict_SetItemString(dict, "vectorType", (PyObject *)&vector_Type);
- PyDict_SetItemString(dict, "bufferType", (PyObject *)&buffer_Type);
- PyDict_SetItemString(dict, "constantType", (PyObject *)&constant_Type);
- PyDict_SetItemString(dict, "rgbTupleType", (PyObject *)&rgbTuple_Type);
- PyDict_SetItemString(dict, "matrix_Type", (PyObject *)&matrix_Type);
- PyDict_SetItemString(dict, "eulerType", (PyObject *)&euler_Type);
- PyDict_SetItemString(dict, "quaternionType", (PyObject *)&quaternion_Type);
- PyDict_SetItemString(dict, "BezTripleType", (PyObject *)&BezTriple_Type);
- PyDict_SetItemString(dict, "ActionType", (PyObject *)&Action_Type);
- PyDict_SetItemString(dict, "propertyType", (PyObject *)&property_Type);
+ PyDict_SetItemString( dict, "vectorType",
+ ( PyObject * ) & vector_Type );
+ PyDict_SetItemString( dict, "bufferType",
+ ( PyObject * ) & buffer_Type );
+ PyDict_SetItemString( dict, "constantType",
+ ( PyObject * ) & constant_Type );
+ PyDict_SetItemString( dict, "rgbTupleType",
+ ( PyObject * ) & rgbTuple_Type );
+ PyDict_SetItemString( dict, "matrix_Type",
+ ( PyObject * ) & matrix_Type );
+ PyDict_SetItemString( dict, "eulerType", ( PyObject * ) & euler_Type );
+ PyDict_SetItemString( dict, "quaternionType",
+ ( PyObject * ) & quaternion_Type );
+ PyDict_SetItemString( dict, "BezTripleType",
+ ( PyObject * ) & BezTriple_Type );
+ PyDict_SetItemString( dict, "ActionType",
+ ( PyObject * ) & Action_Type );
+ PyDict_SetItemString( dict, "propertyType",
+ ( PyObject * ) & property_Type );
return submodule;
}