Public Member Functions | |
| HRESULT | NtConnectTo ([in] BSTR bstrClientName,[in] BSTR bstrClientPassword,[in] BSTR bstrLocSharedSpace,[in] BSTR bstrServerAddr,[in] VARIANT vPort,[in] VARIANT vSyncRate) |
| HRESULT | NtDisconnect ([in] BSTR bstrName) |
| HRESULT | OpenNetworkView ([in] BSTR bszNetwork) |
| HRESULT | NtOpenView (void) |
| HRESULT | OpenPrivilegesPanel () |
| HRESULT | SetPrivileges ([in] BSTR bstrNodeName,[in] VARIANT bRecursive,[in] VARIANT vOperation,[in] BSTR bstrKeys,[in] VARIANT vSetOperation) |
| HRESULT | GetNodeStatus ([in] BSTR bstrNodeName,[out, retval] VARIANT *pvRetInfo) |
| HRESULT | NtSetCNotifSounds ([in] VARIANT vEnabled) |
| HRESULT | NtGetCNotifSounds ([out, retval] VARIANT *pvEnabled) |
| HRESULT | NtSetCAutoReconnect ([in] VARIANT vEnabled) |
| HRESULT | NtGetCAutoReconnect ([out, retval] VARIANT *pvEnabled) |
| HRESULT | GetNodeSessionId ([in] VARIANT vNodeName,[in] VARIANT vIndex,[out, retval] VARIANT *pvSessionId) |
| HRESULT | GetNodeSessionNickName ([in] VARIANT vNodeName,[in] VARIANT vIndex,[out, retval] VARIANT *pvNickname) |
| HRESULT | NtSetCDefaultServerAddr ([in] VARIANT vAddress) |
| HRESULT | NtGetCDefaultServerAddr ([out, retval] VARIANT *pvAddress) |
| HRESULT | NtSetCDefaultServerPort ([in] VARIANT vPort) |
| HRESULT | NtGetCDefaultServerPort ([out, retval] VARIANT *pvPort) |
| HRESULT | ReplaceAddrInSSS ([in] BSTR bstrObjName,[in] BSTR bstrOrigAddr,[in] BSTR bstrNewAddr) |
| HRESULT | EnterSharedSpace ([in] BSTR bstrSSSNode) |
| HRESULT | GetNearestSharedSpace ([in] BSTR bstrNodeName,[out, retval] VARIANT *pvSharedSpaceName) |
| HRESULT | GenerateCacheIIDAttr ([in] BSTR bstrNodeName) |
| HRESULT | RemoveCacheIIDAttr ([in] BSTR bstrNodeName) |
| HRESULT | PurgeCache ([in] DWORD dwKeepDays) |
| HRESULT | NtOpenViewEx ([in] BOOL bAutoLogin) |
| HRESULT | NtGetFirstServerPortRange ([out, retval] VARIANT *pvPort) |
| HRESULT | NtGetLastServerPortRange ([out, retval] VARIANT *pvPort) |
| HRESULT | NtSetServerPortRange ([in] VARIANT vFirstPort,[in] VARIANT vLastPort) |
| HRESULT | LoadNetworkPropsFromCfgFile ([in] VARIANT vFilePath) |
| HRESULT | NtCreateServerView () |
Properties | |
| VARIANT * | ConLocal ([in] BSTR szNodeName,[in] BSTR szConName) [get] |
| VARIANT | ConLocal ([in] BSTR szNodeName,[in] BSTR szConName) [set] |
Root-level name in the scripting engine's name space: Net.
| HRESULT IRiNetwork::NtConnectTo | ( | [in] BSTR | bstrClientName, | |
| [in] BSTR | bstrClientPassword, | |||
| [in] BSTR | bstrLocSharedSpace, | |||
| [in] BSTR | bstrServerAddr, | |||
| [in] VARIANT | vPort, | |||
| [in] VARIANT | vSyncRate | |||
| ) |
Method creates Client object and sets its attributes.
Once the object is created and set, the object then automatically tries to connect to the server.
| bstrClientName | [in] Client's login name. It will be used as name of the created Client node as well. Empty strings are mapped as "UnknClient". | |
| bstrClientPassword | [in] Client's login password. | |
| bstrLocSharedSpace | [in] Full name identification of the space that will be synchronized with server. An empty string value '' will be mapped as the current scene space (usually '/Project/Space 3D'). | |
| bstrServerAddr | [in] Server address. | |
| vPort | [in] Communication port. | |
| vSyncRate | [in] Synchronization rate. Defines number of times per second, that the client space is synchronized with the server. |
Net.NtConnectTo('MyUserName', 'MyPasswd', Space.CurrentScene(), '192.168.0.1', 1109, 15.0);
| HRESULT IRiNetwork::NtDisconnect | ( | [in] BSTR | bstrName | ) |
Disconnect Client object and delete it from Network Space.
| bstrName | [in] Full name identification of the object located in Network Space (Str.ID = "/Network") that will be disconnected and then deleted. Empty string value '' will be mapped as 'UnknClient'. |
Net.NtDisconnect('MyUserName');
| HRESULT IRiNetwork::OpenNetworkView | ( | [in] BSTR | bszNetwork | ) |
Use to open network view/panel window.
| bszNetwork | [in] Full name identification of the Client object that the view should be connected to. |
Net.OpenNetworkView('/Network/MyUserName');
| HRESULT IRiNetwork::NtOpenView | ( | void | ) |
Use this method to open a network view.
If you are already connected, standard network view is opened and no other action is executed.
In case you are not logged in yet, then the login view opens.
Net.NtOpenView();
| HRESULT IRiNetwork::OpenPrivilegesPanel | ( | ) |
Opens privileges panel.
Net.OpenPrivilegesPanel();
| HRESULT IRiNetwork::SetPrivileges | ( | [in] BSTR | bstrNodeName, | |
| [in] VARIANT | bRecursive, | |||
| [in] VARIANT | vOperation, | |||
| [in] BSTR | bstrKeys, | |||
| [in] VARIANT | vSetOperation | |||
| ) |
Set privileges for specified object.
| bstrNodeName | [in] Full name identification of the object for which the privileges will be set. | |
| bRecursive | [in] Specify true if you want to set the privileges for sub-objects as well. | |
| vOperation | [in] Kind of operation for which the privileges will be set.
| |
| bstrKeys | [in] List of keys separated by ";" character. | |
| vSetOperation | [in]
|
// Allow Visitor(s) to manipulate the whole selected object. Net.SetPrivileges(Node.FirstSelected(), true, 0, 'Visitor', 1);
| HRESULT IRiNetwork::GetNodeStatus | ( | [in] BSTR | bstrNodeName, | |
| [out, retval] VARIANT * | pvRetInfo | |||
| ) |
Detect network status for specified object.
Use it to find whether the object is placed in Shared Space or not.
Also used to find out whether your script is running on server or client machine.
It is important mainly for activities that are placed into Shared Space.
With this method you can detect if your script is running on server and prevent the dual execution on client machine.
| bstrNodeName | [in] Full name identification of the object. If NULL or empty string is specified, current scene object is used. |
Standard HRESULT processing can be applied to the result.
StatusObj = Net.GetNodeStatus(Node.FirstSelected());
var status = StatusObj.Param("NtNodeStat");
switch (status)
{
case 0:
strStatus = "Selected object in not in Shared Space";
break;
case 1:
strStatus = "This script runs on server and found that selected object is in Shared Space";
break;
case 2:
strStatus = "This script runs on client and found that selected object is in Shared Space";
break;
}
| HRESULT IRiNetwork::NtSetCNotifSounds | ( | [in] VARIANT | vEnabled | ) |
Set client notify sounds status.
| vEnabled | [in] Put true to enable sounds (login, chat and etc.) and false to disable all sounds for all clients. |
Net.NtSetCNotifSounds(true);
| HRESULT IRiNetwork::NtGetCNotifSounds | ( | [out, retval] VARIANT * | pvEnabled | ) |
Get client notify sounds status.
Standard HRESULT processing can be applied to the result.
var notifySound = Net.NtGetCNotifSounds();
System.Trace(notifySound);
| HRESULT IRiNetwork::NtSetCAutoReconnect | ( | [in] VARIANT | vEnabled | ) |
Set clients' auto-reconnect status.
| vEnabled | [in] If true then after a ctx load tries connect to Shared Space, if the ctx file was created while the client was logged in. If @ false and client was logged in while the ctx was created, then client's Active attribute will be set to as well. |
Net.NtSetCAutoReconnect(true);
| HRESULT IRiNetwork::NtGetCAutoReconnect | ( | [out, retval] VARIANT * | pvEnabled | ) |
Get clients' auto-reconnect status.
Standard HRESULT processing can be applied to the result.
var autoRecon = Net.NtGetCAutoReconnect();
System.Trace(autoRecon);
| HRESULT IRiNetwork::GetNodeSessionId | ( | [in] VARIANT | vNodeName, | |
| [in] VARIANT | vIndex, | |||
| [out, retval] VARIANT * | pvSessionId | |||
| ) |
Get session Id for specified object and Shared Space.
Method enumerates all Shared Spaces in which the object is located and returns session Id.
| vNodeName | [in] Specify object full name identification for which you want get the session Id. If no object is specified, then the current scene will be checked. | |
| vIndex | [in] If object is located in more than one Shared Space, specify the index of the Shared Space for which the session Id will be returned. Use GetNodeStatus method to find in how many Shared Spaces it resides in. |
Standard HRESULT processing can be applied to the result.
var nodeSessID = Net.GetNodeSessionId(Space.CurrentScene(), 1);
System.Trace(nodeSessID);
| HRESULT IRiNetwork::GetNodeSessionNickName | ( | [in] VARIANT | vNodeName, | |
| [in] VARIANT | vIndex, | |||
| [out, retval] VARIANT * | pvNickname | |||
| ) |
Get client/server nickname for specified object and Shared Space.
Method enumerates all Shared Spaces in which the object is located and returns session nickname if found.
| vNodeName | [in] Specify object full name identification for which you want get the nickname. If no object is specified, then the current scene will be checked. | |
| vIndex | [in] If object is located in more than just one Shared Space, specify index of the Shared Space for which the nickname will be returned. Use GetNodeStatus method to find in how many Shared Spaces the object is included in. |
Standard HRESULT processing can be applied to the result.
var nodeSessNN = Net.GetNodeSessionNickName(Space.CurrentScene(), 1);
System.Trace(nodeSessNN);
| HRESULT IRiNetwork::NtSetCDefaultServerAddr | ( | [in] VARIANT | vAddress | ) |
Set default server address.
| vAddress | [in] Default server address. If not set or it is empty, then the default server address is searched in /Network space. |
Net.NtSetCDefaultServerAddr();
| HRESULT IRiNetwork::NtGetCDefaultServerAddr | ( | [out, retval] VARIANT * | pvAddress | ) |
Get default server address.
Standard HRESULT processing can be applied to the result.
var defServeAdd = Net.NtGetCDefaultServerAddr();
| HRESULT IRiNetwork::NtSetCDefaultServerPort | ( | [in] VARIANT | vPort | ) |
Set default server port.
| vPort | [in] Default server port. If not set, it is empty or set to 0, then the default server port is searched in /Network space. |
Net.NtSetCDefaultServerPort();
| HRESULT IRiNetwork::NtGetCDefaultServerPort | ( | [out, retval] VARIANT * | pvPort | ) |
Get default server port.
Standard HRESULT processing can be applied to the result.
var defServePort = Net.NtGetCDefaultServerPort();
| HRESULT IRiNetwork::ReplaceAddrInSSS | ( | [in] BSTR | bstrObjName, | |
| [in] BSTR | bstrOrigAddr, | |||
| [in] BSTR | bstrNewAddr | |||
| ) |
Replace server addresses in SharedSpaceSettings objects.
| bstrObjName | [in] Object identification for which the replace will be executed (all sub-objects are enumerated). If it is not specified, current scene is enumerated. | |
| bstrOrigAddr | [in] Original address. | |
| bstrNewAddr | [in] New address. |
var objName = Node.FirstSelected();
var origAdd = tsportal.caligari.com;
var newAdd = tpportal.caligari.com;
Net.ReplaceAddrInSSS(objName, origAdd, newAdd);
| HRESULT IRiNetwork::EnterSharedSpace | ( | [in] BSTR | bstrSSSNode | ) |
Try to enter specified Shared Space.
| bstrSSSNode | [in] Full name of Shared Space Settings object that holds information about the shared space. |
Net.EnterSharedSpace('/Project/NewSharedSpace');
| HRESULT IRiNetwork::GetNearestSharedSpace | ( | [in] BSTR | bstrNodeName, | |
| [out, retval] VARIANT * | pvSharedSpaceName | |||
| ) |
Get the closest Shared Space in which the given object is included. To find other shared spaces call this method again with returned Shared Space. To get total number of the Shared Spaces call GetNodeStatus.
| bstrNodeName | [in] Full name of the object for which you want to find nearest Shared Space. |
Standard HRESULT processing can be applied to the result.
var nearSS = Net.GetNearestSharedSpace(Node.FirstSelected();
| HRESULT IRiNetwork::GenerateCacheIIDAttr | ( | [in] BSTR | bstrNodeName | ) |
Generate cache identification number. The number is stored in CON_CMD_NETWORK_MANUAL_CACHE_IID (con.name: NetManualCacheIID) connector as IID. This IID is used for manual cache system for object's version identification and has sense to be used only on the top level objects in the Shared Space.
| bstrNodeName | [in] Full name of the object for which you want generate new cache IID. If you don't specify the object, then current selection is enumerated and the IID is set for all selected nodes. If a sub-object already has an assigned IID, then it is removed and replaced with this new one. |
Net.GenerateCacheIIDAttr(Node.FirstSelected());
| HRESULT IRiNetwork::RemoveCacheIIDAttr | ( | [in] BSTR | bstrNodeName | ) |
Remove cache identification attribute CON_CMD_NETWORK_MANUAL_CACHE_IID (con.name: NetManualCacheIID) so the node will no longer be cached.
| bstrNodeName | [in] Full name of the object for which you want remove cache IID. If you don't specify an object, then current selection is enumerated and the IID is removed from all selected nodes. |
Net.RemoveCacheIIDAttr();
| HRESULT IRiNetwork::PurgeCache | ( | [in] DWORD | dwKeepDays | ) |
Remove objects from network cache.
| dwKeepDays | [in] Objects accessed outside this parameter will be deleted. (not accessed means no activity; not selected or manipulated or such). |
Net.PurgeCache(30);
| HRESULT IRiNetwork::NtOpenViewEx | ( | [in] BOOL | bAutoLogin | ) |
Use this method to open a network view.
If you are already connected, standard network view is opened and no other action is executed.
In case you are not logged in yet, then the login view opens.
| bAutoLogin | [in] Specify true for automatic connection. |
Net.NtOpenViewEx(true);
| HRESULT IRiNetwork::NtGetFirstServerPortRange | ( | [out, retval] VARIANT * | pvPort | ) |
Read the first port of the server range.
Standard HRESULT processing can be applied to the result.
var fPort = Net.NtGetFirstServerPortRange();
| HRESULT IRiNetwork::NtGetLastServerPortRange | ( | [out, retval] VARIANT * | pvPort | ) |
Read the last port of the server range.
Standard HRESULT processing can be applied to the result.
var lPort = Net.NtGetLastServerPortRange();
| HRESULT IRiNetwork::NtSetServerPortRange | ( | [in] VARIANT | vFirstPort, | |
| [in] VARIANT | vLastPort | |||
| ) |
Use this method to set the server's port range.
| pvFirstPort | [in] Set the first server port. | |
| pvLastPort | [in] Set the last server port. |
Net.NtSetServerPortRange(1100, 2500);
| HRESULT IRiNetwork::LoadNetworkPropsFromCfgFile | ( | [in] VARIANT | vFilePath | ) |
Call this method to restore the NetProperties node from config file.
| vFilePath | [in] Full file path of the config file. If it is not specified, the default file path is used (application directory). |
Net.LoadNetworkPropsFromCfgFile();
| HRESULT IRiNetwork::NtCreateServerView | ( | ) |
Method creates and opens the Server View for remote manipulation.
Net.NtCreateServerView();
VARIANT * IRiNetwork::ConLocal([in] BSTR szNodeName, [in] BSTR szConName) [get] |
Find whether specified connector is local or not.
| szNodeName | [in] Full name of object. | |
| szConName | [in] Connector name. |
Standard HRESULT processing can be applied to the result.
var nodeName = Node.FirstSelected();
var conName = Mesh;
var isLocal = Net.ConLocal(nodeName, conName);
if(isLocal == true)
{
System.Alert(isLocal);
}
else
{
System.Alert("not local");
}
VARIANT IRiNetwork::ConLocal([in] BSTR szNodeName, [in] BSTR szConName) [set] |
Set for connector whether it will be local or not. If a connector is local, it's value is not synchronized via network.
| szNodeName | [in] Full name of object. If not specified, the first selected object is used. | |
| szConName | [in] Connector name. If not specified, all connectors are set for the object and all sub-objects except owner and sub-objects connectors. | |
| val | [in] Set to true to make the connector local. |
Net.ConLocal(nodeName, conName, true);
1.5.5