Apologies if this is painfully obvious and i'm missing something, but...
Could you please let me know how to use the new c4dpy for Cinema4D R20 SP1?
the IDE I will be using is JetBrains - PyCharm.
Thanks for the help.
I'm terribly sorry for the inconvenience caused. You are right c4dpy needs to be updated for the latest hotfix (Cinema 4D R20 SP1, 20.028). Unfortunately due to our travels I had failed to upload the file. Sorry!
The updated version is now available on our blog's download page.
in fact we have to apologize. It is not painfully obvious. The documentation for c4dpy is currently lacking in the Python SDK documentation. It's being worked on and will follow very soon. Sorry!
Thanks for the quick response.
Ok ill keep my eye on the forum and announcements.
Look forward to using it!!
Okay, I can't promise this is the correct way to do this, but it seems to have worked for me:
C4D > Help > Check for Updates...
Note: I haven't tested on mac, so I'm not sure this works.
Cmd + Space
C:\Users\donovan>"C:\Program Files\MAXON\Cinema 4D R20\c4dpy.exe"
Welcome to the world of C4D and Python 2.7.14 (default, May 3 2018, 18:05:57) [MSC v.1500 64 bit (AMD64)] (c) 2018
Instructions will vary a bit on a per IDE basis.
from c4d import gui
# Welcome to the world of Python
# Script state in the menu or the command palette
# Return True or c4d.CMD_ENABLED to enable, False or 0 to disable
# Alternatively return c4d.CMD_ENABLED|c4d.CMD_VALUE to enable and check/mark
# return True
# Main function
# Execute main()
Additional C4D Py Prep
Python 2.7 (1)
from c4d import
ctrl + space
Congratulations, you've now got AutoComplete working in PyCharm!
If you can't get IntelliSense (autocomplete) working with a default Python install, it's probably not going to work with a C4D Py. If you can do the following, you're in good shape to work with C4D Py in VS Code.
Ctrl + Shift + P
"python.pythonPath": "C:\Program Files\MAXON\Cinema 4D R20\c4dpy.exe"
Windows paths use a \ which needs to be escaped \\ or reversed / for the path to properly register in the VSCode Settings.
"python.pythonPath": "C:/Program Files/MAXON/Cinema 4D R20/c4dpy.exe"
Congratulations, you've now got AutoComplete working in VS Code!
To the C4D Devs: If these instructions are accurate, and you haven't alread written something similar, feel free to include it in the SDK / C4D Py Docs.
-- Edits --
2018/09/05 10:27 - Added screenshot to clarify that you should copy the contents of the Unzipped file to your C4D directory.
2018/09/04 15:50 - Added instructions for VS Code.
You total legend.
Thank you so much for the time and care you took on this. I'll try it out now.
Worked like a charm. Thank you.
The only possible clarification I would add (because despite your fantastic directions, this still got me for a few mins) is that you need to take the contents OUT of the unzipped folder, so that the c4dpy.exe sits in the same folder as the actual cinema4d.exe.
I'm aware you did explain this.. its just been a slow morning.
@alfieb Thanks for the heads up. Added a screenshot to clarify.
Thanks Donovan for your elaborate description.
I'll notify in this thread as soon as the section about c4dpy got added to the Python SDK docs.
Please help us to keep this place tidy and make use of the available tags, when posting. For this thread I already added some.
Someone have tested this workflow on mac? I'm trying to do it on a mac but i can't setup the IDE. Probably the problem is my lack in terminal shell usage but i don't know if possible to execute a .exe file via shell on a mac system. When i drag the c4dpy.app file into the shell and after pressed enter i don't see this "Welcome to the world of C4D and Python 2.7.14 (default, May 3 2018, 18:05:57) [MSC v.1500 64 bit (AMD64)] (c) 2018" but this " -bash: /Applications/MAXON/Cinema 4D R20/c4dpy.app: is a directory". If i drag the c4dpy.exe the result is: -bash: /Applications/MAXON/Cinema 4D R20/c4dpy.exe: cannot execute binary file
Going on i can't set up the environment properly. Someone could help me please? thanks in advance
After the instruction from dskeithbuck, i set up on both windows and mac. With mac its a little different due the way the os packages things. You are getting the error message because the .app is indeed a directory. Open it by right click -> Show package contents -> Contents -> MacOS and in there is the executable you need.
Hope this helps.
@alfieb Thank you so much for your kindly reply! I have solved thanks to your suggestion :-)!
we have updated the Python SDK documentation including c4dpy instructions.
Let us know, if you are missing something in there.
I haven't been able to get c4dpy.exe to run without throwing an 0xC5 access violation error. I have the latest .exe downloaded and placed next to all the other C4D R20 executables, and my R20 instance is running R20.028. Does c4dpy.exe need to be updated for R20.028? I see lots of "UNKNOWNBUILDID" messages in stdout.
Cool! Thanks very much. That's working for me now.
@a_block could you update the link to latest version of c4dpy here?
@mikeudin Thanks for making us aware. We'll change the link with the next docs update.