cwisbg

#Create Render Layers

Jun 8th, 2014
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. #Create Render Layers
  2. from pymel.core import *
  3.  
  4. def createRl():
  5.     beauty = beautyCb.getValue()
  6.     effCb = beautyCb.getValue()
  7.     mat1Cb = beautyCb.getValue()
  8.     mat2Cb = beautyCb.getValue()
  9.     addObjsCb = beautyCb.getValue()
  10.    
  11.    
  12.     print beauty
  13.  
  14.     name = "beauty"
  15.     renderLayer = ls(name)
  16.     if not renderLayer:
  17.         renderLayer = createRenderLayer(name=name,empty=1)
  18.         setAttr(renderLayer.precompTemplate,type="string")
  19.         return renderLayer
  20.     else:
  21.         print name, " already exsists"
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. from pymel.core import *    
  29. win = window(title= "Gui", s=0)
  30. mainLayout = rowColumnLayout(nc=1)
  31. beautyCb = checkBox(l = " Beauty ")
  32. effCb = checkBox(l = " Effects ")
  33. mat1Cb = checkBox(l = " Matte1 ")
  34. mat2Cb = checkBox(l = " Matte2 ")
  35. addObjsCb = checkBox(l = " Add Objects ")
  36. startBtn = button(l="create renderLayers", command=Callback(createRl))
  37. win.show()
Advertisement
Add Comment
Please, Sign In to add comment