Main Page | Class Hierarchy | Alphabetical List | Compound List | Compound Members

# IRiTSBCommand Struct Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | ConnectTSToSpace ([in] BSTR bstrSpaceName)
HRESULT | AttrClean ([in] BSTR bstrSpaceName)
HRESULT | HookToScene ([in] BSTR bstrTSScene)
HRESULT | SuggestTSStateByAlias ([in] BSTR szAlias)
HRESULT | InfoRequestByAlias ([in] BSTR szAlias)
HRESULT | XorTypeTSStateByAlias ([in] BSTR szAlias)
HRESULT | DeleteTmpTextures ()
HRESULT | SetBridgeSyncStatus ([in] VARIANT vStatus)
HRESULT | SetRefreshRate ([in] VARIANT vFPS)
HRESULT | PutActiveFrame ([in] BSTR bstrNodeName,[in] VARIANT vFrame)
HRESULT | FlushSyncEvents (void)
HRESULT | SetBridgeHalfLoop ([in] VARIANT vEnabled)
HRESULT | RsTSEventsStatus ([out, retval] VARIANT *pvEventsBlocked)
HRESULT | BlockRsTSEvents ([in] VARIANT vBlockEvents)
HRESULT | SynchronizeObject ([in] BSTR bstrObjName)
HRESULT | SetBridgeSyncMethod ([in] VARIANT vMethod)

## Detailed Description

The IRiTSBCommand interface provides methods that allows you to controll bridge synchronization.

Root-level name in the scripting engine's name space: tSBridge

## Member Function Documentation

HRESULT IRiTSBCommand::ConnectTSToSpace | ( | [in] BSTR | bstrSpaceName | ) |

  | Tell bridge which space should be synchronized with Modeler's scene. This command is called automatically after New Scene with Space.CurrentScene() as the parameter. It creates all the objects that are necessary to connect Modeler’s scene with the given Player scene/encapsulator. Parameters:
  bstrSpaceName | - full string identification name of the space that should be synchronized

HRESULT IRiTSBCommand::AttrClean | ( | [in] BSTR | bstrSpaceName | ) |

  | Remove all the bridge's attributes from specified object. It is useful if you want to export an object/s and be sure all the bridge package objects are removed from exported object. Parameters:
  bstrSpaceName | - Use full name as the parameter of the object from which the attributes should be removed. If "/" is specified, the whole context will be cleared. If you use "", then just selected object will be cleared.
Remarks: After using this command be aware that the bridge will stop working. You can activate it again from Model view if you activate the whole scene synchronization. You can do it by load a scene or if you turn off and then again turn on bridge with Modeler->Player synchronization.

HRESULT IRiTSBCommand::HookToScene | ( | [in] BSTR | bstrTSScene | ) |

  | Method reconnect 3D objects between Modeler scene and Player View. This command is called automatically after Modeler or Player loads a scene. You can use it to partially restore the bridge connection after AttrClean method. Parameters:
  bstrTSScene | - Full string name identification of the TSScene object. It should be located in /Project space.

HRESULT IRiTSBCommand::SuggestTSStateByAlias | ( | [in] BSTR | szAlias | ) |

  | Call to execute a Modeler's action. This has the same effect as if you click on a Modeler's button. Parameters:
  szAlias | - action identification. For possible values see /Toolbar Prototypes Encapsulator and all toolbars that's name begin with tS. The action you can find in Command connector.
Example:
        // Assign rubber physics material for selected object/s
        tSBridge.SuggestTSStateByAlias("PhysicsLocalRubberButton");
See also: XorTypeTSStateByAlias InfoRequestByAlias

HRESULT IRiTSBCommand::InfoRequestByAlias | ( | [in] BSTR | szAlias | ) |

  | Call to execute a Modeler's info action. This has the same effect as if you right click on a Modeler's button. Parameters:
  szAlias | - info action identification. For possible values see /Toolbar Prototypes Encapsulator and all toolbars that's name begin with tS. The action you can find in RClickCommand connector.
Example:
        // Display physical properties for selected object/s
        tSBridge.InfoRequestByAlias("PhysicsLocalRubberButton")
See also: XorTypeTSStateByAlias SuggestTSStateByAlias

HRESULT IRiTSBCommand::XorTypeTSStateByAlias | ( | [in] BSTR | szAlias | ) |

  | Call to execute a Modeler's action that is specified as a switch. This has the same effect as if you click on a On-Off Modeler's button. Parameters:
  szAlias | - action identification. For possible values see /Toolbar Prototypes Encapsulator and all toolbars that's name begin with tS. The action you can find in Command connector.
Example:
        // Turn on or off the physics grafitation/s
        tSBridge.XorTypeTSStateByAlias("GravitationPadButton");
See also: SuggestTSStateByAlias InfoRequestByAlias

HRESULT IRiTSBCommand::DeleteTmpTextures | ( |  | ) |

| Method delete all temporary created textures. It is called automatically after each time you start tS7.

HRESULT IRiTSBCommand::SetBridgeSyncStatus | ( | [in] VARIANT | vStatus | ) |

  | Set bridge synchronization status. This status is set automatically from desktop preferences, so use it only temporary for speed up your scripts. Parameters:
  vStatus | - status of the bridge. Possible values: 0 - always off 0 - always on 0 - turn off if possible (the auto state)
See also: SetRefreshRate SetBridgeHalfLoop SetBridgeSyncMethod

HRESULT IRiTSBCommand::SetRefreshRate | ( | [in] VARIANT | vFPS | ) |

  | Set bridge synchronization refresh rate. This status is set automatically from desktop preferences. It is possible you change it temporary, but it is recommended you change it directly in Desktop preferences object (string ID: /Preferences/Desktop). Parameters:
  vFPS | - refresh rate in frames per seconds
See also: SetBridgeSyncStatus SetBridgeHalfLoop SetBridgeSyncMethod

HRESULT IRiTSBCommand::PutActiveFrame | ( | [in] BSTR | bstrNodeName,
|  | [in] VARIANT | vFrame
| ) |

  | Use this method to put scene or object to specific frame. If autorecord is turned on in Modeler, a new key-frame will be created in next object move, scale or rotation. Parameters:
  bstrNodeName | - object string scene identification for which the frame should be changed. If you specify '', then it will be set for the whole scene.
  vFrame | - desired frame number.
Example:
        // Put Modeler's scene to frame 10 and be sure it is immediatelly done
        tSBridge.PutActiveFrame('', 10);
        tSBridge.FlushSyncEvents();
See also: FlushSyncEvents

HRESULT IRiTSBCommand::FlushSyncEvents | ( | void |  | ) |

| Flush all the bridge's synchronization events that are waititing in event queue. You can use this command e.g. after PutActiveFrame if you want be sure the scene or object is in desired frame.

HRESULT IRiTSBCommand::SetBridgeHalfLoop | ( | [in] VARIANT | vEnabled | ) |

  | Turn on or off the procedural animation support. Use this method only inside your script, as it is set automatically by Desktop preferences object located in /Preferences space. Parameters:
  vEnabled | - true to activate or false to disable the support.
Remarks: The animation support allows you to make an action with object in Modeler e.g. move an 3D object, then execute a script action in Player and at the same time synchronize the scene with again Modeler. See also: SetBridgeSyncStatus SetRefreshRate SetBridgeSyncMethod

HRESULT IRiTSBCommand::RsTSEventsStatus | ( | [out, retval] VARIANT * | pvEventsBlocked | ) |

  | Use this methid to detect whether Player->Modeler synchronization events are enabled or not. Parameters:
  pvEventsBlocked | - returns true if the events are blocked
See also: BlockRsTSEvents

HRESULT IRiTSBCommand::BlockRsTSEvents | ( | [in] VARIANT | vBlockEvents | ) |

  | Block Player->Modeler synchronization events. You can use this method to speed up your scripts. Parameters:
  vBlockEvents | - use true to block events and false to enable them again
Remarks: Be sure you always give back the original settings that you can detect through RsTSEventsStatus method. See also: SynchronizeObject

HRESULT IRiTSBCommand::SynchronizeObject | ( | [in] BSTR | bstrObjName | ) |

  | Execute this method if you want to synchronize object in Player's scene with Modeler's one. Usually this should be done after you block events with BlockRsTSEvents method and you enable them again. See MakeTree object located in My Activities library for an example. Parameters:
  bstrObjName | - scene name ob the object that should be synchronized with Modeler's scene. If empty string is specified, the whole Player's scene will be synchronized.

HRESULT IRiTSBCommand::SetBridgeSyncMethod | ( | [in] VARIANT | vMethod | ) |

  | Set bridge synchronization method. This status is set automatically from desktop preferences, so it is recommended to use it only temporary from your scripts. Parameters:
  vMethod | - synchronization method. Possible values: 0 - full synchronization 0 - merge contents
See also: SetBridgeSyncStatus SetRefreshRate SetBridgeHalfLoop