diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-06-23 20:30:58 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-06-23 20:30:58 +0300 |
commit | 2d8c1b2c6184de632f8e21dfd1839749dcc1ec7f (patch) | |
tree | 16daf9dc71603eb02367d7b97569d1254ee500e1 /io_scene_gltf2/blender/exp/gltf2_blender_get.py | |
parent | e47d2bcfad930240bfe15980facdbe0f94e51f23 (diff) |
glTF exporter: texture slots: code cleanup
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_get.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_get.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py index 3cee76b4..4f66aa6a 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py @@ -43,13 +43,13 @@ def get_object_from_datapath(blender_object, data_path: str): return prop -def get_socket_or_texture_slot(blender_material: bpy.types.Material, name: str): +def get_socket(blender_material: bpy.types.Material, name: str): """ - For a given material input name, retrieve the corresponding node tree socket or blender render texture slot. + For a given material input name, retrieve the corresponding node tree socket. - :param blender_material: a blender material for which to get the socket/slot - :param name: the name of the socket/slot - :return: either a blender NodeSocket, if the material is a node tree or a blender Texture otherwise + :param blender_material: a blender material for which to get the socket + :param name: the name of the socket + :return: a blender NodeSocket """ if blender_material.node_tree and blender_material.use_nodes: #i = [input for input in blender_material.node_tree.inputs] @@ -79,13 +79,13 @@ def get_socket_or_texture_slot(blender_material: bpy.types.Material, name: str): return None -def get_socket_or_texture_slot_old(blender_material: bpy.types.Material, name: str): +def get_socket_old(blender_material: bpy.types.Material, name: str): """ For a given material input name, retrieve the corresponding node tree socket in the special glTF node group. - :param blender_material: a blender material for which to get the socket/slot - :param name: the name of the socket/slot - :return: either a blender NodeSocket, if the material is a node tree or a blender Texture otherwise + :param blender_material: a blender material for which to get the socket + :param name: the name of the socket + :return: a blender NodeSocket """ gltf_node_group_name = get_gltf_node_name().lower() if blender_material.node_tree and blender_material.use_nodes: |