add_session
Add a Maya session manually by specifying host and port. Use this when auto-discovery does not find your Maya session.
Instructions
Manually add a Maya session at a specific host and port.
Use this when auto-discovery doesn't find your Maya session, or to connect to a Maya instance on a specific port.
Args: host: The session host (default: "127.0.0.1") port: The session port number (default: 7001)
Returns: Session information for the added session
Before using this, ensure Maya has a Python command port open. In Maya's Script Editor (Python), run: import maya.cmds as cmds cmds.commandPort(name=':7001', sourceType='python')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | 127.0.0.1 | |
| port | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | ||
| host | Yes | ||
| port | Yes | ||
| user | Yes | ||
| scene_name | No | ||
| scene_path | No | ||
| session_key | Yes | ||
| maya_version | No |