IC8 Python API:RLPy RScene

From Reallusion Wiki!
Jump to: navigation, search

Description

An animation project will usually contain all sorts of objects, such as characters, props, lights, cameras, particle systems, etc. The RScene class is used to manage these objects in the scene. It provides many functions for users to find and access these objects. RScene is a static class that can be used directly without having to create an instance. This class provides functions for finding objects by name or type, deleting object, showing / hiding objects, getting and setting selected object, and so on. See Also: RIObject, RIAvatar, RIProp

Constructor & Destructor

__init__ (self)

Initializes a new scene instance.

Member Functions

AddSwitchCameraKey (kSetTime, spCamera)

Adds key on camera switcher.

Parameters

  • kSetTime
  • spCamera

ClearSelectObjects ()

Deselect everything in the scene.

ClearSwitchCameraKeys ()

Clears all key on camera switcher.

CreateCollection (strNewCollectionName)

Creates collection.

Parameters

  • strNewCollectionName

DeleteCollection (strCollectionName)

Deletes collection.

Parameters

  • strCollectionName

FindChildObjects (spObject, eType, bAllLevel=True)

Finds all child objects of the specified object type from the object.

Parameters

  • spObject
  • eType
  • bAllLevel (default: True)

FindObject (eType, strName)

Searches for an object by name and type. Returns the first object that fulfills the search criteria.

Parameters

  • eType
  • strName

FindObjects (*args)

Searches for all objects that match by name and type. See Also: FindObject

Parameters

  • args

GetAvatars (*args)

Get all the characters in the scene. The search results can be filtered by avatar type. See Also: FindObject, FindObjects

Parameters

  • args

GetBuildings ()

Gets all buildings in the scene.

GetCameras ()

Gets all cameras in the scene.

GetCurrentCamera ()

Gets the current camera in the scene.

GetMDProps ()

Gets all MD props in the scene.

GetProps ()

Get all the props in the scene. See Also: FindObject, FindObjects

GetRootNode ()

Gets the root node of the scene.

GetSelectedObjects ()

Get all the selected object in the scene. If no objects are selected then return an empty list. See Also: SelectObject, SelectObjects, ClearSelectObjects

GetSwitchCameraFrameIndexs (kFps)

Gets the switch camera frame and camera in the scene.

Parameters

  • kFps

Hide (spObject)

Hide an object in the scene. See Also: Show

Parameters

  • spObject

MoveToCollection (*args)

Moves to collection.

Parameters

  • args

QueryObjectByID (strID)

Returns the scene object with the specified ID, if one is found.

Parameters

  • strID

RemoveObject (spObject)

Remove an object from the scene. See Also: Show

Parameters

  • spObject

SelectObject (spObject)

Select an object in the scene. See Also: SelectObjects, ClearSelectObjects, GetSelectedObjects

Parameters

  • spObject

SelectObjects (kObjects)

Select several objects in the scene. See Also: SelectObject, ClearSelectObjects, GetSelectedObjects

Parameters

  • kObjects

SetCurrentCamera (spCamera)

Sets the current camera in the scene.

Parameters

  • spCamera

Show (spObject)

Display an object in the scene. See Also: Hide

Parameters

  • spObject

Properties

thisown

Indicates whether this SWIG proxy owns the underlying C++ object.