diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-05-28 08:36:18 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-05-28 08:36:18 +0400 |
commit | b7bf9bf1b721ba9a1a5414179763c35a7557ccef (patch) | |
tree | 11890d5eda93dc2b460792ce69ac8bd820f9a26e /source/blender/python/api2_2x/Types.c | |
parent | a0e54446f3ac1ba6adf87cd01d4d7b63fbbf538b (diff) |
* Added submodule Blender.Material
* Added submodule Blender.Types:
Blender Type definitions can't be static anymore.
* Some cleanup of now unused defines in Camera.h and Lamp.h
Diffstat (limited to 'source/blender/python/api2_2x/Types.c')
-rw-r--r-- | source/blender/python/api2_2x/Types.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Types.c b/source/blender/python/api2_2x/Types.c new file mode 100644 index 00000000000..7aa5c64ed14 --- /dev/null +++ b/source/blender/python/api2_2x/Types.c @@ -0,0 +1,74 @@ +/* + * + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * This is a new part of Blender. + * + * Contributor(s): Willian P. Germano + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + +#include "Types.h" + +struct PyMethodDef Null_methods[] = {{NULL, NULL}}; + +/*****************************************************************************/ +/* Function: M_Types_Init */ +/*****************************************************************************/ +PyObject *M_Types_Init (void) +{ + PyObject *submodule, *dict; + + submodule = Py_InitModule3("Blender.Types", Null_methods, M_Types_doc); + + dict = PyModule_GetDict(submodule); + + /* The Blender Object Type */ + + PyDict_SetItemString(dict, "ObjectType", (PyObject *)&Object_Type); + + /* Blender Object Data Types */ + + 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, "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, "ButtonType", (PyObject *)&Button_Type); + PyDict_SetItemString(dict, "MaterialType",(PyObject *)&Material_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); + + return (submodule); +} |