Skip to content

Instantly share code, notes, and snippets.

@990adjustments
Created November 2, 2011 02:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 990adjustments/1332696 to your computer and use it in GitHub Desktop.
Save 990adjustments/1332696 to your computer and use it in GitHub Desktop.
A quick Cinema 4d Python script to toggle anti-aliasing setting.
"""
Toggle-AntiAliasing
Copyright: Erwin Santacruz, www.990adjustments.com
Written for CINEMA 4D R12.016
Name-US: Toggle-AntiAliasing
Description-US: A quick toggle for anti-aliasing settings.
Make it a button for quick access
Script tested on OS X 10.6.4 and Cinema 4D versions:
CINEMA 4D R12.016
CINEMA 4D R12.032
Creation Date: 11/01/2011
"""
import c4d
from c4d import documents
best = 2
geometry = 1
none = 0
def main():
doc = documents.GetActiveDocument()
rd = doc.GetActiveRenderData()
if rd[c4d.RDATA_ANTIALIASING] == none:
rd[c4d.RDATA_ANTIALIASING] = best
c4d.StatusSetText("Anti-Aliasing set to Best")
elif rd[c4d.RDATA_ANTIALIASING] == best:
rd[c4d.RDATA_ANTIALIASING] = none
c4d.StatusSetText("Anti-Aliasing set to None")
c4d.EventAdd()
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment