# IRiView3D Interface Reference

Inherits IDispatch, and IDispatch.

List of all members.

## Public Member Functions
HRESULT | OpenMaterialInLE ()
HRESULT | RenderToFile ([in] VARIANT bsWinID,[in] VARIANT bsMode)
HRESULT | ShowGridPanel ([in] VARIANT bsWinID)
HRESULT | LoadRAPreset ([in] VARIANT bsPresetNameAttribs,[in] VARIANT fFaceOpacity,[in] VARIANT fWireOpacity,[in] VARIANT bsPresetNameGrid,[in] VARIANT bsViewName)
HRESULT | LoadSceneLights ([in] VARIANT vFileName)
HRESULT | SaveSceneLights ([in] VARIANT vFileName)
HRESULT | OpenMaterialInLE ()
HRESULT | RenderToFile ([in] VARIANT bsWinID,[in] VARIANT bsMode)
HRESULT | ShowGridPanel ([in] VARIANT bsWinID)
HRESULT | LoadRAPreset ([in] VARIANT bsPresetNameAttribs,[in] VARIANT fFaceOpacity,[in] VARIANT fWireOpacity,[in] VARIANT bsPresetNameGrid,[in] VARIANT bsViewName)
HRESULT | LoadSceneLights ([in] VARIANT vFileName)
HRESULT | SaveSceneLights ([in] VARIANT vFileName)
## Properties
) | CreateD3DRenderer`[get]`
) | Rescan`[get]`
) | Refresh`[get]`
VARIANT * | ImportBrick ([in] VARIANT vFileName,[in] VARIANT vOwner)`[get]`
BSTR | BuildBrickLibrary`[get]`
BSTR | RendererUpdateFromNode`[get]`
VARIANT * | InsertNodeAt3D ([in] VARIANT vTarget,[in] VARIANT vSrcNode,[in] VARIANT vPosX,[in] VARIANT vPosY,[in] VARIANT vPosZ)`[get]`
VARIANT * | ApplyMaterial ([in] BSTR bsTarget,[in] BSTR bsNode,[in] VARIANT vPosX,[in] VARIANT vPosY,[in] VARIANT vPosZ)`[get]`
VARIANT | SetActiveCamera ([in] VARIANT bsCameraName)`[get]`
VARIANT | CreateNavToolbar`[get]`
VARIANT | HideNavToolbar ([in] VARIANT bsViewName)`[get]`
VARIANT | ShowRenderAttribsForObject ([in] VARIANT bsWinID)`[get]`
VARIANT | ShowRenderAttribsForLayer`[get]`
VARIANT | ShowMaterials ([in] VARIANT bsWinID)`[get]`
VARIANT | ShowPostProcessing`[get]`
VARIANT | SwitchEyeCameraType ([in] VARIANT bsWinID)`[get]`
VARIANT | ToggleMaterialPick`[get]`
) | ShowSettingsDialog`[get]`
VARIANT * | DropObject ([in] VARIANT vSourceObj,[in] VARIANT vDestObj,[in] VARIANT vDestPosX,[in] VARIANT vDestPosY,[in] VARIANT vDestPosZ)`[get]`
VARIANT * | ImportBrick ([in] VARIANT vFileName,[in] VARIANT vOwner)`[get]`
VARIANT * | InsertNodeAt3D ([in] VARIANT vTarget,[in] VARIANT vSrcNode,[in] VARIANT vPosX,[in] VARIANT vPosY,[in] VARIANT vPosZ)`[get]`
VARIANT * | ApplyMaterial ([in] BSTR bsTarget,[in] BSTR bsNode,[in] VARIANT vPosX,[in] VARIANT vPosY,[in] VARIANT vPosZ)`[get]`
VARIANT * | DropObject ([in] VARIANT vSourceObj,[in] VARIANT vDestObj,[in] VARIANT vDestPosX,[in] VARIANT vDestPosY,[in] VARIANT vDestPosZ)`[get]`

## Detailed Description

IRiView3D interface provides real-time renderer related methods.
Root-level name in the scripting engine's name space: D3DView

## Member Function Documentation

HRESULT IRiView3D::OpenMaterialInLE | ( |  | ) |

Open material picked by Material pick tool in LE.

HRESULT IRiView3D::RenderToFile | ( | [in] VARIANT | bsWinID,
|  | [in] VARIANT | bsMode |
| ) |  |  |

Render given D3D view to file.

Parameters:

  | bsWinID | specifies the WinID for which the rendering is performed.
  | bsMode | specifies the mode of the rendering. ('auto' for immediate screen-shot using latest settings, empty string for settings dialog).

HRESULT IRiView3D::ShowGridPanel | ( | [in] VARIANT | bsWinID | ) |

Show grid for given window.

Parameters:

  | bsWinID | specifies the WinID for which the grid is shown.

HRESULT IRiView3D::LoadRAPreset | ( | [in] VARIANT | bsPresetNameAttribs,
|  | [in] VARIANT | fFaceOpacity,
|  | [in] VARIANT | fWireOpacity,
|  | [in] VARIANT | bsPresetNameGrid,
|  | [in] VARIANT | bsViewName |
| ) |  |  |

Set layer render attributes preset and/or grid preset.

HRESULT IRiView3D::LoadSceneLights | ( | [in] VARIANT | vFileName | ) |

Load Scene's lights from Rosetta scene lights file.

Parameters:

  | bstrFileName | The scene lights full path.

HRESULT IRiView3D::SaveSceneLights | ( | [in] VARIANT | vFileName | ) |

Save Scene's lights into Rosetta scene lights file.

Parameters:

  | bstrFileName | The scene lights full path.

HRESULT IRiView3D::OpenMaterialInLE | ( |  | ) |

Open material picked by Material pick tool in LE

HRESULT IRiView3D::RenderToFile | ( | [in] VARIANT | bsWinID,
|  | [in] VARIANT | bsMode |
| ) |  |  |

Render given D3D view to file.

Parameters:

  | bsWinID | specifies the WinID for which the rendering is performed.
  | bsMode | specifies the mode of the rendering ('auto' for immediate screen-shot using latest settings, empty string for settings dialog)

HRESULT IRiView3D::ShowGridPanel | ( | [in] VARIANT | bsWinID | ) |

Show grid for given window.

Parameters:

  | bsWinID | specifies the WinID for which the grid is shown.

HRESULT IRiView3D::LoadRAPreset | ( | [in] VARIANT | bsPresetNameAttribs,
|  | [in] VARIANT | fFaceOpacity,
|  | [in] VARIANT | fWireOpacity,
|  | [in] VARIANT | bsPresetNameGrid,
|  | [in] VARIANT | bsViewName |
| ) |  |  |

Set layer render attributes preset and/or grid preset

HRESULT IRiView3D::LoadSceneLights | ( | [in] VARIANT | vFileName | ) |

Load Scene's lights from Rosetta scene lights file

Parameters:

  | bstrFileName | The scene lights full path

HRESULT IRiView3D::SaveSceneLights | ( | [in] VARIANT | vFileName | ) |

Save Scene's lights into Rosetta scene lights file

Parameters:

  | bstrFileName | The scene lights full path

## Property Documentation

IRiView3D::CreateD3DRenderer`[get]`

Create default D3DRenderer settings (data) node.

- Creates D3DRendererData node in "System" level of Link Editor.

            D3DView.CreateD3DRenderer();

Create default D3DRenderer settings (data) node.

IRiView3D::Rescan`[get]`

Perform topology rescan of watched parts of graph if required.

            D3DView.Rescan();

Perform topology rescan of watched parts of graph if required

IRiView3D::Refresh`[get]`

Perform refresh of cached values if required.

            D3DView.Refresh();

Perform refresh of cached values if required

VARIANT* IRiView3D::ImportBrick([in] VARIANT vFileName, [in] VARIANT vOwner)`[get]`

Import brick from XML file into the graph.

Parameters:

  | vFileName | [in] Specifies the name of the XML brick file.
  | vOwner | [in] Specifies the full-name of the target owner encapsulator.

Returns:
  pVal [out, retval] Is filled with the loaded brick node.

            D3DView.ImportBrick();

BSTR IRiView3D::BuildBrickLibrary`[get]`

Build XML shader brick library from XML files.

Parameters:

  | bsOwnerName | target owner encapsulator of the library.

Build XML shader brick library from XML files

Parameters:

  | bsOwnerName | target owner encapsulator of the library.

BSTR IRiView3D::RendererUpdateFromNode`[get]`

Update internal renderer data from a renderer settings node.

Parameters:

  | bsNodeName | specifies the path to settings node. Empty string uses default node.

VARIANT* IRiView3D::InsertNodeAt3D([in] VARIANT vTarget, [in] VARIANT vSrcNode, [in] VARIANT vPosX, [in] VARIANT vPosY, [in] VARIANT vPosZ)`[get]`

Insert node (3D object) at specific position.

Parameters:

  | vTarget | specifies the target encapsulator where object is placed.
  | vSrcNode | specifies the file or graph path of the source node to insert (copy).
  | vPosX | specifies horizontal position in window coordinates.
  | vPosY | specifies vertical position in window coordinates.
  | vPosZ | specifies desired position where to apply (default is 0).
  | pVal | is filled with the name of the newly created node.

VARIANT* IRiView3D::ApplyMaterial([in] BSTR bsTarget, [in] BSTR bsNode, [in] VARIANT vPosX, [in] VARIANT vPosY, [in] VARIANT vPosZ)`[get]`

Apply material on object at specific location.

Parameters:

  | bsTarget | specifies the target encapsulator where object is placed (where the object on coordinates is searched).
  | bsNode | specifies the path of the source material to apply (copy).
  | vPosX | specifies horizontal position in window coordinates where to apply.
  | vPosY | specifies vertical position in window coordinates where to apply.
  | vPosZ | specifies desired z position where to apply (default is 0).
  | pVal | is filled with the name of the newly created material.

VARIANT IRiView3D::SetActiveCamera`[get]`

Set desired camera as active for given window.

Parameters:

  | bsCameraName | specifies camera name to use (empty string uses selected camera).
  | bsViewName | specifies the name of the view which should use the camera (empty string uses all views).

Set desired camera as active for given window

Parameters:

  | bsCameraName | specifies camera name to use (empty string uses selected camera)
  | bsViewName | specifies the name of the view which should use the camera (empty string uses all views)

VARIANT IRiView3D::CreateNavToolbar`[get]`

Create or update NAV toolbar for given view.

Parameters:

  | bsViewName | specifies the name of the view (WinID) for which to update and show the toolbar.

Create or update NAV toolbar for given view

Parameters:

  | bsViewName | specifies the name of the view (WinID) for which to update and show the toolbar.

VARIANT IRiView3D::HideNavToolbar`[get]`

Hide NAV toolbar for given view.

Parameters:

  | bsViewName | specifies the view name (WinID).
  | bHardKill | specifies if toolbar should be just hidden (false) or deleted (true).

Hide NAV toolbar for given view

Parameters:

  | bsViewName | specifies the view name (WinID)
  | bHardKill | specifies if toolbar should be just hidden (false) or deleted (true)

VARIANT IRiView3D::ShowRenderAttribsForObject`[get]`

Show render attributes panel for given object.

Parameters:

  | bsWinID | specifies the WinID which is used to associate with the panel.
  | bsNodeName | specifies the node (3D object) for which the panel is shown.

Show render attributes panel for given object.

Parameters:

  | bsWinID | specifies the WinID which is used to associate with the panel.
  | bsNodeName | specifies the node (3D object) for which the panel is shown

VARIANT IRiView3D::ShowRenderAttribsForLayer`[get]`

Show render attributes panel for given scene layer.

Parameters:

  | bsWinID | specifies the WinID which is used to search for the scene layer.

VARIANT IRiView3D::ShowMaterials`[get]`

Show all materials of given object.

Parameters:

  | bsWinID | specifies the WinID which is used to associate with the panel.
  | bsNodeName | specifies the node (3D object) for which the materials are shown.

Show all materials of given object.

Parameters:

  | bsWinID | specifies the WinID which is used to associate with the panel.
  | bsNodeName | specifies the node (3D object) for which the materials are shown

VARIANT IRiView3D::ShowPostProcessing`[get]`

Show post processing for given window.

Parameters:

  | bsWinID | specifies the WinID for which the post processing is shown.

VARIANT IRiView3D::SwitchEyeCameraType`[get]`

Switch eye camera to given type for given window.

Types of camera: 0 - Default type means perspective projection. 1 - Orthogonal with pozitive Z in view. 2 - Orthogonal with negative Z in view. 3 - Orthogonal with pozitive X in view. 4 - Orthogonal with negative X in view. 5 - Orthogonal with pozitive Y in view. 6 - Orthogonal with negative Y in view. 7 - Custom orthogonal projection (free 3D orthogonal projection).

Parameters:

  | bsWinID | specifies the WinID for which the camera is switched.
  | vType | specifies the type of the camera as seen above

Switch eye camera to given type for given window.

Types of camera: 0 - Default type means perspective projection 1 - Orthogonal with pozitive Z in view 2 - Orthogonal with negative Z in view 3 - Orthogonal with pozitive X in view 4 - Orthogonal with negative X in view 5 - Orthogonal with pozitive Y in view 6 - Orthogonal with negative Y in view 7 - Custom orthogonal projection (free 3D orthogonal projection)

Parameters:

  | bsWinID | specifies the WinID for which the camera is switched.
  | vType | specifies the type of the camera as seen above

VARIANT IRiView3D::ToggleMaterialPick`[get]`

Enable/Disable or toggle the material pick tool.

Parameters:

  | vAction | specifies the action to be performed. 0 is for Disable, 1 is for Enable. and other value is for toggle to the opposite of current state.

Enable/Disable or toggle the material pick tool.

Parameters:

  | vAction | specifies the action to be performed. 0 is for Disable, 1 is for Enable and other value is for toggle to the opposite of current state.

IRiView3D::ShowSettingsDialog`[get]`

Show the D3DView hardware settings dialog.

VARIANT* IRiView3D::DropObject([in] VARIANT vSourceObj, [in] VARIANT vDestObj, [in] VARIANT vDestPosX, [in] VARIANT vDestPosY, [in] VARIANT vDestPosZ)`[get]`

Drop object into specific View3D view.

Parameters:

  | vSourceObj | The source object. It could be file path, graph path or an object pointer.
  | vDestObj | Specify the destination View3D in form of full string id.
  | vDestPosX | Screen destination X coordinate.
  | vDestPosY | Screen destination Y coordinate.
  | vDestPosZ | Screen destination Z coordinate.
  | pVal | Returns full string ID of the object if it is placed into DG.

Remarks:
  The drop operation could be asynchronous. In this case the return string id is not returned too.

VARIANT* IRiView3D::ImportBrick([in] VARIANT vFileName, [in] VARIANT vOwner)`[get]`

Import brick from XML file into the graph

Parameters:

  | vFileName | specifies the name of the XML brick file
  | vOwner | specifies the full-name of the target owner encapsulator
  | pVal | is filled with the loaded brick node.

VARIANT* IRiView3D::InsertNodeAt3D([in] VARIANT vTarget, [in] VARIANT vSrcNode, [in] VARIANT vPosX, [in] VARIANT vPosY, [in] VARIANT vPosZ)`[get]`

Insert node (3D object) at specific position.

Parameters:

  | vTarget | specifies the target encapsulator where object is placed
  | vSrcNode | specifies the file or graph path of the source node to insert (copy)
  | vPosX | specifies horizontal position in window coordinates
  | vPosY | specifies vertical position in window coordinates
  | vPosZ | specifies desired position where to apply (default is 0)
  | pVal | is filled with the name of the newly created node.

VARIANT* IRiView3D::ApplyMaterial([in] BSTR bsTarget, [in] BSTR bsNode, [in] VARIANT vPosX, [in] VARIANT vPosY, [in] VARIANT vPosZ)`[get]`

Apply material on object at specific location.

Parameters:

  | bsTarget | specifies the target encapsulator where object is placed (where the object on coordinates is searched)
  | bsNode | specifies the path of the source material to apply (copy)
  | vPosX | specifies horizontal position in window coordinates where to apply
  | vPosY | specifies vertical position in window coordinates where to apply
  | vPosZ | specifies desired z position where to apply (default is 0)
  | pVal | is filled with the name of the newly created material.

VARIANT* IRiView3D::DropObject([in] VARIANT vSourceObj, [in] VARIANT vDestObj, [in] VARIANT vDestPosX, [in] VARIANT vDestPosY, [in] VARIANT vDestPosZ)`[get]`

Drop object into specific View3D view

Parameters:

  | vSourceObj | The source object. It could be file path, graph path or an object pointer.
  | vDestObj | Specify the destination View3D in form of full string id.
  | vDestPosX | Screen destination X coordinate
  | vDestPosY | Screen destination Y coordinate
  | vDestPosZ | Screen destination Z coordinate
  | pVal | Returns full string ID of the object if it is placed into DG.

Remarks:
  The drop operation could be asynchronous. In this case the return string id is not returned too