- 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.
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user