#include <c4d_scenehookdata.h>
A data class for creating scene hook plugins.
A scene hook is called on every scene prepare, for example before redraw and before rendering.
Use RegisterSceneHookPlugin() to register a scene hook plugin.
Init/Free SceneHook | |
virtual EXECUTIONRESULT | InitSceneHook (BaseSceneHook *node, BaseDocument *doc, BaseThread *bt) |
virtual void | FreeSceneHook (BaseSceneHook *node, BaseDocument *doc) |
Execute | |
virtual EXECUTIONRESULT | Execute (BaseSceneHook *node, BaseDocument *doc, BaseThread *bt, Int32 priority, EXECUTIONFLAGS flags) |
virtual Bool | AddToExecution (BaseSceneHook *node, PriorityList *list) |
DisplayControl | |
virtual Bool | DisplayControl (BaseDocument *doc, BaseObject *op, BaseObject *chainstart, BaseDraw *bd, BaseDrawHelp *bh, ControlDisplayStruct &cds) const |
virtual Bool | InitDisplayControl (BaseSceneHook *node, BaseDocument *doc, BaseDraw *bd, const AtomArray *active) |
virtual void | FreeDisplayControl () |
Additional Inherited Members | |
Protected Attributes inherited from NodeData | |
GeListNode * | private_link |
|
virtual |
Called to initialize the scene hook, before all scene hooks and expressions in a scene are calculated.
Allocate here temporary data in the node.
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bt | The calling thread. Can be nullptr. Cinema 4D owns the pointed thread. |
|
virtual |
Called to free the scene hook, after all scene hooks and expressions in a scene are calculated, before the drawing starts.
Free here temporary data allocated in InitSceneHook.
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
|
virtual |
Called at the point in the priority pipeline specified by AddToExecution, or by RegisterSceneHookPlugin.
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bt | The calling thread. Can be nullptr. Cinema 4D owns the pointed thread. |
[in] | priority | The priority of the call to Execute() in the pipeline: EXECUTIONPRIORITY |
[in] | flags | The execution flags: EXECUTIONFLAGS |
|
virtual |
Called to add execution priorities.
By default returns false. In that case Cinema 4D will call Execute() at the priority specified by the RegisterSceneHookPlugin() call for the scene hook.
If overridden then insert points of execution in the list and return true. Heres is an example:
Cinema 4D will then call Execute() 2 times.
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | list | The priority list to add execution points to. Cinema 4D owns the pointed priority list. |
|
virtual |
Called when the user clicks with the mouse in any of the editors views.
SceneHookData::MouseInput(node, doc, bd, win, msg)
as last return, so that other plugins can also use this hook when it is their turn.[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | win | The window for the active editor view. Cinema 4D owns the pointed editor window. |
[in] | msg | The mouse message container. See Input Events. |
|
virtual |
Called when the user types something in any of the editors views.
SceneHookData::KeyboardInput(node, doc, bd, win, msg)
as last return, so that other plugins can also use this hook when it is their turn.[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | win | The window for the active editor view. Cinema 4D owns the pointed editor window. |
[in] | msg | The keyboard message container. See Input Events. |
|
virtual |
Called when the cursor is over the editor views to get the state of the mouse pointer.
Set the bubble help and cursor, for example:
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | x | The X coordinate of the mouse cursor relative to the top-left of the active editor view. |
[in] | y | The Y coordinate of the mouse cursor relative to the top-left of the active editor view. |
[in] | bc | The container to store the cursor information in: BFM_GETCURSORINFO_RESULT |
|
virtual |
Called when the display is updated to display arbitrary visual elements in the editor views.
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | bh | The helper for active the editor view. The caller owns the pointed view helper. |
[in] | bt | The calling thread. Can be nullptr. Cinema 4D owns the pointed thread. |
[in] | flags | The draw flags: SCENEHOOKDRAW |
|
virtual |
Called to set information about how the active object should be displayed.
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | op | The active object. Cinema 4D owns the pointed object. |
[in] | chainstart | The start of the object chain. Cinema 4D owns the pointed object. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | bh | The helper for active the editor view. The caller owns the pointed view helper. |
[in] | cds | The display control settings. |
|
virtual |
Initialize resources for the display control used in DisplayControl.
[in] | node | The BaseSceneHook connected with the SceneHookData instance. Equal to static_cast <BaseSceneHook*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed scene hook. |
[in] | doc | The active document. Cinema 4D owns the pointed document. |
[in] | bd | The active editor view. Cinema 4D owns the pointed base draw. |
[in] | active | The active objects array. Cinema 4D owns the pointed array. |
|
virtual |
Free resources allocated in InitDisplayControl.