BPy
* access to sample buffers count of Lamp
This commit is contained in:
@@ -191,6 +191,7 @@ static PyObject *Lamp_getTypesConst( void );
|
|||||||
static PyObject *Lamp_getMode( BPy_Lamp * self );
|
static PyObject *Lamp_getMode( BPy_Lamp * self );
|
||||||
static PyObject *Lamp_getModesConst( void );
|
static PyObject *Lamp_getModesConst( void );
|
||||||
static PyObject *Lamp_getSamples( BPy_Lamp * self );
|
static PyObject *Lamp_getSamples( BPy_Lamp * self );
|
||||||
|
static PyObject *Lamp_getSampleBuffers( BPy_Lamp * self );
|
||||||
static PyObject *Lamp_getRaySamplesX( BPy_Lamp * self );
|
static PyObject *Lamp_getRaySamplesX( BPy_Lamp * self );
|
||||||
static PyObject *Lamp_getRaySamplesY( BPy_Lamp * self );
|
static PyObject *Lamp_getRaySamplesY( BPy_Lamp * self );
|
||||||
static PyObject *Lamp_getAreaSizeX( BPy_Lamp * self );
|
static PyObject *Lamp_getAreaSizeX( BPy_Lamp * self );
|
||||||
@@ -241,6 +242,7 @@ static int Lamp_setIpo( BPy_Lamp * self, PyObject * args );
|
|||||||
static int Lamp_setType( BPy_Lamp * self, PyObject * args );
|
static int Lamp_setType( BPy_Lamp * self, PyObject * args );
|
||||||
static int Lamp_setMode( BPy_Lamp * self, PyObject * args );
|
static int Lamp_setMode( BPy_Lamp * self, PyObject * args );
|
||||||
static int Lamp_setSamples( BPy_Lamp * self, PyObject * args );
|
static int Lamp_setSamples( BPy_Lamp * self, PyObject * args );
|
||||||
|
static int Lamp_setSampleBuffers( BPy_Lamp * self, PyObject * args );
|
||||||
static int Lamp_setRaySamplesX( BPy_Lamp * self, PyObject * args );
|
static int Lamp_setRaySamplesX( BPy_Lamp * self, PyObject * args );
|
||||||
static int Lamp_setRaySamplesY( BPy_Lamp * self, PyObject * args );
|
static int Lamp_setRaySamplesY( BPy_Lamp * self, PyObject * args );
|
||||||
static int Lamp_setAreaSizeX( BPy_Lamp * self, PyObject * args );
|
static int Lamp_setAreaSizeX( BPy_Lamp * self, PyObject * args );
|
||||||
@@ -447,6 +449,10 @@ static PyGetSetDef BPy_Lamp_getseters[] = {
|
|||||||
(getter)Lamp_getSamples, (setter)Lamp_setSamples,
|
(getter)Lamp_getSamples, (setter)Lamp_setSamples,
|
||||||
"Lamp shadow map samples",
|
"Lamp shadow map samples",
|
||||||
NULL},
|
NULL},
|
||||||
|
{"sampleBuffers",
|
||||||
|
(getter)Lamp_getSampleBuffers, (setter)Lamp_setSampleBuffers,
|
||||||
|
"Lamp shadow samples buffers",
|
||||||
|
NULL},
|
||||||
{"raySamplesX",
|
{"raySamplesX",
|
||||||
(getter)Lamp_getRaySamplesX, (setter)Lamp_setRaySamplesX,
|
(getter)Lamp_getRaySamplesX, (setter)Lamp_setRaySamplesX,
|
||||||
"Lamp raytracing samples on the X axis",
|
"Lamp raytracing samples on the X axis",
|
||||||
@@ -923,6 +929,11 @@ static PyObject *Lamp_getSamples( BPy_Lamp * self )
|
|||||||
return PyInt_FromLong( self->lamp->samp );
|
return PyInt_FromLong( self->lamp->samp );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *Lamp_getSampleBuffers( BPy_Lamp * self )
|
||||||
|
{
|
||||||
|
return PyInt_FromLong( self->lamp->buffers );
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *Lamp_getRaySamplesX( BPy_Lamp * self )
|
static PyObject *Lamp_getRaySamplesX( BPy_Lamp * self )
|
||||||
{
|
{
|
||||||
return PyInt_FromLong( self->lamp->ray_samp );
|
return PyInt_FromLong( self->lamp->ray_samp );
|
||||||
@@ -1063,6 +1074,23 @@ static int Lamp_setSamples( BPy_Lamp * self, PyObject * value )
|
|||||||
EXPP_LAMP_SAMPLES_MAX, 'h' );
|
EXPP_LAMP_SAMPLES_MAX, 'h' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int Lamp_setSampleBuffers( BPy_Lamp * self, PyObject * value )
|
||||||
|
{
|
||||||
|
int buffers= 1;
|
||||||
|
if( !PyInt_Check ( value ) ) {
|
||||||
|
return EXPP_ReturnIntError( PyExc_TypeError, "expected int argument" );
|
||||||
|
}
|
||||||
|
buffers= PyInt_AS_LONG(value);
|
||||||
|
|
||||||
|
if(buffers!=1 && buffers!=4 && buffers!=9) {
|
||||||
|
return EXPP_ReturnIntError( PyExc_TypeError,
|
||||||
|
"expected int argument of value 1, 4 or 9" );
|
||||||
|
}
|
||||||
|
|
||||||
|
self->lamp->buffers= buffers;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int Lamp_setRaySamplesX( BPy_Lamp * self, PyObject * value )
|
static int Lamp_setRaySamplesX( BPy_Lamp * self, PyObject * value )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,6 +136,9 @@ class Lamp:
|
|||||||
@ivar samples: Lamp shadow map samples.
|
@ivar samples: Lamp shadow map samples.
|
||||||
Value is clamped to the range [1,16].
|
Value is clamped to the range [1,16].
|
||||||
@type samples: int
|
@type samples: int
|
||||||
|
@ivar sampleBuffers: Lamp amount of shadow map sample buffers.
|
||||||
|
Number of sample buffers for shadow buffer: 1, 4 or 9.
|
||||||
|
@type sampleBuffers: int
|
||||||
@ivar raySamplesX: Lamp raytracing X samples (X is used for the Y axis with square area lamps).
|
@ivar raySamplesX: Lamp raytracing X samples (X is used for the Y axis with square area lamps).
|
||||||
Value is clamped to the range [1,16].
|
Value is clamped to the range [1,16].
|
||||||
@type raySamplesX: int
|
@type raySamplesX: int
|
||||||
|
|||||||
Reference in New Issue
Block a user