Python code written in is executed before all plugins registrations. c4d and maxon can be imported and used. location

For R20 and after is located and loaded in this order:

  • Windows:
    1. %APPDATA%/MAXON/python27/

    2. %APPDATA%/MAXON/Cinema 4D R20_XXXXXXXX/python27/

  • MacOS:
    1. ~/Library/Preferences/MAXON/python27/

    2. ~/Library/Preferences/MAXON/Cinema 4D R20_XXXXXXXX/python27/


In R20 SP1 is not loaded.

Before R20 was located:

  • for Windows in %APPDATA%/MAXON/Cinema 4D R19_XXXXXXXX/prefs/python/

  • for MacOS in ~/Library/Preferences/MAXON/Cinema 4D R19_XXXXXXXX/prefs/python/


Few variables can be accessed in


In R20 SP2 variables are not available.

They can be defined as below:
doc = c4d.documents.GetActiveDocument()
op = doc.GetActiveObject()
tp = doc.GetParticleSystem()