Skip to content

Commit

Permalink
Core: anim_utils uses dict.iteritems() and errors in Python 3 Fixes #203
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Jan 11, 2023
1 parent 704e9db commit bb5af2a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion release/scripts/mgear/core/anim_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import traceback
from functools import partial

from .six import PY2

# Maya imports
from maya import cmds
import pymel.core as pm
Expand Down Expand Up @@ -2339,7 +2341,12 @@ def bakeAnimation(
pm.cutKey(fkControls, at=channels, time=(startFrame, endFrame))
pm.cutKey(ikControls, at=channels, time=(startFrame, endFrame))

for frame, matchDict in matchMatrix_dict.iteritems():
if PY2:
dic_items = matchMatrix_dict.iteritems
else:
dic_items = matchMatrix_dict.items

for frame, matchDict in dic_items():
pm.currentTime(frame)
transferFunc(fkControls, ikControls, matchMatrix_dict=matchDict)

Expand Down

0 comments on commit bb5af2a

Please sign in to comment.