Merged revision(s) 57671-57767 from trunk/blender into soc-2013-dingto
[blender.git] / intern / cycles / render / nodes.cpp
index 038b9c24b8a4f59bf99ab9971407520d001f9e1f..3fbcadee42390504af40b450803faf00aa5dcdba 100644 (file)
@@ -1121,12 +1121,15 @@ void MappingNode::compile(OSLCompiler& compiler)
 
 /* Convert */
 
-ConvertNode::ConvertNode(ShaderSocketType from_, ShaderSocketType to_)
+ConvertNode::ConvertNode(ShaderSocketType from_, ShaderSocketType to_, bool autoconvert)
 : ShaderNode("convert")
 {
        from = from_;
        to = to_;
 
+       if(autoconvert)
+               special_type = SHADER_SPECIAL_TYPE_AUTOCONVERT;
+
        assert(from != to);
 
        if(from == SHADER_SOCKET_FLOAT)
@@ -1271,7 +1274,7 @@ void ProxyNode::compile(OSLCompiler& compiler)
 /* BSDF Closure */
 
 BsdfNode::BsdfNode(bool scattering_)
-: ShaderNode("subsurface_scattering"), scattering(scattering_)
+: ShaderNode("bsdf"), scattering(scattering_)
 {
        closure = ccl::CLOSURE_BSSRDF_ID;