Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 28th, 2012  |  syntax: None  |  size: 0.83 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. """
  2. Toggle-AntiAliasing
  3.  
  4. Copyright: Erwin Santacruz, www.990adjustments.com
  5. Written for CINEMA 4D R12.016
  6.  
  7. Name-US: Toggle-AntiAliasing
  8. Description-US: A quick toggle for anti-aliasing settings.
  9. Make it a button for quick access
  10.  
  11. Script tested on OS X 10.6.4 and Cinema 4D versions:
  12. CINEMA 4D R12.016
  13. CINEMA 4D R12.032
  14.  
  15. Creation Date: 11/01/2011
  16. """
  17.  
  18. import c4d
  19. from c4d import documents
  20.  
  21. best = 2
  22. geometry = 1
  23. none = 0
  24.  
  25. def main():
  26.     doc = documents.GetActiveDocument()
  27.     rd = doc.GetActiveRenderData()
  28.  
  29.     if rd[c4d.RDATA_ANTIALIASING] == none:
  30.         rd[c4d.RDATA_ANTIALIASING] = best
  31.         c4d.StatusSetText("Anti-Aliasing set to Best")
  32.     elif rd[c4d.RDATA_ANTIALIASING] == best:
  33.         rd[c4d.RDATA_ANTIALIASING] = none
  34.         c4d.StatusSetText("Anti-Aliasing set to None")
  35.  
  36.     c4d.EventAdd()
  37.  
  38. if __name__=='__main__':
  39.     main()