Merged changes in the trunk up to revision 50829.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/render/intern/source/convertblender.c source/blender/render/intern/source/pipeline.c Also addressed code inconsistency due to changes in the trunk revision 50628 (color management with OCIO) and 50806 (UV project material). OCIO-related changes are marked OCIO_TODO as in some other files modified in revision 50628.
This commit is contained in:
@@ -108,7 +108,7 @@ RAS_IPolyMaterial * getMaterial (PyObject *obj, short matID)
|
||||
}
|
||||
|
||||
// get pointer to a lamp
|
||||
KX_LightObject * getLamp(PyObject *obj)
|
||||
static KX_LightObject *getLamp(PyObject *obj)
|
||||
{
|
||||
// if object is available
|
||||
if (obj == NULL) return NULL;
|
||||
@@ -119,7 +119,7 @@ KX_LightObject * getLamp(PyObject *obj)
|
||||
|
||||
|
||||
// get material ID
|
||||
short getMaterialID(PyObject * obj, const char *name)
|
||||
short getMaterialID(PyObject *obj, const char *name)
|
||||
{
|
||||
// search for material
|
||||
for (short matID = 0;; ++matID)
|
||||
@@ -147,7 +147,7 @@ short getMaterialID(PyObject * obj, const char *name)
|
||||
|
||||
|
||||
// Texture object allocation
|
||||
PyObject * Texture_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
static PyObject *Texture_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
// allocate object
|
||||
Texture * self = reinterpret_cast<Texture*>(type->tp_alloc(type, 0));
|
||||
@@ -167,22 +167,22 @@ PyObject * Texture_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
|
||||
|
||||
// forward declaration
|
||||
PyObject * Texture_close(Texture * self);
|
||||
int Texture_setSource (Texture * self, PyObject * value, void * closure);
|
||||
PyObject *Texture_close(Texture * self);
|
||||
int Texture_setSource (Texture * self, PyObject *value, void *closure);
|
||||
|
||||
|
||||
// Texture object deallocation
|
||||
void Texture_dealloc (Texture * self)
|
||||
static void Texture_dealloc(Texture *self)
|
||||
{
|
||||
// release renderer
|
||||
Py_XDECREF(self->m_source);
|
||||
// close texture
|
||||
PyObject* ret = Texture_close(self);
|
||||
PyObject *ret = Texture_close(self);
|
||||
Py_DECREF(ret);
|
||||
// release scaled image buffer
|
||||
delete [] self->m_scaledImg;
|
||||
// release object
|
||||
Py_TYPE((PyObject *)self)->tp_free((PyObject*)self);
|
||||
Py_TYPE((PyObject *)self)->tp_free((PyObject *)self);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,10 +190,10 @@ ExceptionID MaterialNotAvail;
|
||||
ExpDesc MaterialNotAvailDesc (MaterialNotAvail, "Texture material is not available");
|
||||
|
||||
// Texture object initialization
|
||||
int Texture_init (Texture *self, PyObject *args, PyObject *kwds)
|
||||
static int Texture_init(Texture *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
// parameters - game object with video texture
|
||||
PyObject * obj = NULL;
|
||||
PyObject *obj = NULL;
|
||||
// material ID
|
||||
short matID = 0;
|
||||
// texture ID
|
||||
@@ -275,7 +275,7 @@ int Texture_init (Texture *self, PyObject *args, PyObject *kwds)
|
||||
|
||||
|
||||
// close added texture
|
||||
PyObject * Texture_close(Texture * self)
|
||||
PyObject *Texture_close(Texture * self)
|
||||
{
|
||||
// restore texture
|
||||
if (self->m_orgSaved)
|
||||
@@ -298,10 +298,10 @@ PyObject * Texture_close(Texture * self)
|
||||
|
||||
|
||||
// refresh texture
|
||||
PyObject * Texture_refresh (Texture * self, PyObject * args)
|
||||
static PyObject *Texture_refresh(Texture *self, PyObject *args)
|
||||
{
|
||||
// get parameter - refresh source
|
||||
PyObject * param;
|
||||
PyObject *param;
|
||||
double ts = -1.0;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O|d:refresh", ¶m, &ts) || !PyBool_Check(param))
|
||||
@@ -390,14 +390,14 @@ PyObject * Texture_refresh (Texture * self, PyObject * args)
|
||||
}
|
||||
|
||||
// get OpenGL Bind Id
|
||||
PyObject * Texture_getBindId (Texture * self, void * closure)
|
||||
static PyObject *Texture_getBindId(Texture *self, void *closure)
|
||||
{
|
||||
unsigned int id = self->m_actTex;
|
||||
return Py_BuildValue("h", id);
|
||||
}
|
||||
|
||||
// get mipmap value
|
||||
PyObject * Texture_getMipmap (Texture * self, void * closure)
|
||||
static PyObject *Texture_getMipmap(Texture *self, void *closure)
|
||||
{
|
||||
// return true if flag is set, otherwise false
|
||||
if (self->m_mipmap) Py_RETURN_TRUE;
|
||||
@@ -405,7 +405,7 @@ PyObject * Texture_getMipmap (Texture * self, void * closure)
|
||||
}
|
||||
|
||||
// set mipmap value
|
||||
int Texture_setMipmap (Texture * self, PyObject * value, void * closure)
|
||||
static int Texture_setMipmap(Texture *self, PyObject *value, void *closure)
|
||||
{
|
||||
// check parameter, report failure
|
||||
if (value == NULL || !PyBool_Check(value))
|
||||
@@ -421,7 +421,7 @@ int Texture_setMipmap (Texture * self, PyObject * value, void * closure)
|
||||
|
||||
|
||||
// get source object
|
||||
PyObject * Texture_getSource (Texture * self, PyObject * value, void * closure)
|
||||
static PyObject *Texture_getSource(Texture *self, PyObject *value, void *closure)
|
||||
{
|
||||
// if source exists
|
||||
if (self->m_source != NULL)
|
||||
@@ -435,7 +435,7 @@ PyObject * Texture_getSource (Texture * self, PyObject * value, void * closure)
|
||||
|
||||
|
||||
// set source object
|
||||
int Texture_setSource (Texture * self, PyObject * value, void * closure)
|
||||
int Texture_setSource (Texture * self, PyObject *value, void *closure)
|
||||
{
|
||||
// check new value
|
||||
if (value == NULL || !pyImageTypes.in(Py_TYPE(value)))
|
||||
|
||||
Reference in New Issue
Block a user