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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
 
 * $Id: Node.h,v 1.1 2006/11/23 05:59:09 jesterking Exp $
 
2
 * $Id: Node.h,v 1.2 2007/04/03 11:24:11 jesterking Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
30
30
 * ***** END GPL/BL DUAL LICENSE BLOCK *****
31
31
*/
32
32
 
 
33
#ifdef USE_PYNODES /* note: won't work without patch */
33
34
#ifndef __NODE_H__
34
35
#define __NODE_H__
35
36
 
39
40
 
40
41
#include "RE_shader_ext.h"              /* <- ShadeInput Shaderesult TexResult */
41
42
 
42
 
#ifndef SH_NODE_SCRIPT_READY
43
 
#define SH_NODE_SCRIPT_READY    0
44
 
#define SH_NODE_SCRIPT_LOADED   1
45
 
#define SH_NODE_SCRIPT_REPARSE  2
46
 
#define SH_NODE_SCRIPT_NEW      3
47
 
#define SH_NODE_SCRIPT_CREATED  4
48
 
#define SH_NODE_SCRIPT_UPDATED  5
49
 
#define SH_NODE_SCRIPT_ADDEXIST 6
50
 
#endif
51
 
 
52
43
extern PyTypeObject Node_Type;
53
44
extern PyTypeObject ShadeInput_Type;
54
45
 
58
49
#define BPy_ShadeInput_Check(v) \
59
50
    ((v)->ob_type == &ShadeInput_Type)
60
51
 
 
52
typedef struct BPy_ShadeInput {
 
53
        PyObject_HEAD
 
54
        ShadeInput *shi;
 
55
} BPy_ShadeInput;
 
56
 
 
57
typedef struct {
 
58
        PyObject_VAR_HEAD
 
59
        bNodeType *typeinfo;
 
60
        bNodeStack **stack;
 
61
} BPy_SockMap;
 
62
 
 
63
typedef struct {
 
64
        PyObject_HEAD
 
65
        bNode *node;
 
66
} BPy_DefinitionMap;
 
67
 
61
68
typedef struct BPy_Node {
62
69
        PyObject_HEAD
63
70
        bNode *node;
64
 
        bNodeStack **inputs;
65
 
        bNodeStack **outputs;
66
 
        int altered;
 
71
        bNodeStack **in;
 
72
        bNodeStack **out;
 
73
        ShadeInput *shi;
67
74
} BPy_Node;
68
75
 
69
 
typedef struct BPy_ShadeInput {
70
 
        PyObject_HEAD
71
 
        ShadeInput *shi;
72
 
} BPy_ShadeInput;
73
 
 
74
 
typedef struct {
75
 
        PyObject_VAR_HEAD /* required python macro */
76
 
        bNodeType *typeinfo;
77
 
        bNodeStack **inputs;
78
 
} BPy_SockInMap;
79
 
 
80
 
typedef struct {
81
 
        PyObject_VAR_HEAD /* required python macro */
82
 
        bNodeType *typeinfo;
83
 
        bNodeStack **outputs;
84
 
} BPy_SockOutMap;
85
 
 
86
 
typedef struct {
87
 
        PyObject_HEAD /* required python macro */
88
 
        bNode *node;
89
 
        bNodeStack **outputs;
90
 
} BPy_OutputDefMap;
91
 
 
92
 
typedef struct {
93
 
        PyObject_HEAD /* required python macro */
94
 
        bNode *node;
95
 
        bNodeStack **outputs;
96
 
} BPy_InputDefMap;
97
 
 
98
76
extern PyObject *Node_Init(void);
 
77
extern void InitNode(BPy_Node *self, bNode *node);
99
78
extern BPy_Node *Node_CreatePyObject(bNode *node);
100
 
extern PyObject *Node_CreateOutputDefMap(BPy_Node *self);
101
 
extern PyObject *Node_CreateInputDefMap(BPy_Node *self);
 
79
extern BPy_DefinitionMap *Node_CreateOutputDefMap(bNode *node);
 
80
extern BPy_DefinitionMap *Node_CreateInputDefMap(bNode *node);
 
81
extern void Node_SetStack(BPy_Node *self, bNodeStack **stack, int type);
 
82
extern void Node_SetShi(BPy_Node *self, ShadeInput *shi);
102
83
extern BPy_ShadeInput *ShadeInput_CreatePyObject(ShadeInput *shi);
103
 
extern BPy_SockInMap *Node_getInputs(BPy_Node *self);
104
 
extern BPy_SockOutMap *Node_getOutputs(BPy_Node *self);
105
84
extern void Node_dealloc(BPy_Node *self);
106
85
extern void ShadeInput_dealloc(BPy_ShadeInput *self);
107
86
 
 
87
#define NODE_INPUTSTACK         0
 
88
#define NODE_OUTPUTSTACK        1
 
89
 
108
90
#endif /* __NODE_H__*/
 
91
#endif /* USE_PYNODES */