Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-12-18 16:46:01 +0300
committerTon Roosendaal <ton@blender.org>2005-12-18 16:46:01 +0300
commite14ff3de3d4a2c9ee11ea53dde4a3a0e33395c0b (patch)
tree04cf3f1c27eecc66086394118ae80a180d2c4e1f /source/blender/makesdna
parent510403277be6c5b34d01b386bfbf66871348f555 (diff)
Orange:
- Sunday merger with bf-blender - Foundations for new Node editor in Blender, generic framework that can be used for Material/Texture, Compositing, Logic or maybe even Sequencer. Note: this doesn't do anything yet, nor save! Is just to get this nice in CVS now. :)
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_node_types.h86
-rw-r--r--source/blender/makesdna/DNA_screen_types.h5
-rw-r--r--source/blender/makesdna/DNA_space_types.h19
-rw-r--r--source/blender/makesdna/intern/makesdna.c2
4 files changed, 109 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
new file mode 100644
index 00000000000..2b54b434624
--- /dev/null
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -0,0 +1,86 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_NODE_TYPES_H
+#define DNA_NODE_TYPES_H
+
+#include "DNA_vec_types.h"
+#include "DNA_listBase.h"
+
+struct ID;
+struct SpaceNode;
+
+#define NODE_MAXSTR 32
+
+typedef struct bNodeSocket {
+ struct bNodeSocket *next, *prev;
+
+ char name[32];
+ int type, flag;
+
+ float locx, locy;
+
+} bNodeSocket;
+
+/* limit data in bNode to what we want to see saved? */
+typedef struct bNode {
+ struct bNode *next, *prev;
+
+ char name[32];
+ int type, flag;
+
+ ListBase inputs, outputs;
+ struct ID *id; /* optional link to libdata */
+
+ float locx, locy; /* root offset for drawing */
+ rctf tot; /* entire boundbox */
+ rctf prv; /* optional preview area */
+
+ int (*drawfunc)(struct SpaceNode *, struct bNode *);
+
+} bNode;
+
+typedef struct bNodeLink {
+ struct bNodeLink *next, *prev;
+
+ bNode *from, *to;
+
+} bNodeLink;
+
+/* the basis for a Node tree, all links and nodes reside internal here */
+typedef struct bNodeTree {
+ ListBase nodes, links;
+
+ ListBase inputs, outputs; /* default inputs and outputs, for solving tree */
+
+} bNodeTree;
+
+
+#endif
+
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index ad45ae7d58d..e0b2a337d9f 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -172,11 +172,12 @@ enum {
SPACE_ACTION,
SPACE_NLA,
SPACE_SCRIPT,
- SPACE_TIME
+ SPACE_TIME,
+ SPACE_NODE
/* SPACE_LOGIC */
};
-/* Adding a new space type? Change SPACEICONMAX in headerbuttons.c */
+/* Adding a new space type? Change SPACEICONMAX in BSE_headerbuttons.h */
/* -- should rather handle this with the above enum... */
#endif
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 5a7e84c62ef..cc8f1b3cad1 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -48,7 +48,7 @@ struct Image;
struct SpaceIpo;
struct BlendHandle;
struct TreeStore;
-
+struct bNodeTree;
/**
* The base structure all the other spaces
@@ -292,6 +292,23 @@ typedef struct SpaceTime {
} SpaceTime;
+typedef struct SpaceNode {
+ SpaceLink *next, *prev;
+ int spacetype;
+ float blockscale;
+ struct ScrArea *area;
+
+ View2D v2d;
+
+ struct ID *from;
+ int flag;
+ float aspect;
+ void *curfont;
+
+ struct bNodeTree *nodetree;
+
+} SpaceNode;
+
#
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index d0186deefad..5417164f915 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -123,6 +123,7 @@ char *includefiles[] = {
"DNA_action_types.h",
"DNA_constraint_types.h",
"DNA_nla_types.h",
+ "DNA_node_types.h",
// if you add files here, please add them at the end
// of makesdna.c (this file) as well
@@ -1129,4 +1130,5 @@ int main(int argc, char ** argv)
#include "DNA_action_types.h"
#include "DNA_constraint_types.h"
#include "DNA_nla_types.h"
+#include "DNA_node_types.h"
/* end of list */