fix T62426 glTF exporter: bad truncation of file extension

This commit is contained in:
Julien Duroure 2019-03-19 18:20:33 +01:00
parent 0aab8dd7fa
commit 1fe2251292
Notes: blender-bot 2023-02-14 19:18:50 +01:00
Referenced by issue #62426, gltf export .bin filename doesn't match .gltf filename after a Blender SaveAs
1 changed files with 2 additions and 1 deletions

View File

@ -348,7 +348,8 @@ class ExportGLTF2_Base:
export_settings['gltf_displacement'] = self.export_displacement
export_settings['gltf_binary'] = bytearray()
export_settings['gltf_binaryfilename'] = os.path.splitext(os.path.basename(self.filepath))[0] + '.bin'
export_settings['gltf_binaryfilename'] = os.path.splitext(os.path.basename(
bpy.path.ensure_ext(self.filepath,self.filename_ext)))[0] + '.bin'
return gltf2_blender_export.save(context, export_settings)