diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-07-26 06:44:59 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-07-26 06:44:59 +0400 |
commit | 951a4934b08ab2621a627b1adb74cdf518c53a19 (patch) | |
tree | 38358088b18305fe471d6833ba52cd27e050b686 /source/blender/python/api2_2x/Effect.c | |
parent | ee8e41c65a5bc2f89ad3402005b3767d33e52672 (diff) |
- added wave modifier & removed old wave effect
- added decimate modifier & removed old decimate interface
(currently lacks warning about destroying data, and there needs
to be a way for modifiers to return errors back to the interface)
- allow applyModifier to return NULL to indicate error
- unfortunately new decimate modifier means it does not know exact
number of faces in mesh (other modifiers may come before) and so
instead interface uses a percentage. if people need exact face
count slider then I will have to think of some hack to fit this
in. note that it does display the output face count so its possible
to tweak the pct to get what you want regardless.
- removed python Wave object
If you are bored now how much easier it is to implement something
like decimate as a modifier. Very few changes to interface, very
few entry points.
Diffstat (limited to 'source/blender/python/api2_2x/Effect.c')
-rw-r--r-- | source/blender/python/api2_2x/Effect.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/source/blender/python/api2_2x/Effect.c b/source/blender/python/api2_2x/Effect.c index c49dd53257c..6ea892e506c 100644 --- a/source/blender/python/api2_2x/Effect.c +++ b/source/blender/python/api2_2x/Effect.c @@ -35,7 +35,6 @@ #include "BKE_global.h" #include "BKE_main.h" #include "Particle.h" -#include "Wave.h" #include "gen_utils.h" /*****************************************************************************/ @@ -100,9 +99,7 @@ PyObject *M_Effect_New( PyObject * self, PyObject * args ) return Py_None; /* if( !PyArg_ParseTuple( args, "s", &btype ) ) return ( EXPP_ReturnPyObjError( PyExc_TypeError, - "expected type argument(wave,build or particle)" ) ); - if( !strcmp( btype, "wave" ) ) - type = EFF_WAVE; + "expected type argument(particle)" ) ); if( !strcmp( btype, "particle" ) ) type = EFF_PARTICLE; if( type == -1 ) @@ -232,7 +229,6 @@ PyObject *M_Effect_Get( PyObject * self, PyObject * args ) /*****************************************************************************/ -PyObject *Wave_Init( void ); PyObject *Particle_Init( void ); PyObject *Effect_Init( void ) @@ -243,7 +239,6 @@ PyObject *Effect_Init( void ) submodule = Py_InitModule3( "Blender.Effect", M_Effect_methods, 0 ); dict = PyModule_GetDict( submodule ); - PyDict_SetItemString( dict, "Wave", Wave_Init( ) ); PyDict_SetItemString( dict, "Particle", Particle_Init( ) ); return ( submodule ); } @@ -319,8 +314,6 @@ void EffectDeAlloc( BPy_Effect * self ) PyObject *EffectGetAttr( BPy_Effect * self, char *name ) { switch ( self->effect->type ) { - case EFF_WAVE: - return WaveGetAttr( ( BPy_Wave * ) self, name ); case EFF_PARTICLE: return ParticleGetAttr( ( BPy_Particle * ) self, name ); } @@ -338,8 +331,6 @@ PyObject *EffectGetAttr( BPy_Effect * self, char *name ) int EffectSetAttr( BPy_Effect * self, char *name, PyObject * value ) { switch ( self->effect->type ) { - case EFF_WAVE: - return WaveSetAttr( ( BPy_Wave * ) self, name, value ); case EFF_PARTICLE: return ParticleSetAttr( ( BPy_Particle * ) self, name, value ); } @@ -355,7 +346,6 @@ int EffectSetAttr( BPy_Effect * self, char *name, PyObject * value ) int EffectPrint(BPy_Effect *self, FILE *fp, int flags) { if (self->effect->type == EFF_PARTICLE)puts("Effect Particle"); -if (self->effect->type == EFF_WAVE)puts("Effect Wave"); return 0; } @@ -371,8 +361,6 @@ PyObject *EffectRepr( BPy_Effect * self ) char *str = ""; if( self->effect->type == EFF_PARTICLE ) str = "Effect Particle"; - if( self->effect->type == EFF_WAVE ) - str = "Effect Wave"; return PyString_FromString( str ); } |