合并动画层
合并动画层
import pymel.core as pm
pm.optionVar(intValue=('animLayerMergeUp', 1))
pm.optionVar(intValue=('animLayerMergeChilds', 0))
pm.optionVar(intValue=('animLayerMergeResultType', 0))
pm.optionVar(intValue=('animLayerMergeDeleteLayers', 1))
pm.optionVar(intValue=('animLayerMergeBakeAll', 1))
pm.optionVar(floatValue=('animLayerMergeByTime', 1))
pm.optionVar(intValue=('animLayerMergeOversamplingRate', 1))
pm.optionVar(intValue=('animLayerMergeSmartBake', 0))
pm.optionVar(intValue=('animLayerMergeSmartFidelity', 0))
pm.optionVar(floatValue=('animLayerMergeSmartFidelityDelta', 5))
all_animlayer = pm.ls(type='animLayer')
for animlayer in all_animlayer :
pm.mel.animLayerEditorOnSelect(animlayer, 1)
pm.mel.performAnimLayerMerge(0)