PythonElementBaseInterface Class Reference

#include <py_element.h>

Inheritance diagram for PythonElementBaseInterface:

Detailed Description

Represents a elements of any Python part in Cinema 4D.

Public Member Functions

MAXON_METHOD void SetDisplayedName (const String name)
 
MAXON_METHOD String GetDisplayedName () const
 
MAXON_METHOD String GetPath (Opt< const PythonElementBaseRef & > stopAt={}) const
 
MAXON_METHOD String GetUUID () const
 
MAXON_METHOD Result< StringGetScript ()
 
MAXON_METHOD Result< void > SetScript (const String &newScript)
 
MAXON_METHOD Result< void > Execute (const Bool debug)
 

Private Member Functions

 MAXON_INTERFACE (PythonElementBaseInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interfaces.python_element.base")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( PythonElementBaseInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interfaces.python_element.base"   
)
private

◆ SetDisplayedName()

MAXON_METHOD void SetDisplayedName ( const String  name)

Define a custom Name, overriding the name retrieved by default. This does not change the actual name of the Python element, only the displayed one.

Parameters
[in]nameThe new name. Pass an empty string if you want the default behavior for the Python element.

◆ GetDisplayedName()

MAXON_METHOD String GetDisplayedName ( ) const

Retrieve the name to use for displaying this element in the interface. This may not be the actual a name of the underlying Python element.

Returns
The name to use in the interface.

◆ GetPath()

MAXON_METHOD String GetPath ( Opt< const PythonElementBaseRef & >  stopAt = {}) const

Retrieve the path of the current python element from the Python Element Tree. Path is built from current Python Element, looking recursively at parents.

Parameters
[in]stopAtElement where the path should stop.

◆ GetUUID()

MAXON_METHOD String GetUUID ( ) const

Retrieve the Unique Identifier of the underlying Python Element.

Returns
The UUID of the Python Element.

◆ GetScript()

MAXON_METHOD Result<String> GetScript ( )

Retrieve the python script from the underlying Python Element.

Returns
The python script.

◆ SetScript()

MAXON_METHOD Result<void> SetScript ( const String newScript)

Defines the python script of the underlying Python Element.

Parameters
[in]newScriptThe new python script.

◆ Execute()

MAXON_METHOD Result<void> Execute ( const Bool  debug)

Executes the current the underlying Python Element.

Parameters
[in]debugtrue if the execution should be done wit python debugging enabled.