From 99b325cebf41054f046d98a7dcf9aea74e165f56 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 23 May 2013 17:45:20 +0000 Subject: Cycles / Toon BSDF: * Added a toon bsdf node to Cycles. This was already available as OSL only closure, but is now available inside the SVM backed as well, for CPU and GPU rendering. * There are 2 variations available, diffuse and glossy toon, selectable via a menu inside the node. Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Toon Example render & blend file: http://www.pasteall.org/pic/show.php?id=51970 http://www.pasteall.org/blend/21579 --- source/blender/editors/space_node/drawnode.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/space_node/drawnode.c') diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index e26fe5f6f3e..e6b4f3cbefb 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -894,6 +894,11 @@ static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), Point uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE); } +static void node_shader_buts_toon(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "component", 0, "", ICON_NONE); +} + static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiLayout *row; @@ -1017,6 +1022,9 @@ static void node_shader_set_butfunc(bNodeType *ntype) case SH_NODE_BSDF_REFRACTION: ntype->uifunc = node_shader_buts_glossy; break; + case SH_NODE_BSDF_TOON: + ntype->uifunc = node_shader_buts_toon; + break; case SH_NODE_SCRIPT: ntype->uifunc = node_shader_buts_script; ntype->uifuncbut = node_shader_buts_script_details; -- cgit v1.2.3