diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-01-29 23:57:22 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-01-29 23:57:22 +0300 |
commit | 2caaf64ab10be6f03e234fa5b533e341512fbed5 (patch) | |
tree | 887f6d0d7c58939c9558c81407486d38072f9d47 /io_scene_gltf2/blender/com | |
parent | e88c7ee2a7c091520efe006795817638cd4dcbb0 (diff) |
glTF importer: rewrite material import
Diffstat (limited to 'io_scene_gltf2/blender/com')
-rwxr-xr-x | io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py b/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py index ebb357a8..2b26350d 100755 --- a/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py +++ b/io_scene_gltf2/blender/com/gltf2_blender_material_helpers.py @@ -13,50 +13,6 @@ # limitations under the License. -def get_output_node(node_tree): - """Retrieve output node.""" - output = [node for node in node_tree.nodes if node.type == 'OUTPUT_MATERIAL'][0] - return output - - -def get_output_surface_input(node_tree): - """Retrieve surface input of output node.""" - output_node = get_output_node(node_tree) - return output_node.inputs['Surface'] - - -def get_diffuse_texture(node_tree): - """Retrieve diffuse texture node.""" - for node in node_tree.nodes: - print(node.name) - if node.label == 'BASE COLOR': - return node - - return None - - -def get_preoutput_node_output(node_tree): - """Retrieve node just before output node.""" - output_node = get_output_node(node_tree) - preoutput_node = output_node.inputs['Surface'].links[0].from_node - - # Pre output node is Principled BSDF or any BSDF => BSDF - if 'BSDF' in preoutput_node.type: - return preoutput_node.outputs['BSDF'] - elif 'SHADER' in preoutput_node.type: - return preoutput_node.outputs['Shader'] - else: - print(preoutput_node.type) - - -def get_base_color_node(node_tree): - """Returns the last node of the diffuse block.""" - for node in node_tree.nodes: - if node.label == 'BASE COLOR': - return node - - return None - def get_gltf_node_name(): return "glTF Settings" |