Skip to content

Commit

Permalink
fix crash when bad merging tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Jul 16, 2023
1 parent f5b7a45 commit 60b7e7e
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ def merge_tracks_perform(merged_tracks, animations, export_settings):
else:
new_animations = animations

# If some strips have same channel animations, we already ignored some.
# But if the channels was exactly the same, we already pick index of sampler, and we have a mix of samplers, and index of samplers, in animation.samplers
# So get back to list of objects only
# This can lead to unused samplers... but keep them, as, anyway, data are not exported properly
for anim in new_animations:
new_samplers = []
for s in anim.samplers:
if type(s) == int:
new_samplers.append(anim.samplers[s])
else:
new_samplers.append(s)
anim.samplers = new_samplers

return new_animations

def bake_animation(obj_uuid: str, animation_key: str, export_settings, mode=None):
Expand Down

0 comments on commit 60b7e7e

Please sign in to comment.