~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/World.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
 
2
 * $Id: World.h,v 1.13 2004/10/07 19:25:40 stiv Exp $
2
3
 *
3
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
4
5
 *
34
35
 
35
36
#include <Python.h>
36
37
 
37
 
 
38
 
#include "constant.h"
39
 
#include "gen_utils.h"
40
 
#include "bpy_types.h"
41
 
#include "modules.h"
42
 
 
43
 
 
44
 
/*****************************************************************************/
45
 
/* Python API function prototypes for the World module.                     */
46
 
/*****************************************************************************/
47
 
static PyObject *M_World_New (PyObject *self, PyObject *args,
48
 
                               PyObject *keywords);
49
 
static PyObject *M_World_Get (PyObject *self, PyObject *args);
50
 
 
51
 
 
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";
60
 
 
61
 
static char M_World_New_doc[] ="() - return a new World object";
62
 
 
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.";
66
 
 
67
 
 
68
 
 
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},
76
 
  {NULL, NULL, 0, NULL}
77
 
};
78
 
 
79
 
 
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 );
102
 
 
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"},
145
 
  {0}
146
 
};
 
38
#include <DNA_world_types.h>
 
39
//#include "bpy_types.h"
 
40
 
 
41
 
 
42
#define BPy_World_Check(v) ((v)->ob_type==&World_Type)
 
43
 
 
44
/* Python BPy_World structure definition */
 
45
typedef struct {
 
46
        PyObject_HEAD           /* required py macro */
 
47
        World * world;
 
48
} BPy_World;
 
49
 
 
50
extern PyTypeObject World_Type;
147
51
 
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);
156
 
 
157
 
 
158
 
#endif /* EXPP_WORLD_H */
 
56
 
 
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 );
 
62
 
 
63
#endif                          /* EXPP_WORLD_H */