c4d_scenehookdata.h File Reference

Classes

class   SceneHookData

Macros

#define  PLUGINFLAG_SCENEHOOK_NOTDRAGGABLE
#define  PLUGINFLAG_SCENEHOOK_SUPPORT_DOCUMENT_DESCRIPTION
#define  PLUGINFLAG_SCENEHOOK_SUPPORT_ANIMATION

函数

Bool   RegisterSceneHookPlugin ( Int32 id, const maxon::String &str, Int32 info, DataAllocator *g, Int32 priority, Int32 disklevel)

Function Documentation

◆  RegisterSceneHookPlugin()

Bool RegisterSceneHookPlugin ( Int32   id ,
const maxon::String str ,
Int32   info ,
DataAllocator g ,
Int32   priority ,
Int32   disklevel  
)

Registers a scene hook plugin.

参数
[in] id A unique plugin ID. Must be obtained from http://www.plugincafe.com
[in] str The name of the plugin.
To affect the order that plugins are displayed in menus add "#$n" as a prefix to this name, where n is a number.
Lower numbers are displayed before higher numbers. If name is "--" it will show up as a menu separator.
[in] info The scene hook plugin info flags: PLUGINFLAG_SCENEHOOK PLUGINFLAG
[in] g The allocator for the scene hook plugin. This is a pointer to a function that creates a new instance of SceneHookData with NewObj() .
[in] priority The default priority to call SceneHookData::Execute in the pipeline. Override SceneHookData::AddToExecution to change this or add more priorities. EXECUTIONPRIORITY
[in] disklevel The plugin level is similar to a version number. The default level is 0 .
Increase this for new revisions of a plugin to allow for forward and backward compatibility.

As an example you may have updated a plugin. If you now need to write additional information for new settings or changed types for old settings increase the level.
During loading either a 0 is passed (if the file was written by the old plugin) or 1 (if the file was written by the new plugin). This allows to easily write/read new values.
For forward and backward compatibility to work any existing read order from a given level must not be changed. Cinema 4D skips any new settings automatically if they have not been read.

disklevel is only useful if variables are written/read in NodeData::Write / NodeData::Read .
返回
true if the scene hook plugin was registered, otherwise false .