glTF exporter: tweak options

This commit is contained in:
Julien Duroure 2019-02-17 07:17:10 +01:00
parent 602025d750
commit 12b98c181f
4 changed files with 2 additions and 19 deletions

View File

@ -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')

View File

@ -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"

View File

@ -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

View File

@ -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