diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-05 13:44:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-05 19:43:48 +0300 |
commit | dbdafe1209a4787d6f8dcafa034bc9ced3c7f365 (patch) | |
tree | b9457d3f0c2c8e54de05dbc594d0e8caa4f514e0 /source/blender/editors/space_node | |
parent | 5bd57aaa052d9578d089a92338d6f0977b5d6c5c (diff) |
Shaders: add target setting to material output node.
This makes it possible to have a single shading nodetree that contains
separate Cycles and Eevee shaders. By default the target is set to All
so shaders are shared.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index da49a772688..d7015ed5e53 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1066,6 +1066,11 @@ static void node_shader_buts_script_ex(uiLayout *layout, bContext *C, PointerRNA #endif } +static void node_buts_output_shader(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "target", 0, "", ICON_NONE); +} + static void node_buts_output_linestyle(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiLayout *row, *col; @@ -1209,6 +1214,11 @@ static void node_shader_set_butfunc(bNodeType *ntype) case SH_NODE_UVALONGSTROKE: ntype->draw_buttons = node_shader_buts_uvalongstroke; break; + case SH_NODE_OUTPUT_MATERIAL: + case SH_NODE_OUTPUT_LAMP: + case SH_NODE_OUTPUT_WORLD: + ntype->draw_buttons = node_buts_output_shader; + break; case SH_NODE_OUTPUT_LINESTYLE: ntype->draw_buttons = node_buts_output_linestyle; break; |