SEToolsPlugin.py 文件源码

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

项目:SETools 作者: dtzxporter 项目源码 文件源码
def CreateMenu():
    # Set the diplay's parent
    cmds.setParent(mel.eval("$temp1=$gMainWindow"))

    # Purge old one
    DeleteMenu()

    # Make new menu
    menu = cmds.menu(MENU_DATA['menu'][0], label=MENU_DATA["menu"][1], tearOff=True)    # Recreate the base
    # Add children
    cmds.menuItem(label="Import <- SEAnim", command=lambda x:ImportSEAnim(), annotation="Imports a SEAnim, resetting the scene first")
    cmds.menuItem(label="Import and Blend <- SEAnim", command=lambda x:ImportMergeSEAnim(), annotation="Imports a SEAnim without resetting the scene (Blending the animations together)")
    cmds.menuItem(divider=True)
    cmds.menuItem(label="Export -> SEAnim", command=lambda x:ExportEntireSceneAnim(), annotation="Exports all joints, or all selected joints to a SEAnim file")
    cmds.menuItem(divider=True)
    cmds.menuItem(label="Clean Namespaces", command=lambda x:NamespaceClean(), annotation="Removes all namespaces from the scene")
    cmds.menuItem(label="Place Notetrack", command=lambda x:PlaceNote(), annotation="Places a notetrack at the current scene time")
    cmds.menuItem(label="Select All Joints", command=lambda x:SelectAllJoints(), annotation="Selects all joints")
    cmds.menuItem(label="Select Keyed Joints", command=lambda x:SelectKeyframes(), annotation="Selects keyed joints, this feature does not work with conversion rigs")
    cmds.menuItem(divider=True)
    cmds.menuItem(label="Reset Scene", command=lambda x:ResetSceneAnim(), annotation="Manually reset the scene to bind position")
    cmds.menuItem(label="Clear Curves", command=lambda x:PurgeAllKeyframes(), annotation="Manually delete all cached keyframe curves in the scene")
    cmds.menuItem(divider=True)
    game_menu = cmds.menuItem(label="Game Specific Tools", subMenu=True)    # Make game specific submenu
    cmds.menuItem(label="Call of Duty", subMenu=True)
    cmds.menuItem(label="Attach Weapon to Rig", command=lambda x:WeaponBinder(), annotation="Attatches the weapon to the viewhands, does not work properly with conversion rigs")
    cmds.setParent(game_menu, menu=True)    # Close out menu (Call of Duty)
    cmds.setParent(menu, menu=True)         # Close out menu (Game tools)
    cmds.menuItem(divider=True)
    cmds.menuItem(label="Reload Plugin", command=lambda x:ReloadMayaPlugin(), annotation="Attempts to reload the plugin")
    cmds.menuItem(label="About", command=lambda x:AboutWindow())

# Reloads a maya plugin
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号