# IRiTools Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | MoveTo ([in] BSTR bNodeName, VARIANT x,[in] VARIANT y,[in] VARIANT z)
HRESULT | Rotate ([in] BSTR bNodeName, VARIANT x,[in] VARIANT y,[in] VARIANT z)
HRESULT | Scale ([in] BSTR bNodeName, VARIANT x,[in] VARIANT y,[in] VARIANT z)
HRESULT | CameraView ([in] BSTR bszCamera,[in] BSTR bszView)
HRESULT | Pick ([in] VARIANT xPos,[in] VARIANT yPos,[in] RtBool bPickSubObj,[in] BSTR viewName)
HRESULT | CreateCustomSS ([in] BSTR bDesiredName,[in] BSTR bScnLibContent)
HRESULT | ActivatePhysWidget ([in] BSTR bstrWidgetName)
HRESULT | ResetView ([in] BSTR szNodeName)
HRESULT | LookAtSelection ([in] BSTR szNodeName)
HRESULT | OpenWebPage ([in] BSTR szWebPage)
HRESULT | GetAsyncKeyState ([in]RtUlong uKey,[out, retval]RtUlong *pdwState)
HRESULT | ToggleValue ([in]BSTR szConName)
HRESULT | SetNearestOrthoView ([in] BSTR szNodeName)
HRESULT | AddPrimitive (BSTR szWidget, BSTR szParameters, BSTR szPrimitive)
HRESULT | SelectNextObj ()
HRESULT | SelectPrevObj ()
HRESULT | SelectParentObj ()
HRESULT | SelectChildObj ()
HRESULT | NormalizeLocation (BSTR bNodeName)
HRESULT | NormalizeRotation (BSTR bNodeName)
HRESULT | NormalizeSize (BSTR bNodeName)
HRESULT | GetAvatarsEnumerator ([in] BSTR szNodeName,[out, retval] VARIANT *pvDo)
HRESULT | OpenInfoPanel ()
HRESULT | ShowAxes (BSTR szSelection)
HRESULT | ResetAxes (BSTR szSelection)
HRESULT | OpenStatusBar ()
HRESULT | Arrow ()
HRESULT | PlaySound ([in] VARIANT vSound,[in] VARIANT vVolume,[in] VARIANT vPan)

## Detailed Description

The IRiTools interface provides methods that do not belong to any specific package.
Root-level name in the scripting engine's name space: RsTool

## Member Function Documentation

HRESULT IRiTools::MoveTo | ( | [in] BSTR | bNodeName,
|  | VARIANT | x,
|  | [in] VARIANT | y,
|  | [in] VARIANT | z |
| ) |  |  |

MoveTo method moves specified object to new location.

- This method moves to xyz values you set, it does not increment or add the value to current location.

Parameters:

  | bNodeName | [in] Name of object you wish to move.
  | x | [in] Value to set for translation in x axis.
  | y | [in] Value to set for translation in y axis.
  | z | [in] Value to set for translation in z axis.

        RsTool.MoveTo('/Project/Space 3D/Cube', 1.000, 2.342, 4.005);

HRESULT IRiTools::Rotate | ( | [in] BSTR | bNodeName,
|  | VARIANT | x,
|  | [in] VARIANT | y,
|  | [in] VARIANT | z |
| ) |  |  |

Rotate method rotates specified object.

- This method rotates to xyz values you set, it does not increment or add the value to current rotation.

Parameters:

  | bNodeName | [in] Name of object you wish to rotate.
  | x | [in] Value to set for rotation in x axis.
  | y | [in] Value to set for rotation in y axis.
  | z | [in] Value to set for rotation in z axis.

        RsTool.Rotate('/Project/Space 3D/Cube', 45.000, 0.000, 55.005);

HRESULT IRiTools::Scale | ( | [in] BSTR | bNodeName,
|  | VARIANT | x,
|  | [in] VARIANT | y,
|  | [in] VARIANT | z |
| ) |  |  |

Scale method scales specified object.

- This method scales to xyz values you set, it does not increment or add the value to current scale values.

Parameters:

  | bNodeName | [in] Name of object you wish to scale.
  | x | [in] Value to set for scale in x axis.
  | y | [in] Value to set for scale in y axis.
  | z | [in] Value to set for scale in z axis.

        RsTool.Scale('/Project/Space 3D/Cube', .50, 1.20, 1.00);

HRESULT IRiTools::CameraView | ( | [in] BSTR | bszCamera,
|  | [in] BSTR | bszView |
| ) |  |  |

CameraView

This method obsolete: replaced by D3DView.SetActiveCamera

HRESULT IRiTools::Pick | ( | [in] VARIANT | xPos,
|  | [in] VARIANT | yPos,
|  | [in] RtBool | bPickSubObj,
|  | [in] BSTR | viewName |
| ) |  |  |

Pick Anton can help on this one.

Parameters:

  | xPos | [in] .
  | yPos | [in] .
  | bPickSubObj | [in] .
  | viewName | [in] .

HRESULT IRiTools::CreateCustomSS | ( | [in] BSTR | bDesiredName,
|  | [in] BSTR | bScnLibContent |
| ) |  |  |

CreateCustomSS Vladimir can help on this one.

Parameters:

  | bDesiredName | [in] .
  | bScnLibContent | [in] .

HRESULT IRiTools::ActivatePhysWidget | ( | [in] BSTR | bstrWidgetName | ) |

ActivatePhysWidget: obsolete

Parameters:

  | bstrWidgetName | [in] Name of widget to activate.

HRESULT IRiTools::ResetView | ( | [in] BSTR | szNodeName | ) |

Reset camera for view specified by szNodeName.

- Node name represents either Window frame ID or direct window node path.

Parameters:

  | szNodeName | [in] Window id or window path.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRiTools::LookAtSelection | ( | [in] BSTR | szNodeName | ) |

Set look-at transform for view specified by szNodeName.

- Node name represents either Window frame ID or direct window node path.

Parameters:

  | szNodeName | [in] Window id or window path.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRiTools::OpenWebPage | ( | [in] BSTR | szWebPage | ) |

Open specified web page in a default browser.

- Web page name is without 'http://' prefix.

Parameters:

  | szWebPage | [in] Web page to open.

Returns:
  standard HRESULT processing can be applied to returned value.

          RsTool.OpenWebPage('www.microsoft.com');

HRESULT IRiTools::GetAsyncKeyState | ( | [in] RtUlong | uKey,
|  | [out, retval] RtUlong * | pdwState |
| ) |  |  |

Return current state of keyboard key.

Parameters:

  | uKey | [in] Virtual key code.

Returns:
  pdwState [out,retval] Will be filled with key state.

  standard HRESULT processing can be applied to returned value.

http://www.sharewareplaza.com/CharProbe-downloads_30952.html has useful program to assist in this regard.

          RsTool.GetAsyncKeyState(VK_MBUTTON);

HRESULT IRiTools::ToggleValue | ( | [in] BSTR | szConName | ) |

ToggleValue

Parameters:

  | szConName | [in] .

HRESULT IRiTools::SetNearestOrthoView | ( | [in] BSTR | szNodeName | ) |

Set nearest orthogonal view for camera specified by szNodeName.

- Node name represents either Window frame ID or direct window node path.
- Camera is repositioned to have selection centered in it's view.

Parameters:

  | szNodeName | [in] Window id or window path.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRiTools::AddPrimitive | ( | BSTR | szWidget,
|  | BSTR | szParameters,
|  | BSTR | szPrimitive |
| ) |  |  |

Start Add primitive tool.

- If selected objects are in PE mode, widget is activated into PE tool group.
- Else widget is activated to 3d group.

Parameters:

  | szWidget | [in] .
  | szParameters | [in] .
  | szPrimitive | [in] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRiTools::SelectNextObj | ( |  | ) |

Select next object.

- If no object is selected, select first object in the scene.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::SelectPrevObj | ( |  | ) |

Select previous object.

- If no object is selected, select first object in the scene.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::SelectParentObj | ( |  | ) |

Select parent object.

- If no object is selected, select first object in the scene.
- If parent is scene, nothing is done.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::SelectChildObj | ( |  | ) |

Select first sub-node of selected object.

- If no object is selected, select first object in the scene.
- If object is not an encapsulator, nothing is done.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::NormalizeLocation | ( | BSTR | bNodeName | ) |

NormalizeLocation

Parameters:

  | bNodeName | [in] Name of node to normalize location on.

HRESULT IRiTools::NormalizeRotation | ( | BSTR | bNodeName | ) |

NormalizeRotation

Parameters:

  | bNodeName | [in] Name of node to normalize rotaion on.

HRESULT IRiTools::NormalizeSize | ( | BSTR | bNodeName | ) |

NormalizeSize

Parameters:

  | bNodeName | [in] Name of node to normalize size/scale on.

HRESULT IRiTools::GetAvatarsEnumerator | ( | [in] BSTR | szNodeName,
|  | [out, retval] VARIANT * | pvDo |
| ) |  |  |

Return initialized avatar enumerator for specified Shared/Local space.

Parameters:

  | szNodeName | [in] Defines "" for current local space or node name of shared space on server.

Returns:
  pvDo [out,retval] Will be filled with enumerator data object.

  standard HRESULT processing can be applied to returned value.

HRESULT IRiTools::OpenInfoPanel | ( |  | ) |

OpenInfoPanel

HRESULT IRiTools::ShowAxes | ( | BSTR | szSelection | ) |

Show object pivot axes.

Parameters:

  | szSelection | [in] Name of object/node to show axes for.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::ResetAxes | ( | BSTR | szSelection | ) |

Reset object pivot axes.

- If pivot is not contained in selected object, it is not added.

Parameters:

  | szSelection | [in] Name of object/node to reset pivot axes for.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::OpenStatusBar | ( |  | ) |

OpenStatusBar

HRESULT IRiTools::Arrow | ( |  | ) |

Activate arrow tool:

- Change selection to root nodes and activate default NAV.
- If no selection exists, deactivate context widgets.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRiTools::PlaySound | ( | [in] VARIANT | vSound,
|  | [in] VARIANT | vVolume,
|  | [in] VARIANT | vPan |
| ) |  |  |

Play simple sound. For more advanced sound please see RsSound name space

Parameters:

  | vSound | [in] The object to play (Sound Data) or full connector ID that contains the sound stored in data object (

See also:
  IRdSoundDisp).

Parameters:

  | vVolume | [in] Volume for specified channel in percent (range from 0.0 to 1.0).
  | vPan | [in] Pan for specified channel. The allowed range is from -1.0 to 1.0

Returns:
  standard HRESULT processing can be applied to returned value.