glTF exporter: do not raise error when some not known properties are animated
This commit is contained in:
parent
15d56ea627
commit
4ef5cd10f6
|
@ -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, 2, 66),
|
||||
"version": (1, 2, 67),
|
||||
'blender': (2, 83, 9),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in New Issue