From 4003baf03d7d6d78ef4c16be79c73edadf87759c Mon Sep 17 00:00:00 2001 From: Julien Duroure Date: Sat, 12 Feb 2022 14:06:54 +0100 Subject: glTF exporter: Option to not export texture images --- io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py') 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 -- cgit v1.2.3