SEToolsPlugin.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:SETools 作者: dtzxporter 项目源码 文件源码
def PlaceNote():
    # Notetrack number
    note_tracks = 0
    # We need to ask for a name
    if not (cmds.objExists("SENotes")):
        # We need to make the SENotes parent first
        base_track = cmds.spaceLocator()
        # Rename
        cmds.rename(base_track, "SENotes")
    # Notetrack name
    noteName = "new_notetrack" + str(note_tracks)
    # Now we can make the child (if you have > 50000 notetracks, we got a problem...)
    for npos in xrange(note_tracks, 50000):
        # Setup
        noteName = "new_notetrack" + str(npos)
        # Check
        if not (cmds.objExists(noteName)):
            # Exit
            break
    # Now make it and parent it
    notetrack = cmds.spaceLocator()
    # Rename
    cmds.rename(notetrack, noteName)
    # Parent it
    mel.eval("parent " + noteName + " SENotes")
    # Get current time
    currentFrame = cmds.currentTime(query = True)
    # Key it
    cmds.setKeyframe(noteName, time = currentFrame)
    # Log it
    print("A new notetrack was created")

# Selects all bones
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号