[Bf-extensions-cvs] [60c0b418] master: glTF exporter: check bad fcurve name

Julien Duroure noreply at git.blender.org
Sun Jun 23 22:59:43 CEST 2019


Commit: 60c0b4186187a77c487efc90b1d92c799f3d8705
Author: Julien Duroure
Date:   Sun Jun 23 22:59:03 2019 +0200
Branches: master
https://developer.blender.org/rBA60c0b4186187a77c487efc90b1d92c799f3d8705

glTF exporter: check bad fcurve name

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

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

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index a403edf9..938256da 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, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
-    "version": (0, 9, 32),
+    "version": (0, 9, 33),
     'blender': (2, 80, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
index 40a30e78..0c931ebd 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
@@ -148,7 +148,11 @@ def __gather_target(channels: typing.Tuple[bpy.types.FCurve],
 def __get_channel_groups(blender_action: bpy.types.Action, blender_object: bpy.types.Object, export_settings):
     targets = {}
     for fcurve in blender_action.fcurves:
-        target_property = get_target_property_name(fcurve.data_path)
+        try:
+            target_property = get_target_property_name(fcurve.data_path)
+        except:
+            gltf2_io_debug.print_console("WARNING", "Invalid animation fcurve name on action {}".format(blender_action.name))
+            continue
         object_path = get_target_object_path(fcurve.data_path)
 
         # find the object affected by this action



More information about the Bf-extensions-cvs mailing list