diff options
author | Thomas Dinges <blender@dingto.org> | 2013-05-23 21:45:20 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-05-23 21:45:20 +0400 |
commit | 99b325cebf41054f046d98a7dcf9aea74e165f56 (patch) | |
tree | 208b201551a5a3e79d59f7e4a2585ae866025ec1 /source/blender/makesrna | |
parent | 3b0cc9cfd74de9594b1388694ee13a94ba36b91b (diff) |
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 308fab7e610..e57256efd87 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2815,6 +2815,12 @@ static EnumPropertyItem node_glossy_items[] = { {0, NULL, 0, NULL, NULL} }; +static EnumPropertyItem node_toon_items[] = { + {SHD_TOON_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""}, + {SHD_TOON_GLOSSY, "GLOSSY", 0, "Glossy", ""}, + {0, NULL, 0, NULL, NULL} +}; + static EnumPropertyItem node_script_mode_items[] = { {NODE_SCRIPT_INTERNAL, "INTERNAL", 0, "Internal", "Use internal text datablock"}, {NODE_SCRIPT_EXTERNAL, "EXTERNAL", 0, "External", "Use external .osl or .oso file"}, @@ -3427,6 +3433,17 @@ static void def_glossy(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_toon(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "component", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, node_toon_items); + RNA_def_property_ui_text(prop, "Component", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + static void def_sh_bump(StructRNA *srna) { PropertyRNA *prop; |