diff options
author | Ton Roosendaal <ton@blender.org> | 2008-11-12 22:03:50 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-11-12 22:03:50 +0300 |
commit | 8030cb03fd41673b7d687128782a0e21417baaea (patch) | |
tree | b2e25d9a91ecf3713c45a4263f88a934e973e593 /source/blender/blenkernel/BKE_node.h | |
parent | 3fd3a13efc81ce3eafadd5ab31a154bbc25d6e58 (diff) |
Patch #7897 Texture Nodes!
Robin (Frrr) Allen did a decent job on this, so we can also welcome him
as a member in the svn committers team to maintain it!
I do the first commit with some minor fixes:
- get Makefiles work
- fix rounding issue with tiles on unit faces
- removed UI includes from tex node
A nice doc in wiki is here:
http://wiki.blender.org/index.php/User:Frr/TexnodeManual
On the todo for Robin is:
- When using one or more Texture-input nodes, you cannot edit them by activating
(as works now for Material nodes).
- The new "output node" option fails on the default case, when only one
output node is active. It then shows often a blank menu. Will get fixed asap.
- When using a NodeTree-Texture as input node, the menu for 'active output'
should not show. NodeTree should ignore other nodetrees to keep things sane
for now.
- On a future todo is proper usage of "Dxt" and "Dyt" texture vectors for
superior antialising of checkers/bricks.
General note; I know people are dying to get a full integrated shader system
with nodes. In theory we could merge this with Material Nodetrees... but I
rather wait for a solid and very well thought out design proposal for this,
also including design ideas for unifying with a shader language (GPU, CPU).
For the time being this is a nice extension of current textures. :)
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 01c54663c6d..fa3a654c1c2 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -47,6 +47,7 @@ struct rctf; struct ListBase; struct RenderData; struct Scene; +struct Tex; struct GPUMaterial; struct GPUNode; struct GPUNodeStack; @@ -118,6 +119,8 @@ typedef struct bNodeType { #define NODE_CLASS_MATTE 9 #define NODE_CLASS_DISTORT 10 #define NODE_CLASS_OP_DYNAMIC 11 +#define NODE_CLASS_PATTERN 12 +#define NODE_CLASS_TEXTURE 13 /* ************** GENERIC API, TREES *************** */ @@ -377,6 +380,45 @@ void ntreeCompositForceHidden(struct bNodeTree *ntree); void free_compbuf(struct CompBuf *cbuf); /* internal...*/ + +/* ************** TEXTURE NODES *************** */ + +struct TexResult; + +#define TEX_NODE_OUTPUT 101 +#define TEX_NODE_CHECKER 102 +#define TEX_NODE_TEXTURE 103 +#define TEX_NODE_BRICKS 104 +#define TEX_NODE_MATH 105 +#define TEX_NODE_MIX_RGB 106 +#define TEX_NODE_RGBTOBW 107 +#define TEX_NODE_VALTORGB 108 +#define TEX_NODE_IMAGE 109 +#define TEX_NODE_CURVE_RGB 110 +#define TEX_NODE_INVERT 111 +#define TEX_NODE_HUE_SAT 112 +#define TEX_NODE_CURVE_TIME 113 +#define TEX_NODE_ROTATE 114 +#define TEX_NODE_VIEWER 115 +#define TEX_NODE_TRANSLATE 116 + +/* 201-299 reserved. Use like this: TEX_NODE_PROC + TEX_CLOUDS, etc */ +#define TEX_NODE_PROC 200 +#define TEX_NODE_PROC_MAX 300 + +extern struct ListBase node_all_textures; + +/* API */ +int ntreeTexTagAnimated(struct bNodeTree *ntree); +void ntreeTexUpdatePreviews( struct bNodeTree* nodetree ); +void ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, char do_preview, short thread, struct Tex *tex, short which_output); +void ntreeTexCheckCyclics(struct bNodeTree *ntree); +void ntreeTexAssignIndex(struct bNodeTree *ntree, struct bNode *node); +char* ntreeTexOutputMenu(struct bNodeTree *ntree); + + +/**/ + void init_nodesystem(void); void free_nodesystem(void); |