Maya Scripts?

Isn’t this the reason to have a blog? To post stuff that might help people? Yes Mom, I am going to give it a try! I am going to do my best!!!

Ok, my best wasn’t good enough. No code for you my friend. Blame Wordpress’s insistence to removing spaces in text.

LATER: Hah, eat this, Wordpress!

After the break, a small python script to quickly create a renderlayer with a name:

import maya.cmds as mc
  1.  
  2. gorbenWindow = mc.window()
  3. if(mc.window(gorbenWindow, query=True, exists=True)):
  4.    mc.deleteUI(gorbenWindow)
  5.  
  6. gorbenWindow = mc.window(width=400, height=400, title="New Render Layer")
  7. mc.columnLayout(width=400, columnWidth = 10, rowSpacing = 1)
  8. outputField = mc.textFieldButtonGrp(label='Layer Name', buttonLabel = "Create", buttonCommand = 'doProc()', text='', changeCommand='doProc()')
  9.  
  10. def doProc():
  11.    mc.createRenderLayer(name=mc.textFieldButtonGrp(outputField, query=True, text=True))
  12.    mc.deleteUI(gorbenWindow)
  13.  
  14. mc.showWindow(gorbenWindow)

0 Responses to “Maya Scripts?”


  1. No Comments

Leave a Reply