A command is an action that is presented in Cinema 4D's user interface. The command can be invoked by pressing the button in the interface or calling CallCommand() with the command ID.
A custom command is created by implementing a CommandData based class. CommandData::Execute() receives a pointer to the currently active BaseDocument.
See also General Plugin Information Manual and Command Utility Manual.
A custom command plugin must be registered with RegisterCommandPlugin(). The function must be called in the context of PluginStart().
See also Plugin Functions Manual.
GeDialog is the base class for custom dialog windows. A custom window is created by implementing a GeDialog based class.
See GeDialog Manual.
A dialog window can be displayed modal/synchronously (blocking) or non-modal/asynchronously. Such an asynchronous dialog instance must be stored in memory. It is typically stored as a member of a CommandData plugin. The CommandData plugin can be used to open and close the dialog. CommandData::RestoreLayout() must be implemented to handle the dialog correctly in a layout.
The layout is defined with groups that contain various GUI gadgets. It is possible to define the layout by implementing GeDialog::CreateLayout(). It is also possible to define the layout in a layout file.
See Layout and Resource Files Manual.
A user can interact with the gadgets displayed in the dialog. The dialog can react when a value was changed or when a button was pressed. In such a case GeDialog::Command() will be called.
See Interaction and Gadget Values.
Files can simply be read using file streams. File names can be handled using the classic Filename class or the maxon::Url class.
See Filename Manual, Url Manual and InputStream Manual.
This function could be used in a dialog like this: