diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-23 21:02:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-23 21:02:49 +0300 |
commit | a44b08a6c473c0aae9f98dc13f9d000e5ea639bc (patch) | |
tree | 6b70d6026827b5cf6eed3af1c56a38329c2497bf /intern/cycles/blender/blender_shader.cpp | |
parent | 0305fc30b3ba6a1b24e2c9c182ae2e76d553f341 (diff) | |
parent | 0aec2dcd3ae0ed382ffe7b3311a4e30fc88398e4 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 131e76d106e..7d3abe35b20 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -560,6 +560,10 @@ static ShaderNode *add_node(Scene *scene, else if(b_node.is_a(&RNA_ShaderNodeVolumeAbsorption)) { node = new AbsorptionVolumeNode(); } + else if(b_node.is_a(&RNA_ShaderNodeVolumePrincipled)) { + PrincipledVolumeNode *principled = new PrincipledVolumeNode(); + node = principled; + } else if(b_node.is_a(&RNA_ShaderNodeNewGeometry)) { node = new GeometryNode(); } @@ -1028,6 +1032,10 @@ static void add_nodes(Scene *scene, for(b_node->internal_links.begin(b_link); b_link != b_node->internal_links.end(); ++b_link) { BL::NodeSocket to_socket(b_link->to_socket()); SocketType::Type to_socket_type = convert_socket_type(to_socket); + if (to_socket_type == SocketType::UNDEFINED) { + continue; + } + ConvertNode *proxy = new ConvertNode(to_socket_type, to_socket_type, true); input_map[b_link->from_socket().ptr.data] = proxy->inputs[0]; @@ -1051,6 +1059,10 @@ static void add_nodes(Scene *scene, */ for(b_node->inputs.begin(b_input); b_input != b_node->inputs.end(); ++b_input) { SocketType::Type input_type = convert_socket_type(*b_input); + if (input_type == SocketType::UNDEFINED) { + continue; + } + ConvertNode *proxy = new ConvertNode(input_type, input_type, true); graph->add(proxy); @@ -1063,6 +1075,10 @@ static void add_nodes(Scene *scene, } for(b_node->outputs.begin(b_output); b_output != b_node->outputs.end(); ++b_output) { SocketType::Type output_type = convert_socket_type(*b_output); + if (output_type == SocketType::UNDEFINED) { + continue; + } + ConvertNode *proxy = new ConvertNode(output_type, output_type, true); graph->add(proxy); |