Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
What I was doing is just open a c4d file via python. The file is so simple as there is only a cube.
It works in C4D Console,
But not working in c4dpy.
Am I missing something? Pls give me a hint.
Hey @sol87,
it works fine for me here. You are using a relative file path though, which is not supported by these loading functions.
Cheers, Ferdinand
Hello @sol87,
Welcome to the Plugin Café and thank you for reaching out to us.
What you are encountering is intended behavior. LoadFile is intrinsically bound to the GUI of Cinema 4D, e.g., calling it on a bitmap will open the Picture Viewer, calling it on a c4d file will scene into the editor. c4dpy is basically a GUIless Cinema 4D instance governed by a Python interpreter, which makes certain operations impossible (everything that requires a GUI).
LoadFile
c4dpy
LoadDocument should however work fine in c4dpy as it does not try to load the scene into the editor.
Hi @ferdinand ,
Thx so much for your help. But I still I still haven't succeeded to load the file.
I tried LoadDocument method like this, but it returns None.
LoadDocument
None
>>> d = documents.LoadDocument( 'test.c4d', c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS | c4d.SCENEFILTER_MERGESCENE, thread=None) >>> print(d) None
Am I using the loadflags in wrong way?
What I'm actually doing is making a python script to load render settings such as frame range, resolutions, cameras should be rendered from c4d files.
frame range
resolutions
cameras should be rendered
Is there any shortcut to figure it out?
@ferdinand
wow, awesome. It works!
thank you so much.