About
A lot of functionality of Cinema 4D is implemented in form of commands. Such commands are plugins based on CommandData. A command is identified by a specific ID that can be used to invoke that command.
- Note
- The described functions can only be used from the main thread, see Cinema 4D Threads Manual.
-
The command IDs can easily be obtained from the "Customize Commands" dialog.
-
These functions wrap around SendCoreMessage().
-
For modeling commands see SendModelingCommand(), for UV commands see CallUVCommand(), for painter commands see SendPainterCommand().
Functionality
These functions exist to access and utilize existing Cinema 4D commands:
const Int32 commandID = 12098;
const char const char * name
Definition: abstract.h:195
String GetCommandName(Int32 id)
String GetCommandHelp(Int32 id)
Definition: string.h:1235
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
- Warning
- Using CallCommand() is the same as pressing the corresponding button in the GUI. This means the command operates on the active document, adds undo-steps and sends messages. So CallCommand() should only be used in response to some user interaction e.g. when a button in a GeDialog was pressed.
const Int32 commandID = 14047;
{
}
Bool IsCommandEnabled(Int32 id)
void CallCommand(Int32 id, Int32 subid=0)
Further Reading