Skip to content

Instantly share code, notes, and snippets.

@MikeUdin
Created June 26, 2017 11:14
Show Gist options
  • Save MikeUdin/930a79d3d0b98b1554e3caef61013beb to your computer and use it in GitHub Desktop.
Save MikeUdin/930a79d3d0b98b1554e3caef61013beb to your computer and use it in GitHub Desktop.
Cinema4D Python Toogle Script Example: ToogleBoolParameter.py
import c4d
# Toggle selecting render settings Render Region parameter
# Author: Mike Udin
# http://mikeudin.net
def main():
rd = doc.GetActiveRenderData()
rd[c4d.RDATA_RENDERREGION] = not rd[c4d.RDATA_RENDERREGION]
status_text = ('Disabled','Enabled')[rd[c4d.RDATA_RENDERREGION]]
c4d.StatusSetText(status_text)
c4d.EventAdd()
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment