IC8 Python API:RLPy RGlobal
Contents
- 1 Description
- 2 Member Functions
- 2.1 AddInfoTips ( pObjPtr, strImageSource, strFunctionName, strDescription, strVideoURLLinkcountId, strButtonText, strLearnMoreURL )
- 2.2 BeginAction ( strAction, bBlockRecordUndo=False )
- 2.3 CapturePixelStream ( )
- 2.4 CheckTimecodePluginFeatureAllowed ( )
- 2.5 CheckTimecodePluginFullOrTiralInstalled ( )
- 2.6 CheckTimecodePluginTrialValid ( )
- 2.7 DoBatchSNVerification ( strJson )
- 2.8 DoPluginTrialFollowUp ( strProductNamePath, nPID )
- 2.9 DoSNVerification ( nProductID, strRegistry, strProductName, strSNFailTitle, strSNFailMsg, strSNExceedTitle, strSNExceedMsg )
- 2.10 EnablePixelStream ( bEnable )
- 2.11 EndAction ( )
- 2.12 ForceViewportUpdate ( )
- 2.13 GetDefaultContentFileAbsolutePath ( eContent, bCustom )
- 2.14 GetDialogMode ( )
- 2.15 GetEndTime ( )
- 2.16 GetFps ( )
- 2.17 GetMocapManager ( )
- 2.18 GetMotionDirector ( )
- 2.19 GetMotionSettingOptions ( )
- 2.20 GetOmniConnectorManager ( )
- 2.21 GetPath ( ePath, strPath )
- 2.22 GetPreviewEndTime ( )
- 2.23 GetPreviewStartTime ( )
- 2.24 GetProjectLength ( )
- 2.25 GetRealtimeRenderOptions ( )
- 2.26 GetRenderExportAudioParameter ( )
- 2.27 GetRenderExportImageParameter ( )
- 2.28 GetRenderExportImageSequenceParameter ( )
- 2.29 GetRenderExportType ( )
- 2.30 GetRenderExportVideoParameter ( )
- 2.31 GetScreenSize ( nWidth, nHeight )
- 2.32 GetSilentMode ( )
- 2.33 GetStartTime ( )
- 2.34 GetTime ( )
- 2.35 GetTimecodeTime ( )
- 2.36 GetViewSize ( nWidth, nHeight )
- 2.37 GetVisualSettingComponent ( )
- 2.38 IsPhysicsSimulationLoop ( )
- 2.39 IsPlaying ( )
- 2.40 IsTrialContentMode ( )
- 2.41 IsTrialVersion ( )
- 2.42 ObjectDataChanged2 ( spObject, eType )
- 2.43 ObjectModified ( spObject, eType )
- 2.44 Pause ( )
- 2.45 Play ( kStart, kEnd )
- 2.46 Redo ( )
- 2.47 RemoveAllAnimations ( spObject )
- 2.48 RenderAudio ( *args )
- 2.49 RenderImage ( strOutputFileName )
- 2.50 RenderImageSequence ( *args )
- 2.51 RenderImageSequenceCanny ( *args )
- 2.52 RenderImageSequenceDepth ( *args )
- 2.53 RenderImageSequenceNormal ( *args )
- 2.54 RenderImageSequenceOpenPoseKeyPoint ( *args )
- 2.55 RenderPreview ( *args )
- 2.56 RenderPreviewCanny ( *args )
- 2.57 RenderPreviewDepth ( *args )
- 2.58 RenderPreviewNormal ( *args )
- 2.59 RenderPreviewOpenPoseKeyPoint ( *args )
- 2.60 RenderVideo ( *args )
- 2.61 RenderVideoCanny ( *args )
- 2.62 RenderVideoDepth ( *args )
- 2.63 RenderVideoNormal ( *args )
- 2.64 RenderVideoOpenPoseKeyPoint ( *args )
- 2.65 SendLogToServer ( *args )
- 2.66 SetDialogMode ( eMode )
- 2.67 SetEndTime ( kTime )
- 2.68 SetMotionSettingOptions ( eOptions )
- 2.69 SetPhysicsSimulationLoop ( bLoop )
- 2.70 SetPreviewEndTime ( kTime )
- 2.71 SetPreviewStartTime ( kTime )
- 2.72 SetProjectLength ( kLength )
- 2.73 SetRealtimeRenderOptions ( kParams )
- 2.74 SetRenderExportParameter ( *args )
- 2.75 SetRenderExportType ( kParams )
- 2.76 SetSilentMode ( bSilent )
- 2.77 SetStartTime ( kTime )
- 2.78 SetTime ( kTime, bSendEvent=True )
- 2.79 SetTimecodeSource ( eSource )
- 2.80 SetTimecodeSourceData ( eSource, strFormattedTime )
- 2.81 SetViewSize ( nWidth, nHeight )
- 2.82 SetViewportInfoMotionLiveDevice ( *args )
- 2.83 ShowMemberLoginDialog ( )
- 2.84 Stop ( )
- 2.85 TrialVersionIncreaseTimes ( strBinPath, uProductID, strProductFold, strRegRoot, nCount=1 )
- 2.86 TrialVersionRemainingDays ( strBinPath, uProductID, strProductFold, strRegRoot )
- 2.87 TrialVersionRemainingTimes ( strBinPath, uProductID, strProductFold, strRegRoot, uTimeNo )
- 2.88 Undo ( )
- 3 Description
- 4 Constructor & Destructor
- 5 Member Functions
- 5.1 AddInfoTips (pObjPtr, strImageSource, strFunctionName, strDescription, strVideoURLLinkcountId, strButtonText, strLearnMoreURL)
- 5.2 BeginAction (strAction, bBlockRecordUndo=False)
- 5.3 CapturePixelStream ()
- 5.4 CheckTimecodePluginFeatureAllowed ()
- 5.5 CheckTimecodePluginFullOrTiralInstalled ()
- 5.6 CheckTimecodePluginTrialValid ()
- 5.7 DoBatchSNVerification (strJson)
- 5.8 DoPluginTrialFollowUp (strProductNamePath, nPID)
- 5.9 DoSNVerification (nProductID, strRegistry, strProductName, strSNFailTitle, strSNFailMsg, strSNExceedTitle, strSNExceedMsg)
- 5.10 EnablePixelStream (bEnable)
- 5.11 EndAction ()
- 5.12 ForceViewportUpdate ()
- 5.13 GetDefaultContentFileAbsolutePath (eContent, bCustom)
- 5.14 GetDialogMode ()
- 5.15 GetEndTime ()
- 5.16 GetFps ()
- 5.17 GetMocapManager ()
- 5.18 GetMotionDirector ()
- 5.19 GetMotionSettingOptions ()
- 5.20 GetObjectSubdivisionSetting (spObject)
- 5.21 GetOmniConnectorManager ()
- 5.22 GetPath (ePath, strPath)
- 5.23 GetPreviewEndTime ()
- 5.24 GetPreviewStartTime ()
- 5.25 GetProjectLength ()
- 5.26 GetRealtimeRenderOptions ()
- 5.27 GetRenderExportAudioParameter ()
- 5.28 GetRenderExportImageParameter ()
- 5.29 GetRenderExportImageSequenceParameter ()
- 5.30 GetRenderExportType ()
- 5.31 GetRenderExportVideoParameter ()
- 5.32 GetScreenSize (nWidth, nHeight)
- 5.33 GetSilentMode ()
- 5.34 GetStartTime ()
- 5.35 GetTime ()
- 5.36 GetTimecodeTime ()
- 5.37 GetViewSize (nWidth, nHeight)
- 5.38 GetVisualSettingComponent ()
- 5.39 IsAuxiliaryLightEnabled ()
- 5.40 IsPhysicsSimulationLoop ()
- 5.41 IsPlaying ()
- 5.42 IsTrialContentMode ()
- 5.43 IsTrialVersion ()
- 5.44 ObjectDataChanged2 (spObject, eType)
- 5.45 ObjectModified (spObject, eType)
- 5.46 Pause ()
- 5.47 Play (kStart, kEnd)
- 5.48 Redo ()
- 5.49 RemoveAllAnimations (spObject, bKeepCurrent=True)
- 5.50 RenderAudio (*args)
- 5.51 RenderImage (strOutputFileName)
- 5.52 RenderImageSequence (*args)
- 5.53 RenderImageSequenceCanny (*args)
- 5.54 RenderImageSequenceDepth (*args)
- 5.55 RenderImageSequenceNormal (*args)
- 5.56 RenderImageSequenceOpenPoseKeyPoint (*args)
- 5.57 RenderPreview (*args)
- 5.58 RenderPreviewCanny (*args)
- 5.59 RenderPreviewDepth (*args)
- 5.60 RenderPreviewNormal (*args)
- 5.61 RenderPreviewOpenPoseKeyPoint (*args)
- 5.62 RenderVideo (*args)
- 5.63 RenderVideoCanny (*args)
- 5.64 RenderVideoDepth (*args)
- 5.65 RenderVideoNormal (*args)
- 5.66 RenderVideoOpenPoseKeyPoint (*args)
- 5.67 SendLogToServer (*args)
- 5.68 SetAuxiliaryLightEnabled (bEnable)
- 5.69 SetDialogMode (eMode)
- 5.70 SetEndTime (kTime)
- 5.71 SetMotionSettingOptions (eOptions)
- 5.72 SetObjectSubdivisionSetting (spObject, kSetting)
- 5.73 SetPhysicsSimulationLoop (bLoop)
- 5.74 SetPreviewEndTime (kTime)
- 5.75 SetPreviewStartTime (kTime)
- 5.76 SetProjectLength (kLength)
- 5.77 SetRealtimeRenderOptions (kParams)
- 5.78 SetRenderExportParameter (*args)
- 5.79 SetRenderExportType (kParams)
- 5.80 SetSilentMode (bSilent)
- 5.81 SetStartTime (kTime)
- 5.82 SetTime (kTime, bSendEvent=True)
- 5.83 SetTimecodeSource (eSource)
- 5.84 SetTimecodeSourceData (eSource, strFormattedTime)
- 5.85 SetViewSize (nWidth, nHeight)
- 5.86 SetViewportInfoMotionLiveDevice (*args)
- 5.87 ShowMemberLoginDialog ()
- 5.88 Stop ()
- 5.89 TrialVersionIncreaseTimes (strBinPath, uProductID, strProductFold, strRegRoot, nCount=1)
- 5.90 TrialVersionRemainingDays (strBinPath, uProductID, strProductFold, strRegRoot)
- 5.91 TrialVersionRemainingTimes (strBinPath, uProductID, strProductFold, strRegRoot, uTimeNo)
- 5.92 Undo ()
- 6 Properties
Description
This class provides global settings and information for the application, including project values such as frame rate and time, screen settings, shared managers and paths, and operations such as playback control, rendering, and media export.
Member Functions
AddInfoTips ( pObjPtr, strImageSource, strFunctionName, strDescription, strVideoURLLinkcountId, strButtonText, strLearnMoreURL )
Adds an information tip to the native UI object identified by `pObjPtr`. The supplied image, function name, description, video link, button text, and learn-more URL provide the contents of the tip.
Parameters
- `pObjPtr` (IN): Native pointer address of the Qt UI object to which the information tip is attached, passed as a 64-bit integer. It must refer to a live Qt object; a Python object ID is not a native Qt pointer.
- `strImageSource` (IN): Source path or resource URL for the tip image. A source ending in `.gif` is used as an animated GIF.
- `strFunctionName` (IN): Feature or function name displayed in the tip. This is display text, not the name of a Python function to execute.
- `strDescription` (IN): Description text explaining the feature shown in the tip.
- `strVideoURLLinkcountId` (IN): Video link-count identifier used to resolve the tip's video link. A link-count URL containing a `lid` parameter can also be supplied.
- `strButtonText` (IN): Caption displayed on the tip's learn-more button.
- `strLearnMoreURL` (IN): Destination URL opened when the user clicks the learn-more button.
All seven arguments must be supplied. Keep the target Qt object alive while its information tip is in use. Passing zero for `pObjPtr` does not attach a tip.
Returns
`None`.
BeginAction ( strAction, bBlockRecordUndo=False )
Begins an action associated with the application's undo and redo operations. Call `EndAction()` after making the changes for the action. `strAction` supplies the action name, and `bBlockRecordUndo` controls whether undo recording is blocked during the action.
Parameters
- `strAction` (IN): Action name.
- `bBlockRecordUndo` (IN): Whether to block undo recording during the action. Defaults to `False`.
Sample code
def run_script():
import RLPy
RLPy.RGlobal.BeginAction('ActionName')
RLPy.RGlobal.EndAction()
CapturePixelStream ( )
Captures a frame from the application's pixel stream. The returned frame contains its width, height, and pixel buffer information. Use `EnablePixelStream()` to control pixel streaming before requesting frames.
Returns
Return type: `RLPy.PixelStreamCaptureFrame`.
CheckTimecodePluginFeatureAllowed ( )
Checks whether the application permits use of the Timecode plug-in feature. Use this check before offering Timecode operations in a plug-in. Installation can be checked separately with `CheckTimecodePluginFullOrTiralInstalled()`.
Returns
Return type: `bool`. Returns true if timecode plugin feature allowed.
Sample code
import RLPy
def run_script():
"""Check whether the current product allows the Timecode feature."""
value = RLPy.RGlobal.CheckTimecodePluginFeatureAllowed()
print(value)
return value
CheckTimecodePluginFullOrTiralInstalled ( )
Checks whether either the full version or the trial version of the Timecode plug-in is installed. This installation check is separate from the feature-permission and trial-validity checks.
Returns
Return type: `bool`. Returns true if timecode plugin full or trial version installed.
Sample code
import RLPy
def run_script():
"""Check whether the full or trial Timecode plug-in is installed. The API spelling `Tiral` is preserved."""
value = RLPy.RGlobal.CheckTimecodePluginFullOrTiralInstalled()
print(value)
return value
CheckTimecodePluginTrialValid ( )
Checks the validity of the Timecode plug-in trial. An installed trial with no remaining days fails this check. Use the separate installation and feature-permission checks when determining whether Timecode operations are available.
Returns
Return type: `bool`. Returns true if timecode plugin trial remaining days > 0.
Sample code
import RLPy
def run_script():
"""Check the Timecode plug-in trial status."""
value = RLPy.RGlobal.CheckTimecodePluginTrialValid()
print(value)
return value
DoBatchSNVerification ( strJson )
Verifies serial-number information for multiple products in one request. Supply the product records as a JSON string, including the product identifiers and registration information. The result is a JSON string containing the verification results for the requested products.
Parameters
- `strJson` (IN): product info in json formate
Returns
Return type: `str`. SN check result in Json formate
DoPluginTrialFollowUp ( strProductNamePath, nPID )
Invokes the application's trial follow-up operation for the product identified by its name path and product ID. This method is intended for internal product and plug-in trial workflows.
Parameters
- `strProductNamePath` (IN): Product name path
- `nPID` (IN): Product ID
DoSNVerification ( nProductID, strRegistry, strProductName, strSNFailTitle, strSNFailMsg, strSNExceedTitle, strSNExceedMsg )
Runs serial-number verification for the specified product and registration location. The product name and message parameters supply the titles and messages used for invalid serial numbers and exceeded activation limits.
Parameters
- `nProductID` (IN): product ID
- `strRegistry` (IN): registry
- `strProductName` (IN): product name
- `strSNFailTitle` (IN): fail title
- `strSNFailMsg` (IN): fail message
- `strSNExceedTitle` (IN): exceed title
- `strSNExceedMsg` (IN): exceed message
Returns
Return type: `bool`. Boolean verification result.
EnablePixelStream ( bEnable )
Enables or disables the application's pixel stream according to `bEnable`. Pixel-stream frames can be obtained with `CapturePixelStream()` while streaming is enabled.
EndAction ( )
Ends an action begun with `BeginAction()` and completes its undo and redo recording boundary. Place this call after the changes belonging to the action.
Sample code
def run_script():
import RLPy
# undo / redo
RLPy.RGlobal.BeginAction("Motion")
# do something
RLPy.RGlobal.EndAction()
ForceViewportUpdate ( )
Requests an immediate update of the scene viewport. Use it when a script needs the displayed scene to refresh after changes. The return status indicates whether the update request succeeded.
Returns
Return type: `RLPy.RStatus`.
Sample code
import RLPy
def run_script():
"""Request a viewport update."""
status = RLPy.RGlobal.ForceViewportUpdate()
print(status)
return status
GetDefaultContentFileAbsolutePath ( eContent, bCustom )
Returns the absolute path for the content root selected by `eContent`. Set `bCustom` to `True` for custom content or `False` for template content. Use the returned path to locate files in the selected content category.
Parameters
- `eContent` (IN): options.
- `bCustom` (IN): template or custom.
Returns
Return type: `str`. absolute path of target content folder
Sample code
import RLPy
def run_script():
"""Get the custom MotionPlus content path."""
path = RLPy.RGlobal.GetDefaultContentFileAbsolutePath(
RLPy.EContentRootFolder_MotionPlus, True)
print(path)
return path
GetDialogMode ( )
Returns the current application editing or tool mode as an `EModeType` value. This identifies modes such as puppeteering or object editing. Use `SetDialogMode()` to request a different mode.
Returns
Return type: `RLPy.EModeType`.
Sample code
import RLPy
def run_script():
"""Read the current edit mode."""
value = RLPy.RGlobal.GetDialogMode()
print(value)
return value
GetEndTime ( )
Returns the end marker of the project's playback range as an `RTime` value. Read the corresponding start marker with `GetStartTime()` and change the end marker with `SetEndTime()`.
Returns
Return type: `RLPy.RTime`. end frame time
Sample code
def run_script():
import RLPy
time = RLPy.RGlobal.GetEndTime()
print(time)
GetFps ( )
Returns the frame-rate object for the current project. In IC8.73 the Python result is an `RLPy.RFps` object. Use this object when converting between project frames and time values.
Returns
Return type: `RLPy.RFps`. Frame rate
Sample code
def run_script():
import RLPy
print(RLPy.RGlobal.GetFps()) # RFps object
GetMocapManager ( )
Returns the application's `RIMocapManager` interface. Use the manager's methods to access motion-capture operations and query their current state, such as whether capture is running.
Returns
Return type: `RLPy.RIMocapManager`. pointer to mocap manager
Sample code
def run_script():
import RLPy
mocap_manager = RLPy.RGlobal.GetMocapManager()
print(mocap_manager.IsRunning()) # True or False
GetMotionDirector ( )
Returns the application's `RIMotionDirectorManager` interface for Motion Director operations. Obtaining the manager gives access to its methods without starting a Motion Director session.
Returns
Return type: `RLPy.RIMotionDirectorManager`. RIMotionDirectorManagerPtr
Sample code
import RLPy
def run_script():
"""Get the Motion Director manager and check that it is available."""
manager = RLPy.RGlobal.GetMotionDirector()
if manager is None:
raise RuntimeError("This host does not provide the manager/component")
print(manager)
return manager
GetMotionSettingOptions ( )
Returns the current motion-setting flags as an `EMotionSettingOption` value. These options include motion alignment and motion-root reset settings. Apply a new combination with `SetMotionSettingOptions()`.
Returns
Return type: `RLPy.EMotionSettingOption`. options
Sample code
import RLPy
def run_script():
"""Read the current motion settings flags."""
value = RLPy.RGlobal.GetMotionSettingOptions()
print(value)
return value
GetOmniConnectorManager ( )
Returns an `RIOmniConnectorManager` interface for the application's Omniverse connector operations. Use the returned manager to access connector functionality; retrieving it does not establish a connection.
Returns
Return type: `RLPy.RIOmniConnectorManager`. pointer to Omniverse connector manager
Sample code
import RLPy
def run_script():
"""Get the Omni Connector manager and check that it is available."""
manager = RLPy.RGlobal.GetOmniConnectorManager()
if manager is None:
raise RuntimeError("This host does not provide the manager/component")
print(manager)
return manager
GetPath ( ePath, strPath )
Resolves an application directory selected by an `EPathType` value. Supported categories include temporary files, template content, custom content, and application resources. The Python result contains the status followed by the resolved absolute path.
Parameters
- `ePath` (IN): path type
- `strPath` (OUT): path name
Returns
A Python list containing `[status, path]`. `status` is an `RLPy.RStatus`; `path` is the resolved directory string.
Sample code
def run_script():
import RLPy
temp = ""
ret_list = RLPy.RGlobal.GetPath(RLPy.EPathType_Temp, temp)
print(ret_list[0]) # success or faild
print(ret_list[1]) # path
GetPreviewEndTime ( )
Returns the end marker of the preview playback range as an `RTime` value. Use `GetPreviewStartTime()` for the matching start marker and `SetPreviewEndTime()` to change this boundary.
Returns
Return type: `RLPy.RTime`. end frame time
Sample code
import RLPy
def run_script():
"""Read the preview end time."""
value = RLPy.RGlobal.GetPreviewEndTime()
print(value.ToFloat())
return value
GetPreviewStartTime ( )
Returns the start marker of the preview playback range as an `RTime` value. Use `GetPreviewEndTime()` for the matching end marker and `SetPreviewStartTime()` to change this boundary.
Returns
Return type: `RLPy.RTime`. start frame time
Sample code
import RLPy
def run_script():
"""Read the preview start time."""
value = RLPy.RGlobal.GetPreviewStartTime()
print(value.ToFloat())
return value
GetProjectLength ( )
Returns the total duration of the current project as an `RTime` value. This is the project length; playback and preview markers can be queried separately. Use `SetProjectLength()` to change the duration.
Returns
Return type: `RLPy.RTime`. project length
Sample code
def run_script():
import RLPy
print(RLPy.RGlobal.GetProjectLength()) # Print project duration for the current scene
GetRealtimeRenderOptions ( )
Returns the current real-time rendering options in an `RRealtimeRenderOptions` object. Read its fields to inspect the viewport rendering configuration. To apply changed options, pass the object to `SetRealtimeRenderOptions()`.
Returns
Return type: `RLPy.RRealtimeRenderOptions`. realtime render options parameters.
Sample code
import RLPy
def run_script():
"""Read the real-time render settings."""
options = RLPy.RGlobal.GetRealtimeRenderOptions()
print("realtime smoothing:", options.bRealtimeSmooth)
return options
GetRenderExportAudioParameter ( )
Returns the current audio export configuration as an `RExportAudioParameter` object. Read or edit its export fields, then use `SetRenderExportParameter()` to apply any changes before exporting audio.
Returns
Return type: `RLPy.RExportAudioParameter`.
Sample code
import RLPy
def run_script():
"""Read the Audio export settings without modifying the returned parameter object."""
params = RLPy.RGlobal.GetRenderExportAudioParameter()
print("format:", params.strFormat)
print("range:", params.kOutputRange.nOutputRangeStart, params.kOutputRange.nOutputRangeEnd)
return params
GetRenderExportImageParameter ( )
Returns the current still-image export configuration as an `RExportImageParameter` object. It includes the image export settings used by the render interface. Apply edited settings with `SetRenderExportParameter()`.
Returns
Return type: `RLPy.RExportImageParameter`.
Sample code
import RLPy
def run_script():
"""Read the Image export settings without modifying the returned parameter object."""
params = RLPy.RGlobal.GetRenderExportImageParameter()
print("format:", params.strFormat)
print("size:", params.kCommon.nOutputSizeWidth, params.kCommon.nOutputSizeHeight)
return params
GetRenderExportImageSequenceParameter ( )
Returns the current image-sequence export configuration as an `RExportImageSequenceParameter` object. This includes the sequence output range and export settings. Apply edited settings with `SetRenderExportParameter()`.
Returns
Return type: `RLPy.RExportImageSequenceParameter`.
Sample code
import RLPy
def run_script():
"""Read the ImageSequence export settings without modifying the returned parameter object."""
params = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
print("format:", params.strFormat)
print("size:", params.kCommon.nOutputSizeWidth, params.kCommon.nOutputSizeHeight)
print("range:", params.kOutputRange.nOutputRangeStart, params.kOutputRange.nOutputRangeEnd)
return params
GetRenderExportType ( )
Returns the export type currently selected in the application's render settings. Use it to determine which export configuration is active, and use `SetRenderExportType()` to select another output type.
Returns
Return type: `RLPy.RExportType`.
Sample code
import RLPy
def run_script():
"""Read the current render export type."""
value = RLPy.RGlobal.GetRenderExportType()
print(value)
return value
GetRenderExportVideoParameter ( )
Returns the current video export configuration as an `RExportVideoParameter` object. This includes the video output range and export settings. Apply edited settings with `SetRenderExportParameter()` before exporting.
Returns
Return type: `RLPy.RExportVideoParameter`.
Sample code
import RLPy
def run_script():
"""Read the Video export settings without modifying the returned parameter object."""
params = RLPy.RGlobal.GetRenderExportVideoParameter()
print("format:", params.strFormat)
print("size:", params.kCommon.nOutputSizeWidth, params.kCommon.nOutputSizeHeight)
print("range:", params.kOutputRange.nOutputRangeStart, params.kOutputRange.nOutputRangeEnd)
return params
GetScreenSize ( nWidth, nHeight )
Returns the width and height of the scene's render output in pixels. In Python the result contains the status, width, and height. Use `GetViewSize()` when the dimensions of the interactive viewport are required.
Parameters
- `nWidth` (OUT): Render output width in pixels.
- `nHeight` (OUT): Render output height in pixels.
Returns
A Python list containing `[status, width, height]`. `status` is an `RLPy.RStatus`; width and height are integers in pixels.
Sample code
def run_script():
import RLPy
width = 0
height = 0
result = RLPy.RGlobal.GetScreenSize(width, height)
print(result[0]) # successful or failed
print(result[1]) # width
print(result[2]) # height
GetSilentMode ( )
Returns whether the application's silent-mode flag is enabled. This reads the current flag without changing it. Use `SetSilentMode()` to enable or disable the mode for a scripted workflow.
Returns
Return type: `bool`.
Sample code
import RLPy
def run_script():
"""Read the silent mode setting."""
value = RLPy.RGlobal.GetSilentMode()
print(value)
return value
GetStartTime ( )
Returns the start marker of the project's playback range as an `RTime` value. Read the corresponding end marker with `GetEndTime()` and change the start marker with `SetStartTime()`.
Returns
Return type: `RLPy.RTime`. start frame time
Sample code
def run_script():
import RLPy
time = RLPy.RGlobal.GetStartTime()
print(time)
GetTime ( )
Returns the current scene time at the timeline playhead as an `RTime` value. Use it to read the position at which the scene is being evaluated. Move the playhead with `SetTime()`.
Returns
Return type: `RLPy.RTime`. current time
Sample code
def run_script():
import RLPy
time = RLPy.RGlobal.GetTime()
print(time)
GetTimecodeTime ( )
Returns the current scene time expressed as timecode time in milliseconds. This includes the project's timecode start offset. The result is a floating-point value, whereas `GetTime()` returns an `RTime` object.
Returns
Return type: `double`. current timecode time in milliseconds
Sample code
import RLPy
def run_script():
"""Read the current timecode time in milliseconds."""
value = RLPy.RGlobal.GetTimecodeTime()
print(value)
return value
GetViewSize ( nWidth, nHeight )
Returns the width and height of the interactive scene viewport in pixels. In Python the result contains the status, width, and height. Resize the viewport with `SetViewSize()`.
Parameters
- `nWidth` (OUT): Viewport width in pixels.
- `nHeight` (OUT): Viewport height in pixels.
Returns
A Python list containing `[status, width, height]`. `status` is an `RLPy.RStatus`; width and height are integers in pixels.
Sample code
import RLPy
def run_script():
"""Read the OUT parameter results for the viewport size."""
result = RLPy.RGlobal.GetViewSize(0, 0)
# This follows the OUT parameter usage of `GetScreenSize`; the actual tuple/list structure still requires API verification.
print(result)
return result
GetVisualSettingComponent ( )
Returns the scene's `RIVisualSettingComponent` interface. Use the component's methods to access the project's visual settings. Obtaining the component does not itself change those settings.
Returns
Return type: `RLPy.RIVisualSettingComponent`. RIVisualSettingComponentPtr object
Sample code
import RLPy
def run_script():
"""Get the scene visual settings component and check that it is available."""
manager = RLPy.RGlobal.GetVisualSettingComponent()
if manager is None:
raise RuntimeError("This host does not provide the manager/component")
print(manager)
return manager
IsPhysicsSimulationLoop ( )
Returns whether physics simulation restarts when playback returns to the beginning of a loop. Use `SetPhysicsSimulationLoop()` to change this simulation behavior.
Returns
Return type: `bool`.
Sample code
import RLPy
def run_script():
"""Read the physics simulation loop state."""
value = RLPy.RGlobal.IsPhysicsSimulationLoop()
print(value)
return value
IsPlaying ( )
Returns whether timeline playback is currently running. Use this query to decide whether to start, pause, or stop playback through `Play()`, `Pause()`, and `Stop()`.
Returns
Return type: `bool`. Returns true when application playing.
Sample code
def run_script():
import RLPy
if(not RLPy.RGlobal.IsPlaying()):
RLPy.RGlobal.Play(RLPy.RTime.FromValue(0), RLPy.RTime.FromValue(1000))
if(RLPy.RGlobal.IsPlaying()):
RLPy.RGlobal.Stop()
IsTrialContentMode ( )
Returns whether the application is currently in trial-content mode. This query is intended for internal trial-content workflows and is separate from `IsTrialVersion()`, which checks the application version.
Returns
Return type: `bool`. Returns true when application in trial content mode.
Sample code
import RLPy
def run_script():
"""Check whether trial content mode is currently active."""
value = RLPy.RGlobal.IsTrialContentMode()
print(value)
return value
IsTrialVersion ( )
Returns whether the running application is a trial version. Use this query when a plug-in needs to distinguish the application trial from the full version. Trial-content mode is queried separately with `IsTrialContentMode()`.
Returns
Return type: `bool`. Returns true when application is trial version.
Sample code
import RLPy
def run_script():
"""Check whether the current version is a trial version."""
value = RLPy.RGlobal.IsTrialVersion()
print(value)
return value
ObjectDataChanged2 ( spObject, eType )
Sends an object data-change event for the supplied object and event type. For a viseme change, use `EObjectEventType_VisemeChangeEvent` after updating the object's viseme data. This method sends a notification; it does not make the data change itself.
Sample code
After changing an avatar's viseme data, invoke `run_script()`; the sample selects the first avatar in the current scene.
import RLPy
def run_script():
"""Notify the first avatar that its viseme data changed."""
avatars = RLPy.RScene.GetAvatars()
if not avatars:
print("No avatar is available in the current scene.")
return
RLPy.RGlobal.ObjectDataChanged2(
avatars[0], RLPy.EObjectEventType_VisemeChangeEvent)
ObjectModified ( spObject, eType )
Notifies iClone and other plug-ins that an object has been modified. Call it after changing the object's data, using `eType` to identify the modification category, so dependent UI and listeners can update. It does not perform the object edit itself.
Parameters
- `spObject` (IN): Modified object.
Sample code
import RLPy
def run_script():
"""Notify iClone that the selected object attribute changed."""
selected = RLPy.RScene.GetSelectedObjects()
if not selected:
raise RuntimeError("Select a test object")
obj = selected[0]
RLPy.RGlobal.ObjectModified(obj, RLPy.EObjectModifiedType_Attribute)
return obj
Pause ( )
Pauses timeline playback while retaining the current playhead position. Use `Play()` to start another playback range, or `Stop()` to stop playback and return to its start marker.
Sample code
def run_script():
import RLPy
RLPy.RGlobal.Play(RLPy.RTime.FromValue(0), RLPy.RTime.FromValue(1000))
RLPy.RGlobal.Pause()
Play ( kStart, kEnd )
Starts timeline playback between `kStart` and `kEnd`. Both boundaries must be `RTime` values; in IC8.73 construct them with `RLPy.RTime.FromValue(value)`. Use `IsPlaying()` to query playback and `Pause()` or `Stop()` to interrupt it.
Parameters
- `kStart` (IN): start time
- `kEnd` (IN): end time
Sample code
def run_script():
import RLPy
start_time = RLPy.RTime.FromValue(0)
end_time = RLPy.RTime.FromValue(1000.0)
RLPy.RGlobal.Play(start_time,end_time)
Redo ( )
Reapplies the most recently undone operation from the application's redo history. Use it after an `Undo()` operation when that operation remains available to redo. It affects the current project's editing history.
Sample code
Prepare an operation in the corresponding editing history before running this example.
import RLPy
def run_script():
"""Redo the top operation on the current Redo stack."""
RLPy.RGlobal.Redo()
RemoveAllAnimations ( spObject )
Deletes animation data from the specified scene object. The operation applies to supported animated scene objects, including characters, props, lights, and cameras. Refresh the timeline after the call to display the updated tracks, and inspect the returned status for failure.
Parameters
- `spObject` (IN): The object to remove animations
Returns
Return type: `RLPy.RStatus`.
Sample code
def run_script():
import RLPy
avatar_list = RLPy.RScene.GetAvatars()
result = RLPy.RGlobal.RemoveAllAnimations( avatar_list[0] )
print(result)
RenderAudio ( *args )
Exports the project's audio over the interval from `kStartTime` to `kEndTime`. Supply `RTime` boundaries and an output filename. Configure the audio export settings first and ensure the project contains the audio to export.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render Audio to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
output_dir = tempfile.mkdtemp(prefix="rlpy_renderaudio_")
output_path = os.path.join(output_dir, "sample.wav")
status = RLPy.RGlobal.RenderAudio(start, end, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderImage ( strOutputFileName )
Renders the scene at the current time to the supplied output filename. The output uses the application's image export settings. Configure the desired dimensions and image format before calling the method.
Parameters
- `strOutputFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render Image to a new temporary folder."""
import os
import tempfile
output_dir = tempfile.mkdtemp(prefix="rlpy_renderimage_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderImage(output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderImageSequence ( *args )
Renders the scene over the specified time interval as a sequence of image files. Supply `RTime` boundaries and an output filename, and configure the image-sequence export settings before rendering. The operation can create multiple numbered files.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render ImageSequence to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
output_dir = tempfile.mkdtemp(prefix="rlpy_renderimagesequence_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderImageSequence(start, end, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderImageSequenceCanny ( *args )
Exports Canny edge-detection output as an image sequence. Supply `RTime` start and end boundaries for the required interval. The `REdgeDetectionCannyParam` object controls the thresholds, Sobel aperture, and gradient calculation. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `kParam` (IN): `RLPy.REdgeDetectionCannyParam` containing the thresholds, aperture size, and gradient option.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render ImageSequenceCanny to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
params = RLPy.REdgeDetectionCannyParam()
params.fThreshold1 = 100.0
params.fThreshold2 = 200.0
params.nApertureSize = 3
params.bL2gradient = False
output_dir = tempfile.mkdtemp(prefix="rlpy_renderimagesequencecanny_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderImageSequenceCanny(start, end, params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderImageSequenceDepth ( *args )
Exports depth output as an image sequence. Supply `RTime` start and end boundaries for the required interval. The `RDepthParam` object controls depth processing, including CLAHE enhancement. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
- `kParam` (IN): Enhance Depth with CLAHE
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render ImageSequenceDepth to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
params = RLPy.RDepthParam()
params.bEnhanced = False
params.b16BitPng = False
output_dir = tempfile.mkdtemp(prefix="rlpy_renderimagesequencedepth_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderImageSequenceDepth(start, end, params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderImageSequenceNormal ( *args )
Exports normal-map output as an image sequence. Supply `RTime` start and end boundaries for the required interval. The output represents the scene's surface-normal information. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render ImageSequenceNormal to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
output_dir = tempfile.mkdtemp(prefix="rlpy_renderimagesequencenormal_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderImageSequenceNormal(start, end, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderImageSequenceOpenPoseKeyPoint ( *args )
Exports OpenPose keypoint output as an image sequence. Supply `RTime` start and end boundaries for the required interval. Use an `ROpenPoseKeyPointParam` object to configure the pose type and keypoint overlay opacity. The scene must contain a character for pose output. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `kParam` (IN): `RLPy.ROpenPoseKeyPointParam` containing the pose type and overlay opacity.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render ImageSequenceOpenPoseKeyPoint to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
params = RLPy.ROpenPoseKeyPointParam()
params.bFace = True
params.bHand = True
params.fOpacity = 1.0
# The remaining fields use the default constructor values.
output_dir = tempfile.mkdtemp(prefix="rlpy_renderimagesequenceopenposekeypoint_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderImageSequenceOpenPoseKeyPoint(start, end, params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderPreview ( *args )
Renders a preview image of the scene at the current time. Supply an output filename to save the image. Use the specialized preview methods when normal, depth, edge, or pose-keypoint output is required.
Parameters
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render Preview to a new temporary folder."""
import os
import tempfile
output_dir = tempfile.mkdtemp(prefix="rlpy_renderpreview_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderPreview(output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderPreviewCanny ( *args )
Exports Canny edge-detection output as a preview image at the current scene time. The `REdgeDetectionCannyParam` object controls the thresholds, Sobel aperture, and gradient calculation. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kParam` (IN): `RLPy.REdgeDetectionCannyParam` containing the thresholds, aperture size, and gradient option.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render PreviewCanny to a new temporary folder."""
import os
import tempfile
params = RLPy.REdgeDetectionCannyParam()
params.fThreshold1 = 100.0
params.fThreshold2 = 200.0
params.nApertureSize = 3
params.bL2gradient = False
output_dir = tempfile.mkdtemp(prefix="rlpy_renderpreviewcanny_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderPreviewCanny(params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderPreviewDepth ( *args )
Exports depth output as a preview image at the current scene time. The `RDepthParam` object controls depth processing, including CLAHE enhancement. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `strFileName` (IN): The output file name
- `kParam` (IN): Enhance Depth with CLAHE
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render PreviewDepth to a new temporary folder."""
import os
import tempfile
params = RLPy.RDepthParam()
params.bEnhanced = False
params.b16BitPng = False
output_dir = tempfile.mkdtemp(prefix="rlpy_renderpreviewdepth_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderPreviewDepth(params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderPreviewNormal ( *args )
Exports normal-map output as a preview image at the current scene time. The output represents the scene's surface-normal information. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render PreviewNormal to a new temporary folder."""
import os
import tempfile
output_dir = tempfile.mkdtemp(prefix="rlpy_renderpreviewnormal_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderPreviewNormal(output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderPreviewOpenPoseKeyPoint ( *args )
Exports OpenPose keypoint output as a preview image at the current scene time. Use an `ROpenPoseKeyPointParam` object to configure the pose type and keypoint overlay opacity. The scene must contain a character for pose output. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kParam` (IN): `RLPy.ROpenPoseKeyPointParam` containing the pose type and overlay opacity.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render PreviewOpenPoseKeyPoint to a new temporary folder."""
import os
import tempfile
params = RLPy.ROpenPoseKeyPointParam()
params.bFace = True
params.bHand = True
params.fOpacity = 1.0
# The remaining fields use the default constructor values.
output_dir = tempfile.mkdtemp(prefix="rlpy_renderpreviewopenposekeypoint_")
output_path = os.path.join(output_dir, "sample.png")
status = RLPy.RGlobal.RenderPreviewOpenPoseKeyPoint(params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderVideo ( *args )
Exports the scene to a video using the current render configuration. The filename-only overload uses the configured output range; the time-range overload accepts explicit `RTime` start and end values. Configure the video format and dimensions before rendering and inspect the returned status.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
def run_script():
import RLPy
result = RLPy.RGlobal.RenderVideo()
print(result)
RenderVideoCanny ( *args )
Exports Canny edge-detection output as a video. Supply `RTime` start and end boundaries for the required interval. The `REdgeDetectionCannyParam` object controls the thresholds, Sobel aperture, and gradient calculation. Configure the matching export settings and supply an output filename before rendering.
Known issue in IC8.73: Canny video export can fail with the message "Fail to export canny result". Check that the output file was created even if the returned status does not indicate an error.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `kParam` (IN): `RLPy.REdgeDetectionCannyParam` containing the thresholds, aperture size, and gradient option.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render VideoCanny to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
params = RLPy.REdgeDetectionCannyParam()
params.fThreshold1 = 100.0
params.fThreshold2 = 200.0
params.nApertureSize = 3
params.bL2gradient = False
output_dir = tempfile.mkdtemp(prefix="rlpy_rendervideocanny_")
output_path = os.path.join(output_dir, "sample.mp4")
status = RLPy.RGlobal.RenderVideoCanny(start, end, params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderVideoDepth ( *args )
Exports depth output as a video. Supply `RTime` start and end boundaries for the required interval. The `RDepthParam` object controls depth processing, including CLAHE enhancement. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
- `kParam` (IN): Enhance Depth with CLAHE
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render VideoDepth to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
params = RLPy.RDepthParam()
params.bEnhanced = False
params.b16BitPng = False
output_dir = tempfile.mkdtemp(prefix="rlpy_rendervideodepth_")
output_path = os.path.join(output_dir, "sample.mp4")
status = RLPy.RGlobal.RenderVideoDepth(start, end, params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderVideoNormal ( *args )
Exports normal-map output as a video. Supply `RTime` start and end boundaries for the required interval. The output represents the scene's surface-normal information. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render VideoNormal to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
output_dir = tempfile.mkdtemp(prefix="rlpy_rendervideonormal_")
output_path = os.path.join(output_dir, "sample.mp4")
status = RLPy.RGlobal.RenderVideoNormal(start, end, output_path)
print("status:", status, "output:", output_path)
return status, output_path
RenderVideoOpenPoseKeyPoint ( *args )
Exports OpenPose keypoint output as a video. Supply `RTime` start and end boundaries for the required interval. Use an `ROpenPoseKeyPointParam` object to configure the pose type and keypoint overlay opacity. The scene must contain a character for pose output. Configure the matching export settings and supply an output filename before rendering.
Parameters
- `kStartTime` (IN): Specifies the start time to set.
- `kEndTime` (IN): Specifies the end time to set.
- `kParam` (IN): `RLPy.ROpenPoseKeyPointParam` containing the pose type and overlay opacity.
- `strFileName` (IN): The output file name
Returns
Return type: `RLPy.RStatus`.
Sample code
Configure the matching export format before running this example. The output is saved in a new temporary folder.
import RLPy
def run_script():
"""Render VideoOpenPoseKeyPoint to a new temporary folder."""
import os
import tempfile
start = RLPy.RGlobal.GetStartTime()
end = RLPy.RGlobal.GetEndTime()
if start.ToInt() >= end.ToInt():
raise RuntimeError("Set a valid, short render range first")
params = RLPy.ROpenPoseKeyPointParam()
params.bFace = True
params.bHand = True
params.fOpacity = 1.0
# The remaining fields use the default constructor values.
output_dir = tempfile.mkdtemp(prefix="rlpy_rendervideoopenposekeypoint_")
output_path = os.path.join(output_dir, "sample.mp4")
status = RLPy.RGlobal.RenderVideoOpenPoseKeyPoint(start, end, params, output_path)
print("status:", status, "output:", output_path)
return status, output_path
SendLogToServer ( *args )
Sends diagnostic log information to the application's server. One overload accepts an application-step identifier and log description; the other accepts a plug-in name. Calling this method transmits information outside the local project.
SetDialogMode ( eMode )
Requests an application editing or tool mode using an `EModeType` value. For example, `EModeType__None` selects the mode with no editing tool active. Use `GetDialogMode()` to read the resulting mode.
Parameters
- `eMode` (IN): An `EModeType` constant selecting the application editing mode. Use one value at a time.
The IC8.73 values are listed below. A mode requires the corresponding tool and a compatible selected object. Use `GetDialogMode()` after the call to read the active mode.
| eMode value | Numeric value | Description |
|---|---|---|
RLPy.EModeType__None |
0 | General editing mode with no specialized editing tool active. |
RLPy.EModeType_DirectPuppet |
1 | Direct Puppet mode for manipulating and recording character body-part motion. |
RLPy.EModeType_MotionPuppet |
2 | Motion Puppet mode for creating character motion from motion presets. |
RLPy.EModeType_PropPuppet |
3 | Prop Puppet mode for manipulating and recording prop animation. |
RLPy.EModeType_AvatarProport |
4 | Character proportion editing mode for adjusting body proportions. |
RLPy.EModeType_AvatarPoseOffset |
5 | Character pose-offset editing mode for adjusting the character pose offset. |
RLPy.EModeType_Duplicate |
6 | Object duplication mode. |
RLPy.EModeType_IkEditing |
7 | Inverse-kinematics pose editing mode for positioning character body effectors. |
RLPy.EModeType_ReachTarget |
8 | Reach-target editing mode for assigning or adjusting character reach targets. |
RLPy.EModeType_QuickLight |
9 | Quick lighting adjustment mode. |
RLPy.EModeType_FacePuppet |
10 | Face Puppet mode for puppeteering and recording facial animation. |
RLPy.EModeType_FaceKey |
11 | Face Key mode for editing facial expressions and creating facial keys. |
RLPy.EModeType_VisemeSmooth |
12 | Viseme smoothing mode for adjusting transitions between lip-sync mouth shapes. |
RLPy.EModeType_EditMeshByFace |
13 | Mesh editing mode that operates on selected faces. |
RLPy.EModeType_EditMeshByVertex |
14 | Mesh editing mode that operates on selected vertices. |
RLPy.EModeType_EditMeshByElement |
15 | Mesh editing mode that operates on mesh elements. |
RLPy.EModeType_MorphAnimation |
16 | Morph animation mode for animating morph values. |
RLPy.EModeType_AdjustTPose |
17 | T-pose adjustment mode for editing the character reference pose. |
RLPy.EModeType_EditNormal |
18 | Mesh normal editing mode for adjusting surface normals. |
RLPy.EModeType_PaintMaskByBrush |
19 | Brush-based mask painting mode. |
RLPy.EModeType_MotionMatching |
20 | Motion Matching mode used by Motion Director. |
RLPy.EModeType_AutoRig |
21 | Automatic character rigging mode. |
RLPy.EModeType_AiPosing |
22 | AI-assisted character posing mode. |
RLPy.EModeType_AdjustMixerSliderBoneTranslate |
23 | Bone-translation adjustment mode used for mixer slider setup. |
RLPy.EModeType_Unknown |
24 | Unknown or unmapped mode returned by GetDialogMode(). Do not use this sentinel as a target editing mode. |
Sample code
import RLPy
def run_script():
"""Temporarily switch to edit mode with no tools active."""
previous = RLPy.RGlobal.GetDialogMode()
try:
result = RLPy.RGlobal.SetDialogMode(RLPy.EModeType__None)
print(RLPy.RGlobal.GetDialogMode())
return result
finally:
RLPy.RGlobal.SetDialogMode(previous)
SetEndTime ( kTime )
Changes the end marker of the project's playback range to `kTime`. Supply an `RTime` value consistent with the intended start and end range. Read the updated marker with `GetEndTime()`.
Parameters
- `kTime` (IN): Specifies the time to set.
Returns
Return type: `RLPy.RStatus`.
Sample code
With playback stopped, invoke `run_script()`. The sample chooses a time within the current marker range, applies it, and restores the previous marker.
import RLPy
def run_script():
"""Temporarily set and restore the playback end time."""
if RLPy.RGlobal.IsPlaying():
print("Stop playback before running this sample.")
return
lower = RLPy.RGlobal.GetStartTime().ToFloat()
upper = RLPy.RGlobal.GetEndTime().ToFloat()
if upper <= lower:
print("The current time range is empty; sample skipped.")
return
new_time = RLPy.RTime.FromValue((lower + upper) / 2.0)
previous = RLPy.RGlobal.GetEndTime()
try:
status = RLPy.RGlobal.SetEndTime(new_time)
print("status:", status, "readback:", RLPy.RGlobal.GetEndTime().ToFloat())
return status
finally:
RLPy.RGlobal.SetEndTime(previous)
SetMotionSettingOptions ( eOptions )
Applies a combination of `EMotionSettingOption` flags to the application's motion settings. The flags control options such as actor-motion alignment and motion-root resets. Combine the required flags and read the current combination with `GetMotionSettingOptions()`.
Parameters
- `eOptions` (IN): options.
Returns
Return type: `RLPy.RStatus`.
Sample code
import RLPy
def run_script():
"""Temporarily set motion-alignment and root-reset flags."""
previous = RLPy.RGlobal.GetMotionSettingOptions()
try:
result = RLPy.RGlobal.SetMotionSettingOptions(RLPy.EMotionSettingOption_AlignActorMotion | RLPy.EMotionSettingOption_ResetMotionRoot | RLPy.EMotionSettingOption_ResetMotionRootRotate)
print(RLPy.RGlobal.GetMotionSettingOptions())
return result
finally:
RLPy.RGlobal.SetMotionSettingOptions(previous)
SetPhysicsSimulationLoop ( bLoop )
Controls whether physics simulation restarts at the beginning of each playback loop. Set `bLoop` to `True` to restart at the loop boundary or `False` to continue simulation. Read the setting with `IsPhysicsSimulationLoop()`.
Parameters
- `bLoop` (IN): Restart simulation while loop start or not
Sample code
import RLPy
def run_script():
"""Temporarily disable the physics simulation loop."""
previous = RLPy.RGlobal.IsPhysicsSimulationLoop()
try:
result = RLPy.RGlobal.SetPhysicsSimulationLoop(False)
print(RLPy.RGlobal.IsPhysicsSimulationLoop())
return result
finally:
RLPy.RGlobal.SetPhysicsSimulationLoop(previous)
SetPreviewEndTime ( kTime )
Changes the end marker of the preview playback range to the supplied `RTime` value. Choose a value consistent with the preview start marker. Read the updated marker with `GetPreviewEndTime()`.
Parameters
- `kTime` (IN): Specifies the time to set.
Returns
Return type: `RLPy.RStatus`.
Sample code
With playback stopped, invoke `run_script()`. The sample chooses a time within the current marker range, applies it, and restores the previous marker.
import RLPy
def run_script():
"""Temporarily set and restore the preview end time."""
if RLPy.RGlobal.IsPlaying():
print("Stop playback before running this sample.")
return
lower = RLPy.RGlobal.GetPreviewStartTime().ToFloat()
upper = RLPy.RGlobal.GetPreviewEndTime().ToFloat()
if upper <= lower:
print("The current time range is empty; sample skipped.")
return
new_time = RLPy.RTime.FromValue((lower + upper) / 2.0)
previous = RLPy.RGlobal.GetPreviewEndTime()
try:
status = RLPy.RGlobal.SetPreviewEndTime(new_time)
print("status:", status, "readback:", RLPy.RGlobal.GetPreviewEndTime().ToFloat())
return status
finally:
RLPy.RGlobal.SetPreviewEndTime(previous)
SetPreviewStartTime ( kTime )
Changes the start marker of the preview playback range to the supplied `RTime` value. Choose a value consistent with the preview end marker. Read the updated marker with `GetPreviewStartTime()`.
Parameters
- `kTime` (IN): Specifies the time to set.
Returns
Return type: `RLPy.RStatus`.
Sample code
With playback stopped, invoke `run_script()`. The sample chooses a time within the current marker range, applies it, and restores the previous marker.
import RLPy
def run_script():
"""Temporarily set and restore the preview start time."""
if RLPy.RGlobal.IsPlaying():
print("Stop playback before running this sample.")
return
lower = RLPy.RGlobal.GetPreviewStartTime().ToFloat()
upper = RLPy.RGlobal.GetPreviewEndTime().ToFloat()
if upper <= lower:
print("The current time range is empty; sample skipped.")
return
new_time = RLPy.RTime.FromValue((lower + upper) / 2.0)
previous = RLPy.RGlobal.GetPreviewStartTime()
try:
status = RLPy.RGlobal.SetPreviewStartTime(new_time)
print("status:", status, "readback:", RLPy.RGlobal.GetPreviewStartTime().ToFloat())
return status
finally:
RLPy.RGlobal.SetPreviewStartTime(previous)
SetProjectLength ( kLength )
Changes the total duration of the current project to `kLength`, supplied as an `RTime` value. This changes the project duration rather than just moving the playhead. Read the resulting duration with `GetProjectLength()`.
Parameters
- `kLength` (IN): project length
Returns
Return type: `RLPy.RStatus`.
Sample code
import RLPy
def run_script():
"""Extend the project duration, then attempt to restore it."""
previous = RLPy.RGlobal.GetProjectLength()
# Extends rather than shortens the project so the documentation sample does not cut off existing animation.
target = RLPy.RTime.FromValue(previous.ToInt() + RLPy.RTime.FromValue(6000).ToInt())
try:
status = RLPy.RGlobal.SetProjectLength(target)
print("status:", status, "length:", RLPy.RGlobal.GetProjectLength().ToFloat())
return status
finally:
RLPy.RGlobal.SetProjectLength(previous)
SetRealtimeRenderOptions ( kParams )
Applies the real-time rendering configuration in an `RRealtimeRenderOptions` object. Retrieve the current options, change the required fields, and pass the object to this method to update the viewport rendering configuration.
Parameters
- `kParams` (IN): realtime render options parameters.
Sample code
import RLPy
def run_script():
"""Temporarily disable real-time smoothing and restore the previous setting."""
options = RLPy.RGlobal.GetRealtimeRenderOptions()
previous_smoothing = options.bRealtimeSmooth
try:
options.bRealtimeSmooth = False
RLPy.RGlobal.SetRealtimeRenderOptions(options)
print(RLPy.RGlobal.GetRealtimeRenderOptions().bRealtimeSmooth)
finally:
options.bRealtimeSmooth = previous_smoothing
RLPy.RGlobal.SetRealtimeRenderOptions(options)
SetRenderExportParameter ( *args )
Applies render export settings from an audio, image, image-sequence, or video parameter object. The overload is selected by the supplied object type: `RExportAudioParameter`, `RExportImageParameter`, `RExportImageSequenceParameter`, or `RExportVideoParameter`. Retrieve the corresponding current settings, edit the required fields, and pass the object back to this method.
Parameters
- `kParams` (IN): The export settings object to apply. Pass one of the four object types listed below. The object type selects the overload; pass one object per call to `RLPy.RGlobal.SetRenderExportParameter(kParams)`.
| kParams type | Description | Get current settings |
|---|---|---|
RLPy.RExportImageParameter |
Still-image export settings: strFormat, common output settings in kCommon, and nImageQuality. |
RLPy.RGlobal.GetRenderExportImageParameter()
|
RLPy.RExportImageSequenceParameter |
Image-sequence export settings: strFormat, kCommon, output range in kOutputRange, and nImageQuality. |
RLPy.RGlobal.GetRenderExportImageSequenceParameter()
|
RLPy.RExportVideoParameter |
Video export settings: strFormat, kCommon, kOutputRange, video and audio quality, alpha-only output, hardware video encoding, and PopVideo resolution. |
RLPy.RGlobal.GetRenderExportVideoParameter()
|
RLPy.RExportAudioParameter |
Audio export settings: the output format in strFormat and output range in kOutputRange. |
RLPy.RGlobal.GetRenderExportAudioParameter()
|
Retrieve the matching settings object, change the required fields, and pass it back to this method. Use `SetRenderExportType()` to select the output type separately. Applying parameters updates the export configuration; it does not start rendering.
Returns
`None`.
Sample code
Select Image export before running this example. It changes the image dimensions temporarily, then restores them.
import RLPy
def run_script():
"""Adjust the Image export dimensions to demonstrate an `RExportImageParameter` overload."""
if RLPy.RGlobal.GetRenderExportType() != RLPy.IMAGE:
raise RuntimeError("Select Image export in the Render panel first")
params = RLPy.RGlobal.GetRenderExportImageParameter()
previous_width = params.kCommon.nOutputSizeWidth
previous_height = params.kCommon.nOutputSizeHeight
try:
params.kCommon.nOutputSizeWidth = 512
params.kCommon.nOutputSizeHeight = 512
RLPy.RGlobal.SetRenderExportParameter(params)
current = RLPy.RGlobal.GetRenderExportImageParameter()
print(current.kCommon.nOutputSizeWidth, current.kCommon.nOutputSizeHeight)
finally:
params.kCommon.nOutputSizeWidth = previous_width
params.kCommon.nOutputSizeHeight = previous_height
RLPy.RGlobal.SetRenderExportParameter(params)
SetRenderExportType ( kParams )
Selects the output type used by the application's render interface. Pass an `RExportType` value, such as `RLPy.IMAGE`, and configure the corresponding export parameters before rendering. Read the selected type with `GetRenderExportType()`.
Sample code
import RLPy
def run_script():
"""Temporarily switch to the IMAGE export type."""
previous = RLPy.RGlobal.GetRenderExportType()
try:
result = RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
print(RLPy.RGlobal.GetRenderExportType())
return result
finally:
RLPy.RGlobal.SetRenderExportType(previous)
SetSilentMode ( bSilent )
Enables or disables the application's silent-mode flag. Pass `True` to enable it or `False` to disable it. Save and restore the previous value when changing the mode temporarily in a script.
Parameters
- `bSilent` (IN): set silent or not.
Sample code
import RLPy
def run_script():
"""Temporarily enable silent mode."""
previous = RLPy.RGlobal.GetSilentMode()
try:
result = RLPy.RGlobal.SetSilentMode(True)
print(RLPy.RGlobal.GetSilentMode())
return result
finally:
RLPy.RGlobal.SetSilentMode(previous)
SetStartTime ( kTime )
Changes the start marker of the project's playback range to `kTime`. Supply an `RTime` value consistent with the intended start and end range. Read the updated marker with `GetStartTime()`.
Parameters
- `kTime` (IN): Specifies the time to set.
Returns
Return type: `RLPy.RStatus`.
Sample code
With playback stopped, invoke `run_script()`. The sample chooses a time within the current marker range, applies it, and restores the previous marker.
import RLPy
def run_script():
"""Temporarily set and restore the playback start time."""
if RLPy.RGlobal.IsPlaying():
print("Stop playback before running this sample.")
return
lower = RLPy.RGlobal.GetStartTime().ToFloat()
upper = RLPy.RGlobal.GetEndTime().ToFloat()
if upper <= lower:
print("The current time range is empty; sample skipped.")
return
new_time = RLPy.RTime.FromValue((lower + upper) / 2.0)
previous = RLPy.RGlobal.GetStartTime()
try:
status = RLPy.RGlobal.SetStartTime(new_time)
print("status:", status, "readback:", RLPy.RGlobal.GetStartTime().ToFloat())
return status
finally:
RLPy.RGlobal.SetStartTime(previous)
SetTime ( kTime, bSendEvent=True )
Moves the timeline playhead to `kTime` and updates the scene at that time. In IC8.73, use `RLPy.RTime.FromValue(value)` to construct the time argument. The optional `bSendEvent` argument controls time-change event dispatch; read the resulting position with `GetTime()`.
Parameters
- `kTime` (IN): Target scene time as an `RTime` value.
- `bSendEvent` (IN): Whether to dispatch the time-change event. Defaults to `True`.
Returns
Return type: `RLPy.RStatus`.
Sample code
def run_script():
import RLPy
result = RLPy.RGlobal.SetTime(RLPy.RTime.FromValue(1000))
print(result) # Success or fail
time = RLPy.RGlobal.GetTime()
print(time)
SetTimecodeSource ( eSource )
Selects the source used by the application's Timecode system. Pass an `ETimecodeSource` value identifying the required source. Source-specific timecode data can be supplied through `SetTimecodeSourceData()`.
Parameters
- `eSource` (IN): options.
SetTimecodeSourceData ( eSource, strFormattedTime )
Supplies a formatted timecode string for the specified `ETimecodeSource`. Use it to update the timecode data associated with that source. Select the active source with `SetTimecodeSource()`.
Parameters
- `eSource` (IN): options.
- `strFormattedTime` (IN): formmated time string.
SetViewSize ( nWidth, nHeight )
Changes the width and height of the interactive scene viewport in pixels. Supply the desired dimensions and inspect the returned status. Read the current viewport dimensions with `GetViewSize()`.
Parameters
- `nWidth` (IN): Width of the viewport.
- `nHeight` (IN): Height of the viewport.
Returns
Return type: `RLPy.RStatus`.
Sample code
import RLPy
def run_script():
"""Temporarily adjust the viewport size after confirming that the OUT result is usable."""
previous = RLPy.RGlobal.GetViewSize(0, 0)
if not isinstance(previous, (tuple, list)) or len(previous) != 3:
raise RuntimeError("First verify that the `GetViewSize` OUT parameters are returned as status/width/height")
status, width, height = previous
if status != RLPy.RStatus.Success or width <= 0 or height <= 0:
raise RuntimeError("Could not obtain a viewport size that can be restored")
try:
result = RLPy.RGlobal.SetViewSize(640, 360)
print(result, RLPy.RGlobal.GetViewSize(0, 0))
return result
finally:
RLPy.RGlobal.SetViewSize(width, height)
SetViewportInfoMotionLiveDevice ( *args )
Sets the Motion LIVE device name displayed in the viewport's timecode information. Pass the device name as a string; the default empty string clears the device identification shown there.
ShowMemberLoginDialog ( )
Opens the Reallusion member sign-in dialog in iClone. The dialog lets the user enter account credentials or choose an available social sign-in option. Calling the method displays the dialog and leaves the sign-in interaction to the user.
Sample code
import RLPy
def run_script():
"""Open the member sign-in dialog."""
RLPy.RGlobal.ShowMemberLoginDialog()
Stop ( )
Stops timeline playback and returns the playhead to the playback start marker. Use `Pause()` to halt playback while keeping the current playhead position, and `IsPlaying()` to query playback state.
Sample code
def run_script():
import RLPy
RLPy.RGlobal.Play(RLPy.RTime.FromValue(0), RLPy.RTime.FromValue(1000))
RLPy.RGlobal.Stop()
TrialVersionIncreaseTimes ( strBinPath, uProductID, strProductFold, strRegRoot, nCount=1 )
Increases the recorded usage count for the identified trial plug-in. The product and registration parameters identify the trial record, and `nCount` specifies the requested increment, defaulting to one. This changes trial-usage data.
Parameters
- `strBinPath` (IN): bin file position
- `uProductID` (IN): product id for checking
- `strProductFold` (IN): registry path
- `strRegRoot` (IN): registry path
- `nCount` (IN): increase time
Returns
Return type: `RLPy.RStatus`.
TrialVersionRemainingDays ( strBinPath, uProductID, strProductFold, strRegRoot )
Returns the number of trial days remaining for the product identified by the binary path, product ID, product folder, and registry root. The result is an integer representing the remaining trial period.
Parameters
- `strBinPath` (IN): bin file path
- `uProductID` (IN): product ID
- `strProductFold` (IN): product Folder
- `strRegRoot` (IN): registry root
Returns
Return type: `int`. remain days of trial version
TrialVersionRemainingTimes ( strBinPath, uProductID, strProductFold, strRegRoot, uTimeNo )
Returns the remaining trial-use count for the specified product and usage category `uTimeNo`. The binary path, product ID, product folder, and registry root identify the trial record. The result is an integer count.
Parameters
- `strBinPath` (IN): bin file path
- `uProductID` (IN): product ID
- `strProductFold` (IN): product Folder
- `strRegRoot` (IN): registry root
- `uTimeNo` (IN): time number
Returns
Return type: `int`. remain times of trial version
Undo ( )
Reverses the most recent operation available in the application's undo history. It affects the current project's editing history. Use `Redo()` to reapply an undone operation when it is still available in the redo history.
Sample code
Prepare an operation in the corresponding editing history before running this example.
import RLPy
def run_script():
"""Undo the top operation on the current Undo stack."""
RLPy.RGlobal.Undo()
Description
This class provides global settings and information for the application, including project values such as frame rate and time, screen settings, shared managers and paths, and operations such as playback control, rendering, and media export.
Constructor & Destructor
__init__ (self)
Initializes a new global instance.
Member Functions
AddInfoTips (pObjPtr, strImageSource, strFunctionName, strDescription, strVideoURLLinkcountId, strButtonText, strLearnMoreURL)
Adds an information tip to the native UI object identified by `pObjPtr`. The supplied image, function name, description, video link, button text, and learn-more URL provide the contents of the tip.
Parameters
- pObjPtr
- strImageSource
- strFunctionName
- strDescription
- strVideoURLLinkcountId
- strButtonText
- strLearnMoreURL
BeginAction (strAction, bBlockRecordUndo=False)
Begins an action associated with the application's undo and redo operations. Call `EndAction()` after making the changes for the action. `strAction` supplies the action name, and `bBlockRecordUndo` controls whether undo recording is blocked during the action.
Parameters
- strAction
- bBlockRecordUndo (default: False)
Sample code
Start and end a global action boundary named Motion with an empty body.
def run_script():
import RLPy
RLPy.RGlobal.BeginAction("Motion")
try:
pass
finally:
RLPy.RGlobal.EndAction()
Side Effects
- Begins and ends a global action boundary named Motion.
CapturePixelStream ()
Captures a frame from the application's pixel stream. The returned frame contains its width, height, and pixel buffer information. Use `EnablePixelStream()` to control pixel streaming before requesting frames.
CheckTimecodePluginFeatureAllowed ()
Checks whether the application permits use of the Timecode plug-in feature. Use this check before offering Timecode operations in a plug-in. Installation can be checked separately with `CheckTimecodePluginFullOrTiralInstalled()`.
CheckTimecodePluginFullOrTiralInstalled ()
Checks whether either the full version or the trial version of the Timecode plug-in is installed. This installation check is separate from the feature-permission and trial-validity checks.
CheckTimecodePluginTrialValid ()
Checks the validity of the Timecode plug-in trial. An installed trial with no remaining days fails this check. Use the separate installation and feature-permission checks when determining whether Timecode operations are available.
DoBatchSNVerification (strJson)
Verifies serial-number information for multiple products in one request. Supply the product records as a JSON string, including the product identifiers and registration information. The result is a JSON string containing the verification results for the requested products.
Parameters
- strJson
DoPluginTrialFollowUp (strProductNamePath, nPID)
Invokes the application's trial follow-up operation for the product identified by its name path and product ID. This method is intended for internal product and plug-in trial workflows.
Parameters
- strProductNamePath
- nPID
DoSNVerification (nProductID, strRegistry, strProductName, strSNFailTitle, strSNFailMsg, strSNExceedTitle, strSNExceedMsg)
Runs serial-number verification for the specified product and registration location. The product name and message parameters supply the titles and messages used for invalid serial numbers and exceeded activation limits.
Parameters
- nProductID
- strRegistry
- strProductName
- strSNFailTitle
- strSNFailMsg
- strSNExceedTitle
- strSNExceedMsg
EnablePixelStream (bEnable)
Enables or disables the application's pixel stream according to `bEnable`. Pixel-stream frames can be obtained with `CapturePixelStream()` while streaming is enabled.
Parameters
- bEnable
EndAction ()
Ends an action begun with `BeginAction()` and completes its undo and redo recording boundary. Place this call after the changes belonging to the action.
Sample code
Start and end a global action boundary named Motion with an empty body.
def run_script():
import RLPy
RLPy.RGlobal.BeginAction("Motion")
try:
pass
finally:
RLPy.RGlobal.EndAction()
Side Effects
- Begins and ends a global action boundary named Motion.
ForceViewportUpdate ()
Requests an immediate update of the scene viewport. Use it when a script needs the displayed scene to refresh after changes. The return status indicates whether the update request succeeded.
Sample code
Request a viewport refresh.
def run_script():
import RLPy
result = RLPy.RGlobal.ForceViewportUpdate()
assert result == RLPy.RStatus.Success
Side Effects
- Requests a viewport refresh.
GetDefaultContentFileAbsolutePath (eContent, bCustom)
Returns the absolute path for the content root selected by `eContent`. Set `bCustom` to `True` for custom content or `False` for template content. Use the returned path to locate files in the selected content category.
Parameters
- eContent
- bCustom
GetDialogMode ()
Returns the current application editing or tool mode as an `EModeType` value. This identifies modes such as puppeteering or object editing. Use `SetDialogMode()` to request a different mode.
Sample code
Call `SetDialogMode` with the value returned by `GetDialogMode`.
def run_script():
import RLPy
current_mode = RLPy.RGlobal.GetDialogMode()
RLPy.RGlobal.SetDialogMode(current_mode)
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
GetEndTime ()
Returns the end marker of the project's playback range as an `RTime` value. Read the corresponding start marker with `GetStartTime()` and change the end marker with `SetEndTime()`.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
GetFps ()
Returns the frame-rate object for the current project. In IC8.73 the Python result is an `RLPy.RFps` object. Use this object when converting between project frames and time values.
Sample code
Temporarily set preview start to frame 10, then restore its captured value.
def run_script():
import RLPy
original = RLPy.RGlobal.GetPreviewStartTime()
try:
preview_start = RLPy.RGlobal.GetFps().IndexedFrameTime(10)
assert RLPy.RGlobal.SetPreviewStartTime(preview_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetPreviewStartTime().ToInt() == preview_start.ToInt()
finally:
RLPy.RGlobal.SetPreviewStartTime(original)
Preconditions
- A project is open.
Side Effects
- Temporarily changes preview start time, then restores the captured value during cleanup.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
GetMocapManager ()
Returns the application's `RIMocapManager` interface. Use the manager's methods to access motion-capture operations and query their current state, such as whether capture is running.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
GetMotionDirector ()
Returns the application's `RIMotionDirectorManager` interface for Motion Director operations. Obtaining the manager gives access to its methods without starting a Motion Director session.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
GetMotionSettingOptions ()
Returns the current motion-setting flags as an `EMotionSettingOption` value. These options include motion alignment and motion-root reset settings. Apply a new combination with `SetMotionSettingOptions()`.
Sample code
Set motion-setting option flags, check the readback, and restore the captured flags.
def run_script():
import RLPy
original = RLPy.RGlobal.GetMotionSettingOptions()
options = RLPy.EMotionSettingOption_AlignActorMotion
options |= RLPy.EMotionSettingOption_ResetMotionRoot
options |= RLPy.EMotionSettingOption_ResetMotionRootRotate
try:
RLPy.RGlobal.SetMotionSettingOptions(options)
assert RLPy.RGlobal.GetMotionSettingOptions() == options
finally:
RLPy.RGlobal.SetMotionSettingOptions(original)
Side Effects
- Temporarily changes global motion-setting options, then restores the captured value during cleanup.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
GetObjectSubdivisionSetting (spObject)
Gets the smooth mesh subdivision settings of an object.
Parameters
- spObject
GetOmniConnectorManager ()
Returns an `RIOmniConnectorManager` interface for the application's Omniverse connector operations. Use the returned manager to access connector functionality; retrieving it does not establish a connection.
GetPath (ePath, strPath)
Resolves an application directory selected by an `EPathType` value. Supported categories include temporary files, template content, custom content, and application resources. The Python result contains the status followed by the resolved absolute path.
Parameters
- ePath
- strPath
Sample code
Read the temporary-directory path from `RLPy.RGlobal.GetPath`.
def run_script():
import RLPy
status, path = RLPy.RGlobal.GetPath(RLPy.EPathType_Temp, "")
assert status == RLPy.RStatus.Success
assert path
GetPreviewEndTime ()
Returns the end marker of the preview playback range as an `RTime` value. Use `GetPreviewStartTime()` for the matching start marker and `SetPreviewEndTime()` to change this boundary.
GetPreviewStartTime ()
Returns the start marker of the preview playback range as an `RTime` value. Use `GetPreviewEndTime()` for the matching end marker and `SetPreviewStartTime()` to change this boundary.
Sample code
Temporarily set preview start to frame 10, then restore its captured value.
def run_script():
import RLPy
original = RLPy.RGlobal.GetPreviewStartTime()
try:
preview_start = RLPy.RGlobal.GetFps().IndexedFrameTime(10)
assert RLPy.RGlobal.SetPreviewStartTime(preview_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetPreviewStartTime().ToInt() == preview_start.ToInt()
finally:
RLPy.RGlobal.SetPreviewStartTime(original)
Preconditions
- A project is open.
Side Effects
- Temporarily changes preview start time, then restores the captured value during cleanup.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
GetProjectLength ()
Returns the total duration of the current project as an `RTime` value. This is the project length; playback and preview markers can be queried separately. Use `SetProjectLength()` to change the duration.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
GetRealtimeRenderOptions ()
Returns the current real-time rendering options in an `RRealtimeRenderOptions` object. Read its fields to inspect the viewport rendering configuration. To apply changed options, pass the object to `SetRealtimeRenderOptions()`.
GetRenderExportAudioParameter ()
Returns the current audio export configuration as an `RExportAudioParameter` object. Read or edit its export fields, then use `SetRenderExportParameter()` to apply any changes before exporting audio.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
GetRenderExportImageParameter ()
Returns the current still-image export configuration as an `RExportImageParameter` object. It includes the image export settings used by the render interface. Apply edited settings with `SetRenderExportParameter()`.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
GetRenderExportImageSequenceParameter ()
Returns the current image-sequence export configuration as an `RExportImageSequenceParameter` object. This includes the sequence output range and export settings. Apply edited settings with `SetRenderExportParameter()`.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
GetRenderExportType ()
Returns the export type currently selected in the application's render settings. Use it to determine which export configuration is active, and use `SetRenderExportType()` to select another output type.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
GetRenderExportVideoParameter ()
Returns the current video export configuration as an `RExportVideoParameter` object. This includes the video output range and export settings. Apply edited settings with `SetRenderExportParameter()` before exporting.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
GetScreenSize (nWidth, nHeight)
Returns the width and height of the scene's render output in pixels. In Python the result contains the status, width, and height. Use `GetViewSize()` when the dimensions of the interactive viewport are required.
Parameters
- nWidth
- nHeight
Sample code
Read the screen size for index 0.
def run_script():
import RLPy
status, width, height = RLPy.RGlobal.GetScreenSize(0, 0)
assert status == RLPy.RStatus.Success
assert width > 0 and height > 0
GetSilentMode ()
Returns whether the application's silent-mode flag is enabled. This reads the current flag without changing it. Use `SetSilentMode()` to enable or disable the mode for a scripted workflow.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Temporarily enable silent mode, then restore the captured setting.
def run_script():
import RLPy
original = RLPy.RGlobal.GetSilentMode()
try:
RLPy.RGlobal.SetSilentMode(True)
assert RLPy.RGlobal.GetSilentMode() is True
finally:
RLPy.RGlobal.SetSilentMode(original)
Side Effects
- Temporarily enables silent mode, then restores the captured setting during cleanup.
GetStartTime ()
Returns the start marker of the project's playback range as an `RTime` value. Read the corresponding end marker with `GetEndTime()` and change the start marker with `SetStartTime()`.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
GetTime ()
Returns the current scene time at the timeline playhead as an `RTime` value. Use it to read the position at which the scene is being evaluated. Move the playhead with `SetTime()`.
Sample code
Read the current global time.
def run_script():
import RLPy
current_time = RLPy.RGlobal.GetTime()
return current_time
GetTimecodeTime ()
Returns the current scene time expressed as timecode time in milliseconds. This includes the project's timecode start offset. The result is a floating-point value, whereas `GetTime()` returns an `RTime` object.
GetViewSize (nWidth, nHeight)
Returns the width and height of the interactive scene viewport in pixels. In Python the result contains the status, width, and height. Resize the viewport with `SetViewSize()`.
Parameters
- nWidth
- nHeight
GetVisualSettingComponent ()
Returns the scene's `RIVisualSettingComponent` interface. Use the component's methods to access the project's visual settings. Obtaining the component does not itself change those settings.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
IsAuxiliaryLightEnabled ()
Gets whether the auxiliary light is enabled.
Sample code
Read the auxiliary-light setting, change it, check the readback, and restore the original setting.
def run_script():
import RLPy
original_enabled = RLPy.RGlobal.IsAuxiliaryLightEnabled()
target_enabled = not original_enabled
try:
result = RLPy.RGlobal.SetAuxiliaryLightEnabled(target_enabled)
assert result == RLPy.RStatus.Success
assert RLPy.RGlobal.IsAuxiliaryLightEnabled() == target_enabled
finally:
restore_result = RLPy.RGlobal.SetAuxiliaryLightEnabled(original_enabled)
assert restore_result == RLPy.RStatus.Success
assert RLPy.RGlobal.IsAuxiliaryLightEnabled() == original_enabled
Side Effects
- Temporarily changes the global auxiliary-light setting, then restores its original value.
IsPhysicsSimulationLoop ()
Returns whether physics simulation restarts when playback returns to the beginning of a loop. Use `SetPhysicsSimulationLoop()` to change this simulation behavior.
Sample code
Temporarily disable the physics simulation loop, then restore its captured state.
def run_script():
import RLPy
original = RLPy.RGlobal.IsPhysicsSimulationLoop()
try:
RLPy.RGlobal.SetPhysicsSimulationLoop(False)
assert RLPy.RGlobal.IsPhysicsSimulationLoop() is False
finally:
RLPy.RGlobal.SetPhysicsSimulationLoop(original)
Side Effects
- Temporarily disables the physics simulation loop, then restores the captured state during cleanup.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
IsPlaying ()
Returns whether timeline playback is currently running. Use this query to decide whether to start, pause, or stop playback through `Play()`, `Pause()`, and `Stop()`.
Sample code
Play the 0–6000 tick interval, pause playback, and stop playback during cleanup.
def run_script():
import RLPy
start_time = RLPy.RTime.FromValue(0)
end_time = RLPy.RTime.FromValue(6000)
try:
RLPy.RGlobal.Play(start_time, end_time)
assert RLPy.RGlobal.IsPlaying()
RLPy.RGlobal.Pause()
assert not RLPy.RGlobal.IsPlaying()
finally:
RLPy.RGlobal.Stop()
Preconditions
- A project is open; do not run while existing playback must continue.
Side Effects
- Changes playback state and stops playback during cleanup; the playhead may move.
Sample code
Read global playback, project, motion, visual-setting, and render/export values.
def run_script():
import RLPy
dialog_mode = RLPy.RGlobal.GetDialogMode()
end_time = RLPy.RGlobal.GetEndTime()
fps = RLPy.RGlobal.GetFps()
mocap_manager = RLPy.RGlobal.GetMocapManager()
motion_director = RLPy.RGlobal.GetMotionDirector()
motion_options = RLPy.RGlobal.GetMotionSettingOptions()
preview_start = RLPy.RGlobal.GetPreviewStartTime()
project_length = RLPy.RGlobal.GetProjectLength()
audio_parameters = RLPy.RGlobal.GetRenderExportAudioParameter()
image_parameters = RLPy.RGlobal.GetRenderExportImageParameter()
image_sequence_parameters = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
export_type = RLPy.RGlobal.GetRenderExportType()
video_parameters = RLPy.RGlobal.GetRenderExportVideoParameter()
silent_mode = RLPy.RGlobal.GetSilentMode()
start_time = RLPy.RGlobal.GetStartTime()
visual_settings = RLPy.RGlobal.GetVisualSettingComponent()
physics_loop = RLPy.RGlobal.IsPhysicsSimulationLoop()
is_playing = RLPy.RGlobal.IsPlaying()
IsTrialContentMode ()
Returns whether the application is currently in trial-content mode. This query is intended for internal trial-content workflows and is separate from `IsTrialVersion()`, which checks the application version.
IsTrialVersion ()
Returns whether the running application is a trial version. Use this query when a plug-in needs to distinguish the application trial from the full version. Trial-content mode is queried separately with `IsTrialContentMode()`.
ObjectDataChanged2 (spObject, eType)
Sends an object data-change event for the supplied object and event type. For a viseme change, use `EObjectEventType_VisemeChangeEvent` after updating the object's viseme data. This method sends a notification; it does not make the data change itself.
Parameters
- spObject
- eType
ObjectModified (spObject, eType)
Notifies iClone and other plug-ins that an object has been modified. Call it after changing the object's data, using `eType` to identify the modification category, so dependent UI and listeners can update. It does not perform the object edit itself.
Parameters
- spObject
- eType
Sample code
Notify iClone that the first scene avatar's transform and attributes changed.
def run_script():
import RLPy
avatars = RLPy.RScene.GetAvatars()
if not avatars:
raise RuntimeError("Load a project containing an avatar first.")
RLPy.RGlobal.ObjectModified(
avatars[0],
RLPy.EObjectModifiedType_Transform | RLPy.EObjectModifiedType_Attribute,
)
Preconditions
- A project with at least one avatar is loaded.
Side Effects
- Sends a Transform and Attribute modification notification for the first avatar; it does not edit the avatar.
Pause ()
Pauses timeline playback while retaining the current playhead position. Use `Play()` to start another playback range, or `Stop()` to stop playback and return to its start marker.
Sample code
Play the 0–6000 tick interval, pause playback, and stop playback during cleanup.
def run_script():
import RLPy
start_time = RLPy.RTime.FromValue(0)
end_time = RLPy.RTime.FromValue(6000)
try:
RLPy.RGlobal.Play(start_time, end_time)
assert RLPy.RGlobal.IsPlaying()
RLPy.RGlobal.Pause()
assert not RLPy.RGlobal.IsPlaying()
finally:
RLPy.RGlobal.Stop()
Preconditions
- A project is open; do not run while existing playback must continue.
Side Effects
- Changes playback state and stops playback during cleanup; the playhead may move.
Play (kStart, kEnd)
Starts timeline playback between `kStart` and `kEnd`. Both boundaries must be `RTime` values; in IC8.73 construct them with `RLPy.RTime.FromValue(value)`. Use `IsPlaying()` to query playback and `Pause()` or `Stop()` to interrupt it.
Parameters
- kStart
- kEnd
Sample code
Play the 0–6000 tick interval, pause playback, and stop playback during cleanup.
def run_script():
import RLPy
start_time = RLPy.RTime.FromValue(0)
end_time = RLPy.RTime.FromValue(6000)
try:
RLPy.RGlobal.Play(start_time, end_time)
assert RLPy.RGlobal.IsPlaying()
RLPy.RGlobal.Pause()
assert not RLPy.RGlobal.IsPlaying()
finally:
RLPy.RGlobal.Stop()
Preconditions
- A project is open; do not run while existing playback must continue.
Side Effects
- Changes playback state and stops playback during cleanup; the playhead may move.
Redo ()
Reapplies the most recently undone operation from the application's redo history. Use it after an `Undo()` operation when that operation remains available to redo. It affects the current project's editing history.
RemoveAllAnimations (spObject, bKeepCurrent=True)
Deletes animation data from the specified scene object. The operation applies to supported animated scene objects, including characters, props, lights, and cameras. Refresh the timeline after the call to display the updated tracks, and inspect the returned status for failure.
Parameters
- spObject
- bKeepCurrent (default: True)
RenderAudio (*args)
Exports the project's audio over the interval from `kStartTime` to `kEndTime`. Supply `RTime` boundaries and an output filename. Configure the audio export settings first and ensure the project contains the audio to export.
Parameters
- args
RenderImage (strOutputFileName)
Renders the scene at the current time to the supplied output filename. The output uses the application's image export settings. Configure the desired dimensions and image format before calling the method.
Parameters
- strOutputFileName
RenderImageSequence (*args)
Renders the scene over the specified time interval as a sequence of image files. Supply `RTime` boundaries and an output filename, and configure the image-sequence export settings before rendering. The operation can create multiple numbered files.
Parameters
- args
RenderImageSequenceCanny (*args)
Exports Canny edge-detection output as an image sequence. Supply `RTime` start and end boundaries for the required interval. The `REdgeDetectionCannyParam` object controls the thresholds, Sobel aperture, and gradient calculation. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderImageSequenceDepth (*args)
Exports depth output as an image sequence. Supply `RTime` start and end boundaries for the required interval. The `RDepthParam` object controls depth processing, including CLAHE enhancement. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderImageSequenceNormal (*args)
Exports normal-map output as an image sequence. Supply `RTime` start and end boundaries for the required interval. The output represents the scene's surface-normal information. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderImageSequenceOpenPoseKeyPoint (*args)
Exports OpenPose keypoint output as an image sequence. Supply `RTime` start and end boundaries for the required interval. Use an `ROpenPoseKeyPointParam` object to configure the pose type and keypoint overlay opacity. The scene must contain a character for pose output. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderPreview (*args)
Renders a preview image of the scene at the current time. Supply an output filename to save the image. Use the specialized preview methods when normal, depth, edge, or pose-keypoint output is required.
Parameters
- args
RenderPreviewCanny (*args)
Exports Canny edge-detection output as a preview image at the current scene time. The `REdgeDetectionCannyParam` object controls the thresholds, Sobel aperture, and gradient calculation. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderPreviewDepth (*args)
Exports depth output as a preview image at the current scene time. The `RDepthParam` object controls depth processing, including CLAHE enhancement. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderPreviewNormal (*args)
Exports normal-map output as a preview image at the current scene time. The output represents the scene's surface-normal information. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderPreviewOpenPoseKeyPoint (*args)
Exports OpenPose keypoint output as a preview image at the current scene time. Use an `ROpenPoseKeyPointParam` object to configure the pose type and keypoint overlay opacity. The scene must contain a character for pose output. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderVideo (*args)
Exports the scene to a video using the current render configuration. The filename-only overload uses the configured output range; the time-range overload accepts explicit `RTime` start and end values. Configure the video format and dimensions before rendering and inspect the returned status.
Parameters
- args
Sample code
Render the 600–3000 tick interval to a uniquely named MP4 file in the system temporary directory.
def run_script():
import os
import tempfile
import uuid
import RLPy
output_path = os.path.join(tempfile.gettempdir(), "RLPy_" + uuid.uuid4().hex + ".mp4")
start = RLPy.RTime.FromValue(100 * 6)
end = RLPy.RTime.FromValue(500 * 6)
result = RLPy.RGlobal.RenderVideo(start, end, output_path)
assert result == RLPy.RStatus.Success
Preconditions
- A project with renderable content over ticks 600–3000 is open; configure the video format and dimensions in the render export settings.
Side Effects
- Renders an MP4 file in the system temporary directory and leaves the file in place.
RenderVideoCanny (*args)
Exports Canny edge-detection output as a video. Supply `RTime` start and end boundaries for the required interval. The `REdgeDetectionCannyParam` object controls the thresholds, Sobel aperture, and gradient calculation. Configure the matching export settings and supply an output filename before rendering. Known issue in IC8.73: Canny video export can fail with the message "Fail to export canny result". Check that the output file was created even if the returned status does not indicate an error.
Parameters
- args
RenderVideoDepth (*args)
Exports depth output as a video. Supply `RTime` start and end boundaries for the required interval. The `RDepthParam` object controls depth processing, including CLAHE enhancement. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderVideoNormal (*args)
Exports normal-map output as a video. Supply `RTime` start and end boundaries for the required interval. The output represents the scene's surface-normal information. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
RenderVideoOpenPoseKeyPoint (*args)
Exports OpenPose keypoint output as a video. Supply `RTime` start and end boundaries for the required interval. Use an `ROpenPoseKeyPointParam` object to configure the pose type and keypoint overlay opacity. The scene must contain a character for pose output. Configure the matching export settings and supply an output filename before rendering.
Parameters
- args
SendLogToServer (*args)
Sends diagnostic log information to the application's server. One overload accepts an application-step identifier and log description; the other accepts a plug-in name. Calling this method transmits information outside the local project.
Parameters
- args
SetAuxiliaryLightEnabled (bEnable)
Sets whether the auxiliary light is enabled.
Parameters
- bEnable
Sample code
Read the auxiliary-light setting, change it, check the readback, and restore the original setting.
def run_script():
import RLPy
original_enabled = RLPy.RGlobal.IsAuxiliaryLightEnabled()
target_enabled = not original_enabled
try:
result = RLPy.RGlobal.SetAuxiliaryLightEnabled(target_enabled)
assert result == RLPy.RStatus.Success
assert RLPy.RGlobal.IsAuxiliaryLightEnabled() == target_enabled
finally:
restore_result = RLPy.RGlobal.SetAuxiliaryLightEnabled(original_enabled)
assert restore_result == RLPy.RStatus.Success
assert RLPy.RGlobal.IsAuxiliaryLightEnabled() == original_enabled
Side Effects
- Temporarily changes the global auxiliary-light setting, then restores its original value.
SetDialogMode (eMode)
Requests an application editing or tool mode using an `EModeType` value. For example, `EModeType__None` selects the mode with no editing tool active. Use `GetDialogMode()` to read the resulting mode.
Parameters
- eMode
Sample code
Call `SetDialogMode` with the value returned by `GetDialogMode`.
def run_script():
import RLPy
current_mode = RLPy.RGlobal.GetDialogMode()
RLPy.RGlobal.SetDialogMode(current_mode)
SetEndTime (kTime)
Changes the end marker of the project's playback range to `kTime`. Supply an `RTime` value consistent with the intended start and end range. Read the updated marker with `GetEndTime()`.
Parameters
- kTime
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
SetMotionSettingOptions (eOptions)
Applies a combination of `EMotionSettingOption` flags to the application's motion settings. The flags control options such as actor-motion alignment and motion-root resets. Combine the required flags and read the current combination with `GetMotionSettingOptions()`.
Parameters
- eOptions
Sample code
Set motion-setting option flags, check the readback, and restore the captured flags.
def run_script():
import RLPy
original = RLPy.RGlobal.GetMotionSettingOptions()
options = RLPy.EMotionSettingOption_AlignActorMotion
options |= RLPy.EMotionSettingOption_ResetMotionRoot
options |= RLPy.EMotionSettingOption_ResetMotionRootRotate
try:
RLPy.RGlobal.SetMotionSettingOptions(options)
assert RLPy.RGlobal.GetMotionSettingOptions() == options
finally:
RLPy.RGlobal.SetMotionSettingOptions(original)
Side Effects
- Temporarily changes global motion-setting options, then restores the captured value during cleanup.
SetObjectSubdivisionSetting (spObject, kSetting)
Sets the smooth mesh subdivision settings of an object and its sub-objects.
Parameters
- spObject
- kSetting
SetPhysicsSimulationLoop (bLoop)
Controls whether physics simulation restarts at the beginning of each playback loop. Set `bLoop` to `True` to restart at the loop boundary or `False` to continue simulation. Read the setting with `IsPhysicsSimulationLoop()`.
Parameters
- bLoop
Sample code
Temporarily disable the physics simulation loop, then restore its captured state.
def run_script():
import RLPy
original = RLPy.RGlobal.IsPhysicsSimulationLoop()
try:
RLPy.RGlobal.SetPhysicsSimulationLoop(False)
assert RLPy.RGlobal.IsPhysicsSimulationLoop() is False
finally:
RLPy.RGlobal.SetPhysicsSimulationLoop(original)
Side Effects
- Temporarily disables the physics simulation loop, then restores the captured state during cleanup.
SetPreviewEndTime (kTime)
Changes the end marker of the preview playback range to the supplied `RTime` value. Choose a value consistent with the preview start marker. Read the updated marker with `GetPreviewEndTime()`.
Parameters
- kTime
SetPreviewStartTime (kTime)
Changes the start marker of the preview playback range to the supplied `RTime` value. Choose a value consistent with the preview end marker. Read the updated marker with `GetPreviewStartTime()`.
Parameters
- kTime
Sample code
Temporarily set preview start to frame 10, then restore its captured value.
def run_script():
import RLPy
original = RLPy.RGlobal.GetPreviewStartTime()
try:
preview_start = RLPy.RGlobal.GetFps().IndexedFrameTime(10)
assert RLPy.RGlobal.SetPreviewStartTime(preview_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetPreviewStartTime().ToInt() == preview_start.ToInt()
finally:
RLPy.RGlobal.SetPreviewStartTime(original)
Preconditions
- A project is open.
Side Effects
- Temporarily changes preview start time, then restores the captured value during cleanup.
SetProjectLength (kLength)
Changes the total duration of the current project to `kLength`, supplied as an `RTime` value. This changes the project duration rather than just moving the playhead. Read the resulting duration with `GetProjectLength()`.
Parameters
- kLength
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
SetRealtimeRenderOptions (kParams)
Applies the real-time rendering configuration in an `RRealtimeRenderOptions` object. Retrieve the current options, change the required fields, and pass the object to this method to update the viewport rendering configuration.
Parameters
- kParams
SetRenderExportParameter (*args)
Applies render export settings from an audio, image, image-sequence, or video parameter object. The overload is selected by the supplied object type: `RExportAudioParameter`, `RExportImageParameter`, `RExportImageSequenceParameter`, or `RExportVideoParameter`. Retrieve the corresponding current settings, edit the required fields, and pass the object back to this method.
Parameters
- args
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
SetRenderExportType (kParams)
Selects the output type used by the application's render interface. Pass an `RExportType` value, such as `RLPy.IMAGE`, and configure the corresponding export parameters before rendering. Read the selected type with `GetRenderExportType()`.
Parameters
- kParams
Sample code
Select IMAGE export, apply the current image parameters, then restore the previous export type.
def run_script():
import RLPy
original_type = RLPy.RGlobal.GetRenderExportType()
try:
audio = RLPy.RGlobal.GetRenderExportAudioParameter()
image_sequence = RLPy.RGlobal.GetRenderExportImageSequenceParameter()
video = RLPy.RGlobal.GetRenderExportVideoParameter()
RLPy.RGlobal.SetRenderExportType(RLPy.IMAGE)
image = RLPy.RGlobal.GetRenderExportImageParameter()
RLPy.RGlobal.SetRenderExportParameter(image)
finally:
RLPy.RGlobal.SetRenderExportType(original_type)
Side Effects
- Temporarily changes the selected export type and applies the current image export parameters.
SetSilentMode (bSilent)
Enables or disables the application's silent-mode flag. Pass `True` to enable it or `False` to disable it. Save and restore the previous value when changing the mode temporarily in a script.
Parameters
- bSilent
Sample code
Temporarily enable silent mode, then restore the captured setting.
def run_script():
import RLPy
original = RLPy.RGlobal.GetSilentMode()
try:
RLPy.RGlobal.SetSilentMode(True)
assert RLPy.RGlobal.GetSilentMode() is True
finally:
RLPy.RGlobal.SetSilentMode(original)
Side Effects
- Temporarily enables silent mode, then restores the captured setting during cleanup.
SetStartTime (kTime)
Changes the start marker of the project's playback range to `kTime`. Supply an `RTime` value consistent with the intended start and end range. Read the updated marker with `GetStartTime()`.
Parameters
- kTime
Sample code
Call each project time-range setter with its current value and verify the matching getter.
def run_script():
import RLPy
current_start = RLPy.RGlobal.GetStartTime()
try:
assert RLPy.RGlobal.SetStartTime(current_start) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetStartTime() == current_start
finally:
RLPy.RGlobal.SetStartTime(current_start)
current_end = RLPy.RGlobal.GetEndTime()
try:
assert RLPy.RGlobal.SetEndTime(current_end) == RLPy.RStatus.Success
assert RLPy.RGlobal.GetEndTime() == current_end
finally:
RLPy.RGlobal.SetEndTime(current_end)
current_length = RLPy.RGlobal.GetProjectLength()
try:
RLPy.RGlobal.SetProjectLength(current_length)
assert RLPy.RGlobal.GetProjectLength() == current_length
finally:
RLPy.RGlobal.SetProjectLength(current_length)
Preconditions
- An open project exposes writable start time, end time, and project length settings.
Side Effects
- Calls the setters with captured current values; the sample does not intentionally change the project time range.
SetTime (kTime, bSendEvent=True)
Moves the timeline playhead to `kTime` and updates the scene at that time. In IC8.73, use `RLPy.RTime.FromValue(value)` to construct the time argument. The optional `bSendEvent` argument controls time-change event dispatch; read the resulting position with `GetTime()`.
Parameters
- kTime
- bSendEvent (default: True)
SetTimecodeSource (eSource)
Selects the source used by the application's Timecode system. Pass an `ETimecodeSource` value identifying the required source. Source-specific timecode data can be supplied through `SetTimecodeSourceData()`.
Parameters
- eSource
SetTimecodeSourceData (eSource, strFormattedTime)
Supplies a formatted timecode string for the specified `ETimecodeSource`. Use it to update the timecode data associated with that source. Select the active source with `SetTimecodeSource()`.
Parameters
- eSource
- strFormattedTime
SetViewSize (nWidth, nHeight)
Changes the width and height of the interactive scene viewport in pixels. Supply the desired dimensions and inspect the returned status. Read the current viewport dimensions with `GetViewSize()`.
Parameters
- nWidth
- nHeight
SetViewportInfoMotionLiveDevice (*args)
Sets the Motion LIVE device name displayed in the viewport's timecode information. Pass the device name as a string; the default empty string clears the device identification shown there.
Parameters
- args
ShowMemberLoginDialog ()
Opens the Reallusion member sign-in dialog in iClone. The dialog lets the user enter account credentials or choose an available social sign-in option. Calling the method displays the dialog and leaves the sign-in interaction to the user.
Stop ()
Stops timeline playback and returns the playhead to the playback start marker. Use `Pause()` to halt playback while keeping the current playhead position, and `IsPlaying()` to query playback state.
Sample code
Play the 0–6000 tick interval, pause playback, and stop playback during cleanup.
def run_script():
import RLPy
start_time = RLPy.RTime.FromValue(0)
end_time = RLPy.RTime.FromValue(6000)
try:
RLPy.RGlobal.Play(start_time, end_time)
assert RLPy.RGlobal.IsPlaying()
RLPy.RGlobal.Pause()
assert not RLPy.RGlobal.IsPlaying()
finally:
RLPy.RGlobal.Stop()
Preconditions
- A project is open; do not run while existing playback must continue.
Side Effects
- Changes playback state and stops playback during cleanup; the playhead may move.
TrialVersionIncreaseTimes (strBinPath, uProductID, strProductFold, strRegRoot, nCount=1)
Increases the recorded usage count for the identified trial plug-in. The product and registration parameters identify the trial record, and `nCount` specifies the requested increment, defaulting to one. This changes trial-usage data.
Parameters
- strBinPath
- uProductID
- strProductFold
- strRegRoot
- nCount (default: 1)
TrialVersionRemainingDays (strBinPath, uProductID, strProductFold, strRegRoot)
Returns the number of trial days remaining for the product identified by the binary path, product ID, product folder, and registry root. The result is an integer representing the remaining trial period.
Parameters
- strBinPath
- uProductID
- strProductFold
- strRegRoot
TrialVersionRemainingTimes (strBinPath, uProductID, strProductFold, strRegRoot, uTimeNo)
Returns the remaining trial-use count for the specified product and usage category `uTimeNo`. The binary path, product ID, product folder, and registry root identify the trial record. The result is an integer count.
Parameters
- strBinPath
- uProductID
- strProductFold
- strRegRoot
- uTimeNo
Undo ()
Reverses the most recent operation available in the application's undo history. It affects the current project's editing history. Use `Redo()` to reapply an undone operation when it is still available in the redo history.
Properties
thisown
Indicates whether this SWIG proxy owns the underlying C++ object.