Page MenuHome

patch-Texture2.txt

Authored By
Ken Hughes (khughes)
Nov 13 2013, 1:07 PM
Size
3 KB
Subscribers
None

patch-Texture2.txt

--- source/blender/python/api2_2x/Texture.c 2005-08-24 16:22:32.000000000 -0700
+++ source/blender/python/api2_2x/Texture.c 2005-08-24 16:19:10.000000000 -0700
@@ -508,12 +508,12 @@
SETFUNC( setWeight3 );
SETFUNC( setWeight4 );
-static PyObject *Texture_getImageFlags( BPy_Texture *self, int type );
-static PyObject *Texture_getNoiseBasis2( BPy_Texture *self, int type );
+static PyObject *Texture_getImageFlags( BPy_Texture *self, void *type );
+static PyObject *Texture_getNoiseBasis2( BPy_Texture *self, void *type );
static int Texture_setImageFlags( BPy_Texture *self, PyObject *args,
- int type );
+ void *type );
static int Texture_setNoiseBasis2( BPy_Texture *self, PyObject *args,
- int type );
+ void *type );
/*****************************************************************************/
/* Python BPy_Texture methods table: */
@@ -1516,7 +1516,7 @@
}
static int Texture_setImageFlags( BPy_Texture * self, PyObject * value,
- int type )
+ void *type )
{
short param;
@@ -1525,10 +1525,10 @@
* so set/clear the bit in the bitfield based on the type
*/
- if( type ) {
+ if( (int)type ) {
int err;
param = self->texture->imaflag;
- err = EXPP_setBitfield( value, &param, type, 'h' );
+ err = EXPP_setBitfield( value, &param, (int)type, 'h' );
if( err )
return err;
@@ -1647,14 +1647,14 @@
}
static int Texture_setNoiseBasis2( BPy_Texture * self, PyObject * value,
- int type )
+ void *type )
{
/*
* if type is EXPP_TEX_NOISEBASIS2, then this is the "noiseBasis2"
* attribute, so check the range and set the whole value
*/
- if( type == EXPP_TEX_NOISEBASIS2 ) {
+ if( (int)type == EXPP_TEX_NOISEBASIS2 ) {
int param;
if( !PyInt_CheckExact ( value ) )
return EXPP_ReturnIntError( PyExc_TypeError,
@@ -1682,9 +1682,9 @@
if( PyInt_AS_LONG ( value ) != 1 )
return EXPP_ReturnIntError( PyExc_ValueError,
- "expected intvalue of 1" );
+ "expected int value of 1" );
- self->texture->noisebasis2 = type;
+ self->texture->noisebasis2 = (int)type;
}
return 0;
}
@@ -2113,7 +2113,7 @@
return attr;
}
-static PyObject *Texture_getImageFlags( BPy_Texture *self, int type )
+static PyObject *Texture_getImageFlags( BPy_Texture *self, void *type )
{
PyObject *attr;
@@ -2122,8 +2122,8 @@
* other types means attribute "mipmap", "calcAlpha", etc
*/
- if( type )
- attr = EXPP_getBitfield( &self->texture->imaflag, type, 'h' );
+ if( (int)type )
+ attr = EXPP_getBitfield( &self->texture->imaflag, (int)type, 'h' );
else
attr = PyInt_FromLong( self->texture->imaflag );
@@ -2167,7 +2167,7 @@
return attr;
}
-static PyObject *Texture_getNoiseBasis2( BPy_Texture *self, int type )
+static PyObject *Texture_getNoiseBasis2( BPy_Texture *self, void *type )
{
PyObject *attr;
@@ -2176,10 +2176,10 @@
* other types means attribute "sine", "saw", or "tri" attribute
*/
- if( type == EXPP_TEX_NOISEBASIS2 )
+ if( (int)type == EXPP_TEX_NOISEBASIS2 )
attr = PyInt_FromLong( self->texture->noisebasis2 );
else
- attr = PyInt_FromLong( ( self->texture->noisebasis2 == type ) ? 1 : 0 );
+ attr = PyInt_FromLong( ( self->texture->noisebasis2 == (int)type ) ? 1 : 0 );
if( !attr )
return EXPP_ReturnPyObjError( PyExc_RuntimeError,

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9d/06/9c667a4b7a60796322e4c5ed32aa

Event Timeline