Python GUIs

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 21/02/2011 at 16:40, xxxxxxxx wrote:

Hello,

I have used Python in C4D before, but just to whip out quick scripts
that wrote data to text files, with no user interaction(no save file dialog, no export options, etc.)

I would like to write an exporter that fits nicely in C4D and I have a few questions:

1. Is it possible to write an exporter that will show in the File > Export menu ?
(If I write a plugin with Python, will it show under Python > My Plugin only,
or it possible to make it accessible through the File > Export menu ?
Is it possible to write a plugin that will show in the File > Export menu, how ?)

2. How do I get started with making GUIs in Python ?
I've noticed the gui.GeDialog class has the functionality I need, but I can't seem
to understand where to start. How do I create a basic dialog ? Is there a sample
somewhere ?

Thank you for your time,
George

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 21/02/2011 at 22:14, xxxxxxxx wrote:

Hi,

I can't answer your first question, but the 2nd one though.
Yes, it is possible to use GUIs with Python. You can Code
them by yourself or you can use ResEdit.
I didn't use Dialogs in Python yet, but in Coffee. You have to create an own class
for the dialog there and i think its the same in Python.

How to start ?
Take a look into the GeDialog (or you better use a ModalDialog for an exporter, so check GeModalDialog)
and also have a look at GeRessource. Create a dialog, save ir to your Plugin Path, load the ressource into a variable, give this ressource your Ge(Modal)Dialog-Subclass, finished. But that's just the simple explanation. :lol:
You could also take a look into the MemoryViewer example for example. It uses a dialog, too, even the examples don't work anymore 😕

Hopefully this helps you a little bit.
Cheers, nux