glTF exporter: Fix #124072 - avoid crash exporting empty collection at center

This commit is contained in:
Julien Duroure 2024-07-04 08:57:27 +02:00
parent 69390e970f
commit 8bf4d3c33f
2 changed files with 2 additions and 1 deletions

@ -5,7 +5,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": (4, 2, 56),
"version": (4, 2, 57),
'blender': (4, 2, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

@ -925,5 +925,6 @@ class VExportTree:
if len(centers) == 0:
self.export_settings['gltf_collection_center'] = Vector((0.0, 0.0, 0.0))
return
self.export_settings['gltf_collection_center'] = sum(centers, Vector()) / len(centers)