resolve some compiler warnings with intel c/c++ compiler
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later. * some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion. * removed unused vars * obscure python memory leak with colorband. * make_sample_tables had a loop running wasnt used. * if 0'd functions in arithb.c that are not used yet. * made many functions static
This commit is contained in:
@@ -57,9 +57,9 @@ static const char sArmatureBadArgs[] = "ArmatureType - Bad Arguments: ";
|
||||
static const char sModuleError[] = "Blender.Armature - Error: ";
|
||||
static const char sModuleBadArgs[] = "Blender.Armature - Bad Arguments: ";
|
||||
|
||||
PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref);
|
||||
static PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref);
|
||||
/* python callable */
|
||||
PyObject * arm_weakref_callback_weakref_dealloc__pyfunc;
|
||||
static PyObject * arm_weakref_callback_weakref_dealloc__pyfunc;
|
||||
|
||||
//################## BonesDict_Type (internal) ########################
|
||||
/*This is an internal psuedo-dictionary type that allows for manipulation
|
||||
@@ -1323,7 +1323,7 @@ PyObject *Armature_RebuildBones(PyObject *pyarmature)
|
||||
}
|
||||
|
||||
/* internal func to remove weakref from weakref list */
|
||||
PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref)
|
||||
static PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref)
|
||||
{
|
||||
char *list_name = ARM_WEAKREF_LIST_NAME;
|
||||
PyObject *maindict = NULL, *armlist = NULL;
|
||||
|
||||
@@ -1156,10 +1156,12 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
void Set_uiBlock(uiBlock *block)
|
||||
#if 0 /* not used yet */
|
||||
static void Set_uiBlock(uiBlock *block)
|
||||
{
|
||||
uiblock = block;
|
||||
}
|
||||
#endif
|
||||
|
||||
static uiBlock *Get_uiBlock( void )
|
||||
{
|
||||
|
||||
@@ -349,7 +349,7 @@ static PyObject *M_Geometry_PointInQuad2D( PyObject * self, PyObject * args )
|
||||
return PyInt_FromLong(IsectPQ2Df(pt_vec->vec, quad_p1->vec, quad_p2->vec, quad_p3->vec, quad_p4->vec));
|
||||
}
|
||||
|
||||
int boxPack_FromPyObject(PyObject * value, boxPack **boxarray )
|
||||
static int boxPack_FromPyObject(PyObject * value, boxPack **boxarray )
|
||||
{
|
||||
int len, i;
|
||||
PyObject *list_item, *item_1, *item_2;
|
||||
@@ -393,7 +393,7 @@ int boxPack_FromPyObject(PyObject * value, boxPack **boxarray )
|
||||
return 0;
|
||||
}
|
||||
|
||||
void boxPack_ToPyObject(PyObject * value, boxPack **boxarray)
|
||||
static void boxPack_ToPyObject(PyObject * value, boxPack **boxarray)
|
||||
{
|
||||
int len, i;
|
||||
PyObject *list_item;
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
/* Python API function prototypes for the Blender module. */
|
||||
/*****************************************************************************/
|
||||
static PyObject *M_Group_New( PyObject * self, PyObject * args );
|
||||
PyObject *M_Group_Get( PyObject * self, PyObject * args );
|
||||
PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp );
|
||||
static PyObject *M_Group_Get( PyObject * self, PyObject * args );
|
||||
static PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp );
|
||||
|
||||
/* internal */
|
||||
static PyObject *GroupObSeq_CreatePyObject( BPy_Group *self, GroupObject *iter );
|
||||
@@ -405,7 +405,7 @@ PyObject *M_Group_New( PyObject * self, PyObject * args )
|
||||
/* Function: M_Group_Get */
|
||||
/* Python equivalent: Blender.Group.Get */
|
||||
/*****************************************************************************/
|
||||
PyObject *M_Group_Get( PyObject * self, PyObject * args )
|
||||
static PyObject *M_Group_Get( PyObject * self, PyObject * args )
|
||||
{
|
||||
char *name = NULL;
|
||||
Group *group_iter;
|
||||
@@ -475,7 +475,7 @@ PyObject *M_Group_Get( PyObject * self, PyObject * args )
|
||||
/* Function: M_Group_Unlink */
|
||||
/* Python equivalent: Blender.Group.Unlink */
|
||||
/*****************************************************************************/
|
||||
PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp )
|
||||
static PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp )
|
||||
{
|
||||
Group *group;
|
||||
if( !BPy_Group_Check(pygrp) )
|
||||
|
||||
@@ -154,7 +154,7 @@ PyObject *BPy_IDGroup_GetName(BPy_IDProperty *self, void *bleh)
|
||||
return PyString_FromString(self->prop->name);
|
||||
}
|
||||
|
||||
int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *bleh)
|
||||
static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *bleh)
|
||||
{
|
||||
char *st;
|
||||
if (!PyString_Check(value))
|
||||
@@ -168,7 +168,7 @@ int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *bleh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_GetType(BPy_IDProperty *self)
|
||||
static PyObject *BPy_IDGroup_GetType(BPy_IDProperty *self)
|
||||
{
|
||||
return PyInt_FromLong((long)self->prop->type);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ static PyGetSetDef BPy_IDGroup_getseters[] = {
|
||||
{NULL, NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
int BPy_IDGroup_Map_Len(BPy_IDProperty *self)
|
||||
static int BPy_IDGroup_Map_Len(BPy_IDProperty *self)
|
||||
{
|
||||
if (self->prop->type != IDP_GROUP)
|
||||
return EXPP_ReturnIntError( PyExc_TypeError,
|
||||
@@ -190,7 +190,7 @@ int BPy_IDGroup_Map_Len(BPy_IDProperty *self)
|
||||
return self->prop->len;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
|
||||
static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
|
||||
{
|
||||
IDProperty *loop;
|
||||
char *st;
|
||||
@@ -212,7 +212,7 @@ PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
|
||||
}
|
||||
|
||||
/*returns NULL on success, error string on failure*/
|
||||
char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObject *ob)
|
||||
static char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObject *ob)
|
||||
{
|
||||
IDProperty *prop = NULL;
|
||||
IDPropertyTemplate val = {0};
|
||||
@@ -297,7 +297,7 @@ char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObje
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
|
||||
static int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
|
||||
{
|
||||
char *err;
|
||||
|
||||
@@ -325,7 +325,7 @@ int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
|
||||
static PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
|
||||
{
|
||||
BPy_IDGroup_Iter *iter = PyObject_New(BPy_IDGroup_Iter, &IDGroup_Iter_Type);
|
||||
|
||||
@@ -339,7 +339,7 @@ PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
|
||||
return (PyObject*) iter;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
|
||||
static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
|
||||
{
|
||||
switch (prop->type) {
|
||||
case IDP_STRING:
|
||||
@@ -401,7 +401,7 @@ PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
|
||||
"eek!! a property exists with a bad type code!!!" );
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
|
||||
static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
|
||||
{
|
||||
IDProperty *loop;
|
||||
PyObject *pyform;
|
||||
@@ -431,7 +431,7 @@ PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
|
||||
"item not in group" );
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
|
||||
static PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
|
||||
{
|
||||
BPy_IDGroup_Iter *iter = PyObject_New(BPy_IDGroup_Iter, &IDGroup_Iter_Type);
|
||||
|
||||
@@ -446,7 +446,7 @@ PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
|
||||
return (PyObject*) iter;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
|
||||
static PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
|
||||
{
|
||||
PyObject *seq = PyList_New(self->prop->len);
|
||||
IDProperty *loop;
|
||||
@@ -481,7 +481,7 @@ PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
|
||||
return seq;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
|
||||
static PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
|
||||
{
|
||||
PyObject *seq = PyList_New(self->prop->len);
|
||||
IDProperty *loop;
|
||||
@@ -517,7 +517,7 @@ PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
|
||||
return seq;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_HasKey(BPy_IDProperty *self, PyObject *value)
|
||||
static PyObject *BPy_IDGroup_HasKey(BPy_IDProperty *self, PyObject *value)
|
||||
{
|
||||
IDProperty *loop;
|
||||
char *name = PyString_AsString(value);
|
||||
@@ -533,7 +533,7 @@ PyObject *BPy_IDGroup_HasKey(BPy_IDProperty *self, PyObject *value)
|
||||
Py_RETURN_FALSE;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *vars)
|
||||
static PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *vars)
|
||||
{
|
||||
PyObject *pyob, *pkey, *pval;
|
||||
Py_ssize_t i=0;
|
||||
@@ -555,7 +555,7 @@ PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *vars)
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDGroup_ConvertToPy(BPy_IDProperty *self)
|
||||
static PyObject *BPy_IDGroup_ConvertToPy(BPy_IDProperty *self)
|
||||
{
|
||||
return BPy_IDGroup_MapDataToPy(self->prop);
|
||||
}
|
||||
@@ -665,18 +665,18 @@ PyObject *BPy_Wrap_IDProperty(ID *id, IDProperty *prop, IDProperty *parent)
|
||||
|
||||
/********Array Wrapper********/
|
||||
|
||||
PyObject *IDArray_repr(BPy_IDArray *self)
|
||||
static PyObject *IDArray_repr(BPy_IDArray *self)
|
||||
{
|
||||
return PyString_FromString("(ID Array)");
|
||||
}
|
||||
|
||||
|
||||
PyObject *BPy_IDArray_GetType(BPy_IDArray *self)
|
||||
static PyObject *BPy_IDArray_GetType(BPy_IDArray *self)
|
||||
{
|
||||
return PyInt_FromLong( (long)self->prop->subtype );
|
||||
}
|
||||
|
||||
PyObject *BPy_IDArray_GetLen(BPy_IDArray *self)
|
||||
static PyObject *BPy_IDArray_GetLen(BPy_IDArray *self)
|
||||
{
|
||||
return PyInt_FromLong( (long)self->prop->len );
|
||||
}
|
||||
@@ -693,12 +693,12 @@ static PyGetSetDef BPy_IDArray_getseters[] = {
|
||||
{NULL, NULL, NULL, NULL, NULL},
|
||||
};
|
||||
|
||||
int BPy_IDArray_Len(BPy_IDArray *self)
|
||||
static int BPy_IDArray_Len(BPy_IDArray *self)
|
||||
{
|
||||
return self->prop->len;
|
||||
}
|
||||
|
||||
PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
|
||||
static PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
|
||||
{
|
||||
if (index < 0 || index >= self->prop->len)
|
||||
return EXPP_ReturnPyObjError( PyExc_IndexError,
|
||||
@@ -719,7 +719,7 @@ PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
|
||||
"invalid/corrupt array type!");
|
||||
}
|
||||
|
||||
int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *val)
|
||||
static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *val)
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
@@ -865,18 +865,18 @@ PyTypeObject IDArray_Type = {
|
||||
|
||||
/*********** ID Property Group iterator ********/
|
||||
|
||||
PyObject *IDGroup_Iter_iterself(PyObject *self)
|
||||
static PyObject *IDGroup_Iter_iterself(PyObject *self)
|
||||
{
|
||||
Py_XINCREF(self);
|
||||
return self;
|
||||
}
|
||||
|
||||
PyObject *IDGroup_Iter_repr(BPy_IDGroup_Iter *self)
|
||||
static PyObject *IDGroup_Iter_repr(BPy_IDGroup_Iter *self)
|
||||
{
|
||||
return PyString_FromString("(ID Property Group)");
|
||||
}
|
||||
|
||||
PyObject *BPy_Group_Iter_Next(BPy_IDGroup_Iter *self)
|
||||
static PyObject *BPy_Group_Iter_Next(BPy_IDGroup_Iter *self)
|
||||
{
|
||||
IDProperty *cur=NULL;
|
||||
PyObject *tmpval;
|
||||
|
||||
@@ -1027,7 +1027,6 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
|
||||
{
|
||||
namefunc lookup_name;
|
||||
int size;
|
||||
PyObject *dict;
|
||||
int *vals = NULL;
|
||||
char name[32];
|
||||
PyObject *attr = Py_None;
|
||||
@@ -1131,7 +1130,6 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
|
||||
* with string as key and adrcode as value
|
||||
*/
|
||||
|
||||
dict = PyModule_GetDict( submodule );
|
||||
attr = PyConstant_New();
|
||||
|
||||
while( size-- ) {
|
||||
@@ -1148,7 +1146,7 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
|
||||
return attr;
|
||||
}
|
||||
|
||||
void generate_curveconsts( PyObject* module )
|
||||
static void generate_curveconsts( PyObject* module )
|
||||
{
|
||||
namefunc lookup_name = NULL;
|
||||
int size = 0;
|
||||
|
||||
@@ -699,7 +699,7 @@ static PyObject *Material_clearScriptLinks(BPy_Material *self, PyObject *args);
|
||||
|
||||
static PyObject *Material_insertIpoKey( BPy_Material * self, PyObject * args );
|
||||
static PyObject *Material_getColorband( BPy_Material * self, void * type);
|
||||
int Material_setColorband( BPy_Material * self, PyObject * value, void * type);
|
||||
static int Material_setColorband( BPy_Material * self, PyObject * value, void * type);
|
||||
static PyObject *Material_copy( BPy_Material * self );
|
||||
static PyObject *Material_freeNodes( BPy_Material * self );
|
||||
|
||||
@@ -2782,10 +2782,10 @@ int EXPP_Colorband_fromPyList( ColorBand **coba, PyObject * value )
|
||||
for (i=0; i<5; i++) {
|
||||
pyflt = PySequence_GetItem( colseq, i );
|
||||
if (!PyNumber_Check(pyflt)) {
|
||||
return ( EXPP_ReturnIntError( PyExc_ValueError,
|
||||
"Colorband colors must be sequences of 5 floats" ) );
|
||||
Py_DECREF ( pyflt );
|
||||
Py_DECREF ( colseq );
|
||||
return ( EXPP_ReturnIntError( PyExc_ValueError,
|
||||
"Colorband colors must be sequences of 5 floats" ) );
|
||||
}
|
||||
Py_DECREF ( pyflt );
|
||||
}
|
||||
@@ -3038,7 +3038,7 @@ static PyObject *Material_getColorband( BPy_Material * self, void * type)
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
int Material_setColorband( BPy_Material * self, PyObject * value, void * type)
|
||||
static int Material_setColorband( BPy_Material * self, PyObject * value, void * type)
|
||||
{
|
||||
switch( (long)type ) {
|
||||
case 0: /* these are backwards, but that how it works */
|
||||
|
||||
@@ -160,7 +160,7 @@ typedef struct FaceEdges {
|
||||
* compare edges by vertex indices
|
||||
*/
|
||||
|
||||
int medge_comp( const void *va, const void *vb )
|
||||
static int medge_comp( const void *va, const void *vb )
|
||||
{
|
||||
const unsigned int *a = ((SrchEdges *)va)->v;
|
||||
const unsigned int *b = ((SrchEdges *)vb)->v;
|
||||
@@ -180,7 +180,7 @@ int medge_comp( const void *va, const void *vb )
|
||||
* compare edges by insert list indices
|
||||
*/
|
||||
|
||||
int medge_index_comp( const void *va, const void *vb )
|
||||
static int medge_index_comp( const void *va, const void *vb )
|
||||
{
|
||||
const SrchEdges *a = (SrchEdges *)va;
|
||||
const SrchEdges *b = (SrchEdges *)vb;
|
||||
@@ -196,7 +196,7 @@ int medge_index_comp( const void *va, const void *vb )
|
||||
* compare faces by vertex indices
|
||||
*/
|
||||
|
||||
int mface_comp( const void *va, const void *vb )
|
||||
static int mface_comp( const void *va, const void *vb )
|
||||
{
|
||||
const SrchFaces *a = va;
|
||||
const SrchFaces *b = vb;
|
||||
@@ -231,7 +231,7 @@ int mface_comp( const void *va, const void *vb )
|
||||
* compare faces by insert list indices
|
||||
*/
|
||||
|
||||
int mface_index_comp( const void *va, const void *vb )
|
||||
static int mface_index_comp( const void *va, const void *vb )
|
||||
{
|
||||
const SrchFaces *a = va;
|
||||
const SrchFaces *b = vb;
|
||||
@@ -248,7 +248,7 @@ int mface_index_comp( const void *va, const void *vb )
|
||||
* compare edges by vertex indices
|
||||
*/
|
||||
|
||||
int faceedge_comp( const void *va, const void *vb )
|
||||
static int faceedge_comp( const void *va, const void *vb )
|
||||
{
|
||||
const unsigned int *a = ((FaceEdges *)va)->v;
|
||||
const unsigned int *b = ((FaceEdges *)vb)->v;
|
||||
|
||||
@@ -88,9 +88,6 @@ extern void countall(void);
|
||||
#define NMESH_SUBDIV_MIN 0
|
||||
#define NMESH_SUBDIV_MAX 6
|
||||
|
||||
/* Globals */
|
||||
static PyObject *g_nmeshmodule = NULL;
|
||||
|
||||
static int unlink_existingMeshData( Mesh * mesh );
|
||||
static int convert_NMeshToMesh( Mesh *mesh, BPy_NMesh *nmesh );
|
||||
static void check_dverts(Mesh *me, int old_totverts);
|
||||
@@ -3321,7 +3318,6 @@ PyObject *NMesh_Init( void )
|
||||
if( EdgeFlags )
|
||||
PyModule_AddObject( submodule, "EdgeFlags", EdgeFlags );
|
||||
|
||||
g_nmeshmodule = submodule;
|
||||
return submodule;
|
||||
}
|
||||
|
||||
|
||||
@@ -1698,11 +1698,9 @@ static PyObject *Object_getBoundBox( BPy_Object * self, PyObject *args )
|
||||
"This object isn't linked to any object data (mesh, curve, etc) yet" );
|
||||
|
||||
if( !self->object->bb ) { /* if no ob bbox, we look in obdata */
|
||||
Mesh *me;
|
||||
Curve *curve;
|
||||
switch ( self->object->type ) {
|
||||
case OB_MESH:
|
||||
me = self->object->data;
|
||||
vec = (float*) mesh_get_bb(self->object)->vec;
|
||||
break;
|
||||
case OB_CURVE:
|
||||
|
||||
@@ -591,7 +591,7 @@ PyObject *Scene_CreatePyObject( Scene * scene )
|
||||
}
|
||||
|
||||
/*-----------------------FromPyObject-----------------------------------*/
|
||||
Scene *Scene_FromPyObject( PyObject * pyobj )
|
||||
static Scene *Scene_FromPyObject( PyObject * pyobj )
|
||||
{
|
||||
return ( ( BPy_Scene * ) pyobj )->scene;
|
||||
}
|
||||
@@ -1221,7 +1221,7 @@ static PyObject *SceneObSeq_getObjects( BPy_SceneObSeq *self, void *mode)
|
||||
return SceneObSeq_CreatePyObject(self->bpyscene, NULL, (int)((long)mode));
|
||||
}
|
||||
|
||||
int SceneObSeq_setObjects( BPy_SceneObSeq *self, PyObject *value, void *_mode_)
|
||||
static int SceneObSeq_setObjects( BPy_SceneObSeq *self, PyObject *value, void *_mode_)
|
||||
{
|
||||
/*
|
||||
ONLY SUPPORTS scn.objects.selected and scn.objects.context
|
||||
@@ -1642,7 +1642,7 @@ static PyObject *SceneObSeq_unlink( BPy_SceneObSeq * self, PyObject *args )
|
||||
Py_RETURN_FALSE;
|
||||
}
|
||||
|
||||
PyObject *SceneObSeq_getActive(BPy_SceneObSeq *self)
|
||||
static PyObject *SceneObSeq_getActive(BPy_SceneObSeq *self)
|
||||
{
|
||||
Base *base;
|
||||
SCENE_DEL_CHECK_PY(self->bpyscene);
|
||||
@@ -1687,7 +1687,7 @@ static int SceneObSeq_setActive(BPy_SceneObSeq *self, PyObject *value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *SceneObSeq_getCamera(BPy_SceneObSeq *self)
|
||||
static PyObject *SceneObSeq_getCamera(BPy_SceneObSeq *self)
|
||||
{
|
||||
SCENE_DEL_CHECK_PY(self->bpyscene);
|
||||
|
||||
|
||||
@@ -149,16 +149,12 @@ struct PyMethodDef M_sys_methods[] = {
|
||||
|
||||
/* Module Functions */
|
||||
|
||||
static PyObject *g_sysmodule = NULL; /* pointer to Blender.sys module */
|
||||
|
||||
PyObject *sys_Init( void )
|
||||
{
|
||||
PyObject *submodule, *dict;
|
||||
|
||||
submodule = Py_InitModule3( "Blender.sys", M_sys_methods, M_sys_doc );
|
||||
|
||||
g_sysmodule = submodule;
|
||||
|
||||
dict = PyModule_GetDict( submodule );
|
||||
|
||||
EXPP_dict_set_item_str( dict, "dirsep", PyString_FromString(DIRSEP_STR) );
|
||||
|
||||
@@ -1209,7 +1209,7 @@ static PyObject *M_Window_QHandle( PyObject * self, PyObject * args )
|
||||
|
||||
if( sa ) {
|
||||
BWinEvent evt;
|
||||
short do_redraw = 0, do_change = 0;
|
||||
short do_redraw = 0;
|
||||
|
||||
if( sa != curarea || sa->win != mywinget( ) ) {
|
||||
oldsa = curarea;
|
||||
@@ -1221,7 +1221,6 @@ static PyObject *M_Window_QHandle( PyObject * self, PyObject * args )
|
||||
do_redraw = 1;
|
||||
} else if( evt.event == CHANGED ) {
|
||||
sa->win_swap = 0;
|
||||
do_change = 1;
|
||||
do_redraw = 1;
|
||||
} else {
|
||||
scrarea_do_winhandle( sa, &evt );
|
||||
|
||||
@@ -243,7 +243,7 @@ static PyObject *LibBlockSeq_nextIter( BPy_LibBlockSeq * self )
|
||||
return object;
|
||||
}
|
||||
|
||||
PyObject *LibBlockSeq_getActive(BPy_LibBlockSeq *self)
|
||||
static PyObject *LibBlockSeq_getActive(BPy_LibBlockSeq *self)
|
||||
{
|
||||
switch (self->type) {
|
||||
case ID_SCE:
|
||||
@@ -382,7 +382,7 @@ static int LibBlockSeq_setTag(BPy_LibBlockSeq *self, PyObject *value)
|
||||
|
||||
|
||||
/* New Data, internal functions */
|
||||
Mesh *add_mesh__internal(char *name)
|
||||
static Mesh *add_mesh__internal(char *name)
|
||||
{
|
||||
Mesh *mesh = add_mesh(name); /* doesn't return NULL now, but might someday */
|
||||
|
||||
@@ -453,8 +453,7 @@ PyObject *LibBlockSeq_new(BPy_LibBlockSeq *self, PyObject * args, PyObject *kwd)
|
||||
return EXPP_ReturnPyObjError( PyExc_IOError,
|
||||
"couldn't create pyobject on load, unknown error" );
|
||||
if (name) {
|
||||
ID *id = ((BPy_GenericLib *)ret)->id;
|
||||
rename_id( id, name );
|
||||
rename_id( ((BPy_GenericLib *)ret)->id, name );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -599,7 +598,7 @@ PyObject *LibBlockSeq_new(BPy_LibBlockSeq *self, PyObject * args, PyObject *kwd)
|
||||
}
|
||||
|
||||
|
||||
PyObject *LibBlockSeq_unlink(BPy_LibBlockSeq *self, PyObject * value)
|
||||
static PyObject *LibBlockSeq_unlink(BPy_LibBlockSeq *self, PyObject * value)
|
||||
{
|
||||
switch (self->type) {
|
||||
case ID_SCE:
|
||||
@@ -790,15 +789,12 @@ PyTypeObject LibBlockSeq_Type = {
|
||||
PyObject * Data_Init( void )
|
||||
{
|
||||
PyObject *module;
|
||||
PyObject *dict;
|
||||
|
||||
|
||||
PyType_Ready( &LibBlockSeq_Type );
|
||||
PyType_Ready( &Config_Type );
|
||||
|
||||
/*submodule = Py_InitModule3( "Blender.Main", NULL, M_Main_doc );*/
|
||||
module = Py_InitModule3( "bpy.data", NULL, "The bpy.data submodule" );
|
||||
dict = PyModule_GetDict( module );
|
||||
|
||||
/* Python Data Types */
|
||||
PyModule_AddObject( module, "scenes", LibBlockSeq_CreatePyObject(NULL, ID_SCE) );
|
||||
|
||||
@@ -37,19 +37,19 @@ PyTypeObject constant_Type;
|
||||
//------------------METHOD IMPLEMENTATIONS-----------------------------
|
||||
//------------------------constant.items()
|
||||
//Returns a list of key:value pairs like dict.items()
|
||||
PyObject* constant_items(BPy_constant *self)
|
||||
static PyObject* constant_items(BPy_constant *self)
|
||||
{
|
||||
return PyDict_Items(self->dict);
|
||||
}
|
||||
//------------------------constant.keys()
|
||||
//Returns a list of keys like dict.keys()
|
||||
PyObject* constant_keys(BPy_constant *self)
|
||||
static PyObject* constant_keys(BPy_constant *self)
|
||||
{
|
||||
return PyDict_Keys(self->dict);
|
||||
}
|
||||
//------------------------constant.values()
|
||||
//Returns a list of values like dict.values()
|
||||
PyObject* constant_values(BPy_constant *self)
|
||||
static PyObject* constant_values(BPy_constant *self)
|
||||
{
|
||||
return PyDict_Values(self->dict);
|
||||
}
|
||||
|
||||
@@ -774,7 +774,7 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
|
||||
return EXPP_ReturnPyObjError(PyExc_TypeError,
|
||||
"Matrix multiplication: arguments not acceptable for this operation\n");
|
||||
}
|
||||
PyObject* Matrix_inv(MatrixObject *self)
|
||||
static PyObject* Matrix_inv(MatrixObject *self)
|
||||
{
|
||||
return Matrix_Invert(self);
|
||||
}
|
||||
|
||||
@@ -397,13 +397,13 @@ static PyObject *M_Render_getInt( BPy_RenderData *self, int var )
|
||||
/* Render Module Function Definitions */
|
||||
/***************************************************************************/
|
||||
|
||||
PyObject *M_Render_CloseRenderWindow( PyObject * self )
|
||||
static PyObject *M_Render_CloseRenderWindow( PyObject * self )
|
||||
{
|
||||
BIF_close_render_display( );
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *M_Render_SetRenderWinPos( PyObject * self, PyObject * args )
|
||||
static PyObject *M_Render_SetRenderWinPos( PyObject * self, PyObject * args )
|
||||
{
|
||||
PyObject *list = NULL;
|
||||
char *loc = NULL;
|
||||
@@ -446,7 +446,7 @@ PyObject *M_Render_SetRenderWinPos( PyObject * self, PyObject * args )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *M_Render_EnableDispView( PyObject * self )
|
||||
static PyObject *M_Render_EnableDispView( PyObject * self )
|
||||
{
|
||||
G.displaymode = R_DISPLAYIMAGE;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -454,7 +454,7 @@ PyObject *M_Render_EnableDispView( PyObject * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *M_Render_EnableDispWin( PyObject * self )
|
||||
static PyObject *M_Render_EnableDispWin( PyObject * self )
|
||||
{
|
||||
G.displaymode = R_DISPLAYWIN;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -467,7 +467,7 @@ PyObject *M_Render_EnableDispWin( PyObject * self )
|
||||
/* BPy_RenderData Function Definitions */
|
||||
/***************************************************************************/
|
||||
|
||||
PyObject *RenderData_Render( BPy_RenderData * self )
|
||||
static PyObject *RenderData_Render( BPy_RenderData * self )
|
||||
{
|
||||
Scene *oldsce;
|
||||
/* unlock to prevent a deadlock when there are pynodes: */
|
||||
@@ -511,7 +511,7 @@ PyObject *RenderData_Render( BPy_RenderData * self )
|
||||
/* BPy_Bake Function Definitions */
|
||||
/***************************************************************************/
|
||||
|
||||
PyObject *RenderData_Bake( BPy_RenderData * self )
|
||||
static PyObject *RenderData_Bake( BPy_RenderData * self )
|
||||
{
|
||||
char *error_msg = NULL;
|
||||
Scene *oldsce;
|
||||
@@ -532,7 +532,7 @@ PyObject *RenderData_Bake( BPy_RenderData * self )
|
||||
/*
|
||||
* This will save the rendered image to an output file path already defined.
|
||||
*/
|
||||
PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
|
||||
static PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
|
||||
{
|
||||
char dir[FILE_MAXDIR * 2], str[FILE_MAXFILE * 2];
|
||||
char *name_str, filepath[FILE_MAXDIR+FILE_MAXFILE];
|
||||
@@ -571,7 +571,7 @@ PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_RenderAnim( BPy_RenderData * self )
|
||||
static PyObject *RenderData_RenderAnim( BPy_RenderData * self )
|
||||
{
|
||||
Scene *oldsce;
|
||||
/* unlock to prevent a deadlock when there are pynodes: */
|
||||
@@ -609,7 +609,7 @@ PyObject *RenderData_RenderAnim( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_Play( BPy_RenderData * self )
|
||||
static PyObject *RenderData_Play( BPy_RenderData * self )
|
||||
{
|
||||
char file[FILE_MAXDIR + FILE_MAXFILE];
|
||||
extern char bprogname[];
|
||||
@@ -668,46 +668,46 @@ PyObject *RenderData_Play( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableBackbuf( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnableBackbuf( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleShort( args, 1,
|
||||
&self->renderContext->bufflag );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableExtensions( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnableExtensions( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_EXTENSION,
|
||||
&self->renderContext->scemode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableSequencer( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnableSequencer( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_DOSEQ,
|
||||
&self->renderContext->scemode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableRenderDaemon( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableRenderDaemon( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_BG_RENDER,
|
||||
&self->renderContext->scemode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableToonShading( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableToonShading( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_EDGE,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EdgeIntensity( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EdgeIntensity( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args,
|
||||
&self->renderContext->edgeint, 0,
|
||||
255 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_SetEdgeColor( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_SetEdgeColor( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
float red, green, blue;
|
||||
|
||||
@@ -732,7 +732,7 @@ PyObject *RenderData_SetEdgeColor( BPy_RenderData * self, PyObject * args )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_GetEdgeColor( BPy_RenderData * self )
|
||||
static PyObject *RenderData_GetEdgeColor( BPy_RenderData * self )
|
||||
{
|
||||
char rgb[24];
|
||||
|
||||
@@ -741,7 +741,7 @@ PyObject *RenderData_GetEdgeColor( BPy_RenderData * self )
|
||||
return PyString_FromString( rgb );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableOversampling( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableOversampling( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_OSA,
|
||||
@@ -768,34 +768,34 @@ static int RenderData_setOSALevel( BPy_RenderData * self,
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableMotionBlur( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnableMotionBlur( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_MBLUR,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_MotionBlurLevel( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_MotionBlurLevel( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
&self->renderContext->blurfac,
|
||||
0.01f, 5.0f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_PartsX( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_PartsX( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args,
|
||||
&self->renderContext->xparts, 1,
|
||||
512 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_PartsY( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_PartsY( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args,
|
||||
&self->renderContext->yparts, 1,
|
||||
64 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableSky( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableSky( BPy_RenderData * self )
|
||||
{
|
||||
self->renderContext->alphamode = R_ADDSKY;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -803,7 +803,7 @@ PyObject *RenderData_EnableSky( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnablePremultiply( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnablePremultiply( BPy_RenderData * self )
|
||||
{
|
||||
self->renderContext->alphamode = R_ALPHAPREMUL;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -811,7 +811,7 @@ PyObject *RenderData_EnablePremultiply( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableKey( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableKey( BPy_RenderData * self )
|
||||
{
|
||||
self->renderContext->alphamode = R_ALPHAKEY;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -819,59 +819,59 @@ PyObject *RenderData_EnableKey( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableShadow( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnableShadow( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_SHADOW,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableEnvironmentMap( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableEnvironmentMap( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_ENVMAP,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnablePanorama( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnablePanorama( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_PANORAMA,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableRayTracing( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EnableRayTracing( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_RAYTRACE,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableRadiosityRender( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableRadiosityRender( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_RADIO,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
PyObject *RenderData_EnableFieldRendering( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableFieldRendering( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_FIELDS,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableOddFieldFirst( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableOddFieldFirst( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_ODDFIELD,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableFieldTimeDisable( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableFieldTimeDisable( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_FIELDSTILL,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableGaussFilter( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableGaussFilter( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_GAUSS,
|
||||
@@ -882,7 +882,7 @@ PyObject *RenderData_EnableGaussFilter( BPy_RenderData * self,
|
||||
/* choices are listed in DNA_scene_types.h (search filtertype) */
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableBorderRender( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableBorderRender( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_BORDER,
|
||||
@@ -924,57 +924,57 @@ static PyObject *RenderData_getBorder( BPy_RenderData * self )
|
||||
self->renderContext->border.ymax );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableGammaCorrection( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableGammaCorrection( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_GAMMA,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
|
||||
PyObject *RenderData_GaussFilterSize( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_GaussFilterSize( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
&self->renderContext->gauss,
|
||||
0.5f, 1.5f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_AspectRatioX( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_AspectRatioX( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args, &self->renderContext->xasp,
|
||||
1.0f, 200.0f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_AspectRatioY( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_AspectRatioY( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args, &self->renderContext->yasp,
|
||||
1.0f, 200.0f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_StartFrame( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_StartFrame( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeInt( args, &self->renderContext->sfra,
|
||||
1, MAXFRAME );
|
||||
}
|
||||
|
||||
PyObject *RenderData_CurrentFrame( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_CurrentFrame( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeInt( args, &self->renderContext->cfra,
|
||||
1, MAXFRAME );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EndFrame( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_EndFrame( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeInt( args, &self->renderContext->efra,
|
||||
1, MAXFRAME );
|
||||
}
|
||||
|
||||
PyObject *RenderData_ImageSizeX( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_ImageSizeX( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args, &self->renderContext->xsch,
|
||||
4, 10000 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_ImageSizeY( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_ImageSizeY( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args, &self->renderContext->ysch,
|
||||
4, 10000 );
|
||||
@@ -1001,7 +1001,7 @@ static int RenderData_setRenderer( BPy_RenderData * self, PyObject * value )
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableCropping( void )
|
||||
static PyObject *RenderData_EnableCropping( void )
|
||||
{
|
||||
/* return M_Render_BitToggleInt( args, R_MOVIECROP,
|
||||
&self->renderContext->mode );
|
||||
@@ -1067,21 +1067,21 @@ static int RenderData_setImageType( BPy_RenderData *self, PyObject *value )
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *RenderData_Quality( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_Quality( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args,
|
||||
&self->renderContext->quality,
|
||||
10, 100 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_FramesPerSec( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_FramesPerSec( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args,
|
||||
&self->renderContext->frs_sec, 1,
|
||||
120 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableGrayscale( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableGrayscale( BPy_RenderData * self )
|
||||
{
|
||||
self->renderContext->planes = R_PLANESBW;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -1089,7 +1089,7 @@ PyObject *RenderData_EnableGrayscale( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableRGBColor( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableRGBColor( BPy_RenderData * self )
|
||||
{
|
||||
self->renderContext->planes = R_PLANES24;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -1097,7 +1097,7 @@ PyObject *RenderData_EnableRGBColor( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableRGBAColor( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableRGBAColor( BPy_RenderData * self )
|
||||
{
|
||||
self->renderContext->planes = R_PLANES32;
|
||||
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
|
||||
@@ -1105,7 +1105,7 @@ PyObject *RenderData_EnableRGBAColor( BPy_RenderData * self )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_SizePreset( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_SizePreset( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
int type;
|
||||
|
||||
@@ -1489,7 +1489,7 @@ static PyObject *RenderData_getYafrayGITunePhotons( BPy_RenderData * self )
|
||||
|
||||
/* (die) end */
|
||||
|
||||
PyObject *RenderData_YafrayGIPower( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayGIPower( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod > 0 ) {
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
@@ -1501,7 +1501,7 @@ PyObject *RenderData_YafrayGIPower( BPy_RenderData * self, PyObject * args )
|
||||
"YafrayGIMethod must be set to 'SKYDOME' or 'FULL'" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIIndirPower( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayGIIndirPower( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
&self->renderContext->
|
||||
@@ -1509,7 +1509,7 @@ PyObject *RenderData_YafrayGIIndirPower( BPy_RenderData * self, PyObject * args
|
||||
100.00f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIDepth( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayGIDepth( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2 ) {
|
||||
return M_Render_GetSetAttributeInt( args,
|
||||
@@ -1520,7 +1520,7 @@ PyObject *RenderData_YafrayGIDepth( BPy_RenderData * self, PyObject * args )
|
||||
"YafrayGIMethod must be set to 'FULL'" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGICDepth( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayGICDepth( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2 ) {
|
||||
return M_Render_GetSetAttributeInt( args,
|
||||
@@ -1531,7 +1531,7 @@ PyObject *RenderData_YafrayGICDepth( BPy_RenderData * self, PyObject * args )
|
||||
"YafrayGIMethod must be set to 'FULL'" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableYafrayGICache( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableYafrayGICache( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2 ) {
|
||||
@@ -1543,7 +1543,7 @@ PyObject *RenderData_EnableYafrayGICache( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL'" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableYafrayGIPhotons( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableYafrayGIPhotons( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2 ) {
|
||||
@@ -1555,7 +1555,7 @@ PyObject *RenderData_EnableYafrayGIPhotons( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL'" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIPhotonCount( BPy_RenderData * self,
|
||||
static PyObject *RenderData_YafrayGIPhotonCount( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1569,7 +1569,7 @@ PyObject *RenderData_YafrayGIPhotonCount( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIPhotonRadius( BPy_RenderData * self,
|
||||
static PyObject *RenderData_YafrayGIPhotonRadius( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1583,7 +1583,7 @@ PyObject *RenderData_YafrayGIPhotonRadius( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIPhotonMixCount( BPy_RenderData * self,
|
||||
static PyObject *RenderData_YafrayGIPhotonMixCount( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1596,7 +1596,7 @@ PyObject *RenderData_YafrayGIPhotonMixCount( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableYafrayGITunePhotons( BPy_RenderData * self,
|
||||
static PyObject *RenderData_EnableYafrayGITunePhotons( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1609,7 +1609,7 @@ PyObject *RenderData_EnableYafrayGITunePhotons( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIShadowQuality( BPy_RenderData * self,
|
||||
static PyObject *RenderData_YafrayGIShadowQuality( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1623,7 +1623,7 @@ PyObject *RenderData_YafrayGIShadowQuality( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GICache must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIPixelsPerSample( BPy_RenderData * self,
|
||||
static PyObject *RenderData_YafrayGIPixelsPerSample( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1636,7 +1636,7 @@ PyObject *RenderData_YafrayGIPixelsPerSample( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GICache must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGIRefinement( BPy_RenderData * self,
|
||||
static PyObject *RenderData_YafrayGIRefinement( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
if( self->renderContext->GImethod == 2
|
||||
@@ -1650,53 +1650,53 @@ PyObject *RenderData_YafrayGIRefinement( BPy_RenderData * self,
|
||||
"YafrayGIMethod must be set to 'FULL' and GICache must be enabled" ) );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayRayBias( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayRayBias( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
&self->renderContext->YF_raybias,
|
||||
0.0f, 10.0f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayRayDepth( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayRayDepth( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeInt( args,
|
||||
&self->renderContext->YF_raydepth,
|
||||
1, 80 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayGamma( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayGamma( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
&self->renderContext->YF_gamma,
|
||||
0.001f, 5.0f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_YafrayExposure( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_YafrayExposure( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeFloat( args,
|
||||
&self->renderContext->
|
||||
YF_exposure, 0.0f, 10.0f );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableGameFrameStretch( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableGameFrameStretch( BPy_RenderData * self )
|
||||
{
|
||||
self->scene->framing.type = SCE_GAMEFRAMING_SCALE;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableGameFrameExpose( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableGameFrameExpose( BPy_RenderData * self )
|
||||
{
|
||||
self->scene->framing.type = SCE_GAMEFRAMING_EXTEND;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableGameFrameBars( BPy_RenderData * self )
|
||||
static PyObject *RenderData_EnableGameFrameBars( BPy_RenderData * self )
|
||||
{
|
||||
self->scene->framing.type = SCE_GAMEFRAMING_BARS;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_SetGameFrameColor( BPy_RenderData * self,
|
||||
static PyObject *RenderData_SetGameFrameColor( BPy_RenderData * self,
|
||||
PyObject * args )
|
||||
{
|
||||
float red = 0.0f;
|
||||
@@ -1724,7 +1724,7 @@ PyObject *RenderData_SetGameFrameColor( BPy_RenderData * self,
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_GetGameFrameColor( BPy_RenderData * self )
|
||||
static PyObject *RenderData_GetGameFrameColor( BPy_RenderData * self )
|
||||
{
|
||||
char rgb[24];
|
||||
|
||||
@@ -1734,33 +1734,33 @@ PyObject *RenderData_GetGameFrameColor( BPy_RenderData * self )
|
||||
}
|
||||
|
||||
#ifdef __sgi
|
||||
PyObject *RenderData_SGIMaxsize( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_SGIMaxsize( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
return M_Render_GetSetAttributeShort( args,
|
||||
&self->renderContext->maximsize,
|
||||
0, 500 );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableSGICosmo( BPy_RenderData *self, PyObject *args )
|
||||
static PyObject *RenderData_EnableSGICosmo( BPy_RenderData *self, PyObject *args )
|
||||
{
|
||||
return M_Render_BitToggleInt( args, R_COSMO,
|
||||
&self->renderContext->mode );
|
||||
}
|
||||
#else
|
||||
PyObject *RenderData_SGIMaxsize( void )
|
||||
static PyObject *RenderData_SGIMaxsize( void )
|
||||
{
|
||||
return EXPP_ReturnPyObjError( PyExc_StandardError,
|
||||
"SGI is not defined on this machine" );
|
||||
}
|
||||
|
||||
PyObject *RenderData_EnableSGICosmo( void )
|
||||
static PyObject *RenderData_EnableSGICosmo( void )
|
||||
{
|
||||
return EXPP_ReturnPyObjError( PyExc_StandardError,
|
||||
"SGI is not defined on this machine" );
|
||||
}
|
||||
#endif
|
||||
|
||||
PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
PyObject *tmp = M_Render_GetSetAttributeInt(args,
|
||||
&self->renderContext->framapto, 1, 900);
|
||||
@@ -1769,7 +1769,7 @@ PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
|
||||
return tmp;
|
||||
}
|
||||
|
||||
PyObject *RenderData_NewMapValue( BPy_RenderData * self, PyObject * args )
|
||||
static PyObject *RenderData_NewMapValue( BPy_RenderData * self, PyObject * args )
|
||||
{
|
||||
PyObject *tmp = M_Render_GetSetAttributeInt(args,
|
||||
&self->renderContext->images, 1, 900);
|
||||
@@ -1801,7 +1801,7 @@ static PyObject *RenderData_getTimeCode( BPy_RenderData * self) {
|
||||
/***************************************************************************/
|
||||
/* Render layer functions */
|
||||
/***************************************************************************/
|
||||
PyObject *RenderData_getRenderLayers(BPy_RenderData * self)
|
||||
static PyObject *RenderData_getRenderLayers(BPy_RenderData * self)
|
||||
{
|
||||
PyObject *list, *layer;
|
||||
SceneRenderLayer *srl;
|
||||
@@ -1816,7 +1816,7 @@ PyObject *RenderData_getRenderLayers(BPy_RenderData * self)
|
||||
return list;
|
||||
}
|
||||
|
||||
PyObject *RenderData_removeRenderLayer(BPy_RenderData * self, BPy_RenderLayer *value)
|
||||
static PyObject *RenderData_removeRenderLayer(BPy_RenderData * self, BPy_RenderLayer *value)
|
||||
{
|
||||
int index;
|
||||
if (!BPy_RenderLayer_Check(value))
|
||||
@@ -1853,7 +1853,7 @@ PyObject *RenderData_removeRenderLayer(BPy_RenderData * self, BPy_RenderLayer *v
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *RenderData_addRenderLayer(BPy_RenderData * self ) {
|
||||
static PyObject *RenderData_addRenderLayer(BPy_RenderData * self ) {
|
||||
scene_add_render_layer(self->scene);
|
||||
return RenderLayer_CreatePyObject( self->scene, self->renderContext->layers.last );
|
||||
|
||||
|
||||
@@ -305,16 +305,16 @@ static PyObject *NewSeq_internal(ListBase *seqbase, PyObject * args, Scene *sce)
|
||||
|
||||
} else if (BPy_Scene_Check(py_data)) {
|
||||
/* scene */
|
||||
Scene *sce = ((BPy_Scene *)py_data)->scene;
|
||||
Scene *sceseq = ((BPy_Scene *)py_data)->scene;
|
||||
|
||||
seq->type= SEQ_SCENE;
|
||||
seq->scene= sce;
|
||||
seq->scene= sceseq;
|
||||
|
||||
/*seq->sfra= sce->r.sfra;*/
|
||||
seq->len= sce->r.efra - sce->r.sfra + 1;
|
||||
seq->len= sceseq->r.efra - sceseq->r.sfra + 1;
|
||||
|
||||
seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
|
||||
strncpy(seq->name + 2, sce->id.name + 2,
|
||||
strncpy(seq->name + 2, sceseq->id.name + 2,
|
||||
sizeof(seq->name) - 2);
|
||||
strip->len= seq->len;
|
||||
strip->us= 1;
|
||||
|
||||
Reference in New Issue
Block a user