python 玛雅动画热键

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 玛雅动画热键相关的知识,希望对你有一定的参考价值。

#--------------------------------------------------------------------------------------#
# sharpen in tangent

import pymel.core as pm
pm.keyTangent(edit=True, weightLock=False, lock=False, inWeight=.01)

# sharpen out tangent

import pymel.core as pm
pm.keyTangent(edit=True, weightLock=False, lock=False, outWeight=.01)

#--------------------------------------------------------------------------------------#

# toggle graph editor inifinity display on/off

import pymel.core as pm
if pm.animCurveEditor('graphEditor1GraphEd', exists=True):
    ge = 'graphEditor1GraphEd'
    if pm.animCurveEditor(ge, q=True, displayInfinities=True):
        pm.animCurveEditor(ge, edit=True, displayInfinities='off')
    else:
        pm.animCurveEditor(ge, edit=True, displayInfinities='on')
        
#--------------------------------------------------------------------------------------#
# Various paste options

# paste keys insert at current frame

import pymel.core as pm
current_frame = pm.getCurrentTime()
pm.pasteKey(option='insert', connect=True, time=(current_frame,))


# paste keys replace completely

import pymel.core as pm
pm.pasteKey(option='replaceCompletely')


# paste keys replace connect (replace but at the starting value of the pasted over curve

import pymel.core as pm
pm.pasteKey(option='replace', connect=True)

# paste keys merge at current frame

import pymel.core as pm
current_frame = pm.getCurrentTime()
pm.pasteKey(option='merge', time=(current_frame,))

#--------------------------------------------------------------------------------------#
# Show only polygons

import pymel.core as pm
activeView = pm.getPanel(withFocus=True)
pm.modelEditor(activeView, edit=True, allObjects=False)
pm.modelEditor(activeView, edit=True, polymeshes=True)

# *** saved above to file so for use:
import show_only_polys
reload(show_only_polys)

#--------------------------------------------------------------------------------------#
# check scene framerate

import pymel.core as pm
current_framerate = pm.currentUnit(q=True, time=True)
if current_framerate != 'ntsc':
    pm.confirmDialog( title='Framerate Warning', icon='warning', message='Framerate not set to 30fps!', button=['Ok'])

#--------------------------------------------------------------------------------------#

以上是关于python 玛雅动画热键的主要内容,如果未能解决你的问题,请参考以下文章

python 取消隐藏玛雅人关节

python 得到玛雅人的场景

python 画面外にふっとんだ玛雅のウィンドウを救出する

UI 窗口关闭时执行命令 |玛雅/蟒蛇

07:玛雅历

Bailian2965 玛雅历日期计算