hello, i try to open any type of cinema 4d dialog window with my script via c4dpy (open file, save file dialogs etc) and get nothing. it seems like c4dpy ignores any type of pop-up windows. how can i use usual dialog windows or pop-up dialogs with c4dpy? is there any way to do this?
I always wondered about that too, but from what I understand (this isn't documented anywhere), all Cinema GUI-functionality is off limits in c4dpy. You would have to use one of the gui-frameworks to open a dialog. You could either use Python's native tkinter (Cinema's Python does not include it) or something like qt. In tkinter opening file dialogs is quite straight forward (this is Python 3 code).
from tkinter import filedialog
file_names = filedialog.askopenfiles()
file_object = filedialog.asksaveasfile()
Hi @wob unfortunately this is not possible, c4dpy is a regular Cinema 4D executed as command line with the NoGui, and as all NoGui Cinema 4D execution, GeDialog is disabled.
So its a limitation, and as said by zipit there is no Tkinter shipped with Cinema 4D in order to force people to use Cinema 4D dialog.
So possible workarounds are: