Adds API for Particle Interaction Settings and Softbody Settings
authorJohnny Matthews <johnny.matthews@gmail.com>
Thu, 14 Apr 2005 17:56:37 +0000 (17:56 +0000)
committerJohnny Matthews <johnny.matthews@gmail.com>
Thu, 14 Apr 2005 17:56:37 +0000 (17:56 +0000)
Also adds docs for above API.

My testing cases seem to work fine. Please test to make sure I have not
missed anything!

Stivs, I got ascotan's signoff on thses. But please make any adjustments that
you deem needed.

Johnny

source/blender/python/api2_2x/Object.c
source/blender/python/api2_2x/doc/Object.py

index 6fbfd2f45fcc39c3cbd4ee97804771f615e6ea13..48605abcd00a5b2733b11215848af0abe9ac9a5f 100644 (file)
@@ -53,6 +53,7 @@
 #include "Lattice.h"
 #include "modules.h"
 
+#include "constant.h"
 /* only used for oops location get/set at the moment */
 #include "DNA_oops_types.h" 
 #include "DNA_space_types.h"
 
 /* Defines for insertIpoKey */
 
-#define IPOKEY_LOC          0
-#define IPOKEY_ROT          1
-#define IPOKEY_SIZE         2
-#define IPOKEY_LOCROT       3
-#define IPOKEY_LOCROTSIZE   4
+#define IPOKEY_LOC              0
+#define IPOKEY_ROT              1
+#define IPOKEY_SIZE             2
+#define IPOKEY_LOCROT           3
+#define IPOKEY_LOCROTSIZE       4
+#define IPOKEY_PI_STRENGTH      5
+#define IPOKEY_PI_FALLOFF       6
+#define IPOKEY_PI_MAXDIST       7 /*Not Ready Yet*/
+#define IPOKEY_PI_SURFACEDAMP   8
+#define IPOKEY_PI_RANDOMDAMP    9
+#define IPOKEY_PI_PERM          10
+
+#define PFIELD_FORCE   1
+#define PFIELD_VORTEX  2
+#define PFIELD_MAGNET  3
+#define PFIELD_WIND            4
 
 /*****************************************************************************/
 /* Python API function prototypes for the Blender module.               */
@@ -170,6 +182,57 @@ static PyObject *Object_getScriptLinks( BPy_Object * self, PyObject * args );
 static PyObject *Object_addScriptLink( BPy_Object * self, PyObject * args );
 static PyObject *Object_clearScriptLinks( BPy_Object * self );
 static PyObject *Object_setDupliVerts ( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIStrength( BPy_Object * self );
+static PyObject *Object_setPIStrength( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIFalloff( BPy_Object * self );
+static PyObject *Object_setPIFalloff( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIMaxDist( BPy_Object * self );
+static PyObject *Object_setPIMaxDist( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIUseMaxDist( BPy_Object * self );
+static PyObject *Object_setPIUseMaxDist( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIType( BPy_Object * self );
+static PyObject *Object_setPIType( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIPerm( BPy_Object * self );
+static PyObject *Object_setPIPerm( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIRandomDamp( BPy_Object * self );
+static PyObject *Object_setPIRandomDamp( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPISurfaceDamp( BPy_Object * self );
+static PyObject *Object_setPISurfaceDamp( BPy_Object * self, PyObject * args );
+static PyObject *Object_getPIDeflection( BPy_Object * self );
+static PyObject *Object_setPIDeflection( BPy_Object * self, PyObject * args );
+
+static PyObject *Object_getSBMass( BPy_Object * self );
+static PyObject *Object_setSBMass( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBGravity( BPy_Object * self );
+static PyObject *Object_setSBGravity( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBFriction( BPy_Object * self );
+static PyObject *Object_setSBFriction( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBErrorLimit( BPy_Object * self );
+static PyObject *Object_setSBErrorLimit( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBGoalSpring( BPy_Object * self );
+static PyObject *Object_setSBGoalSpring( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBGoalFriction( BPy_Object * self );
+static PyObject *Object_setSBGoalFriction( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBMinGoal( BPy_Object * self );
+static PyObject *Object_setSBMinGoal( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBMaxGoal( BPy_Object * self );
+static PyObject *Object_setSBMaxGoal( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBInnerSpring( BPy_Object * self );
+static PyObject *Object_setSBInnerSpring( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBInnerSpringFriction( BPy_Object * self );
+static PyObject *Object_setSBInnerSpringFriction( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBDefaultGoal( BPy_Object * self );
+static PyObject *Object_setSBDefaultGoal( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBEnable( BPy_Object * self );
+static PyObject *Object_setSBEnable( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBPostDef( BPy_Object * self );
+static PyObject *Object_setSBPostDef( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBUseGoal( BPy_Object * self );
+static PyObject *Object_setSBUseGoal( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBUseEdges( BPy_Object * self );
+static PyObject *Object_setSBUseEdges( BPy_Object * self, PyObject * args );
+static PyObject *Object_getSBStiffQuads( BPy_Object * self );
+static PyObject *Object_setSBStiffQuads( BPy_Object * self, PyObject * args );
 /*****************************************************************************/
 /* Python BPy_Object methods table:                                       */
 /*****************************************************************************/
@@ -234,6 +297,113 @@ automatic when the script finishes."},
         "Returns the object's tracked object"},
        {"getType", ( PyCFunction ) Object_getType, METH_NOARGS,
         "Returns type of string of Object"},
+/* Particle Interaction */
+        
+       {"getPIStrength", ( PyCFunction ) Object_getPIStrength, METH_NOARGS,
+        "Returns Particle Interaction Strength"},
+       {"setPIStrength", ( PyCFunction ) Object_setPIStrength, METH_VARARGS,
+        "Sets Particle Interaction Strength"},
+       {"getPIFalloff", ( PyCFunction ) Object_getPIFalloff, METH_NOARGS,
+        "Returns Particle Interaction Falloff"},
+       {"setPIFalloff", ( PyCFunction ) Object_setPIFalloff, METH_VARARGS,
+        "Sets Particle Interaction Falloff"},
+       {"getPIMaxDist", ( PyCFunction ) Object_getPIMaxDist, METH_NOARGS,
+        "Returns Particle Interaction Max Distance"},
+       {"setPIMaxDist", ( PyCFunction ) Object_setPIMaxDist, METH_VARARGS,
+        "Sets Particle Interaction Max Distance"},
+       {"getPIUseMaxDist", ( PyCFunction ) Object_getPIUseMaxDist, METH_NOARGS,
+        "Returns bool for Use Max Distace in Particle Interaction "},
+       {"setPIUseMaxDist", ( PyCFunction ) Object_setPIUseMaxDist, METH_VARARGS,
+        "Sets if Max Distance should be used in Particle Interaction"},
+       {"getPIType", ( PyCFunction ) Object_getPIType, METH_NOARGS,
+        "Returns Particle Interaction Type"},
+       {"setPIType", ( PyCFunction ) Object_setPIType, METH_VARARGS,
+        "sets Particle Interaction Type"},
+       {"getPIPerm", ( PyCFunction ) Object_getPIPerm, METH_NOARGS,
+        "Returns Particle Interaction Permiability"},
+       {"setPIPerm", ( PyCFunction ) Object_setPIPerm, METH_VARARGS,
+        "Sets Particle Interaction  Permiability"},
+       {"getPISurfaceDamp", ( PyCFunction ) Object_getPISurfaceDamp, METH_NOARGS,
+        "Returns Particle Interaction Surface Damping"},
+       {"setPISurfaceDamp", ( PyCFunction ) Object_setPISurfaceDamp, METH_VARARGS,
+        "Sets Particle Interaction Surface Damping"},
+       {"getPIRandomDamp", ( PyCFunction ) Object_getPIRandomDamp, METH_NOARGS,
+        "Returns Particle Interaction Random Damping"},
+       {"setPIRandomDamp", ( PyCFunction ) Object_setPIRandomDamp, METH_VARARGS,
+        "Sets Particle Interaction Random Damping"},
+       {"getPIDeflection", ( PyCFunction ) Object_getPIDeflection, METH_NOARGS,
+        "Returns Particle Interaction Deflection"},
+       {"setPIDeflection", ( PyCFunction ) Object_setPIDeflection, METH_VARARGS,
+        "Sets Particle Interaction Deflection"},  
+     
+/* Softbody */
+
+       {"getSBMass", ( PyCFunction ) Object_getSBMass, METH_NOARGS,
+        "Returns SB Mass"},
+       {"setSBMass", ( PyCFunction ) Object_setSBMass, METH_VARARGS,
+        "Sets SB Mass"}, 
+       {"getSBGravity", ( PyCFunction ) Object_getSBGravity, METH_NOARGS,
+        "Returns SB Gravity"},
+       {"setSBGravity", ( PyCFunction ) Object_setSBGravity, METH_VARARGS,
+        "Sets SB Gravity"}, 
+       {"getSBFriction", ( PyCFunction ) Object_getSBFriction, METH_NOARGS,
+        "Returns SB Friction"},
+       {"setSBFriction", ( PyCFunction ) Object_setSBFriction, METH_VARARGS,
+        "Sets SB Friction"}, 
+       {"getSBErrorLimit", ( PyCFunction ) Object_getSBErrorLimit, METH_NOARGS,
+        "Returns SB ErrorLimit"},
+       {"setSBErrorLimit", ( PyCFunction ) Object_setSBErrorLimit, METH_VARARGS,
+        "Sets SB ErrorLimit"}, 
+       {"getSBGoalSpring", ( PyCFunction ) Object_getSBGoalSpring, METH_NOARGS,
+        "Returns SB GoalSpring"},
+       {"setSBGoalSpring", ( PyCFunction ) Object_setSBGoalSpring, METH_VARARGS,
+        "Sets SB GoalSpring"}, 
+       {"getSBGoalFriction", ( PyCFunction ) Object_getSBGoalFriction, METH_NOARGS,
+        "Returns SB GoalFriction"},
+       {"setSBGoalFriction", ( PyCFunction ) Object_setSBGoalFriction, METH_VARARGS,
+        "Sets SB GoalFriction"}, 
+       {"getSBMinGoal", ( PyCFunction ) Object_getSBMinGoal, METH_NOARGS,
+        "Returns SB MinGoal"},
+       {"setSBMinGoal", ( PyCFunction ) Object_setSBMinGoal, METH_VARARGS,
+        "Sets SB MinGoal "}, 
+       {"getSBMaxGoal", ( PyCFunction ) Object_getSBMaxGoal, METH_NOARGS,
+        "Returns SB MaxGoal"},
+       {"setSBMaxGoal", ( PyCFunction ) Object_setSBMaxGoal, METH_VARARGS,
+        "Sets SB MaxGoal"},  
+       {"getSBInnerSpring", ( PyCFunction ) Object_getSBInnerSpring, METH_NOARGS,
+        "Returns SB InnerSpring"},
+       {"setSBInnerSpring", ( PyCFunction ) Object_setSBInnerSpring, METH_VARARGS,
+        "Sets SB InnerSpring"},         
+       {"getSBInnerSpringFriction", ( PyCFunction ) Object_getSBInnerSpringFriction, METH_NOARGS,
+        "Returns SB InnerSpringFriction"},
+       {"setSBInnerSpringFriction", ( PyCFunction ) Object_setSBInnerSpringFriction, METH_VARARGS,
+        "Sets SB InnerSpringFriction"},        
+       {"getSBDefaultGoal", ( PyCFunction ) Object_getSBDefaultGoal, METH_NOARGS,
+        "Returns SB DefaultGoal"},
+       {"setSBDefaultGoal", ( PyCFunction ) Object_setSBDefaultGoal, METH_VARARGS,
+        "Sets SB DefaultGoal"},                 
+       {"getSBEnable", ( PyCFunction ) Object_getSBEnable, METH_NOARGS,
+        "Returns SB Enable"},
+       {"setSBEnable", ( PyCFunction ) Object_setSBEnable, METH_VARARGS,
+        "Sets SB Enable"},              
+       {"getSBPostDef", ( PyCFunction ) Object_getSBPostDef, METH_NOARGS,
+        "Returns SB PostDef"},
+       {"setSBPostDef", ( PyCFunction ) Object_setSBPostDef, METH_VARARGS,
+        "Sets SB PostDef"}, 
+       {"getSBUseGoal", ( PyCFunction ) Object_getSBUseGoal, METH_NOARGS,
+        "Returns SB UseGoal"},
+       {"setSBUseGoal", ( PyCFunction ) Object_setSBUseGoal, METH_VARARGS,
+        "Sets SB UseGoal"}, 
+       {"getSBUseEdges", ( PyCFunction ) Object_getSBUseEdges, METH_NOARGS,
+        "Returns SB UseEdges"},
+       {"setSBUseEdges", ( PyCFunction ) Object_setSBUseEdges, METH_VARARGS,
+        "Sets SB UseEdges"}, 
+       {"getSBStiffQuads", ( PyCFunction ) Object_getSBStiffQuads, METH_NOARGS,
+        "Returns SB StiffQuads"},
+       {"setSBStiffQuads", ( PyCFunction ) Object_setSBStiffQuads, METH_VARARGS,
+        "Sets SB StiffQuads"},          
+
+                                
        {"getBoundBox", ( PyCFunction ) Object_getBoundBox, METH_NOARGS,
         "Returns the object's bounding box"},
        {"getDupliVerts", ( PyCFunction ) Object_getDupliVerts,
@@ -615,6 +785,18 @@ PyObject *Object_Init( void )
        PyModule_AddIntConstant( module, "LOCROT", IPOKEY_LOCROT );
        PyModule_AddIntConstant( module, "LOCROTSIZE", IPOKEY_LOCROTSIZE );
 
+       PyModule_AddIntConstant( module, "PI_STRENGTH", IPOKEY_PI_STRENGTH );
+       PyModule_AddIntConstant( module, "PI_FALLOFF", IPOKEY_PI_FALLOFF );
+       PyModule_AddIntConstant( module, "PI_SURFACEDAMP", IPOKEY_PI_SURFACEDAMP );
+       PyModule_AddIntConstant( module, "PI_RANDOMDAMP", IPOKEY_PI_RANDOMDAMP );
+       PyModule_AddIntConstant( module, "PI_PERM", IPOKEY_PI_PERM );
+
+       PyModule_AddIntConstant( module, "NONE",0 );
+       PyModule_AddIntConstant( module, "FORCE",PFIELD_FORCE );
+       PyModule_AddIntConstant( module, "VORTEX",PFIELD_VORTEX );
+       PyModule_AddIntConstant( module, "MAGNET",PFIELD_MAGNET );
+       PyModule_AddIntConstant( module, "WIND",PFIELD_WIND );
+
        return ( module );
 }
 
@@ -1600,6 +1782,27 @@ static PyObject *Object_insertIpoKey( BPy_Object * self, PyObject * args )
                insertkey((ID *)self->object,OB_SIZE_Z);      
        }
 
+    if (key == IPOKEY_PI_STRENGTH ){
+        insertkey((ID *)self->object, OB_PD_FSTR);   
+       }
+
+    if (key == IPOKEY_PI_FALLOFF ){
+        insertkey((ID *)self->object, OB_PD_FFALL);   
+       }
+       
+    if (key == IPOKEY_PI_SURFACEDAMP ){
+        insertkey((ID *)self->object, OB_PD_SDAMP);   
+       }
+
+    if (key == IPOKEY_PI_RANDOMDAMP ){
+        insertkey((ID *)self->object, OB_PD_RDAMP);   
+       }
+
+    if (key == IPOKEY_PI_PERM ){
+        insertkey((ID *)self->object, OB_PD_PERM);   
+       }
+
+
        allspace(REMAKEIPO, 0);
        EXPP_allqueue(REDRAWIPO, 0);
        EXPP_allqueue(REDRAWVIEW3D, 0);
@@ -2588,3 +2791,927 @@ static PyObject *Object_repr( BPy_Object * self )
                                    self->object->id.name + 2 );
 }
 
+
+PyObject *Object_getPIStrength( BPy_Object * self )
+{
+    PyObject *attr;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+    
+        attr = PyFloat_FromDouble( ( double ) self->object->pd->f_strength );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->f_strength attribute" ) );    
+}
+PyObject *Object_setPIStrength( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1000.0f || value < -1000.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 1000.0 and -1000.0" ) );
+       self->object->pd->f_strength = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getPIFalloff( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->pd->f_power );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->f_power attribute" ) );
+}
+PyObject *Object_setPIFalloff( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 10.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 10.0 and 0.0" ) );
+       self->object->pd->f_power = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getPIMaxDist( BPy_Object * self )
+{
+       PyObject *attr;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->pd->maxdist );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->f_maxdist attribute" ) );
+}
+PyObject *Object_setPIMaxDist( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1000.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 1000.0 and 0.0" ) );
+       self->object->pd->maxdist = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getPIUseMaxDist( BPy_Object * self )
+{  
+       PyObject *attr;
+     
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }     
+    
+     attr = PyInt_FromLong( ( long ) self->object->pd->flag );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->flag attribute" ) );   
+}
+
+PyObject *Object_setPIUseMaxDist( BPy_Object * self, PyObject * args )
+{
+       int value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+
+       if( !PyArg_ParseTuple( args, "i", &( value ) ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                                                                               "expected int argument" ) );
+
+       self->object->pd->flag = (short)value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getPIType( BPy_Object * self )
+{
+       PyObject *attr;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr  = PyInt_FromLong( ( long ) self->object->pd->forcefield );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->forcefield attribute" ) );
+
+}
+PyObject *Object_setPIType( BPy_Object * self, PyObject * args )
+{
+       BPy_constant *constant;
+       int value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "i", &( value ) ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                                                                               "expected int argument" ) );
+
+       self->object->pd->forcefield = (short)value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+
+PyObject *Object_getPIPerm( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->pd->pdef_perm );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->pdef_perm attribute" ) );
+}
+PyObject *Object_setPIPerm( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 1.0 and 0.0" ) );
+       self->object->pd->pdef_perm = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getPIRandomDamp( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->pd->pdef_rdamp );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->pdef_rdamp attribute" ) );
+}
+PyObject *Object_setPIRandomDamp( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 1.0 and 0.0" ) );
+       self->object->pd->pdef_rdamp = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getPISurfaceDamp( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->pd->pdef_damp );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->pdef_rdamp attribute" ) );
+}
+PyObject *Object_setPISurfaceDamp( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 1.0 and 0.0" ) );
+       self->object->pd->pdef_damp = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+PyObject *Object_getPIDeflection( BPy_Object * self )
+{  
+       PyObject *attr;
+     
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }     
+     
+     attr = PyInt_FromLong( ( long ) self->object->pd->deflect );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->pd->deflect attribute" ) );   
+}
+
+PyObject *Object_setPIDeflection( BPy_Object * self, PyObject * args )
+{
+       BPy_constant *constant;
+       int value;
+
+    if(!self->object->pd){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }
+
+       if( !PyArg_ParseTuple( args, "i", &( value ) ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                                                                               "expected int argument" ) );
+
+       self->object->pd->deflect = (short)value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+/*  SOFTBODY FUNCTIONS */
+
+PyObject *Object_getSBMass( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->nodemass );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->nodemass attribute" ) );
+}
+
+PyObject *Object_setSBMass( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 50.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.0 and 50.0" ) );
+       self->object->soft->nodemass = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBGravity( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->grav );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->grav attribute" ) );
+}
+
+PyObject *Object_setSBGravity( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 10.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.0 and 10.0" ) );
+       self->object->soft->grav = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBFriction( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->mediafrict );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->mediafrict attribute" ) );
+}
+
+PyObject *Object_setSBFriction( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 10.0f || value < 0.0f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.0 and 10.0" ) );
+       self->object->soft->mediafrict = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBErrorLimit( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->rklimit );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->rklimit attribute" ) );
+}
+
+PyObject *Object_setSBErrorLimit( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.01f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.01 and 1.0" ) );
+       self->object->soft->rklimit = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBGoalSpring( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->goalspring );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->goalspring attribute" ) );
+}
+
+PyObject *Object_setSBGoalSpring( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 0.999f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 0.999" ) );
+       self->object->soft->goalspring = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBGoalFriction( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->goalfrict );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->goalfrict attribute" ) );
+}
+
+PyObject *Object_setSBGoalFriction( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 10.0f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 10.0" ) );
+       self->object->soft->goalfrict = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBMinGoal( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->mingoal );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->mingoal attribute" ) );
+}
+
+PyObject *Object_setSBMinGoal( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 1.0" ) );
+       self->object->soft->mingoal = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBMaxGoal( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->maxgoal );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->maxgoal attribute" ) );
+}
+
+PyObject *Object_setSBMaxGoal( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 1.0" ) );
+       self->object->soft->maxgoal = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBInnerSpring( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->inspring );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->inspring attribute" ) );
+}
+
+PyObject *Object_setSBInnerSpring( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 0.999f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 0.999" ) );
+       self->object->soft->inspring = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBInnerSpringFriction( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->infrict );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->infrict attribute" ) );
+}
+
+PyObject *Object_setSBInnerSpringFriction( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 10.0f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 10.0" ) );
+       self->object->soft->infrict = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBDefaultGoal( BPy_Object * self )
+{
+       PyObject *attr;
+    
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+    
+    attr = PyFloat_FromDouble( ( double ) self->object->soft->defgoal );
+
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->soft->defgoal attribute" ) );
+}
+
+PyObject *Object_setSBDefaultGoal( BPy_Object * self, PyObject * args )
+{
+    float value;
+
+    if(!self->object->soft){
+          return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "particle deflection could not be accessed (null pointer)" ) );    
+    }    
+
+       if( !PyArg_ParseTuple( args, "f", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected float argument" ) );
+
+       if(value > 1.0f || value < 0.00f)
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "acceptable values are between 0.00 and 1.0" ) );
+       self->object->soft->defgoal = value;
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBEnable( BPy_Object * self )
+{
+    short flag =  self->object->softflag;
+    PyObject *attr = NULL;
+    
+    if(self->object->softflag & OB_SB_ENABLE){
+           attr = PyInt_FromLong(1);
+    }
+    else{  attr = PyInt_FromLong(0);  }
+        
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->softflag attribute" ) );
+}
+
+PyObject *Object_setSBEnable( BPy_Object * self, PyObject * args )
+{
+    short value;
+       if( !PyArg_ParseTuple( args, "h", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected integer argument" ) );
+               
+    if(value > 0){ 
+        self->object->softflag |= OB_SB_ENABLE; 
+    }
+    else{     
+        self->object->softflag &= ~OB_SB_ENABLE; 
+    } 
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBPostDef( BPy_Object * self )
+{
+    short flag =  self->object->softflag;
+    PyObject *attr = NULL;
+    
+    if(self->object->softflag & OB_SB_POSTDEF){
+           attr = PyInt_FromLong(1);
+    }
+    else{  attr = PyInt_FromLong(0);  }
+        
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->softflag attribute" ) );
+}
+
+PyObject *Object_setSBPostDef( BPy_Object * self, PyObject * args )
+{
+    short value;
+       if( !PyArg_ParseTuple( args, "h", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected integer argument" ) );
+                       
+    if(value){ self->object->softflag |= OB_SB_POSTDEF; }
+    else{ self->object->softflag &= ~OB_SB_POSTDEF; } 
+
+       return EXPP_incr_ret( Py_None );
+}
+PyObject *Object_getSBUseGoal( BPy_Object * self )
+{
+    short flag =  self->object->softflag;
+    PyObject *attr = NULL;
+    
+    if(self->object->softflag & OB_SB_GOAL){
+           attr = PyInt_FromLong(1);
+    }
+    else{  attr = PyInt_FromLong(0);  }
+        
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->softflag attribute" ) );
+}
+
+PyObject *Object_setSBUseGoal( BPy_Object * self, PyObject * args )
+{
+    short value;
+       if( !PyArg_ParseTuple( args, "h", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected integer argument" ) );
+                       
+    if(value){ self->object->softflag |= OB_SB_GOAL; }
+    else{ self->object->softflag &= ~OB_SB_GOAL; } 
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBUseEdges( BPy_Object * self )
+{
+    short flag =  self->object->softflag;
+    PyObject *attr = NULL;
+    
+    if(self->object->softflag & OB_SB_EDGES){
+           attr = PyInt_FromLong(1);
+    }
+    else{  attr = PyInt_FromLong(0);  }
+        
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->softflag attribute" ) );
+}
+
+PyObject *Object_setSBUseEdges( BPy_Object * self, PyObject * args )
+{
+    short value;
+       if( !PyArg_ParseTuple( args, "h", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected integer argument" ) );
+                       
+    if(value){ self->object->softflag |= OB_SB_EDGES; }
+    else{ self->object->softflag &= ~OB_SB_EDGES; } 
+
+       return EXPP_incr_ret( Py_None );
+}
+
+PyObject *Object_getSBStiffQuads( BPy_Object * self )
+{
+    short flag =  self->object->softflag;
+    PyObject *attr = NULL;
+    
+    if(self->object->softflag & OB_SB_QUADS){
+           attr = PyInt_FromLong(1);
+    }
+    else{  attr = PyInt_FromLong(0);  }
+        
+       if( attr )
+               return attr;
+
+       return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
+                                       "couldn't get Object->softflag attribute" ) );
+}
+
+PyObject *Object_setSBStiffQuads( BPy_Object * self, PyObject * args )
+{
+    short value;
+       if( !PyArg_ParseTuple( args, "h", &value ) )
+               return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
+                       "expected integer argument" ) );
+                       
+    if(value){ self->object->softflag |= OB_SB_QUADS; }
+    else{ self->object->softflag &= ~OB_SB_QUADS; } 
+
+       return EXPP_incr_ret( Py_None );
+}
+
index abbc1f0a4843233953eb3604cd9852e893eb6dce..cdb5beb1f197d6bdb45f40a590f0120ddbe3511a 100644 (file)
@@ -389,6 +389,11 @@ class Object:
            -SIZE
            -LOCROT
            -LOCROTSIZE
+           -PI_STRENGTH
+           -PI_FALLOFF
+           -PI_PERM
+           -PI_SURFACEDAMP
+           -PI_RANDOMDAMP
     @return: py_none
     """
 
@@ -743,3 +748,388 @@ class Property:
     @rtype: string
     """
 
+
+  def getPIStregth():
+    """
+    Get the Object's Particle Interaction Strength.
+    @rtype: float
+    """
+
+  def setPIStrength(strength):
+    """
+    Set the the Object's Particle Interaction Strength.
+    Values between -1000.0 to 1000.0
+    @rtype: PyNone
+    @type strength: float
+    @param strength: the Object's Particle Interaction New Strength.
+    """
+
+  def getPIFalloff():
+    """
+    Get the Object's Particle Interaction falloff.
+    @rtype: float
+    """
+
+  def setPIFalloff(falloff):
+    """
+    Set the the Object's Particle Interaction falloff.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type falloff: float
+    @param falloff: the Object's Particle Interaction New falloff.
+    """    
+    
+  def getPIMaxDist():
+    """
+    Get the Object's Particle Interaction MaxDist.
+    @rtype: float
+    """
+
+  def setPIMaxDist(MaxDist):
+    """
+    Set the the Object's Particle Interaction MaxDist.
+    Values between 0 to 1000.0
+    @rtype: PyNone
+    @type MaxDist: float
+    @param MaxDist: the Object's Particle Interaction New MaxDist.
+    """    
+    
+  def getPIType():
+    """
+    Get the Object's Particle Interaction Type.
+    @rtype: int
+    """
+
+  def setPIType(type):
+    """
+    Set the the Object's Particle Interaction type.
+    Use Module Constants
+        NONE
+        WIND
+        FORCE
+        VORTEX
+        MAGNET
+    @rtype: PyNone
+    @type type: int
+    @param type: the Object's Particle Interaction Type.
+    """   
+  def getPIUseMaxDist():
+    """
+    Get the Object's Particle Interaction if using MaxDist.
+    @rtype: int
+    """
+
+  def setPIUseMaxDist(status):
+    """
+    Set the the Object's Particle Interaction MaxDist.
+    0 = Off, 1 = on
+    @rtype: PyNone
+    @type status: int
+    @param status: the new status
+    """ 
+
+  def getPIDeflection():
+    """
+    Get the Object's Particle Interaction Deflection Setting.
+    @rtype: int
+    """
+
+  def setPIDeflection(status):
+    """
+    Set the the Object's Particle Interaction Deflection Setting.
+    0 = Off, 1 = on
+    @rtype: PyNone
+    @type status: int
+    @param status: the new status
+    """ 
+
+  def getPIPermf():
+    """
+    Get the Object's Particle Interaction Permiability.
+    @rtype: float
+    """
+
+  def setPIPerm(perm):
+    """
+    Set the the Object's Particle Interaction Permiability.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type perm: float
+    @param perm: the Object's Particle Interaction New Permiability.
+    """    
+
+  def getPIRandomDamp():
+    """
+    Get the Object's Particle Interaction RandomDamp.
+    @rtype: float
+    """
+
+  def setPIRandomDamp(damp):
+    """
+    Set the the Object's Particle Interaction RandomDamp.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type damp: float
+    @param damp: the Object's Particle Interaction New RandomDamp.
+    """    
+
+  def getPISurfaceDamp():
+    """
+    Get the Object's Particle Interaction SurfaceDamp.
+    @rtype: float
+    """
+
+  def setPISurfaceDamp(damp):
+    """
+    Set the the Object's Particle Interaction SurfaceDamp.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type damp: float
+    @param damp: the Object's Particle Interaction New SurfaceDamp.
+    """    
+
+
+  def getSBMass():
+    """
+    Get the Object's SB Mass.
+    @rtype: float
+    """
+
+  def setSBMass(mass):
+    """
+    Set the the Object's SB Mass.
+    Values between 0 to 50.0
+    @rtype: PyNone
+    @type mass: float
+    @param damp: the Object's SB New mass.
+    """  
+  
+  def getSBGravity():
+    """
+    Get the Object's SB Gravity.
+    @rtype: float
+    """
+
+  def setSBGravity(grav):
+    """
+    Set the the Object's SB Gravity.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type grav: float
+    @param damp: the Object's SB New Gravity.
+    """ 
+    
+  def getSBFriction():
+    """
+    Get the Object's SB Friction.
+    @rtype: float
+    """
+
+  def setSBFriction(frict):
+    """
+    Set the the Object's SB Friction.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type frict: float
+    @param damp: the Object's SB New Friction.
+    """ 
+
+  def getSBErrorLimit():
+    """
+    Get the Object's SB ErrorLimit.
+    @rtype: float
+    """
+
+  def setSBErrorLimit(err):
+    """
+    Set the the Object's SB ErrorLimit.
+    Values between 0 to 1.0
+    @rtype: PyNone
+    @type err: float
+    @param damp: the Object's SB New ErrorLimit.
+    """ 
+    
+  def getSBGoalSpring():
+    """
+    Get the Object's SB GoalSpring.
+    @rtype: float
+    """
+
+  def setSBGoalSpring(gs):
+    """
+    Set the the Object's SB GoalSpring.
+    Values between 0 to 0.999
+    @rtype: PyNone
+    @type gs: float
+    @param damp: the Object's SB New GoalSpring.
+    """ 
+    
+  def getSBGoalFriction():
+    """
+    Get the Object's SB GoalFriction.
+    @rtype: float
+    """
+
+  def setSBGoalFriction(gf):
+    """
+    Set the the Object's SB GoalFriction.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type gf: float
+    @param damp: the Object's SB New GoalFriction.
+    """ 
+    
+  def getSBMinGoal():
+    """
+    Get the Object's SB MinGoal.
+    @rtype: float
+    """
+
+  def setSBMinGoal(mg):
+    """
+    Set the the Object's SB MinGoal.
+    Values between 0 to 1.0
+    @rtype: PyNone
+    @type mg: float
+    @param damp: the Object's SB New MinGoal.
+    """ 
+    
+  def getSBMaxGoal():
+    """
+    Get the Object's SB MaxGoal.
+    @rtype: float
+    """
+
+  def setSBMaxGoal(mg):
+    """
+    Set the the Object's SB MaxGoal.
+    Values between 0 to 1.0
+    @rtype: PyNone
+    @type mg: float
+    @param damp: the Object's SB New MaxGoal.
+    """ 
+    
+  def getSBInnerSpring():
+    """
+    Get the Object's SB InnerSpring.
+    @rtype: float
+    """
+
+  def setSBInnerSpring(sprr):
+    """
+    Set the the Object's SB InnerSpring.
+    Values between 0 to 0.999
+    @rtype: PyNone
+    @type spr: float
+    @param damp: the Object's SB New InnerSpring.
+    """ 
+    
+  def getSBInnerSpringFriction():
+    """
+    Get the Object's SB InnerSpringFriction.
+    @rtype: float
+    """
+
+  def setSBInnerSpringFriction(sprf):
+    """
+    Set the the Object's SB InnerSpringFriction.
+    Values between 0 to 10.0
+    @rtype: PyNone
+    @type sprf: float
+    @param damp: the Object's SB New InnerSpringFriction.
+    """ 
+    
+  def getSBDefaultGoal():
+    """
+    Get the Object's SB DefaultGoal.
+    @rtype: float
+    """
+
+  def setSBDefaultGoal(goal):
+    """
+    Set the the Object's SB DefaultGoal.
+    Values between 0 to 1.0
+    @rtype: PyNone
+    @type goal: float
+    @param damp: the Object's SB New DefaultGoal.
+    """   
+
+  def getSBEnable():
+    """
+    Get if the Object's SB is Enabled.
+    @rtype: int
+    """
+
+  def setSBEnable(switch):
+    """
+    Enable / Disable Softbodies.
+    1: on
+    0: off
+    @rtype: PyNone
+    @type switch: int
+    @param damp: the Object's SB New Enable Value.
+    """  
+
+  def getSBPostDef():
+    """
+    get Softbodies PostDef option
+    @rtype: int
+    """
+
+  def setSBPostDef(switch):
+    """
+    Enable / Disable Softbodies PostDef option
+    1: on
+    0: off
+    @rtype: PyNone
+    @type switch: int
+    @param damp: the Object's SB New PostDef Value.
+    """ 
+
+  def getSBUseGoal():
+    """
+    get Softbodies UseGoal option
+    @rtype: int
+    """
+
+  def setSBUseGoal(switch):
+    """
+    Enable / Disable Softbodies UseGoal option
+    1: on
+    0: off
+    @rtype: PyNone
+    @type switch: int
+    @param damp: the Object's SB New UseGoal Value.
+    """ 
+  def getSBUseEdges():
+    """
+    get Softbodies UseEdges option
+    @rtype: int
+    """
+
+  def setSBUseEdges(switch):
+    """
+    Enable / Disable Softbodies UseEdges option
+    1: on
+    0: off
+    @rtype: PyNone
+    @type switch: int
+    @param damp: the Object's SB New UseEdges Value.
+    """ 
+    
+  def getSBStiffQuads():
+    """
+    get Softbodies StiffQuads option
+    @rtype: int
+    """
+
+  def setSBStiffQuads(switch):
+    """
+    Enable / Disable Softbodies StiffQuads option
+    1: on
+    0: off
+    @rtype: PyNone
+    @type switch: int
+    @param damp: the Object's SB New StiffQuads Value.
+    """