diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-02-17 09:17:10 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-02-17 09:17:10 +0300 |
commit | 12b98c181f5bfcc71816f1c90233e81ab373109b (patch) | |
tree | 09e32b5079f4e42f0da5472f1a54f0880b77466a | |
parent | 602025d7506e0d1806c86f3a21714050d8960664 (diff) |
glTF exporter: tweak options
4 files changed, 2 insertions, 19 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 20afb1d9..4872b228 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -82,7 +82,6 @@ class ExportGLTF2_Base: items=(('GENERAL', "General", "General settings"), ('MESHES', "Meshes", "Mesh settings"), ('OBJECTS', "Objects", "Object settings"), - ('MATERIALS', "Materials", "Material settings"), ('ANIMATION', "Animation", "Animation settings")), name="ui_tab", description="Export setting categories", @@ -241,13 +240,6 @@ class ExportGLTF2_Base: default=False ) - export_texture_transform: BoolProperty( - name='Texture Transforms', - description='Export texture or UV position, rotation, and scale. ' - 'Uses "KHR_texture_transform" glTF extension', - default=False - ) - export_displacement: BoolProperty( name='Displacement Textures (EXPERIMENTAL)', description='EXPERIMENTAL: Export displacement textures. ' @@ -351,7 +343,6 @@ class ExportGLTF2_Base: export_settings['gltf_morph_tangent'] = False export_settings['gltf_lights'] = self.export_lights - export_settings['gltf_texture_transform'] = self.export_texture_transform export_settings['gltf_displacement'] = self.export_displacement export_settings['gltf_binary'] = bytearray() @@ -389,17 +380,13 @@ class ExportGLTF2_Base: if self.export_normals: col.prop(self, 'export_tangents') col.prop(self, 'export_colors') + col.prop(self, 'export_materials') def draw_object_settings(self): col = self.layout.box().column() col.prop(self, 'export_cameras') col.prop(self, 'export_lights') - def draw_material_settings(self): - col = self.layout.box().column() - col.prop(self, 'export_materials') - col.prop(self, 'export_texture_transform') - def draw_animation_settings(self): col = self.layout.box().column() col.prop(self, 'export_animations') diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py b/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py index ca9ca139..8562e09d 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py @@ -55,7 +55,6 @@ ANIMATIONS = 'gltf_animations' EMBED_IMAGES = 'gltf_embed_images' BINARY = 'gltf_binary' EMBED_BUFFERS = 'gltf_embed_buffers' -TEXTURE_TRANSFORM = 'gltf_texture_transform' USE_NO_COLOR = 'gltf_use_no_color' METALLIC_ROUGHNESS_IMAGE = "metallic_roughness_image" diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py index 1e4a4f90..45f7e232 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py @@ -54,9 +54,6 @@ def __filter_texture_info(blender_shader_sockets_or_texture_slots, export_settin def __gather_extensions(blender_shader_sockets_or_texture_slots, export_settings): - if not export_settings[gltf2_blender_export_keys.TEXTURE_TRANSFORM]: - return None - normal_map_node = blender_shader_sockets_or_texture_slots[0].links[0].from_node if not isinstance(normal_map_node, bpy.types.ShaderNodeNormalMap): return None diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py index 600bf81e..eb796df6 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py @@ -53,7 +53,7 @@ def __filter_texture_info(blender_shader_sockets_or_texture_slots, export_settin def __gather_extensions(blender_shader_sockets_or_texture_slots, export_settings): - if not export_settings[gltf2_blender_export_keys.TEXTURE_TRANSFORM]: + if not hasattr(blender_shader_sockets_or_texture_slots[0], 'links'): return None texture_node = blender_shader_sockets_or_texture_slots[0].links[0].from_node |