清理文件中的nan数值


import pymel.core as pm

# 清理文件中的nan数值
animcurves = pm.ls(type='animCurve')

for animcurve in animcurves:
    allkeys = pm.keyframe(animcurve ,q=1, tc=1, vc=1)
    for key in allkeys:
        if pm.datatypes.isnan(key[1]):
            pm.cutKey(animcurve, time=[key[0],key[0]], clear=1)

评论
  目录