SHARE
TWEET

Untitled

a guest Sep 23rd, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from maya.app.renderSetup.model import renderSetup
  2. from render_setup import rs_utils
  3. rs = renderSetup.instance()
  4.  
  5. def renderToggle(*args):
  6.    for layer in rs.getRenderLayers():
  7.       renderable = not layer.isRenderable()
  8.       layer.setRenderable(renderable)
  9. def layerClose(*args):
  10.    rs_utils.collapse_all()
  11.  
  12. if cmds.window('LazyTool', ex = True):
  13.       cmds.deleteUI('LazyTool')
  14.      
  15. cmds.window( title='LazyTool', widthHeight=(275, 55) )
  16. cmds.columnLayout(adjustableColumn=True)
  17. cmds.button(label='RenderSwitch', command=renderToggle, bgc=[.45,.75,.45])
  18. cmds.button(label='CloseAllLayers', command=layerClose, bgc=[.35,.187,.240])
  19. cmds.showWindow()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top