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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-02 22:55:32 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-02 22:55:32 +0400
commit30f1f28a8af3b393608b5869512a8823111294ad (patch)
tree035cee751100c31e25b55087efa476145b29af64 /source/blender/makesdna
parent97a0ae3e1b7eea3c069da8c6d3c7a3535734059d (diff)
Nodes: add support for shader nodes on world and lamps, in addition to materials.
The internal render engine does not support them, and they are not accesible in the UI yet, but cycles will use them.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h12
-rw-r--r--source/blender/makesdna/DNA_space_types.h6
-rw-r--r--source/blender/makesdna/DNA_world_types.h6
3 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index e36573473f3..91930f5766e 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -37,10 +37,11 @@
#define MAX_MTEX 18
#endif
-struct MTex;
-struct CurveMapping;
struct AnimData;
+struct bNodeTree;
+struct CurveMapping;
struct Ipo;
+struct MTex;
typedef struct Lamp {
ID id;
@@ -98,11 +99,14 @@ typedef struct Lamp {
struct Ipo *ipo; // XXX depreceated... old animation system
struct MTex *mtex[18]; /* MAX_MTEX */
- short pr_texture;
- char pad6[6];
+ short pr_texture, use_nodes;
+ char pad6[4];
/* preview */
struct PreviewImage *preview;
+
+ /* nodes */
+ struct bNodeTree *nodetree;
} Lamp;
/* **************** LAMP ********************* */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 37c2ea56e76..0c7943ce056 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -400,7 +400,9 @@ typedef struct SpaceNode {
struct bNodeTree *nodetree, *edittree;
int treetype; /* treetype: as same nodetree->type */
short texfrom; /* texfrom object, world or brush */
+ short shaderfrom; /* shader from object or world */
short recalc; /* currently on 0/1, for auto compo */
+ short pad[3];
ListBase linkdrag; /* temporary data for modal linking operator */
struct bGPdata *gpd; /* grease-pencil data */
@@ -418,6 +420,10 @@ typedef struct SpaceNode {
#define SNODE_TEX_WORLD 1
#define SNODE_TEX_BRUSH 2
+/* snode->shaderfrom */
+#define SNODE_SHADER_OBJECT 0
+#define SNODE_SHADER_WORLD 1
+
typedef struct SpaceLogic {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 2bc384b98a7..0c455022db4 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -34,6 +34,7 @@
#include "DNA_ID.h"
struct AnimData;
+struct bNodeTree;
struct Ipo;
struct MTex;
@@ -120,11 +121,14 @@ typedef struct World {
struct Ipo *ipo; // XXX depreceated... old animation system
struct MTex *mtex[18]; /* MAX_MTEX */
- short pr_texture, pad[3];
+ short pr_texture, use_nodes, pad[2];
/* previews */
struct PreviewImage *preview;
+ /* nodes */
+ struct bNodeTree *nodetree;
+
} World;
/* **************** WORLD ********************* */