several bug fixes
This commit is contained in:
@@ -109,33 +109,27 @@ static PyObject *M_Curve_Get(PyObject *self, PyObject *args)
|
||||
|
||||
|
||||
return (PyObject*)wanted_curv;
|
||||
}/*if(name)*/
|
||||
else{/*no name has been given; return a list with all curves in the scene */
|
||||
int index = 0;
|
||||
PyObject *curvlist, *pyobj;
|
||||
}//if(name)
|
||||
else{//no name has been given; return a list of all curves by name.
|
||||
PyObject *curvlist;
|
||||
|
||||
curv_iter = G.main->curve.first;
|
||||
curvlist = PyList_New (BLI_countlist (&(G.main->curve)));
|
||||
curvlist = PyList_New (0);
|
||||
|
||||
if (curvlist == NULL)
|
||||
return (PythonReturnErrorObject (PyExc_MemoryError,
|
||||
"couldn't create PyList"));
|
||||
|
||||
while (curv_iter) {
|
||||
pyobj = CurveCreatePyObject (curv_iter);
|
||||
|
||||
if (!pyobj)
|
||||
return (PythonReturnErrorObject (PyExc_MemoryError,
|
||||
"couldn't create PyString"));
|
||||
|
||||
PyList_SET_ITEM (curvlist, index, pyobj);
|
||||
C_Curve *found_cur=(C_Curve*)PyObject_NEW(C_Curve,&Curve_Type);
|
||||
found_cur->curve = curv_iter;
|
||||
PyList_Append (curvlist, (PyObject *)found_cur);
|
||||
|
||||
curv_iter = curv_iter->id.next;
|
||||
index++;
|
||||
}
|
||||
|
||||
return (curvlist);
|
||||
}/*else*/
|
||||
}//else
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@@ -119,7 +119,6 @@ static PyObject *Curve_setSize(C_Curve *self, PyObject *args);
|
||||
/* Python C_Curve methods table: */
|
||||
/*****************************************************************************/
|
||||
static PyMethodDef C_Curve_methods[] = {
|
||||
/* name, method, flags, doc */
|
||||
{"getName", (PyCFunction)Curve_getName,
|
||||
METH_NOARGS,"() - Return Curve Data name"},
|
||||
{"setName", (PyCFunction)Curve_setName,
|
||||
@@ -129,56 +128,56 @@ static PyMethodDef C_Curve_methods[] = {
|
||||
{"setPathLen", (PyCFunction)Curve_setPathLen,
|
||||
METH_VARARGS,"(int) - Sets Curve path length"},
|
||||
{"getTotcol", (PyCFunction)Curve_getTotcol,
|
||||
METH_NOARGS,"() - Return totcol"},
|
||||
METH_NOARGS,"() - Return the number of materials of the curve"},
|
||||
{"setTotcol", (PyCFunction)Curve_setTotcol,
|
||||
METH_VARARGS,"(int) - Sets totcol"},
|
||||
METH_VARARGS,"(int) - Sets the number of materials of the curve"},
|
||||
{"getFlag", (PyCFunction)Curve_getMode,
|
||||
METH_NOARGS,"() - Return flag"},
|
||||
METH_NOARGS,"() - Return flag (see the doc for semantic)"},
|
||||
{"setFlag", (PyCFunction)Curve_setMode,
|
||||
METH_VARARGS,"(int) - Sets flag"},
|
||||
METH_VARARGS,"(int) - Sets flag (see the doc for semantic)"},
|
||||
{"getBevresol", (PyCFunction)Curve_getBevresol,
|
||||
METH_NOARGS,"() - Return bevresol"},
|
||||
METH_NOARGS,"() - Return bevel resolution"},
|
||||
{"setBevresol", (PyCFunction)Curve_setBevresol,
|
||||
METH_VARARGS,"(int) - Sets bevresol"},
|
||||
METH_VARARGS,"(int) - Sets bevel resolution"},
|
||||
{"getResolu", (PyCFunction)Curve_getResolu,
|
||||
METH_NOARGS,"() - Return resolu"},
|
||||
METH_NOARGS,"() - Return U resolution"},
|
||||
{"setResolu", (PyCFunction)Curve_setResolu,
|
||||
METH_VARARGS,"(int) - Sets resolu"},
|
||||
METH_VARARGS,"(int) - Sets U resolution"},
|
||||
{"getResolv", (PyCFunction)Curve_getResolv,
|
||||
METH_NOARGS,"() - Return resolv"},
|
||||
METH_NOARGS,"() - Return V resolution"},
|
||||
{"setResolv", (PyCFunction)Curve_setResolv,
|
||||
METH_VARARGS,"(int) - Sets resolv"},
|
||||
METH_VARARGS,"(int) - Sets V resolution"},
|
||||
{"getWidth", (PyCFunction)Curve_getWidth,
|
||||
METH_NOARGS,"() - Return width"},
|
||||
METH_NOARGS,"() - Return curve width"},
|
||||
{"setWidth", (PyCFunction)Curve_setWidth,
|
||||
METH_VARARGS,"(int) - Sets width"},
|
||||
METH_VARARGS,"(int) - Sets curve width"},
|
||||
{"getExt1", (PyCFunction)Curve_getExt1,
|
||||
METH_NOARGS,"() - Return ext1"},
|
||||
METH_NOARGS,"() - Returns extent 1 of the bevel"},
|
||||
{"setExt1", (PyCFunction)Curve_setExt1,
|
||||
METH_VARARGS,"(int) - Sets ext1"},
|
||||
METH_VARARGS,"(int) - Sets extent 1 of the bevel"},
|
||||
{"getExt2", (PyCFunction)Curve_getExt2,
|
||||
METH_NOARGS,"() - Return ext2"},
|
||||
METH_NOARGS,"() - Return extent 2 of the bevel "},
|
||||
{"setExt2", (PyCFunction)Curve_setExt2,
|
||||
METH_VARARGS,"(int) - Sets ext2"},
|
||||
METH_VARARGS,"(int) - Sets extent 2 of the bevel "},
|
||||
{"getControlPoint", (PyCFunction)Curve_getControlPoint,
|
||||
METH_VARARGS,"(int numcurve,int numpoint) - Gets a control point."
|
||||
"\nDepending upon the curve type, returne a list of 4 or 9 floats"},
|
||||
METH_VARARGS,"(int numcurve,int numpoint) -\
|
||||
Gets a control point.Depending upon the curve type, returne a list of 4 or 9 floats"},
|
||||
{"setControlPoint", (PyCFunction)Curve_setControlPoint,
|
||||
METH_VARARGS,"(int numcurve,int numpoint,float x,float y,float z,\
|
||||
loat w)(nurbs) or (int numcurve,int numpoint,float x1,...,x9(bezier)\
|
||||
Sets a control point "},
|
||||
{"getLoc", (PyCFunction)Curve_getLoc,
|
||||
METH_NOARGS,"() - Gets Location"},
|
||||
METH_NOARGS,"() - Gets Location of the curve (a 3-tuple) "},
|
||||
{"setLoc", (PyCFunction)Curve_setLoc,
|
||||
METH_VARARGS,"(float x,float y,float z) - Sets Location"},
|
||||
METH_VARARGS,"(3-tuple) - Sets Location "},
|
||||
{"getRot", (PyCFunction)Curve_getRot,
|
||||
METH_NOARGS,"() - Gets Rotation"},
|
||||
METH_NOARGS,"() - Gets curve rotation"},
|
||||
{"setRot", (PyCFunction)Curve_setRot,
|
||||
METH_VARARGS,"(float x,float y,float z) - Sets Rotation"},
|
||||
METH_VARARGS,"(3-tuple) - Sets curve rotation"},
|
||||
{"getSize", (PyCFunction)Curve_getSize,
|
||||
METH_NOARGS,"() - Gets Size"},
|
||||
METH_NOARGS,"() - Gets curve size"},
|
||||
{"setSize", (PyCFunction)Curve_setSize,
|
||||
METH_VARARGS,"(float x,float y,float z) - Sets Size"},
|
||||
METH_VARARGS,"(3-tuple) - Sets curve size"},
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -198,7 +197,7 @@ struct Curve* CurveFromPyObject (PyObject *py_obj);
|
||||
/*****************************************************************************/
|
||||
/* Python Curve_Type structure definition: */
|
||||
/*****************************************************************************/
|
||||
PyTypeObject Curve_Type =
|
||||
static PyTypeObject Curve_Type =
|
||||
{
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /* ob_size */
|
||||
|
@@ -31,10 +31,6 @@
|
||||
|
||||
#include "Metaball.h"
|
||||
|
||||
#ifndef FP_INFINITE
|
||||
#define FP_INFINITE 1
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Function: M_Metaball_New */
|
||||
/* Python equivalent: Blender.Metaball.New */
|
||||
@@ -114,26 +110,19 @@ static PyObject *M_Metaball_Get(PyObject *self, PyObject *args)
|
||||
}
|
||||
|
||||
else { /* () - return a list of all mballs in the scene */
|
||||
int index = 0;
|
||||
PyObject *mballlist, *pyobj;
|
||||
PyObject *mballlist;
|
||||
|
||||
mballlist = PyList_New (BLI_countlist (&(G.main->mball)));
|
||||
mballlist = PyList_New (0);
|
||||
|
||||
if (mballlist == NULL)
|
||||
return (PythonReturnErrorObject (PyExc_MemoryError,
|
||||
"couldn't create PyList"));
|
||||
|
||||
while (mball_iter) {
|
||||
pyobj = Metaball_CreatePyObject (mball_iter);
|
||||
|
||||
if (!pyobj)
|
||||
return (PythonReturnErrorObject (PyExc_MemoryError,
|
||||
"couldn't create PyString"));
|
||||
|
||||
PyList_SET_ITEM (mballlist, index, pyobj);
|
||||
|
||||
C_Metaball *found_mball=(C_Metaball*)PyObject_NEW(C_Metaball,&Metaball_Type);
|
||||
found_mball->metaball = mball_iter;
|
||||
PyList_Append (mballlist, (PyObject *)found_mball);
|
||||
mball_iter = mball_iter->id.next;
|
||||
index++;
|
||||
}
|
||||
|
||||
return (mballlist);
|
||||
@@ -149,7 +138,6 @@ PyObject *M_Metaball_Init (void)
|
||||
PyObject *submodule;
|
||||
|
||||
Metaball_Type.ob_type = &PyType_Type;
|
||||
|
||||
printf ("In M_Metaball_Init()\n");
|
||||
submodule = Py_InitModule3("Blender.Metaball",
|
||||
M_Metaball_methods, M_Metaball_doc);
|
||||
@@ -219,18 +207,6 @@ static PyObject *Metaball_getNMetaElems(C_Metaball *self)
|
||||
return (PyInt_FromLong(i) );
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getNMetaElems1(C_Metaball *self)
|
||||
{
|
||||
int i = 0;
|
||||
MetaElem*ptr = self->metaball->disp.first;
|
||||
if(!ptr) return (PyInt_FromLong(0) );
|
||||
while(ptr)
|
||||
{
|
||||
i++;
|
||||
ptr = ptr->next;
|
||||
}
|
||||
return (PyInt_FromLong(i) );
|
||||
}
|
||||
|
||||
|
||||
static PyObject *Metaball_getloc(C_Metaball *self)
|
||||
@@ -244,18 +220,18 @@ static PyObject *Metaball_getloc(C_Metaball *self)
|
||||
|
||||
static PyObject *Metaball_setloc(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
|
||||
float val[3];
|
||||
if (!PyArg_ParseTuple(args, "fff", val,val+1,val+2))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected three float args"));
|
||||
|
||||
self->metaball->loc[0] = val[0];
|
||||
self->metaball->loc[1] = val[1];
|
||||
self->metaball->loc[2] = val[2];
|
||||
|
||||
PyObject *listargs=0;
|
||||
int i;
|
||||
if (!PyArg_ParseTuple(args, "O", &listargs))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected a list"));
|
||||
if (!PyList_Check(listargs))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected a list"));
|
||||
for(i=0;i<3;i++){
|
||||
PyObject * xx = PyList_GetItem(listargs,i);
|
||||
self->metaball->loc[i] = PyFloat_AsDouble(xx);
|
||||
}
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getrot(C_Metaball *self)
|
||||
@@ -269,18 +245,18 @@ static PyObject *Metaball_getrot(C_Metaball *self)
|
||||
|
||||
static PyObject *Metaball_setrot(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
|
||||
float val[3];
|
||||
if (!PyArg_ParseTuple(args, "fff", val,val+1,val+2))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError,"expected three float args"));
|
||||
|
||||
self->metaball->rot[0] = val[0];
|
||||
self->metaball->rot[1] = val[1];
|
||||
self->metaball->rot[2] = val[2];
|
||||
|
||||
PyObject *listargs=0;
|
||||
int i;
|
||||
if (!PyArg_ParseTuple(args, "O", &listargs))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected a list"));
|
||||
if (!PyList_Check(listargs))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected a list"));
|
||||
for(i=0;i<3;i++){
|
||||
PyObject * xx = PyList_GetItem(listargs,i);
|
||||
self->metaball->rot[i] = PyFloat_AsDouble(xx);
|
||||
}
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getsize(C_Metaball *self)
|
||||
@@ -294,19 +270,20 @@ static PyObject *Metaball_getsize(C_Metaball *self)
|
||||
|
||||
static PyObject *Metaball_setsize(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
|
||||
float val[3];
|
||||
if (!PyArg_ParseTuple(args, "fff", val,val+1,val+2))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError,"expected three float args"));
|
||||
|
||||
self->metaball->size[0] = val[0];
|
||||
self->metaball->size[1] = val[1];
|
||||
self->metaball->size[2] = val[2];
|
||||
|
||||
PyObject *listargs=0;
|
||||
int i;
|
||||
if (!PyArg_ParseTuple(args, "O", &listargs))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected a list"));
|
||||
if (!PyList_Check(listargs))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected a list"));
|
||||
for(i=0;i<3;i++){
|
||||
PyObject * xx = PyList_GetItem(listargs,i);
|
||||
self->metaball->size[i] = PyFloat_AsDouble(xx);
|
||||
}
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getWiresize(C_Metaball *self)
|
||||
{
|
||||
return PyFloat_FromDouble(self->metaball->wiresize);
|
||||
@@ -389,14 +366,6 @@ static PyObject *Metaball_getMetadata(C_Metaball *self,PyObject*args)
|
||||
}
|
||||
if(!strcmp(name,"type"))
|
||||
return (PyInt_FromLong(ptr->type));
|
||||
if(!strcmp(name,"lay"))
|
||||
return (PyInt_FromLong(ptr->lay));
|
||||
if(!strcmp(name,"selcol"))
|
||||
return (PyInt_FromLong(ptr->selcol));
|
||||
if(!strcmp(name,"flag"))
|
||||
return (PyInt_FromLong(ptr->flag));
|
||||
if(!strcmp(name,"pad"))
|
||||
return (PyInt_FromLong(ptr->pad));
|
||||
if(!strcmp(name,"x"))
|
||||
return (PyFloat_FromDouble(ptr->x));
|
||||
if(!strcmp(name,"y"))
|
||||
@@ -417,11 +386,6 @@ static PyObject *Metaball_getMetadata(C_Metaball *self,PyObject*args)
|
||||
return (PyFloat_FromDouble(ptr->s));
|
||||
if(!strcmp(name,"len"))
|
||||
return (PyFloat_FromDouble(ptr->len));
|
||||
if(!strcmp(name,"maxrad2"))
|
||||
return (PyFloat_FromDouble(ptr->maxrad2));
|
||||
|
||||
|
||||
|
||||
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "unknown name "));
|
||||
}
|
||||
@@ -435,19 +399,12 @@ static PyObject *Metaball_setMetadata(C_Metaball *self,PyObject*args)
|
||||
char*name = NULL;
|
||||
int intval=-1;
|
||||
float floatval=FP_INFINITE;
|
||||
int ok = 0;
|
||||
MetaElem *ptr;
|
||||
|
||||
/* XXX: This won't work. PyArg_ParseTuple will unpack 'args' in its first
|
||||
* call, so it can't be called again. Better get the value as a float then
|
||||
* compare it with its int part and, if equal, consider it an int. Note
|
||||
* that 'ok' isn't used in this function at all, whatever it was meant for */
|
||||
if (PyArg_ParseTuple(args, "sii", &name,&num,&intval))ok=1;
|
||||
if (PyArg_ParseTuple(args, "sif", &name,&num,&floatval)) ok = 2;
|
||||
if (!ok)
|
||||
if (!PyArg_ParseTuple(args, "sif", &name,&num,&floatval))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, \
|
||||
"expected string,int,int or float arguments"));
|
||||
if (floatval == FP_INFINITE) floatval = (float)intval;
|
||||
"expected string,int,int float arguments"));
|
||||
intval = (int)floatval;
|
||||
/*jump to the num-th MetaElem*/
|
||||
ptr = self->metaball->elems.first;
|
||||
if(!ptr)
|
||||
@@ -460,15 +417,7 @@ return (EXPP_ReturnPyObjError (PyExc_TypeError, \
|
||||
}
|
||||
if(!strcmp(name,"type"))
|
||||
{ptr->type=intval;return (PyInt_FromLong(intval));}
|
||||
if(!strcmp(name,"lay"))
|
||||
{ptr->lay=intval;return (PyInt_FromLong(intval));}
|
||||
if(!strcmp(name,"selcol"))
|
||||
{ptr->selcol=intval;return (PyInt_FromLong(intval));}
|
||||
if(!strcmp(name,"flag"))
|
||||
{ptr->flag=intval;return (PyInt_FromLong(intval));}
|
||||
if(!strcmp(name,"pad"))
|
||||
{ptr->pad=intval;return (PyInt_FromLong(intval));}
|
||||
|
||||
if(!strcmp(name,"x"))
|
||||
{ptr->x=floatval;return (PyFloat_FromDouble(floatval));}
|
||||
if(!strcmp(name,"y"))
|
||||
@@ -489,12 +438,8 @@ return (EXPP_ReturnPyObjError (PyExc_TypeError, \
|
||||
{ptr->s=floatval;return (PyFloat_FromDouble(floatval));}
|
||||
if(!strcmp(name,"len"))
|
||||
{ptr->len=floatval;return (PyFloat_FromDouble(floatval));}
|
||||
if(!strcmp(name,"maxrad2"))
|
||||
{ptr->maxrad2=floatval;return (PyFloat_FromDouble(floatval));}
|
||||
|
||||
|
||||
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "unknown name "));
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "unknown field "));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetatype(C_Metaball *self,PyObject*args)
|
||||
@@ -527,121 +472,6 @@ static PyObject *Metaball_setMetatype(C_Metaball *self,PyObject*args)
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetalay(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num;
|
||||
int i = 0;
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyInt_FromLong(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyInt_FromLong(ptr->lay));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_setMetalay(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num,val, i = 0;
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
if (!PyArg_ParseTuple(args, "ii", &num,&val))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected int int arguments"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->lay = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetaflag(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num;
|
||||
int i = 0;
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyInt_FromLong(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyInt_FromLong(ptr->flag));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_setMetaflag(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num,val, i = 0;
|
||||
if (!PyArg_ParseTuple(args, "ii", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int int argnts"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->flag = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetaselcol(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyInt_FromLong(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyInt_FromLong(ptr->selcol));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_setMetaselcol(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num,val, i = 0;
|
||||
if (!PyArg_ParseTuple(args, "ii", &num,&val))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected int int arguments"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->selcol = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetapad(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyInt_FromLong(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyInt_FromLong(ptr->pad));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_setMetapad(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num,val, i = 0;
|
||||
if (!PyArg_ParseTuple(args, "ii", &num,&val))
|
||||
return (EXPP_ReturnPyObjError(PyExc_TypeError,"expected int int arguments"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->pad = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetax(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
@@ -731,148 +561,6 @@ static PyObject *Metaball_setMetaz(C_Metaball *self,PyObject*args)
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetaexpx(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyFloat_FromDouble(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyFloat_FromDouble(ptr->expx));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_setMetaexpx(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num, i = 0;
|
||||
float val;
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float args"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->expx = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetaexpy(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyFloat_FromDouble(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyFloat_FromDouble(ptr->expy));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_setMetaexpy(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num, i = 0;
|
||||
float val;
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float argts"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->expy = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetaexpz(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyFloat_FromDouble(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyFloat_FromDouble(ptr->expz));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_setMetaexpz(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num, i = 0;
|
||||
float val;
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float argts"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->expz = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
|
||||
static PyObject *Metaball_getMetarad(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyFloat_FromDouble(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyFloat_FromDouble(ptr->rad));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_setMetarad(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num, i = 0;
|
||||
float val;
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float args"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->rad = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_getMetarad2(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num;
|
||||
int i = 0;
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
if(!ptr) return (PyFloat_FromDouble(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyFloat_FromDouble(ptr->rad2));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_setMetarad2(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
int num, i = 0;
|
||||
float val;
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float args"));
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->rad2 = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
static PyObject *Metaball_getMetas(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
@@ -889,12 +577,10 @@ static PyObject *Metaball_getMetas(C_Metaball *self,PyObject*args)
|
||||
static PyObject *Metaball_setMetas(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num, i = 0;
|
||||
MetaElem*ptr = self->metaball->elems.first;
|
||||
float val;
|
||||
MetaElem *ptr;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float args"));
|
||||
ptr = self->metaball->elems.first;
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->s = val;
|
||||
@@ -906,6 +592,9 @@ static PyObject *Metaball_setMetas(C_Metaball *self,PyObject*args)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_getMetalen(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num;
|
||||
@@ -940,38 +629,6 @@ static PyObject *Metaball_setMetalen(C_Metaball *self,PyObject*args)
|
||||
|
||||
|
||||
|
||||
static PyObject *Metaball_getMetamaxrad2(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num;
|
||||
int i = 0;
|
||||
MetaElem *ptr;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "i", &num))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument"));
|
||||
ptr = self->metaball->elems.first;
|
||||
if(!ptr) return (PyFloat_FromDouble(0));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
return (PyFloat_FromDouble(ptr->maxrad2));
|
||||
}
|
||||
|
||||
static PyObject *Metaball_setMetamaxrad2(C_Metaball *self,PyObject*args)
|
||||
{
|
||||
int num, i = 0;
|
||||
float val;
|
||||
MetaElem *ptr;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "if", &num,&val))
|
||||
return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int float args"));
|
||||
ptr = self->metaball->elems.first;
|
||||
if(!ptr) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No MetaElem"));
|
||||
for(i = 0;i<num;i++){ptr = ptr->next;}
|
||||
ptr->maxrad2 = val;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1004,6 +661,8 @@ static PyObject *MetaballGetAttr (C_Metaball *self, char *name)
|
||||
|
||||
if (strcmp (name, "name") == 0)return Metaball_getName (self);
|
||||
if (strcmp (name, "rot") == 0)return Metaball_getrot (self);
|
||||
if (strcmp (name, "loc") == 0)return Metaball_getloc (self);
|
||||
if (strcmp (name, "size") == 0)return Metaball_getsize (self);
|
||||
return Py_FindMethod(C_Metaball_methods, (PyObject *)self, name);
|
||||
}
|
||||
|
||||
@@ -1031,7 +690,17 @@ static int MetaballSetAttr (C_Metaball *self, char *name, PyObject *value)
|
||||
Metaball_setrot (self, valtuple);
|
||||
return 0;
|
||||
}
|
||||
if (strcmp (name, "loc") == 0)
|
||||
{
|
||||
Metaball_setloc (self, valtuple);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp (name, "size") == 0)
|
||||
{
|
||||
Metaball_setsize (self, valtuple);
|
||||
return 0;
|
||||
}
|
||||
return (EXPP_ReturnIntError (PyExc_KeyError,"attribute not found"));
|
||||
}
|
||||
|
||||
@@ -1045,44 +714,3 @@ static PyObject *MetaballRepr (C_Metaball *self)
|
||||
return PyString_FromString(self->metaball->id.name+2);
|
||||
}
|
||||
|
||||
/* Three Python Metaball_Type helper functions needed by the Object module: */
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Function: Metaball_CreatePyObject */
|
||||
/* Description: This function will create a new C_Metaball from an existing */
|
||||
/* Blender metaball structure. */
|
||||
/*****************************************************************************/
|
||||
PyObject *Metaball_CreatePyObject (MetaBall *metaball)
|
||||
{
|
||||
C_Metaball *pymetaball;
|
||||
|
||||
pymetaball = (C_Metaball *)PyObject_NEW (C_Metaball, &Metaball_Type);
|
||||
|
||||
if (!pymetaball)
|
||||
return EXPP_ReturnPyObjError (PyExc_MemoryError,
|
||||
"couldn't create C_Metaball object");
|
||||
|
||||
pymetaball->metaball = metaball;
|
||||
|
||||
return (PyObject *)pymetaball;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Function: Metaball_CheckPyObject */
|
||||
/* Description: This function returns true when the given PyObject is of the */
|
||||
/* type Metaball. Otherwise it will return false. */
|
||||
/*****************************************************************************/
|
||||
int Metaball_CheckPyObject (PyObject *pyobj)
|
||||
{
|
||||
return (pyobj->ob_type == &Metaball_Type);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Function: Metaball_FromPyObject */
|
||||
/* Description: This function returns the Blender metaball from the given */
|
||||
/* PyObject. */
|
||||
/*****************************************************************************/
|
||||
MetaBall *Metaball_FromPyObject (PyObject *pyobj)
|
||||
{
|
||||
return ((C_Metaball *)pyobj)->metaball;
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@
|
||||
* Contributor(s): Jacques Guignot
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef EXPP_METABALL_H
|
||||
#define EXPP_METABALL_H
|
||||
@@ -103,41 +103,20 @@ static PyObject *Metaball_setRendersize(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getThresh(C_Metaball *self);
|
||||
static PyObject *Metaball_setThresh(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getNMetaElems(C_Metaball *self);
|
||||
static PyObject *Metaball_getNMetaElems1(C_Metaball *self);
|
||||
static PyObject *Metaball_getMetatype(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetatype(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetadata(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetadata(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetalay(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetalay(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetaflag(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetaflag(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetaselcol(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetaselcol(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetapad(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetapad(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetax(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetax(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetay(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetay(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetaz(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetaz(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetaexpx(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetaexpx(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetaexpy(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetaexpy(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetaexpz(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetaexpz(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetarad(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetarad(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetarad2(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetarad2(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetas(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetas(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetalen(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetalen(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getMetamaxrad2(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_setMetamaxrad2(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getloc(C_Metaball *self);
|
||||
static PyObject *Metaball_setloc(C_Metaball *self,PyObject*args);
|
||||
static PyObject *Metaball_getrot(C_Metaball *self);
|
||||
@@ -151,118 +130,66 @@ static PyObject *Metaball_setsize(C_Metaball *self,PyObject*args);
|
||||
static PyMethodDef C_Metaball_methods[] = {
|
||||
/* name, method, flags, doc */
|
||||
{"getName", (PyCFunction)Metaball_getName,\
|
||||
METH_NOARGS, "() - Return Metaball Data name"},
|
||||
|
||||
METH_NOARGS, "() - Return Metaball name"},
|
||||
{"setName", (PyCFunction)Metaball_setName,\
|
||||
METH_VARARGS, "() - Sets Metaball Data name"},
|
||||
|
||||
METH_VARARGS, "() - Sets Metaball name"},
|
||||
{"getWiresize", (PyCFunction)Metaball_getWiresize,\
|
||||
METH_NOARGS, "() - Return Metaball Data wiresize"},
|
||||
|
||||
METH_NOARGS, "() - Return Metaball wire size"},
|
||||
{"setWiresize", (PyCFunction)Metaball_setWiresize,\
|
||||
METH_VARARGS, "() - Sets Metaball Data wiresize"},
|
||||
|
||||
METH_VARARGS, "() - Sets Metaball wire size"},
|
||||
{"getRendersize", (PyCFunction)Metaball_getRendersize,\
|
||||
METH_NOARGS, "() - Return Metaball Data rendersize"},
|
||||
|
||||
METH_NOARGS, "() - Return Metaball render size"},
|
||||
{"setRendersize", (PyCFunction)Metaball_setRendersize,\
|
||||
METH_VARARGS, "() - Sets Metaball Data rendersize"},
|
||||
|
||||
METH_VARARGS, "() - Sets Metaball render size"},
|
||||
{"getThresh", (PyCFunction)Metaball_getThresh,\
|
||||
METH_NOARGS, "() - Return Metaball Data thresh"},
|
||||
|
||||
METH_NOARGS, "() - Return Metaball threshold"},
|
||||
{"setThresh", (PyCFunction)Metaball_setThresh,\
|
||||
METH_VARARGS, "() - Sets Metaball Data thresh"},
|
||||
|
||||
{"getBbox", (PyCFunction)Metaball_getBbox,\
|
||||
METH_VARARGS, "() - Sets Metaball threshold"},
|
||||
{"getBbox", (PyCFunction)Metaball_getBbox,\
|
||||
METH_NOARGS, "() - Return Metaball bounding box"},
|
||||
|
||||
{"getNMetaElems",(PyCFunction)Metaball_getNMetaElems,\
|
||||
METH_NOARGS, "() - "},
|
||||
|
||||
{"getNMetaElems1",(PyCFunction)Metaball_getNMetaElems1,\
|
||||
METH_NOARGS, "() - "},
|
||||
METH_NOARGS, "() Returns the number of Spheres "},
|
||||
{"getMetatype", (PyCFunction)Metaball_getMetatype , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetatype", (PyCFunction)Metaball_setMetatype , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetadata", (PyCFunction)Metaball_getMetadata , \
|
||||
METH_VARARGS, "() - Gets Metaball MetaData "},
|
||||
METH_VARARGS, "() - Gets Metaball MetaData "},
|
||||
{"setMetadata", (PyCFunction)Metaball_setMetadata , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetalay", (PyCFunction)Metaball_getMetalay , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetalay", (PyCFunction)Metaball_setMetalay , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetaflag", (PyCFunction)Metaball_getMetaflag , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetaflag", (PyCFunction)Metaball_setMetaflag , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetaselcol", (PyCFunction)Metaball_getMetaselcol , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetaselcol", (PyCFunction)Metaball_setMetaselcol , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetapad", (PyCFunction)Metaball_getMetapad , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetapad", (PyCFunction)Metaball_setMetapad , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetax", (PyCFunction)Metaball_getMetax , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - gets the x coordinate of the metaelement "},
|
||||
{"setMetax", (PyCFunction)Metaball_setMetax , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() -sets the x coordinate of the metaelement "},
|
||||
{"getMetay", (PyCFunction)Metaball_getMetay , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - gets the y coordinate of the metaelement"},
|
||||
{"setMetay", (PyCFunction)Metaball_setMetay , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - sets the y coordinate of the metaelement"},
|
||||
{"getMetaz", (PyCFunction)Metaball_getMetaz , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - gets the z coordinate of the metaelement"},
|
||||
{"setMetaz", (PyCFunction)Metaball_setMetaz , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetaexpx", (PyCFunction)Metaball_getMetaexpx , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetaexpx", (PyCFunction)Metaball_setMetaexpx , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetaexpy", (PyCFunction)Metaball_getMetaexpy , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetaexpy", (PyCFunction)Metaball_setMetaexpy , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetaexpz", (PyCFunction)Metaball_getMetaexpz , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetaexpz", (PyCFunction)Metaball_setMetaexpz , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetarad", (PyCFunction)Metaball_getMetarad , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetarad", (PyCFunction)Metaball_setMetarad , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetarad2", (PyCFunction)Metaball_getMetarad2 , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetarad2", (PyCFunction)Metaball_setMetarad2 , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - sets the z coordinate of the metaelement"},
|
||||
{"getMetas", (PyCFunction)Metaball_getMetas , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - gets the s coordinate of the metaelement"},
|
||||
{"setMetas", (PyCFunction)Metaball_setMetas , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - sets the s coordinate of the metaelement"},
|
||||
{"getMetalen", (PyCFunction)Metaball_getMetalen , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - gets the length of the metaelement."},
|
||||
{"setMetalen", (PyCFunction)Metaball_setMetalen , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"getMetamaxrad2", (PyCFunction)Metaball_getMetamaxrad2 , \
|
||||
METH_VARARGS, "() - "},
|
||||
{"setMetamaxrad2", (PyCFunction)Metaball_setMetamaxrad2 , \
|
||||
METH_VARARGS, "() - "},
|
||||
METH_VARARGS, "() - sets the length of the metaelement."},
|
||||
{"getloc", (PyCFunction)Metaball_getloc , \
|
||||
METH_NOARGS, "() - Gets Metaball loc values"},
|
||||
METH_NOARGS, "() - Gets Metaball loc values"},
|
||||
{"setloc", (PyCFunction)Metaball_setloc , \
|
||||
METH_VARARGS, "(f f f) - Sets Metaball loc values"},
|
||||
METH_VARARGS, "(f f f) - Sets Metaball loc values"},
|
||||
{"getrot", (PyCFunction)Metaball_getrot , \
|
||||
METH_NOARGS, "() - Gets Metaball rot values"},
|
||||
METH_NOARGS, "() - Gets Metaball rot values"},
|
||||
{"setrot", (PyCFunction)Metaball_setrot , \
|
||||
METH_VARARGS, "(f f f) - Sets Metaball rot values"},
|
||||
METH_VARARGS, "(f f f) - Sets Metaball rot values"},
|
||||
{"getsize", (PyCFunction)Metaball_getsize , \
|
||||
METH_NOARGS, "() - Gets Metaball size values"},
|
||||
METH_NOARGS, "() - Gets Metaball size values"},
|
||||
{"setsize", (PyCFunction)Metaball_setsize , \
|
||||
METH_VARARGS, "(f f f) - Sets Metaball size values"},
|
||||
/*end of MetaElem data*/
|
||||
METH_VARARGS, "(f f f) - Sets Metaball size values"},
|
||||
/*end of MetaElem data*/
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -278,8 +205,8 @@ static PyObject *MetaballRepr (C_Metaball *self);
|
||||
/*****************************************************************************/
|
||||
/* Python Metaball_Type structure definition: */
|
||||
/*****************************************************************************/
|
||||
PyTypeObject Metaball_Type =
|
||||
{
|
||||
static PyTypeObject Metaball_Type =
|
||||
{
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /* ob_size */
|
||||
"Metaball", /* tp_name */
|
||||
@@ -301,6 +228,6 @@ PyTypeObject Metaball_Type =
|
||||
0,0,0,0,0,0,
|
||||
C_Metaball_methods, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* EXPP_METABALL_H */
|
||||
|
Reference in New Issue
Block a user