diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2022-02-12 16:06:54 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2022-02-12 16:06:54 +0300 |
commit | 4003baf03d7d6d78ef4c16be79c73edadf87759c (patch) | |
tree | 73ab4b72016fc850b4b14b458408f02923a830b4 /io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py | |
parent | 3b088fc33dc62950887977ee3ecd0ce01d03ebd3 (diff) |
glTF exporter: Option to not export texture images
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py index a8ec7f79..96146523 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py @@ -35,6 +35,7 @@ def gather_texture( :param export_settings: configuration of the export :return: a glTF 2.0 texture with sampler and source embedded (will be converted to references by the exporter) """ + if not __filter_texture(blender_shader_sockets, export_settings): return None @@ -56,6 +57,9 @@ def gather_texture( def __filter_texture(blender_shader_sockets, export_settings): + # User doesn't want to export textures + if export_settings['gltf_image_format'] == "NONE": + return None return True |