From 799779d432309e518922d23e3a1d1b5baaece71d Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Fri, 15 Jun 2018 11:03:29 +0200 Subject: Cycles: change Ambient Occlusion shader to output colors. This means the shader can now be used for procedural texturing. New settings on the node are Samples, Inside, Local Only and Distance. Original patch by Lukas with further changes by Brecht. Differential Revision: https://developer.blender.org/D3479 --- source/blender/editors/space_node/drawnode.c | 10 ++++++++++ 1 file changed, 10 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 63bd305c13d..fff6c5d9f2c 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1168,6 +1168,13 @@ static void node_shader_buts_bevel(uiLayout *layout, bContext *UNUSED(C), Pointe uiItemR(layout, ptr, "samples", 0, NULL, ICON_NONE); } +static void node_shader_buts_ambient_occlusion(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "samples", 0, NULL, ICON_NONE); + uiItemR(layout, ptr, "inside", 0, NULL, ICON_NONE); + uiItemR(layout, ptr, "only_local", 0, NULL, ICON_NONE); +} + /* only once called */ static void node_shader_set_butfunc(bNodeType *ntype) { @@ -1311,6 +1318,9 @@ static void node_shader_set_butfunc(bNodeType *ntype) case SH_NODE_BEVEL: ntype->draw_buttons = node_shader_buts_bevel; break; + case SH_NODE_AMBIENT_OCCLUSION: + ntype->draw_buttons = node_shader_buts_ambient_occlusion; + break; } } -- cgit v1.2.3