Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/__init__.py')
-rwxr-xr-xio_scene_gltf2/__init__.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 4c758229..c2c028b9 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (1, 7, 15),
+ "version": (1, 7, 16),
'blender': (2, 91, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
@@ -173,6 +173,16 @@ class ExportGLTF2_Base:
default='',
)
+ export_keep_originals: BoolProperty(
+ name='Keep original',
+ description=('Keep original textures files if possible. '
+ 'WARNING: if you use more than one texture, '
+ 'where pbr standard requires only one, only one texture will be used.'
+ 'This can lead to unexpected results'
+ ),
+ default=False,
+ )
+
export_texcoords: BoolProperty(
name='UVs',
description='Export UVs (texture coordinates) with meshes',
@@ -517,6 +527,7 @@ class ExportGLTF2_Base:
export_settings['gltf_filedirectory'],
self.export_texture_dir,
)
+ export_settings['gltf_keep_original_textures'] = self.export_keep_originals
export_settings['gltf_format'] = self.export_format
export_settings['gltf_image_format'] = self.export_image_format
@@ -653,7 +664,10 @@ class GLTF_PT_export_main(bpy.types.Panel):
layout.prop(operator, 'export_format')
if operator.export_format == 'GLTF_SEPARATE':
- layout.prop(operator, 'export_texture_dir', icon='FILE_FOLDER')
+ layout.prop(operator, 'export_keep_originals')
+ if operator.export_keep_originals is False:
+ layout.prop(operator, 'export_texture_dir', icon='FILE_FOLDER')
+
layout.prop(operator, 'export_copyright')
layout.prop(operator, 'will_save_settings')