35
36
#include <Python.h>
39
#include "gen_utils.h"
40
#include "bpy_types.h"
44
/*****************************************************************************/
45
/* Python API function prototypes for the World module. */
46
/*****************************************************************************/
47
static PyObject *M_World_New (PyObject *self, PyObject *args,
49
static PyObject *M_World_Get (PyObject *self, PyObject *args);
52
/*****************************************************************************/
53
/* The following string definitions are used for documentation strings. */
54
/* In Python these will be written to the console when doing a */
55
/* Blender.World.__doc__ */
56
/*****************************************************************************/
57
static char M_World_doc[] =
58
"The Blender World module\n\n\
59
This module provides access to **World Data** objects in Blender\n\n";
61
static char M_World_New_doc[] ="() - return a new World object";
63
static char M_World_Get_doc[] ="(name) - return the world with the name 'name', \
64
returns None if not found.\n If 'name' is not specified, \
65
it returns a list of all worlds in the\ncurrent scene.";
69
/*****************************************************************************/
70
/* Python method structure definition for Blender.World module: */
71
/*****************************************************************************/
72
struct PyMethodDef M_World_methods[] = {
73
{"New",(PyCFunction)M_World_New, METH_VARARGS|METH_KEYWORDS,M_World_New_doc},
74
{"Get", M_World_Get, METH_VARARGS, M_World_Get_doc},
75
{"get", M_World_Get, METH_VARARGS, M_World_Get_doc},
80
/*****************************************************************************/
81
/* Python BPy_World methods declarations: */
82
/*****************************************************************************/
83
static PyObject *World_getIpo(BPy_World *self);
84
static PyObject *World_setIpo(BPy_World *self, PyObject *args);
85
static PyObject *World_clearIpo(BPy_World *self);
86
static PyObject *World_getName(BPy_World *self);
87
static PyObject *World_setName(BPy_World *self, PyObject *args);
88
static PyObject *World_getSkytype(BPy_World *self);
89
static PyObject *World_setSkytype(BPy_World *self, PyObject *args );
90
static PyObject *World_getMistype(BPy_World *self);
91
static PyObject *World_setMistype(BPy_World *self, PyObject *args );
92
static PyObject *World_getHor(BPy_World *self);
93
static PyObject *World_setHor(BPy_World *self, PyObject *args );
94
static PyObject *World_getZen(BPy_World *self);
95
static PyObject *World_setZen(BPy_World *self, PyObject *args );
96
static PyObject *World_getAmb(BPy_World *self);
97
static PyObject *World_setAmb(BPy_World *self, PyObject *args );
98
static PyObject *World_getStar(BPy_World *self);
99
static PyObject *World_setStar(BPy_World *self, PyObject *args );
100
static PyObject *World_getMist(BPy_World *self);
101
static PyObject *World_setMist(BPy_World *self, PyObject *args );
103
/*****************************************************************************/
104
/* Python BPy_World methods table: */
105
/*****************************************************************************/
106
static PyMethodDef BPy_World_methods[] = {
107
{"getIpo", (PyCFunction)World_getIpo, METH_NOARGS,
108
"() - Return World Ipo"},
109
{"setIpo", (PyCFunction)World_setIpo, METH_VARARGS,
110
"() - Change this World's ipo"},
111
{"clearIpo", (PyCFunction)World_clearIpo, METH_VARARGS,
112
"() - Unlink Ipo from this World"},
113
{"getName", (PyCFunction)World_getName, METH_NOARGS,
114
"() - Return World Data name"},
115
{"setName", (PyCFunction)World_setName, METH_VARARGS,
116
"() - Return World Data name"},
117
{"getSkytype", (PyCFunction)World_getSkytype, METH_NOARGS,
118
"() - Return World Data skytype"},
119
{"setSkytype", (PyCFunction)World_setSkytype, METH_VARARGS,
120
"() - Return World Data skytype"},
121
{"getMistype", (PyCFunction)World_getMistype, METH_NOARGS,
122
"() - Return World Data mistype"},
123
{"setMistype", (PyCFunction)World_setMistype, METH_VARARGS,
124
"() - Return World Data mistype"},
125
{"getHor", (PyCFunction)World_getHor, METH_NOARGS,
126
"() - Return World Data hor"},
127
{"setHor", (PyCFunction)World_setHor, METH_VARARGS,
128
"() - Return World Data hor"},
129
{"getZen", (PyCFunction)World_getZen, METH_NOARGS,
130
"() - Return World Data zen"},
131
{"setZen", (PyCFunction)World_setZen, METH_VARARGS,
132
"() - Return World Data zen"},
133
{"getAmb", (PyCFunction)World_getAmb, METH_NOARGS,
134
"() - Return World Data amb"},
135
{"setAmb", (PyCFunction)World_setAmb, METH_VARARGS,
136
"() - Return World Data amb"},
137
{"getStar", (PyCFunction)World_getStar, METH_NOARGS,
138
"() - Return World Data star"},
139
{"setStar", (PyCFunction)World_setStar, METH_VARARGS,
140
"() - Return World Data star"},
141
{"getMist", (PyCFunction)World_getMist, METH_NOARGS,
142
"() - Return World Data mist"},
143
{"setMist", (PyCFunction)World_setMist, METH_VARARGS,
144
"() - Return World Data mist"},
38
#include <DNA_world_types.h>
39
//#include "bpy_types.h"
42
#define BPy_World_Check(v) ((v)->ob_type==&World_Type)
44
/* Python BPy_World structure definition */
46
PyObject_HEAD /* required py macro */
50
extern PyTypeObject World_Type;
148
52
/*****************************************************************************/
149
53
/* Python World_Type helper functions needed by Blender (the Init function) */
150
54
/* and Object modules. */
151
55
/*****************************************************************************/
152
PyObject *World_Init (void);
153
PyObject *World_CreatePyObject (World *cam);
154
World *World_FromPyObject (PyObject *pyobj);
155
int World_CheckPyObject (PyObject *pyobj);
158
#endif /* EXPP_WORLD_H */
57
PyObject *World_Init( void );
58
PyObject *World_CreatePyObject( World * world );
59
World *World_FromPyObject( PyObject * pyobj );
60
int World_CheckPyObject( PyObject * pyobj );
61
World *GetWorldByName( char *name );
63
#endif /* EXPP_WORLD_H */