diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-08 15:38:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-08 15:38:16 +0400 |
commit | db75cc4cdebb536774a8f2d7601319e2c898ecb0 (patch) | |
tree | 19a1990fae100454d661be7000580b1bbce85978 /source/blender/editors/space_node/drawnode.c | |
parent | ee6f269cda2164509a36caf0947663689823a104 (diff) |
Nodes: add cycles shader nodes, these will only be available to render engines
that use the new shading nodes system. Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 648027b9c58..4394b4b1920 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -994,6 +994,54 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA } } +static void node_shader_buts_attribute(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "attribute_name", 0, "Name", ICON_NONE); +} + +static void node_shader_buts_tex_image(uiLayout *layout, bContext *C, PointerRNA *ptr) +{ + //uiItemR(layout, ptr, "image", 0, "", ICON_NONE); + uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL); + uiItemR(layout, ptr, "color_space", 0, "", ICON_NONE); +} + +static void node_shader_buts_tex_sky(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "sun_direction", 0, "", ICON_NONE); + uiItemR(layout, ptr, "turbidity", 0, NULL, ICON_NONE); +} + +static void node_shader_buts_tex_gradient(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "gradient_type", 0, "", ICON_NONE); +} + +static void node_shader_buts_tex_magic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "turbulence_depth", 0, NULL, ICON_NONE); +} + +static void node_shader_buts_tex_wave(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "wave_type", 0, "", ICON_NONE); +} + +static void node_shader_buts_tex_musgrave(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "musgrave_type", 0, "", ICON_NONE); +} + +static void node_shader_buts_tex_voronoi(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "coloring", 0, "", ICON_NONE); +} + +static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE); +} + static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *ptr) { Main *bmain= CTX_data_main(C); @@ -1080,6 +1128,37 @@ static void node_shader_set_butfunc(bNodeType *ntype) case SH_NODE_GEOMETRY: ntype->uifunc= node_shader_buts_geometry; break; + case SH_NODE_ATTRIBUTE: + ntype->uifunc= node_shader_buts_attribute; + break; + case SH_NODE_TEX_SKY: + ntype->uifunc= node_shader_buts_tex_sky; + break; + case SH_NODE_TEX_IMAGE: + ntype->uifunc= node_shader_buts_tex_image; + break; + case SH_NODE_TEX_ENVIRONMENT: + ntype->uifunc= node_shader_buts_tex_image; + break; + case SH_NODE_TEX_GRADIENT: + ntype->uifunc= node_shader_buts_tex_gradient; + break; + case SH_NODE_TEX_MAGIC: + ntype->uifunc= node_shader_buts_tex_magic; + break; + case SH_NODE_TEX_WAVE: + ntype->uifunc= node_shader_buts_tex_wave; + break; + case SH_NODE_TEX_MUSGRAVE: + ntype->uifunc= node_shader_buts_tex_musgrave; + break; + case SH_NODE_TEX_VORONOI: + ntype->uifunc= node_shader_buts_tex_voronoi; + break; + case SH_NODE_BSDF_GLOSSY: + case SH_NODE_BSDF_GLASS: + ntype->uifunc= node_shader_buts_glossy; + break; case NODE_DYNAMIC: ntype->uifunc= node_shader_buts_dynamic; break; |