Blender V2.61 - r43446
|
#include <PyObjectPlus.h>
#include <structmember.h>
#include <KX_GameObject.h>
#include <RAS_MeshObject.h>
#include <DNA_mesh_types.h>
#include <DNA_meshdata_types.h>
#include <DNA_image_types.h>
#include <IMB_imbuf_types.h>
#include <KX_PolygonMaterial.h>
#include <MEM_guardedalloc.h>
#include <KX_BlenderMaterial.h>
#include <BL_Texture.h>
#include "KX_KetsjiEngine.h"
#include "KX_PythonInit.h"
#include "Texture.h"
#include "ImageBase.h"
#include "Exception.h"
#include <memory.h>
#include "GL/glew.h"
Go to the source code of this file.
Defines | |
#define | CATCH_EXCP |
Functions | |
void | loadTexture (unsigned int texId, unsigned int *texture, short *size, bool mipmap) |
RAS_IPolyMaterial * | getMaterial (PyObject *obj, short matID) |
short | getMaterialID (PyObject *obj, const char *name) |
PyObject * | Texture_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
PyObject * | Texture_close (Texture *self) |
int | Texture_setSource (Texture *self, PyObject *value, void *closure) |
void | Texture_dealloc (Texture *self) |
int | Texture_init (Texture *self, PyObject *args, PyObject *kwds) |
PyObject * | Texture_refresh (Texture *self, PyObject *args) |
PyObject * | Texture_getBindId (Texture *self, void *closure) |
PyObject * | Texture_getMipmap (Texture *self, void *closure) |
int | Texture_setMipmap (Texture *self, PyObject *value, void *closure) |
PyObject * | Texture_getSource (Texture *self, PyObject *value, void *closure) |
Variables | |
BlendType< KX_GameObject > | gameObjectType ("KX_GameObject") |
ExceptionID | MaterialNotAvail |
ExpDesc | MaterialNotAvailDesc (MaterialNotAvail,"Texture material is not available") |
static PyMethodDef | textureMethods [] |
static PyGetSetDef | textureGetSets [] |
PyTypeObject | TextureType |
Definition in file Texture.cpp.
#define CATCH_EXCP |
Definition at line 56 of file Texture.cpp.
Referenced by Texture_refresh().
RAS_IPolyMaterial* getMaterial | ( | PyObject * | obj, |
short | matID | ||
) |
Definition at line 87 of file Texture.cpp.
References gameObjectType, KX_GameObject::GetMesh(), KX_GameObject::GetMeshCount(), RAS_MeshObject::GetMeshMaterial(), RAS_MaterialBucket::GetPolyMaterial(), RAS_MeshMaterial::m_bucket, and NULL.
Referenced by getMaterialID(), ImageMirror_init(), and Texture_init().
short getMaterialID | ( | PyObject * | obj, |
const char * | name | ||
) |
Definition at line 110 of file Texture.cpp.
References getMaterial(), RAS_IPolyMaterial::GetMaterialName(), RAS_IPolyMaterial::GetTextureName(), NULL, and STR_String::ReadPtr().
void loadTexture | ( | unsigned int | texId, |
unsigned int * | texture, | ||
short * | size, | ||
bool | mipmap | ||
) |
Definition at line 65 of file Texture.cpp.
Referenced by ImageViewport::calcImage(), and Texture_refresh().
PyObject * Texture_close | ( | Texture * | self | ) |
Definition at line 260 of file Texture.cpp.
Referenced by Texture_dealloc().
void Texture_dealloc | ( | Texture * | self | ) |
Definition at line 164 of file Texture.cpp.
References Texture_close().
PyObject* Texture_getBindId | ( | Texture * | self, |
void * | closure | ||
) |
Definition at line 375 of file Texture.cpp.
PyObject* Texture_getMipmap | ( | Texture * | self, |
void * | closure | ||
) |
Definition at line 382 of file Texture.cpp.
PyObject* Texture_getSource | ( | Texture * | self, |
PyObject * | value, | ||
void * | closure | ||
) |
Definition at line 406 of file Texture.cpp.
References NULL.
int Texture_init | ( | Texture * | self, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Definition at line 182 of file Texture.cpp.
References KDL::exp(), RAS_IPolyMaterial::GetFlag(), getMaterial(), Texture::m_actTex, Texture::m_mipmap, Texture::m_source, NULL, RAS_BLENDERGLSL, RAS_BLENDERMAT, Exception::report(), S_OK, Texture_setSource(), TextureType, THRWEXCP, and MTFace::tpage.
PyObject* Texture_new | ( | PyTypeObject * | type, |
PyObject * | args, | ||
PyObject * | kwds | ||
) |
Definition at line 139 of file Texture.cpp.
References Texture::m_actTex, and NULL.
PyObject* Texture_refresh | ( | Texture * | self, |
PyObject * | args | ||
) |
Definition at line 283 of file Texture.cpp.
References ImageBase::calcSize(), CATCH_EXCP, KX_KetsjiEngine::GetClockTime(), KX_GetActiveEngine(), loadTexture(), NULL, and size().
int Texture_setMipmap | ( | Texture * | self, |
PyObject * | value, | ||
void * | closure | ||
) |
Definition at line 390 of file Texture.cpp.
References NULL.
int Texture_setSource | ( | Texture * | self, |
PyObject * | value, | ||
void * | closure | ||
) |
Definition at line 420 of file Texture.cpp.
References PyTypeList::in(), NULL, and pyImageTypes.
Referenced by Texture_init().
BlendType<KX_GameObject> gameObjectType("KX_GameObject") |
Referenced by getMaterial().
Definition at line 178 of file Texture.cpp.
Referenced by ImageMirror_init().
ExpDesc MaterialNotAvailDesc(MaterialNotAvail,"Texture material is not available") |
Referenced by registerAllExceptions().
PyGetSetDef textureGetSets[] [static] |
{ {(char*)"source", (getter)Texture_getSource, (setter)Texture_setSource, (char*)"source of texture", NULL}, {(char*)"mipmap", (getter)Texture_getMipmap, (setter)Texture_setMipmap, (char*)"mipmap texture", NULL}, {(char*)"bindId", (getter)Texture_getBindId, NULL, (char*)"OpenGL Bind Name", NULL}, {NULL} }
Definition at line 449 of file Texture.cpp.
PyMethodDef textureMethods[] [static] |
{ { "close", (PyCFunction)Texture_close, METH_NOARGS, "Close dynamic texture and restore original"}, { "refresh", (PyCFunction)Texture_refresh, METH_VARARGS, "Refresh texture from source"}, {NULL} }
Definition at line 441 of file Texture.cpp.
PyTypeObject TextureType |
Definition at line 459 of file Texture.cpp.
Referenced by initVideoTexture(), and Texture_init().