IC Python API:RLPy RStatus

From Reallusion Wiki!
Jump to: navigation, search
Main article: Modules.

Detailed Description

This class is used for API level error handling. Most API methods return this class as a return value. The developer can query, clear, print the error code along with the error description.

status = RLPy.RGlobal.SetTime(RLPy.RTime(1000))

if status == RLPy.RStatus.Success:
print("sucess") # print sucess

if status:
print("sucess") # print sucess

if status.GetStatusCode() == RLPy.RStatus.Success:
print("sucess") # print sucess

print(status.IsError()) # print false

Constructor & Destructors

__init__

RLPy.RStatus.__init__ ( self, args )

The copy constructor of the class. Initialize a new RStatus object with the values from another RStatus object.

Parameters

status [IN] The target RStatus object.

Member Functions

Clear

RLPy.RStatus.Clear ( self )

Clear error codes from the RStatus instance. After this call, it will behave as if it contained Success.


GetStatusCode

RLPy.RStatus.GetStatusCode ( self )

Retrieve the type of error that occurred, as specified in the RStatusCode enumeration.

Returns

The type of error that occurred - RLPy.RStatusCode

IsError

RLPy.RStatus.IsError ( self )

Determines whether there is an error.

Return Values

true An error has occurred.

false The operation was successful