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, 18 insertions, 0 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 8c4d8db4..7b639bf5 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -107,6 +107,22 @@ class ExportGLTF2_Base:
default=''
)
+ export_image_format: EnumProperty(
+ name='Image Format',
+ items=(('NAME', 'from image name',
+ 'Determine the output format from the blender image name'),
+ ('JPEG', 'jpeg image format (.jpg)',
+ 'encode and save textures as .jpeg files. Be aware of a possible loss in quality.'),
+ ('PNG', 'png image format (.png)',
+ 'encode and save textures as .png files.')
+ ),
+ description=(
+ 'Output format for images. PNG is lossless and generally preferred, but JPEG might be preferable for web '
+ 'applications due to the smaller file size'
+ ),
+ default='NAME'
+ )
+
export_texcoords: BoolProperty(
name='UVs',
description='Export UVs (texture coordinates) with meshes',
@@ -348,6 +364,7 @@ class ExportGLTF2_Base:
export_settings['gltf_filedirectory'] = os.path.dirname(export_settings['gltf_filepath']) + '/'
export_settings['gltf_format'] = self.export_format
+ export_settings['gltf_image_format'] = self.export_image_format
export_settings['gltf_copyright'] = self.export_copyright
export_settings['gltf_texcoords'] = self.export_texcoords
export_settings['gltf_normals'] = self.export_normals
@@ -428,6 +445,7 @@ class ExportGLTF2_Base:
col.prop(self, 'export_extras')
col.prop(self, 'will_save_settings')
col.prop(self, 'export_copyright')
+ col.prop(self, 'export_image_format')
def draw_mesh_settings(self):
col = self.layout.box().column()