Week 4


More Script Editor.

Tasked with creating a window using only Python. Exercise in personal research and searching for several ways to apply Python code. Not all of them work.

Also figured out how to add in sliders and colour wheels. Have yet to make them do something.


import maya.cmds as cmds  
# Make a new window 
# 
window = cmds.window( title="Long Name", iconName='Short Name', widthHeight=(200, 55) ) 
cmds.columnLayout( adjustableColumn=True ) 
cmds.button( label='Do Nothing' ) 
cmds.button( label='Close', command=('cmds.deleteUI(\"' + window + '\", window=True)') ) 
cmds.setParent( '..' ) 
cmds.showWindow( window )

Leave a comment

Log in with itch.io to leave a comment.