LiveSession#
- class omni.kit.usd.layers.LiveSession(handle, session_channel, live_syncing)#
Bases:
objectPython instance of ILayersInstance for the convenience of accessing and querying properties and states of a Live Session.
Methods
__init__(handle, session_channel, live_syncing)Internal constructor.
Gets the last modified time of the Live Session.
get_peer_user_info(user_id)Gets the info of peer user by user id if this session is joined.
Attributes
The base layer identifier of the Live Session.
The channel url of the Live Session that shares by all users to do communication.
Returns True if this session is joined locally.
The user that connects the server of base layer.
The user id that connects the server of base layer.
The user name that connects the server of base layer.
Whether local user has permission to merge the Live Session or not.
The name of the Live Session.
The owner name of the Live Session.
All peer users in the Live Session if the session is joined.
The url of the root.live layer for the Live Session in the server.
The session link to be shared.
The physical url of the Live Session in the server.
Returns true if the session is valid.
- __init__(handle, session_channel, live_syncing)#
Internal constructor.
- get_last_modified_time() int#
Gets the last modified time of the Live Session. The modified time is fetched from the session config file. It can be used to sort the Live Session list in access order.
- get_peer_user_info(
- user_id,
Gets the info of peer user by user id if this session is joined.
- property base_layer_identifier: str#
The base layer identifier of the Live Session.
- property channel_url: str#
The channel url of the Live Session that shares by all users to do communication.
- property joined: bool#
Returns True if this session is joined locally.
- property logged_user: LiveSessionUser#
The user that connects the server of base layer. It’s also the user that joins the Live Session, and can be uniquely identified in the Live Session with user id.
- property logged_user_id: str#
The user id that connects the server of base layer. And it’s also the user that joins the Live Session.
- property logged_user_name: str#
The user name that connects the server of base layer. And it’s also the user that joins the Live Session.
- property merge_permission: bool#
Whether local user has permission to merge the Live Session or not. It’s possible that the local user is the owner but this returns False as if multiple instances of the same user join the same session, only one of them will be the runtime owner.
- property name: str#
The name of the Live Session.
- property owner: str#
The owner name of the Live Session. It returns the static owner name of the session only. If it has multiple instances of the same user join the same session, only one of the owner has the real merge_permission.
- property peer_users: List[LiveSessionUser]#
All peer users in the Live Session if the session is joined.
- property root: str#
The url of the root.live layer for the Live Session in the server.
The session link to be shared. Shared link is different as url, so url points to the physical location of the Live Session that local user can get access to, while session link is the URL that you can share to others, and can be launched from Omniverse launcher and other apps could parse it and decide the action from it. The session name is passed as the query parameter to the base layer url, for example, omniverse://localhost/test/stage.usd?live_session_name=my_session.
- property url: str#
The physical url of the Live Session in the server.
- property valid: bool#
Returns true if the session is valid. Or it’s removed.