Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Gilbert <ascotan@gmail.com>2005-07-18 07:50:37 +0400
committerJoseph Gilbert <ascotan@gmail.com>2005-07-18 07:50:37 +0400
commite60291d39c0f77282a2d17f79e9264107bbc495e (patch)
tree274f6c0fc564553bb1484abfc5ad33e758d00903 /source/blender/python/api2_2x/Effect.c
parent9919df089dc34a62ac14f5c151d7815ee852bd81 (diff)
Header file clean up and warning fixes
- Mostly this cleans up the #includes and header files in the python project. - Warning fixes are mostly casting issues and misc fixes. General warning clean up. - #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles - fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
Diffstat (limited to 'source/blender/python/api2_2x/Effect.c')
-rw-r--r--source/blender/python/api2_2x/Effect.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/Effect.c b/source/blender/python/api2_2x/Effect.c
index 2e3e65e2c77..ee81281ec39 100644
--- a/source/blender/python/api2_2x/Effect.c
+++ b/source/blender/python/api2_2x/Effect.c
@@ -29,10 +29,15 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
-#include "Effect.h"
+#include "Effect.h" /*This must come first */
+
+#include "DNA_object_types.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
#include "Build.h"
#include "Particle.h"
#include "Wave.h"
+#include "gen_utils.h"
/*****************************************************************************/
/* Python BPy_Effect methods table: */
@@ -88,13 +93,13 @@ struct PyMethodDef M_Effect_methods[] = {
/*****************************************************************************/
PyObject *M_Effect_New( PyObject * self, PyObject * args )
{
- BPy_Effect *pyeffect;
+/* BPy_Effect *pyeffect;
Effect *bleffect = 0;
int type = -1;
- char *btype = NULL;
+ char *btype = NULL;*/
Py_INCREF( Py_None );
return Py_None;
- if( !PyArg_ParseTuple( args, "s", &btype ) )
+/* if( !PyArg_ParseTuple( args, "s", &btype ) )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected type argument(wave,build or particle)" ) );
if( !strcmp( btype, "wave" ) )
@@ -122,7 +127,7 @@ PyObject *M_Effect_New( PyObject * self, PyObject * args )
pyeffect->effect = bleffect;
- return ( PyObject * ) pyeffect;
+ return ( PyObject * ) pyeffect;*/
}
/*****************************************************************************/
@@ -268,7 +273,7 @@ PyObject *Effect_setType( BPy_Effect * self, PyObject * args )
if( !PyArg_ParseTuple( args, "i", &value ) )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected an int as argument" ) );
- self->effect->type = value;
+ self->effect->type = (short)value;
Py_INCREF( Py_None );
return Py_None;
}
@@ -289,7 +294,7 @@ PyObject *Effect_setFlag( BPy_Effect * self, PyObject * args )
if( !PyArg_ParseTuple( args, "i", &value ) )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected an int as argument" ) );
- self->effect->flag = value;
+ self->effect->flag = (short)value;
Py_INCREF( Py_None );
return Py_None;
}