cwisbg

activate_VewPort2.0_v0.1

Jan 17th, 2012
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. # view port 2.o
  2. from pymel.core import *
  3. #import maya.core as mc
  4. currentPanel = getPanel(withFocus=1)
  5. #create Sun and set attr
  6. rendering.directionalLight(n='Sun')
  7. move('Sun',-2,0,1.5, ws=1, r=1)
  8. rotate('Sun', -60,-40,0, ws=1)
  9. setAttr("SunShape.useDepthMapShadows", 1)
  10. setAttr ("SunShape.dmapResolution", 1024)
  11. setAttr ("SunShape.dmapFilterSize", 15)
  12. # ambient ligth
  13. ambientLight(n='ambientLight_Fill')
  14. setAttr( "ambientLight_FillShape.intensity", 0.3)
  15. move('ambientLight_Fill',-2,0,1.5, ws=1, r=1)
  16. #refresh(cv=1)
  17. #updateModelPanelBar(' modelPanel4')
  18.  
  19.  
  20.  
  21. setAttr("hardwareRenderingGlobals.ssaoEnable", 1)
  22. setAttr("hardwareRenderingGlobals.ssaoAmount", 3)
  23. setAttr ("hardwareRenderingGlobals.multiSampleEnable", 1)
  24. runtime.ActivateViewport20()
  25. runtime.DisplayLight('Sun','ambientLight_Fill')
  26. modelEditor('modelPanel4', e= 1, shadows = 1)# might need to change modelPane14
  27.  
  28. print 'Done'
Advertisement
Add Comment
Please, Sign In to add comment