[Bf-python] Image.getMode

Campbell Barton cbarton at metavr.com
Wed Apr 20 15:27:27 CEST 2005


I wanted to add image.flag to accsess image reflection options etc.
This code dosent work, no idea why.
- Cam

static PyObject *Image_setMode( BPy_Image * self, PyObject * args )
{
    PyObject *arg = NULL;
    short mode = 0;
   
    if( !PyArg_ParseTuple( args, "O", &arg ) )
        return ( EXPP_ReturnPyObjError( PyExc_TypeError,
                        "expected int flag as in argument" ) );
    mode = (short)PyInt_AsLong(arg);
    self->image->flag = mode;
   
    Py_INCREF( Py_None );
    return Py_None;
}


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241




More information about the Bf-python mailing list