Open 3D Engine EditorPythonBindings Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EditorPythonBindings::PythonProxyObject Class Referencefinal

Wraps an instance of a Behavior Class that is flagged for 'Editor'. More...

#include <PythonProxyObject.h>

Public Types

enum class  Comparison { LessThan , LessThanOrEquals , GreaterThan , GreaterThanOrEquals }
 Perform a comparison of a Python operator.
 

Public Member Functions

 AZ_TYPE_INFO (PythonProxyObject, "{448A4480-CCA8-4F14-9F17-41B0491F9FD1}")
 
 AZ_CLASS_ALLOCATOR (PythonProxyObject, AZ::SystemAllocator)
 
 PythonProxyObject (const AZ::TypeId &typeId)
 
 PythonProxyObject (const char *typeName)
 
 PythonProxyObject (const AZ::BehaviorObject &object)
 
AZStd::optional< AZ::TypeId > GetWrappedType () const
 Gets the AZ RTTI type of the BehaviorObject.
 
AZStd::optional< AZ::BehaviorObject * > GetBehaviorObject ()
 Returns the wrapped behavior object pointer if it is valid.
 
const char * GetWrappedTypeName () const
 Gets the name of the type of the wrapped BehaviorObject.
 
void SetPropertyValue (const char *propertyName, pybind11::object value)
 Assigns a value to a property (by name) a value; the types must match.
 
pybind11::object GetPropertyValue (const char *attributeName)
 Gets the value or callable held by a property of a wrapped BehaviorObject.
 
bool SetByTypeName (const char *typeName)
 Creates a default constructed instance a 'typeName'.
 
pybind11::object Invoke (const char *methodName, pybind11::args pythonArgs)
 Invokes a method by name on a wrapped BehaviorObject.
 
pybind11::object Construct (const AZ::BehaviorClass &behaviorClass, pybind11::args args)
 Constructs a BehaviorClass using Python arguments.
 
bool DoEqualityEvaluation (pybind11::object pythonOther)
 Performs an equality operation to compare this object with another object.
 
pybind11::object ToJson ()
 
bool DoComparisonEvaluation (pybind11::object pythonOther, Comparison comparison)
 
pybind11::object GetWrappedObjectRepr ()
 Gets the wrapped object's repr
 
pybind11::object GetWrappedObjectStr ()
 Gets the wrapped object's str
 
pybind11::ssize_t GetWrappedObjectHash ()
 Gets the wrapped object's hash
 

Protected Member Functions

void PrepareWrappedObject (const AZ::BehaviorClass &behaviorClass)
 
void ReleaseWrappedObject ()
 
bool CreateDefault (const AZ::BehaviorClass *behaviorClass)
 
void PopulateMethodsAndProperties (const AZ::BehaviorClass &behaviorClass)
 
void PopulateComparisonOperators (const AZ::BehaviorClass &behaviorClass)
 
bool CanConvertPythonToBehaviorValue (const AZ::BehaviorParameter &behaviorArg, pybind11::object pythonArg) const
 

Detailed Description

Wraps an instance of a Behavior Class that is flagged for 'Editor'.


The documentation for this class was generated from the following file: