Macros | |
#define | C4DPL_INIT_SYS |
#define | C4DPL_INIT |
#define | C4DPL_END |
#define | C4DPL_INIT_VERSION |
#define | C4DPL_MESSAGE |
#define | C4DMSG_PRIORITY |
#define | C4DPL_BUILDMENU |
#define | C4DPL_STARTACTIVITY |
#define | C4DPL_ENDACTIVITY |
#define | C4DPL_COMMANDLINEARGS |
#define | C4DPL_ENDPLUGINACTIVITY0 |
#define | C4DPL_ENDPLUGINACTIVITY1 |
#define | C4DPL_ENDPLUGINACTIVITY2 |
#define | C4DPL_CHANGEDSECURITYTOKEN |
#define | C4DPL_SHUTDOWNTHREADS |
#define | C4DPL_LAYOUTCHANGED |
#define | C4DPL_RELOADPYTHONPLUGINS |
#define | C4DPL_EDITIMAGE |
#define | C4DPL_ENDPROGRAM |
#define | C4DPL_DEVICECHANGE |
#define | C4DPL_NETWORK_CHANGE |
#define | C4DPL_SYSTEM_SLEEP |
#define | C4DPL_SYSTEM_WAKE |
#define | C4DPL_PROGRAM_STARTED |
#define | C4DPL_REGISTERPYPLUG |
#define | C4DPL_NETRENDERRESULT |
#define C4DPL_INIT_SYS |
Initialize system.
#define C4DPL_INIT |
Initialize the plugin, calling PluginStart().
#define C4DPL_END |
End the plugin, calling PluginEnd().
#define C4DPL_INIT_VERSION |
Get the Cinema 4D API version this plugin was compiled with.
#define C4DPL_MESSAGE |
Receive plugin message, calling PluginMessage().
#define C4DMSG_PRIORITY |
Called to query plugins about their loading time priority. Answer with SetPluginPriority(), passing the message data along.
#define C4DPL_BUILDMENU |
Use GetMenuResource() etc. to add menus here if necessary. See main.cpp in the SDK examples.
Called when the menus are built during startup.
#define C4DPL_STARTACTIVITY |
Sent to all plugins after all PluginStart() have been called.
#define C4DPL_ENDACTIVITY |
Sent to all plugins before any PluginEnd() has been called.
This allows to close dialogs, end threads, delete temporary/undo buffers etc. In PluginEnd() it might crash as some resources from other plugins might already be freed.
Consider the following example: Your plugin starts before the gradient datatype plugin (extensions) is registered.
During runtime store a BaseContainer that contains such a GeData. Now to free the BaseContainer in PluginEnd() you will get a crash as the gradient already has been unloaded.
So it is necessary to free all that data depending on other plugins (and all threads, dialogs) when C4DPL_ENDACTIVITY is sent.
#define C4DPL_COMMANDLINEARGS |
Sent to let plugins parse the command line arguments used when starting Cinema 4D. The data
pointer should be cast to C4DPL_CommandLineArgs.
#define C4DPL_ENDPLUGINACTIVITY0 |
Sent after C4DPL_ENDACTIVITY but before the current document is freed. Should only be used if absolutely necessary.
#define C4DPL_ENDPLUGINACTIVITY1 |
A plugin should use C4DPL_ENDACTIVITY whenever possible and C4DPL_ENDPLUGINACTIVITY1 or C4DPL_ENDPLUGINACTIVITY2 only when absolutely necessary.
Sent to all plugins after all documents are closed, but before the plugin registrations are destroyed.
#define C4DPL_ENDPLUGINACTIVITY2 |
A plugin should use C4DPL_ENDACTIVITY whenever possible and C4DPL_ENDPLUGINACTIVITY1 or C4DPL_ENDPLUGINACTIVITY2 only when absolutely necessary.
Sent after all plugin registrations are destroyed, so for example any custom GUI datatypes will no longer be accessible (freeing of a BaseContainer holding one of these will crash).
#define C4DPL_CHANGEDSECURITYTOKEN |
Sent to all plugins if the Security Token of Team Render was changed.
#define C4DPL_SHUTDOWNTHREADS |
Sent to all plugins before the threading system of Cinema 4D is shutdown. After that no threads should be started.
#define C4DPL_LAYOUTCHANGED |
Sent to all plugins after the layout has been switched.
#define C4DPL_RELOADPYTHONPLUGINS |
Sent when Python plugins are to be reloaded.
#define C4DPL_EDITIMAGE |
Sent to allow plugins to start any other actions when Cinema 4D tries to show an image (e.g. in the shader popup).
The data
pointer should be cast to C4DPL_EditImage.
#define C4DPL_ENDPROGRAM |
Sent when Cinema 4D is about to close.
#define C4DPL_DEVICECHANGE |
Sent when a device has changed. The data
pointer should be cast to C4DPL_DeviceChange.
#define C4DPL_NETWORK_CHANGE |
Sent to all plugins if the network configuration on the system changed.
#define C4DPL_SYSTEM_SLEEP |
Send to all plugins if the system goes to sleep.
#define C4DPL_SYSTEM_WAKE |
Send to all plugins if the system wakes up.
#define C4DPL_PROGRAM_STARTED |
Sent when the application has been started.
#define C4DPL_REGISTERPYPLUG |
Private.
#define C4DPL_NETRENDERRESULT |
Private.