I am trying to run python code on our linux render nodes like I do with c4dpy on our windows render nodes. There is a c4d python module and a maxon provided python interpreter in the linux render node software so this looks like it should work.
I set up my test environment to use the Cinema 4D provided modules with the following:
I create a test file with the following code:
from c4d import documents
filename = "testscene.c4d"
flags = c4d.SCENEFILTER_NONE
doc = c4d.documents.LoadDocument( filename, flags )
I tested this code on my windows node with:
It completes without error.
On the linux node, I directly call the included python2.7 and run the above script with the following line:
The result is the following error:
Traceback (most recent call last):
File "/storage/neo/Assets/Software/maxon/cinema4d/c4dpy/scripts/testc4d.py", line 3, in
File "/opt/maxon/cinema4dr21.022/bin/resource/modules/python/libs/python27/c4d/init.py", line 1, in
from c4d import utils
File "/opt/maxon/cinema4dr21.022/bin/resource/modules/python/libs/python27/c4d/utils/init.py", line 1, in
from c4d.c4d_enums import *
ImportError: No module named c4d_enums
It seems like the submodule c4d_enums is missing from the c4d module. Does anyone know how to make this work? I contacted support at Maxon and they said I should ask here.
Hi fyeng, thanks for reaching out us.
With regard to your question, I confirm that the workflow you're trying to achieve using the python executable found among the Linux CLR modules is not possible since only c4dpy, as you've already seen, has access to all the needed modules.