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:
authorDaniel Dunbar <daniel@zuster.org>2005-07-26 06:44:59 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-07-26 06:44:59 +0400
commit951a4934b08ab2621a627b1adb74cdf518c53a19 (patch)
tree38358088b18305fe471d6833ba52cd27e050b686 /source/blender/python
parentee8e41c65a5bc2f89ad3402005b3767d33e52672 (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')
-rw-r--r--source/blender/python/SConscript1
-rw-r--r--source/blender/python/api2_2x/Effect.c14
-rw-r--r--source/blender/python/api2_2x/Types.c1
-rw-r--r--source/blender/python/api2_2x/Types.h2
-rw-r--r--source/blender/python/api2_2x/Wave.c605
-rw-r--r--source/blender/python/api2_2x/Wave.h98
6 files changed, 2 insertions, 719 deletions
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index bd39ae498c6..44f88d5d92f 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -39,7 +39,6 @@ source_files = ['BPY_interface.c',
'api2_2x/Sound.c',
'api2_2x/Sys.c',
'api2_2x/Types.c',
- 'api2_2x/Wave.c',
'api2_2x/Window.c',
'api2_2x/World.c',
'api2_2x/Image.c',
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 );
}
diff --git a/source/blender/python/api2_2x/Types.c b/source/blender/python/api2_2x/Types.c
index 54555a32b08..f8b24468a14 100644
--- a/source/blender/python/api2_2x/Types.c
+++ b/source/blender/python/api2_2x/Types.c
@@ -75,7 +75,6 @@ void types_InitAll( void )
Text_Type.ob_type = &PyType_Type;
Text3d_Type.ob_type = &PyType_Type;
Texture_Type.ob_type = &PyType_Type;
- Wave_Type.ob_type = &PyType_Type;
World_Type.ob_type = &PyType_Type;
buffer_Type.ob_type = &PyType_Type;
constant_Type.ob_type = &PyType_Type;
diff --git a/source/blender/python/api2_2x/Types.h b/source/blender/python/api2_2x/Types.h
index e75f4a78a0a..ede21369fe0 100644
--- a/source/blender/python/api2_2x/Types.h
+++ b/source/blender/python/api2_2x/Types.h
@@ -49,7 +49,7 @@ extern PyTypeObject Object_Type;
extern PyTypeObject Particle_Type;
extern PyTypeObject Scene_Type, RenderData_Type;
extern PyTypeObject Text_Type, Text3d_Type, Texture_Type;
-extern PyTypeObject Wave_Type, World_Type;
+extern PyTypeObject World_Type;
extern PyTypeObject property_Type;
extern PyTypeObject buffer_Type, constant_Type, euler_Type;
extern PyTypeObject matrix_Type, quaternion_Type, rgbTuple_Type, vector_Type;
diff --git a/source/blender/python/api2_2x/Wave.c b/source/blender/python/api2_2x/Wave.c
deleted file mode 100644
index 5b0abacc782..00000000000
--- a/source/blender/python/api2_2x/Wave.c
+++ /dev/null
@@ -1,605 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * This is a new part of Blender.
- *
- * Contributor(s): Jacques Guignot
- *
- * ***** END GPL/BL DUAL LICENSE BLOCK *****
- */
-
-#include "Wave.h" /*This must come first*/
-
-#include "DNA_object_types.h"
-#include "BKE_effect.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "gen_utils.h"
-
-/******* prototypes **********/
-PyObject *Wave_Init( void );
-
-/*****************************************************************************/
-/* Python BPy_Wave methods table: */
-/*****************************************************************************/
-static PyMethodDef BPy_Wave_methods[] = {
- {"getType", ( PyCFunction ) Effect_getType,
- METH_NOARGS, "() - Return Effect type"},
- {"setType", ( PyCFunction ) Effect_setType,
- METH_VARARGS, "() - Set Effect type"},
- {"getFlag", ( PyCFunction ) Effect_getFlag,
- METH_NOARGS, "() - Return Effect flag"},
- {"setFlag", ( PyCFunction ) Effect_setFlag,
- METH_VARARGS, "() - Set Effect flag"},
- {"getStartx", ( PyCFunction ) Wave_getStartx,
- METH_NOARGS, "()-Return Wave startx"},
- {"setStartx", ( PyCFunction ) Wave_setStartx, METH_VARARGS,
- "()- Sets Wave startx"},
- {"getStarty", ( PyCFunction ) Wave_getStarty,
- METH_NOARGS, "()-Return Wave starty"},
- {"setStarty", ( PyCFunction ) Wave_setStarty, METH_VARARGS,
- "()- Sets Wave starty"},
- {"getHeight", ( PyCFunction ) Wave_getHeight,
- METH_NOARGS, "()-Return Wave height"},
- {"setHeight", ( PyCFunction ) Wave_setHeight, METH_VARARGS,
- "()- Sets Wave height"},
- {"getWidth", ( PyCFunction ) Wave_getWidth,
- METH_NOARGS, "()-Return Wave width"},
- {"setWidth", ( PyCFunction ) Wave_setWidth, METH_VARARGS,
- "()- Sets Wave width"},
- {"getNarrow", ( PyCFunction ) Wave_getNarrow,
- METH_NOARGS, "()-Return Wave narrow"},
- {"setNarrow", ( PyCFunction ) Wave_setNarrow, METH_VARARGS,
- "()- Sets Wave narrow"},
- {"getSpeed", ( PyCFunction ) Wave_getSpeed,
- METH_NOARGS, "()-Return Wave speed"},
- {"setSpeed", ( PyCFunction ) Wave_setSpeed, METH_VARARGS,
- "()- Sets Wave speed"},
- {"getMinfac", ( PyCFunction ) Wave_getMinfac,
- METH_NOARGS, "()-Return Wave minfac"},
- {"setMinfac", ( PyCFunction ) Wave_setMinfac, METH_VARARGS,
- "()- Sets Wave minfac"},
- {"getDamp", ( PyCFunction ) Wave_getDamp,
- METH_NOARGS, "()-Return Wave damp"},
- {"setDamp", ( PyCFunction ) Wave_setDamp, METH_VARARGS,
- "()- Sets Wave damp"},
- {"getTimeoffs", ( PyCFunction ) Wave_getTimeoffs,
- METH_NOARGS, "()-Return Wave timeoffs"},
- {"setTimeoffs", ( PyCFunction ) Wave_setTimeoffs, METH_VARARGS,
- "()- Sets Wave timeoffs"},
- {"getLifetime", ( PyCFunction ) Wave_getLifetime,
- METH_NOARGS, "()-Return Wave lifetime"},
- {"setLifetime", ( PyCFunction ) Wave_setLifetime, METH_VARARGS,
- "()- Sets Wave lifetime"},
- {NULL, NULL, 0, NULL}
-};
-
-
-
-
-/*****************************************************************************/
-/* Python Wave_Type structure definition: */
-/*****************************************************************************/
-PyTypeObject Wave_Type = {
- PyObject_HEAD_INIT( NULL )
- 0,
- "Wave",
- sizeof( BPy_Wave ),
- 0,
- /* methods */
- ( destructor ) WaveDeAlloc, /* tp_dealloc */
- ( printfunc ) WavePrint, /* tp_print */
- ( getattrfunc ) WaveGetAttr, /* tp_getattr */
- ( setattrfunc ) WaveSetAttr, /* tp_setattr */
- 0, /* tp_compare */
- ( reprfunc ) WaveRepr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_as_hash */
- 0, 0, 0, 0, 0, 0,
- 0, /* tp_doc */
- 0, 0, 0, 0, 0, 0,
- BPy_Wave_methods, /* tp_methods */
- 0, /* tp_members */
-};
-
-
-/*****************************************************************************/
-/* The following string definitions are used for documentation strings. */
-/* In Python these will be written to the console when doing a */
-/* Blender.Wave.__doc__ */
-/*****************************************************************************/
-static char M_Wave_doc[] = "The Blender Wave module\n\n\
-This module provides access to **Object Data** in Blender.\n\
-Functions :\n\
- New(opt name) : creates a new wave object with the given name (optional)\n\
- Get(name) : retreives a wave with the given name (mandatory)\n\
- get(name) : same as Get. Kept for compatibility reasons";
-static char M_Wave_New_doc[] = "";
-static char M_Wave_Get_doc[] = "xxx";
-/*****************************************************************************/
-/* Python method structure definition for Blender.Wave module: */
-/*****************************************************************************/
-struct PyMethodDef M_Wave_methods[] = {
- {"New", ( PyCFunction ) M_Wave_New, METH_VARARGS, M_Wave_New_doc},
- {"Get", M_Wave_Get, METH_VARARGS, M_Wave_Get_doc},
- {"get", M_Wave_Get, METH_VARARGS, M_Wave_Get_doc},
- {NULL, NULL, 0, NULL}
-};
-
-
-
-/* -Sta x et Sta y : là où débute la vague
- -X, Y : la vague se propagera dans les directions X et/ou Y
- -Cycl : la vague se répétera ou ne se produira qu'une fois
- -Speed, Height, Width, Narrow : joues avec ces paramètres, je
- te fais confiance. Ils interagissent et s'influencent alors
- mieux vaut y aller un à la fois et qu'un peu à la fois.
- -Time sta: la frame où l'effet commence à se produire.
- -Lifetime: durée en frames de l'effet.
- -Damptime: le temps, en frames, que met une vague à mourir.
-*/
-
-/*****************************************************************************/
-/* Function: M_Wave_New */
-/* Python equivalent: Blender.Effect.Wave.New */
-/*****************************************************************************/
-PyObject *M_Wave_New( PyObject * self, PyObject * args )
-{
- int type = EFF_WAVE;
- BPy_Effect *pyeffect;
- Effect *bleffect = 0;
-
- bleffect = add_effect( type );
- if( bleffect == NULL )
- return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
- "couldn't create Effect Data in Blender" ) );
-
- pyeffect = ( BPy_Effect * ) PyObject_NEW( BPy_Effect, &Effect_Type );
-
-
- if( pyeffect == NULL )
- return ( EXPP_ReturnPyObjError( PyExc_MemoryError,
- "couldn't create Effect Data object" ) );
-
- pyeffect->effect = bleffect;
-
- return ( PyObject * ) pyeffect;
-}
-
-/*****************************************************************************/
-/* Function: M_Wave_Get */
-/* Python equivalent: Blender.Effect.Wave.Get */
-/*****************************************************************************/
-PyObject *M_Wave_Get( PyObject * self, PyObject * args )
-{
- /*arguments : string object name
- int : position of effect in the obj's effect list */
- char *name = 0;
- Object *object_iter;
- Effect *eff;
- BPy_Wave *wanted_eff;
- int num, i;
-
- if( !PyArg_ParseTuple( args, "si", &name, &num ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected string int argument" ) );
-
- object_iter = G.main->object.first;
- if( !object_iter )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "Scene contains no object" ) );
-
- while( object_iter ) {
- if( strcmp( name, object_iter->id.name + 2 ) ) {
- object_iter = object_iter->id.next;
- continue;
- }
-
-
- if( object_iter->effect.first != NULL ) {
- eff = object_iter->effect.first;
- for( i = 0; i < num; i++ ) {
- if( eff->type != EFF_WAVE )
- continue;
- eff = eff->next;
- if( !eff )
- return ( EXPP_ReturnPyObjError
- ( PyExc_AttributeError,
- "bject" ) );
- }
- wanted_eff =
- ( BPy_Wave * ) PyObject_NEW( BPy_Wave,
- &Wave_Type );
- wanted_eff->wave = eff;
- return ( PyObject * ) wanted_eff;
- }
- object_iter = object_iter->id.next;
- }
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-/*****************************************************************************/
-/* Function: Wave_Init */
-/*****************************************************************************/
-PyObject *Wave_Init( void )
-{
- PyObject *submodule;
-
- Wave_Type.ob_type = &PyType_Type;
- submodule =
- Py_InitModule3( "Blender.Wave", M_Wave_methods, M_Wave_doc );
- return ( submodule );
-}
-
-/*****************************************************************************/
-/* Python BPy_Wave methods: */
-/*****************************************************************************/
-
-PyObject *Wave_getStartx( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->startx );
-}
-
-PyObject *Wave_setStartx( BPy_Wave * self, PyObject * args )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- float val = 0;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr->startx = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getStarty( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->starty );
-}
-
-PyObject *Wave_setStarty( BPy_Wave * self, PyObject * args )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- float val = 0;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr->starty = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getHeight( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->height );
-}
-
-PyObject *Wave_setHeight( BPy_Wave * self, PyObject * args )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- float val = 0;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr->height = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getWidth( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->width );
-}
-
-PyObject *Wave_setWidth( BPy_Wave * self, PyObject * args )
-{
- float val = 0;
- WaveEff *ptr;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->width = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getNarrow( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->narrow );
-}
-
-PyObject *Wave_setNarrow( BPy_Wave * self, PyObject * args )
-{
- float val = 0;
- WaveEff *ptr;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->narrow = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getSpeed( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->speed );
-}
-
-PyObject *Wave_setSpeed( BPy_Wave * self, PyObject * args )
-{
- float val = 0;
- WaveEff *ptr;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->speed = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getMinfac( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->minfac );
-}
-
-PyObject *Wave_setMinfac( BPy_Wave * self, PyObject * args )
-{
- float val = 0;
- WaveEff *ptr;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->minfac = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-
-
-PyObject *Wave_getDamp( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->damp );
-}
-
-PyObject *Wave_setDamp( BPy_Wave * self, PyObject * args )
-{
- WaveEff *ptr;
- float val = 0;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->damp = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getTimeoffs( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->timeoffs );
-}
-
-PyObject *Wave_setTimeoffs( BPy_Wave * self, PyObject * args )
-{
- float val = 0;
- WaveEff *ptr;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->timeoffs = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-PyObject *Wave_getLifetime( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- return PyFloat_FromDouble( ptr->lifetime );
-}
-
-PyObject *Wave_setLifetime( BPy_Wave * self, PyObject * args )
-{
- float val = 0;
- WaveEff *ptr;
- if( !PyArg_ParseTuple( args, "f", &val ) )
- return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
- "expected float argument" ) );
- ptr = ( WaveEff * ) self->wave;
- ptr->lifetime = val;
- Py_INCREF( Py_None );
- return Py_None;
-}
-
-/*****************************************************************************/
-/* Function: WaveDeAlloc */
-/* Description: This is a callback function for the BPy_Wave type. It is */
-/* the destructor function. */
-/*****************************************************************************/
-void WaveDeAlloc( BPy_Wave * self )
-{
- WaveEff *ptr = ( WaveEff * ) self->wave;
- PyObject_DEL( ptr );
-}
-
-/*****************************************************************************/
-/* Function: WaveGetAttr */
-/* Description: This is a callback function for the BPy_Wave type. It is */
-/* the function that accesses BPy_Wave "member variables" and */
-/* methods. */
-/*****************************************************************************/
-
-PyObject *WaveGetAttr( BPy_Wave * self, char *name )
-{
- if( !strcmp( name, "lifetime" ) )
- return Wave_getLifetime( self );
- else if( !strcmp( name, "timeoffs" ) )
- return Wave_getTimeoffs( self );
- else if( !strcmp( name, "damp" ) )
- return Wave_getDamp( self );
- else if( !strcmp( name, "minfac" ) )
- return Wave_getMinfac( self );
- else if( !strcmp( name, "speed" ) )
- return Wave_getSpeed( self );
- else if( !strcmp( name, "narrow" ) )
- return Wave_getNarrow( self );
- else if( !strcmp( name, "width" ) )
- return Wave_getWidth( self );
- else if( !strcmp( name, "height" ) )
- return Wave_getHeight( self );
- else if( !strcmp( name, "startx" ) )
- return Wave_getStartx( self );
- else if( !strcmp( name, "starty" ) )
- return Wave_getStarty( self );
- return Py_FindMethod( BPy_Wave_methods, ( PyObject * ) self, name );
-}
-
-/*****************************************************************************/
-/* Function: WaveSetAttr */
-/* Description: This is a callback function for the BPy_Wave type. It is the */
-/* function that sets Wave Data attributes (member variables). */
-/*****************************************************************************/
-int WaveSetAttr( BPy_Wave * self, char *name, PyObject * value )
-{
- PyObject *valtuple;
- PyObject *error = NULL;
-
- valtuple = Py_BuildValue( "(N)", value );
-
- if( !valtuple )
- return EXPP_ReturnIntError( PyExc_MemoryError,
- "ParticleSetAttr: couldn't create PyTuple" );
-
- if( !strcmp( name, "lifetime" ) )
- error = Wave_setLifetime( self, valtuple );
- else if( !strcmp( name, "timeoffs" ) )
- error = Wave_setTimeoffs( self, valtuple );
- else if( !strcmp( name, "damp" ) )
- error = Wave_setDamp( self, valtuple );
- else if( !strcmp( name, "minfac" ) )
- error = Wave_setMinfac( self, valtuple );
- else if( !strcmp( name, "speed" ) )
- error = Wave_setSpeed( self, valtuple );
- else if( !strcmp( name, "narrow" ) )
- error = Wave_setNarrow( self, valtuple );
- else if( !strcmp( name, "width" ) )
- error = Wave_setWidth( self, valtuple );
- else if( !strcmp( name, "height" ) )
- error = Wave_setHeight( self, valtuple );
- else if( !strcmp( name, "startx" ) )
- error = Wave_setStartx( self, valtuple );
- else if( !strcmp( name, "starty" ) )
- error = Wave_setStarty( self, valtuple );
-
-
- else {
- Py_DECREF( valtuple );
-
- if( ( strcmp( name, "Types" ) == 0 ) ||
- ( strcmp( name, "Modes" ) == 0 ) )
- return ( EXPP_ReturnIntError( PyExc_AttributeError,
- "constant dictionary -- cannot be changed" ) );
-
- else
- return ( EXPP_ReturnIntError( PyExc_KeyError,
- "attribute not found" ) );
- }
-
- Py_DECREF(valtuple);
-
- if( error != Py_None )
- return -1;
-
- Py_DECREF( Py_None );
- return 0;
-}
-
-/*****************************************************************************/
-/* Function: WavePrint */
-/* Description: This is a callback function for the BPy_Wave type. It */
-/* builds a meaninful string to 'print' wave objects. */
-/*****************************************************************************/
-int WavePrint( BPy_Wave * self, FILE * fp, int flags )
-{
-
- printf( "I'm a wave...Cool, no?" );
- return 0;
-}
-
-/*****************************************************************************/
-/* Function: WaveRepr */
-/* Description: This is a callback function for the BPy_Wave type. It */
-/* builds a meaninful string to represent wave objects. */
-/*****************************************************************************/
-PyObject *WaveRepr( BPy_Wave * self )
-{
- return 0;
-}
-
-PyObject *WaveCreatePyObject( struct Effect * wave )
-{
- BPy_Wave *blen_object;
-
-
- blen_object = ( BPy_Wave * ) PyObject_NEW( BPy_Wave, &Wave_Type );
-
- if( blen_object == NULL ) {
- return ( NULL );
- }
- blen_object->wave = wave;
- return ( ( PyObject * ) blen_object );
-
-}
-
-int WaveCheckPyObject( PyObject * py_obj )
-{
- return ( py_obj->ob_type == &Wave_Type );
-}
-
-
-struct Wave *WaveFromPyObject( PyObject * py_obj )
-{
- BPy_Wave *blen_obj;
-
- blen_obj = ( BPy_Wave * ) py_obj;
- return ( ( struct Wave * ) blen_obj->wave );
-
-}
diff --git a/source/blender/python/api2_2x/Wave.h b/source/blender/python/api2_2x/Wave.h
deleted file mode 100644
index 194642d36a1..00000000000
--- a/source/blender/python/api2_2x/Wave.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * This is a new part of Blender.
- *
- * Contributor(s): Jacques Guignot
- *
- * ***** END GPL/BL DUAL LICENSE BLOCK *****
- */
-
-#ifndef EXPP_WAVE_H
-#define EXPP_WAVE_H
-
-#include <Python.h>
-#include "Effect.h"
-
-extern PyTypeObject Wave_Type;
-
-#define BPy_Wave_Check(v) ((v)->ob_type==&Wave_Type)
-
-/* Python BPy_Wave structure definition */
-typedef struct {
- PyObject_HEAD /* required py macro */
- Effect * wave;
-} BPy_Wave;
-
-
-/*****************************************************************************/
-/* Python API function prototypes for the Wave module. */
-/*****************************************************************************/
-PyObject *M_Wave_New( PyObject * self, PyObject * args );
-PyObject *M_Wave_Get( PyObject * self, PyObject * args );
-
-
-/*****************************************************************************/
-/* Python BPy_Wave methods declarations: */
-/*****************************************************************************/
-PyObject *Effect_getType( BPy_Effect * self );
-PyObject *Effect_setType( BPy_Effect * self, PyObject * args );
-PyObject *Effect_getFlag( BPy_Effect * self );
-PyObject *Effect_setFlag( BPy_Effect * self, PyObject * args );
-PyObject *Wave_getStartx( BPy_Wave * self );
-PyObject *Wave_setStartx( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getStarty( BPy_Wave * self );
-PyObject *Wave_setStarty( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getHeight( BPy_Wave * self );
-PyObject *Wave_setHeight( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getWidth( BPy_Wave * self );
-PyObject *Wave_setWidth( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getNarrow( BPy_Wave * self );
-PyObject *Wave_setNarrow( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getSpeed( BPy_Wave * self );
-PyObject *Wave_setSpeed( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getMinfac( BPy_Wave * self );
-PyObject *Wave_setMinfac( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getDamp( BPy_Wave * self );
-PyObject *Wave_setDamp( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getTimeoffs( BPy_Wave * self );
-PyObject *Wave_setTimeoffs( BPy_Wave * self, PyObject * a );
-PyObject *Wave_getLifetime( BPy_Wave * self );
-PyObject *Wave_setLifetime( BPy_Wave * self, PyObject * a );
-
-/*****************************************************************************/
-/* Python Wave_Type callback function prototypes: */
-/*****************************************************************************/
-void WaveDeAlloc( BPy_Wave * msh );
-int WavePrint( BPy_Wave * msh, FILE * fp, int flags );
-int WaveSetAttr( BPy_Wave * msh, char *name, PyObject * v );
-PyObject *WaveGetAttr( BPy_Wave * msh, char *name );
-PyObject *WaveRepr( BPy_Wave * msh );
-PyObject *WaveCreatePyObject( struct Effect *wave );
-int WaveCheckPyObject( PyObject * py_obj );
-struct Wave *WaveFromPyObject( PyObject * py_obj );
-
-
-#endif /* EXPP_WAVE_H */