R20 Startup script location - python_init.py

  • Hi everyone

    Anyone know if it's possible to add a startup script in R20 like in previous versions?

    The old method was adding a python_init.py file to the directory:

    Cinema 4D RXX_XXXXXXX>prefs>python

    The python directory no longer exists so not sure where to put it.



  • I would also like the answer to this question. can anyone enlighten us?

  • edit:
    Go here: {HOME}\AppData\Roaming\Maxon\Cinema4D_RXX_YYYYYYYY\python27\maxon_generated and use the __init__.py to execute scripts.

  • That'll do it. Thanks!

    It's worth noting that this seems to get loaded after all of the other plugins whereas in the method for previous versions it was before. - Just in case that might be a factor for anybody.



  • Hey Adam,

    for now, I don't know better. Docs don't state anything about it yet. Guess, we'll have to wait until devs are back. Maybe someone can shed some light onto this.

  • Global Moderator


    Sorry for being late in the discussion here.

    In R20 python_init.py is no longer executed at startup of Cinema. Sorry this change was not documented.

    The __init__.py script in the preferences path python27/maxon_generated was not meant for this but it can be used as replacement.
    However, as Adam pointed out the difference in his last post here, the __init__.py script in R20 is executed after the plugins are registered. Pre-R20 python_init.py was executed before the plugins registration.
    This means a plugin cannot rely on operations done in python27/maxon_generated/__init__.py.

    Note the other Python files in the directory python27/maxon_generated (_configuration.py and _enums.py) must not be modified.