Hi, 
in Maya 2024 is no more pymel available so I have to switch to what ever...

But I struggle with Maya cmds. 
How can I translate this to cmds?

import pymel.core as pm
# import os
# import maya.mel as mel
# main call

def dags_menu():
# call menu objects
main_window = pm.language.melGlobals['gMainWindow']
menu_obj = 'DagsMenu'
menu_label = 'Dags Tools'

if pm.menu(menu_obj, label=menu_label, parent=main_window, exists=True):
pm.deleteUI(pm.menu(menu_obj, deleteAllItems=True, e=True))

dags_menu = pm.menu(menu_obj, label=menu_label, parent=main_window, 
tearOff=True)


project_menu(dags_menu)
polygon_menu(dags_menu)
object_menu(dags_menu)
script_menu(dags_menu)
material_menu(dags_menu)
rigging_menu(dags_menu)
camera_menu(dags_menu)
light_menu(dags_menu)
render_menu(dags_menu)


# menu Items
def project_menu(dags_menu):
# Main Submenu Project
# pm.setParent('..', menu=True)
# dags_menu = pm.menu(menu_obj, label=menu_label, parent=main_window, 
tearOff=True)
pm.menuItem(label='Project', subMenu=True, parent=dags_menu, tearOff=True)
# set project
pm.menuItem(
label='Set Project',
command='SetProject',
image='fileOpen.png',
sourceType='mel',
optionBox=False,
visible=True,
)

pm.menuItem(divider=True)
# save
pm.menuItem(
label='Save',
command='SaveScene',
image='save.png',
sourceType='mel',
optionBox=False,
visible=True,
)
# save as
pm.menuItem(
label='Save Scene As...',
command='SaveSceneAs',
image='save.png',
sourceType='mel',
optionBox=False,
visible=True,
)
# save incremental
pm.menuItem(
label='Increment Save',
command='IncrementAndSave',
image='saveToShelf.png',
sourceType='mel',
optionBox=False,
visible=True,
)

Thanks!
D.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/1b086fbd-ac54-435e-b4e7-7d90d1943eb3n%40googlegroups.com.

Reply via email to