IC Python API:RLPy RTime

From Reallusion Wiki!
Revision as of 20:53, 13 January 2019 by Chuck (RL) (Talk | contribs)

Jump to: navigation, search
Main article: System Module.

Class in RLPy / Inherits from: _object

Description

This class is used to hold and manipulate timing information.

Time is stored internally in system as milliseconds. Most API methods that require or return timing information do so through variables of this type. This class also provide methods to convert between Frame and RTime, such as GetFrameIndex() and IndexedFrameTime(). Use of GetFrameTime() can ensure that RTime is on the correct frame.

Member Functions

GetFrameIndex

def RLPy.RTime.GetFrameIndex(kTime, nFps)

Convert the current time to frame index. Since iClone is 60 frames per second, the return value is usually the time in seconds times 60.

Code:
 
import RLPy

#create a time object of 3 seconds
time = RLPy.RTime(3000)

#print the frame index at the 3 second mark: 180
print(RLPy.RTime.GetFrameIndex(time, RLPy.RGlobal.GetFps()))

GetStatusCode

def RLPY.RStatus.GetStatusCode(self)

IsError

def RLPY.RStatus.IsError(self)