#include <py_element_manager.h>
Manage Python Elements representing various python elements available in Cinema 4D. Provides a unified way of dealing with any python elements regardless of their implementation.
Public Member Functions | |
MAXON_METHOD Result< void > | EmbeddedElementAdded (PythonElementEmbeddedRef pyElem) |
MAXON_METHOD Result< void > | EmbeddedElementRemoved (PythonElementEmbeddedRef pyElem) |
MAXON_METHOD Result< void > | ScriptElementAdded (PythonElementBaseRef pyElem, PythonElementBaseRef parent=PythonElementBaseRef::NullValue()) |
MAXON_METHOD Result< void > | ScriptElementRemoved (PythonElementBaseRef pyElem) |
MAXON_METHOD Result< Opt< PythonElementBaseRef > > | FindPyElementByPath (const String path) const |
MAXON_METHOD Result< Opt< PythonElementBaseRef > > | FindPyElementByBaseList2D (const BaseList2D *obj) const |
MAXON_METHOD PythonElementBaseRef | GetRoot () const |
MAXON_METHOD WeakRef< PythonElementBaseRef > | GetScriptsRoot () const |
MAXON_METHOD WeakRef< PythonElementBaseRef > | GetEmbeddedRoot () const |
MAXON_OBSERVABLE (void, ObservableNewEmbeddedElement,(PythonElementEmbeddedRef bl2D), ObservableCombinerRunAllComponent) | |
MAXON_OBSERVABLE (void, ObservableDeletedEmbeddedElement,(PythonElementEmbeddedRef bl2D), ObservableCombinerRunAllComponent) | |
MAXON_OBSERVABLE (void, ObservableNewScriptElement,(PythonElementScriptRef bl2D), ObservableCombinerRunAllComponent) | |
MAXON_OBSERVABLE (void, ObservableDeletedScriptElement,(PythonElementScriptRef bl2D), ObservableCombinerRunAllComponent) | |
Private Member Functions | |
MAXON_INTERFACE (PyElementManagerInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interfaces.py_element_manager") | |
|
private |
MAXON_METHOD Result<void> EmbeddedElementAdded | ( | PythonElementEmbeddedRef | pyElem | ) |
Notify a new object being created and triggers ObservableNewEmbeddedElement after it is inserted in the tree.
[in] | pyElem | The Python Embedded Element to add into the tree. |
MAXON_METHOD Result<void> EmbeddedElementRemoved | ( | PythonElementEmbeddedRef | pyElem | ) |
Notify a python object being deleted and triggers ObservableDeletedEmbeddedElement before it is removed from the tree.
[in] | pyElem | The Python Embedded Element to add to the tree. |
MAXON_METHOD Result<void> ScriptElementAdded | ( | PythonElementBaseRef | pyElem, |
PythonElementBaseRef | parent = PythonElementBaseRef::NullValue() |
||
) |
MAXON_METHOD Result<void> ScriptElementRemoved | ( | PythonElementBaseRef | pyElem | ) |
Notify a python script being deleted and triggers ObservableDeletedScriptElement before it is removed from the tree.
[in] | pyElem | The Python Script Element to add to the tree. |
MAXON_METHOD Result<Opt<PythonElementBaseRef> > FindPyElementByPath | ( | const String | path | ) | const |
MAXON_METHOD Result<Opt<PythonElementBaseRef> > FindPyElementByBaseList2D | ( | const BaseList2D * | obj | ) | const |
Find a given Python Embedded Element, from a given BaseList2D (can be a ScriptObject, or a regular Python object, like the Python Generator
[in] | obj | The BaseList2D to search in the tree. @retun An optional Python Embedded Element if found. |
MAXON_METHOD PythonElementBaseRef GetRoot | ( | ) | const |
Retrieves the root of the tree, there is always a root. This root contains 2 children PythonElementBasRef, Scripts and Embedded. @retun The root of all Python Elements.
MAXON_METHOD WeakRef<PythonElementBaseRef> GetScriptsRoot | ( | ) | const |
Retrieves the root of the tree containing all Python Element representing a Script in the Script Manager. @retun The Script root of all Python Script Elements.
MAXON_METHOD WeakRef<PythonElementBaseRef> GetEmbeddedRoot | ( | ) | const |
Retrieves the root of the tree containing all Python Embedded representing an object in the scene containing some python. @retun The Script root of all Python Embedded Elements.
MAXON_OBSERVABLE | ( | void | , |
ObservableNewEmbeddedElement | , | ||
(PythonElementEmbeddedRef bl2D) | , | ||
ObservableCombinerRunAllComponent | |||
) |
Fired when EmbeddedElementAdded() is called once the python element is inserted into the tree.
MAXON_OBSERVABLE | ( | void | , |
ObservableDeletedEmbeddedElement | , | ||
(PythonElementEmbeddedRef bl2D) | , | ||
ObservableCombinerRunAllComponent | |||
) |
Fired when NewBaseList2DAdded() is called before the python element is deleted from the tree.
MAXON_OBSERVABLE | ( | void | , |
ObservableNewScriptElement | , | ||
(PythonElementScriptRef bl2D) | , | ||
ObservableCombinerRunAllComponent | |||
) |
Fired when ScriptElementAdded() is called once the python script is inserted into the tree.
MAXON_OBSERVABLE | ( | void | , |
ObservableDeletedScriptElement | , | ||
(PythonElementScriptRef bl2D) | , | ||
ObservableCombinerRunAllComponent | |||
) |
Fired when ScriptElementRemoved() is called before the python script is deleted from the tree.