several warning fixes, for a bug-free *and* warnings-free 2.31 !

Just moved some declarations, nothing important.
This commit is contained in:
2003-11-22 23:30:40 +00:00
parent fbc58ed007
commit 86a236b029
3 changed files with 48 additions and 43 deletions

View File

@@ -32,6 +32,22 @@
#include "Build.h"
#include "Effect.h"
/*****************************************************************************/
/* Python BPy_Build methods table: */
/*****************************************************************************/
static PyMethodDef BPy_Build_methods[] = {
{"getLen",(PyCFunction)Build_getLen,
METH_NOARGS,"()-Return Build len"},
{"setLen",(PyCFunction)Build_setLen, METH_VARARGS,
"()- Sets Build len"},
{"getSfra",(PyCFunction)Build_getSfra,
METH_NOARGS,"()-Return Build sfra"},
{"setSfra",(PyCFunction)Build_setSfra, METH_VARARGS,
"()- Sets Build sfra"},
{0}
};
/*****************************************************************************/
/* Python Build_Type structure definition: */
/*****************************************************************************/
@@ -44,7 +60,7 @@ PyTypeObject Build_Type =
0, /* tp_itemsize */
/* methods */
(destructor)BuildDeAlloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_print */
(getattrfunc)BuildGetAttr, /* tp_getattr */
(setattrfunc)BuildSetAttr, /* tp_setattr */
0, /* tp_compare */
@@ -62,6 +78,26 @@ PyTypeObject Build_Type =
/*****************************************************************************/
/* The following string definitions are used for documentation strings. */
/* In Python these will be written to the console when doing a */
/* Blender.Camera.__doc__ */
/*****************************************************************************/
static char M_Build_doc[] =
"The Blender Build module\n\
This module provides access to **Build Data** objects in Blender\n";
static char M_Build_New_doc[] =
"Build.New ():\n\
Return a new Build Data object with the given type and name.";
static char M_Build_Get_doc[] =
"Build.Get (name = None):\n\
Return the build data with the given 'name', None if not found, or\n\
Return a list with all Build Data objects in the current scene,\n\
if no argument was given.";
/*****************************************************************************/
/* Function: M_Build_New */
/* Python equivalent: Blender.Effect.Build.New */
@@ -152,6 +188,7 @@ struct PyMethodDef M_Build_methods[] = {
/*****************************************************************************/
/* Function: Build_Init */
/*****************************************************************************/
PyObject *Build_Init (void)
{
PyObject *submodule;

View File

@@ -52,37 +52,9 @@
/*****************************************************************************/
PyObject *M_Build_New (PyObject *self, PyObject *args);
PyObject *M_Build_Get (PyObject *self, PyObject *args);
/*****************************************************************************/
/* The following string definitions are used for documentation strings. */
/* In Python these will be written to the console when doing a */
/* Blender.Camera.__doc__ */
/*****************************************************************************/
static char M_Build_doc[] =
"The Blender Build module\n\
This module provides access to **Build Data** objects in Blender\n";
static char M_Build_New_doc[] =
"Build.New ():\n\
Return a new Build Data object with the given type and name.";
static char M_Build_Get_doc[] =
"Build.Get (name = None):\n\
Return the build data with the given 'name', None if not found, or\n\
Return a list with all Build Data objects in the current scene,\n\
if no argument was given.";
/*****************************************************************************/
/* Python method structure definition for Blender.Build module: */
/*****************************************************************************/
/*
struct PyMethodDef M_Build_methods[] = {
{"New",(PyCFunction)M_Build_New, METH_VARARGS, 0},
{"Get", M_Build_Get, METH_VARARGS, 0},
{"get", M_Build_Get, METH_VARARGS, 0},
{NULL, NULL, 0, NULL}
};
*/
/*****************************************************************************/
/* Python BPy_Build methods declarations: */
/*****************************************************************************/
@@ -91,20 +63,6 @@ PyObject *Build_setLen(BPy_Build *self,PyObject*a);
PyObject *Build_getSfra(BPy_Build *self);
PyObject *Build_setSfra(BPy_Build *self,PyObject*a);
/*****************************************************************************/
/* Python BPy_Build methods table: */
/*****************************************************************************/
static PyMethodDef BPy_Build_methods[] = {
{"getLen",(PyCFunction)Build_getLen,
METH_NOARGS,"()-Return Build len"},
{"setLen",(PyCFunction)Build_setLen, METH_VARARGS,
"()- Sets Build len"},
{"getSfra",(PyCFunction)Build_getSfra,
METH_NOARGS,"()-Return Build sfra"},
{"setSfra",(PyCFunction)Build_setSfra, METH_VARARGS,
"()- Sets Build sfra"},
{0}
};
/*****************************************************************************/

View File

@@ -107,6 +107,10 @@ static PyObject *Curve_getRot(BPy_Curve *self);
static PyObject *Curve_setRot(BPy_Curve *self, PyObject *args);
static PyObject *Curve_getSize(BPy_Curve *self);
static PyObject *Curve_setSize(BPy_Curve *self, PyObject *args);
static PyObject *Curve_getNumCurves(BPy_Curve *self);
static PyObject *Curve_isNurb( BPy_Curve *self, PyObject *args );
static PyObject *Curve_getNumPoints(BPy_Curve *self, PyObject *args);
static PyObject *Curve_getNumPoints(BPy_Curve *self, PyObject *args);
/*****************************************************************************/
/* Python BPy_Curve methods table: */
@@ -171,6 +175,12 @@ Sets a control point "},
METH_NOARGS,"() - Gets curve size"},
{"setSize", (PyCFunction)Curve_setSize,
METH_VARARGS,"(3-tuple) - Sets curve size"},
{"getNumCurves", (PyCFunction)Curve_getNumCurves,
METH_NOARGS,"() - Gets # of curves"},
{"isNurb", (PyCFunction)Curve_isNurb,
METH_VARARGS,"(nothing or integer) - returns 1 or 0, depending upon the curve being a Nurb"},
{"getNumPoints", (PyCFunction)Curve_getNumPoints,
METH_VARARGS,"(nothing or integer) - returns the number of points of the specified curve"},
{0}
};