FBX IO: Speed up animation simplification using NumPy #104904

Merged
Thomas Barlow merged 17 commits from Mysteryem/blender-addons:fbx_anim_export_numpy_simplify into blender-v4.0-release 2023-10-06 17:53:02 +02:00
Showing only changes of commit 892a192b6b - Show all commits

View File

@ -2919,8 +2919,8 @@ def fbx_data_from_scene(scene, depsgraph, settings):
for _alayer_key, alayer in astack.values():
for _acnode_key, acnode, _acnode_name in alayer.values():
nbr_acnodes += 1
for _acurve_key, _dval, (acurve_keys, acurve_values), acurve_valid in acnode.values():
if len(acurve_keys):
for _acurve_key, _dval, (keys, _values), acurve_valid in acnode.values():
if len(keys):
nbr_acurves += 1
templates[b"AnimationStack"] = fbx_template_def_animstack(scene, settings, nbr_users=nbr_astacks)
@ -3054,8 +3054,8 @@ def fbx_data_from_scene(scene, depsgraph, settings):
connections.append((b"OO", acurvenode_id, alayer_id, None))
# Animcurvenode -> object property.
connections.append((b"OP", acurvenode_id, elem_id, fbx_prop.encode()))
for fbx_item, (acurve_key, default_value, (acurve_keys, acurve_values), acurve_valid) in acurves.items():
if len(acurve_keys):
for fbx_item, (acurve_key, default_value, (keys, values), acurve_valid) in acurves.items():
if len(keys):
# Animcurve -> Animcurvenode.
connections.append((b"OP", get_fbx_uuid_from_key(acurve_key), acurvenode_id, fbx_item.encode()))