C4DPL_MESSAGES

Detailed Description

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
 

Macro Definition Documentation

◆ C4DPL_INIT_SYS

#define C4DPL_INIT_SYS

Initialize system.

◆ C4DPL_INIT

#define C4DPL_INIT

Initialize the plugin, calling PluginStart().

◆ C4DPL_END

#define C4DPL_END

End the plugin, calling PluginEnd().

◆ C4DPL_INIT_VERSION

#define C4DPL_INIT_VERSION

Get the Cinema 4D API version this plugin was compiled with.

◆ C4DPL_MESSAGE

#define C4DPL_MESSAGE

Receive plugin message, calling PluginMessage().

◆ C4DMSG_PRIORITY

#define C4DMSG_PRIORITY

Called to query plugins about their loading time priority. Answer with SetPluginPriority(), passing the message data along.

◆ C4DPL_BUILDMENU

#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.

◆ C4DPL_STARTACTIVITY

#define C4DPL_STARTACTIVITY

Sent to all plugins after all PluginStart() have been called.

◆ C4DPL_ENDACTIVITY

#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.

◆ C4DPL_COMMANDLINEARGS

#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.

◆ C4DPL_ENDPLUGINACTIVITY0

#define C4DPL_ENDPLUGINACTIVITY0

Sent after C4DPL_ENDACTIVITY but before the current document is freed. Should only be used if absolutely necessary.

◆ C4DPL_ENDPLUGINACTIVITY1

#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.

◆ C4DPL_ENDPLUGINACTIVITY2

#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).

◆ C4DPL_CHANGEDSECURITYTOKEN

#define C4DPL_CHANGEDSECURITYTOKEN

Sent to all plugins if the Security Token of Team Render was changed.

◆ C4DPL_SHUTDOWNTHREADS

#define C4DPL_SHUTDOWNTHREADS

Sent to all plugins before the threading system of Cinema 4D is shutdown. After that no threads should be started.

◆ C4DPL_LAYOUTCHANGED

#define C4DPL_LAYOUTCHANGED

Sent to all plugins after the layout has been switched.

◆ C4DPL_RELOADPYTHONPLUGINS

#define C4DPL_RELOADPYTHONPLUGINS

Sent when Python plugins are to be reloaded.

◆ C4DPL_EDITIMAGE

#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.

◆ C4DPL_ENDPROGRAM

#define C4DPL_ENDPROGRAM

Sent when Cinema 4D is about to close.

◆ C4DPL_DEVICECHANGE

#define C4DPL_DEVICECHANGE

Sent when a device has changed. The data pointer should be cast to C4DPL_DeviceChange.

◆ C4DPL_NETWORK_CHANGE

#define C4DPL_NETWORK_CHANGE

Sent to all plugins if the network configuration on the system changed.

◆ C4DPL_SYSTEM_SLEEP

#define C4DPL_SYSTEM_SLEEP

Send to all plugins if the system goes to sleep.

◆ C4DPL_SYSTEM_WAKE

#define C4DPL_SYSTEM_WAKE

Send to all plugins if the system wakes up.

◆ C4DPL_PROGRAM_STARTED

#define C4DPL_PROGRAM_STARTED

Sent when the application has been started.

◆ C4DPL_REGISTERPYPLUG

#define C4DPL_REGISTERPYPLUG

Private.

◆ C4DPL_NETRENDERRESULT

#define C4DPL_NETRENDERRESULT

Private.