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:
authorJulien Duroure <julien.duroure@gmail.com>2020-04-18 10:31:13 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-04-18 10:31:13 +0300
commitfbcdae78e995142c9312f7fe2616698171ecedf9 (patch)
tree2ce8a9b856961d55e1232d98ca535731f30f1d98
parentb9b54234d12f74380ec9a0740aae145bc66e48e1 (diff)
parent4ef5cd10f6895fbee5704d088fdbc493c0874dd9 (diff)
Merge branch 'blender-v2.83-release'
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py39
3 files changed, 23 insertions, 20 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index b3609fc1..ef06ae1c 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": (1, 3, 3),
+ "version": (1, 3, 4),
'blender': (2, 83, 9),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
index 6edf52cc..488f09ea 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
@@ -122,6 +122,6 @@ def __gather_path(channels: typing.Tuple[bpy.types.FCurve],
}.get(target)
if target is None:
- raise RuntimeError("Cannot export an animation with {} target".format(target))
+ return None
return path
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 6868047e..cf23ead1 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
@@ -191,25 +191,28 @@ def __gather_animation_channel(channels: typing.Tuple[bpy.types.FCurve],
if not __filter_animation_channel(channels, blender_object, export_settings):
return None
- animation_channel = gltf2_io.AnimationChannel(
- extensions=__gather_extensions(channels, blender_object, export_settings, bake_bone),
- extras=__gather_extras(channels, blender_object, export_settings, bake_bone),
- sampler=__gather_sampler(channels, blender_object, export_settings, bake_bone, bake_channel, bake_range_start, bake_range_end, action_name, driver_obj),
- target=__gather_target(channels, blender_object, export_settings, bake_bone, bake_channel, driver_obj)
- )
+ __target= __gather_target(channels, blender_object, export_settings, bake_bone, bake_channel, driver_obj)
+ if __target.path is not None:
+ animation_channel = gltf2_io.AnimationChannel(
+ extensions=__gather_extensions(channels, blender_object, export_settings, bake_bone),
+ extras=__gather_extras(channels, blender_object, export_settings, bake_bone),
+ sampler=__gather_sampler(channels, blender_object, export_settings, bake_bone, bake_channel, bake_range_start, bake_range_end, action_name, driver_obj),
+ target=__target
+ )
+
+ export_user_extensions('gather_animation_channel_hook',
+ export_settings,
+ animation_channel,
+ channels,
+ blender_object,
+ bake_bone,
+ bake_channel,
+ bake_range_start,
+ bake_range_end,
+ action_name)
- export_user_extensions('gather_animation_channel_hook',
- export_settings,
- animation_channel,
- channels,
- blender_object,
- bake_bone,
- bake_channel,
- bake_range_start,
- bake_range_end,
- action_name)
-
- return animation_channel
+ return animation_channel
+ return None
def __filter_animation_channel(channels: typing.Tuple[bpy.types.FCurve],