[Bf-extensions-cvs] [dbb9b629] master: glTF exporter: fix animation baking bug when sampling is off, and limited to selection only

Julien Duroure noreply at git.blender.org
Fri Apr 29 08:38:58 CEST 2022


Commit: dbb9b62991b35d7f6285419460f3e829e076fd96
Author: Julien Duroure
Date:   Fri Apr 29 08:22:37 2022 +0200
Branches: master
https://developer.blender.org/rBAdbb9b62991b35d7f6285419460f3e829e076fd96

glTF exporter: fix animation baking bug when sampling is off, and limited to selection only

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index ab55c77b..38d20a18 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -4,7 +4,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": (3, 2, 33),
+    "version": (3, 2, 34),
     'blender': (3, 1, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
index 2b8a0682..20a919dc 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
@@ -63,7 +63,9 @@ def gather_animations(  obj_uuid: int,
     if len([a for a in blender_actions if a[2] == "OBJECT"]) == 0:
         # No TRS animation are found for this object.
         # But we need to bake, in case we export selection
-        if export_settings['gltf_selected'] is True and blender_object.type != "ARMATURE":
+        # (Only when force sampling is ON)
+        # If force sampling is OFF, can lead to inconsistant export anyway
+        if export_settings['gltf_selected'] is True and blender_object.type != "ARMATURE" and export_settings['gltf_force_sampling'] is True:
             channels = __gather_channels_baked(obj_uuid, export_settings)
             if channels is not None:
                 animation = gltf2_io.Animation(



More information about the Bf-extensions-cvs mailing list