Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-05-23 21:45:20 +0400
committerThomas Dinges <blender@dingto.org>2013-05-23 21:45:20 +0400
commit99b325cebf41054f046d98a7dcf9aea74e165f56 (patch)
tree208b201551a5a3e79d59f7e4a2585ae866025ec1 /intern/cycles/blender/blender_shader.cpp
parent3b0cc9cfd74de9594b1388694ee13a94ba36b91b (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 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r--intern/cycles/blender/blender_shader.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 8331f3a5790..4fcba2f9021 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -354,6 +354,19 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
}
node = refraction;
}
+ else if (b_node.is_a(&RNA_ShaderNodeBsdfToon)) {
+ BL::ShaderNodeBsdfToon b_toon_node(b_node);
+ ToonBsdfNode *toon = new ToonBsdfNode();
+ switch(b_toon_node.component()) {
+ case BL::ShaderNodeBsdfToon::component_DIFFUSE:
+ toon->component = ustring("Diffuse");
+ break;
+ case BL::ShaderNodeBsdfToon::component_GLOSSY:
+ toon->component = ustring("Glossy");
+ break;
+ }
+ node = toon;
+ }
else if (b_node.is_a(&RNA_ShaderNodeBsdfTranslucent)) {
node = new TranslucentBsdfNode();
}