Skip to content

Commit

Permalink
Warn instead of error for animation tables targeting non-existent joint
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
rdb committed Aug 30, 2020
1 parent b8c90d6 commit 5c2d440
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,10 @@ def build_animations(self, context, bundle):
def add_curves(self, context, name, data):
""" Adds the curves for the given joint from the given <Xfm$Anim>. """

if name not in context.joints:
context.warn("Ignoring animation targeting non-existent joint {}".format(name))
return

fcurves = self.action.fcurves
prefix = 'pose.bones["{}"].'.format(name)

Expand Down

0 comments on commit 5c2d440

Please sign in to comment.