Shotgun Toolkit Engine for Maxon Cinema 4D

Hey @jhudsonFP. I just ran into this myself and have a fork that is working with R23 and Python3.

There were a few slight syntax issues but the biggest issue was that R23 no longer adds paths from PYTHONPATH to your sys.path when Cinema4D launches. This meant that all the paths available in shotgun desktop were being disregarded. I’ve fixed this by manually adding the paths from PYTHONPATH to sys.path in the shotgun.pyp plugin that handles bootstraping tk-cinema. I also added support for C4DPYTHONPATH37 which is a new environment variable they are using to replace PYTHONPATH for R23105+. They reason that PYTHONPATH may have remnants of Python2. I think that’s reasonable but also annoying to drop on all their users!

The other big one was making PySide2 and shiboken2 available. To do so I added Shotgun Desktop’s Python3 site-packages PYTHONPATH and C4DPYTHONPATH37 prior to launch, then add them to sys.path in shotgun.pyp.

I’ve created a pull-request for @Mykhailo_Datsyk repo but if you need to get this into production you can point your engine_location to my repo and the latest commit.

Finally, you need to make sure your config is pulling the latest apps from the app_store and unpin the fork of tk-multi-setframerange in the tk-cinema.yml config file.

Good luck!

2 Likes