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

IRiNodeItem Struct Reference

Inherits IDispatch.

List of all members.

Public Member Functions

HRESULT Value ([in] BSTR bNodeName,[in] BSTR bConName,[out, retval] VARIANT *pVal)
HRESULT Value ([in] BSTR bNodeName,[in] BSTR bConName,[in] VARIANT newVal)
HRESULT Create ([in] BSTR idName,[in] VARIANT vOwner,[out, retval] VARIANT *pVal)
HRESULT Delete ([in] BSTR nodeName)
HRESULT ConnectTo ([in] BSTR bSourceNodeName,[in] BSTR bSourceConName,[in] BSTR bDestNodeName,[in] BSTR bDestConName)
HRESULT Disconnect ([in] BSTR bSourceNodeName,[in] BSTR bSourceConName,[in] BSTR bDestNodeName,[in] BSTR bDestConName)
HRESULT ExportConnector ([in] BSTR bSourceNodeName,[in] BSTR bSourceConName,[in] BSTR bDestNodeName,[in] VARIANT vConnect,[in] VARIANT vSetValue,[out, retval] VARIANT *pVal)
HRESULT ConRemove ([in] BSTR szNodeName,[in] BSTR szConName)
HRESULT ConReset ([in] BSTR szNodeName,[in] BSTR szConName)
HRESULT Rename ([in] BSTR bsFullNodeName,[in] BSTR bsNewShortNodeName,[out, retval] VARIANT *pVal)
HRESULT ConCreate ([in] BSTR szNodeName,[in] BSTR szNewConName,[in] BSTR szNewType,[in] VARIANT vNewflags)
HRESULT Copy ([in] VARIANT idName,[in] VARIANT vOwner,[out, retval] VARIANT *pVal)
HRESULT SafeRename ([in] BSTR bsFullNodeName,[in] BSTR bsNewShortNodeName,[out, retval] VARIANT *pVal)
HRESULT DisconnectAll ([in] BSTR bNodeName,[in] BSTR bConName)
HRESULT ConRename ([in] BSTR bsFullNodeName,[in] BSTR bsConName,[in] BSTR bsNewConName,[out, retval] VARIANT *pVal)
HRESULT SetFrame ([in] BSTR szRootName,[in] RtFloat frame)
HRESULT ConExists ([in] BSTR szNodeName,[in] BSTR szConName,[out, retval] RtBOOL *pVal)
HRESULT ConDataTypeExists ([in] BSTR szNodeName,[in] BSTR szDataType,[out, retval] RtBOOL *pVal)
HRESULT SubObjectCount ([in] BSTR szNodeName,[out, retval] RtUlong *pNumSubObjs)
HRESULT SubObject ([in] BSTR szNodeName,[in] RtUlong index,[out, retval] VARIANT *pVal)
HRESULT Owner ([in] BSTR szNodeName,[out, retval] VARIANT *pVal)
HRESULT FirstSelected ([out, retval] VARIANT *pVal)
HRESULT Move ([in] VARIANT idName,[in] VARIANT vOwner,[out, retval] VARIANT *pVal)
HRESULT DisconnectAllInputs ([in] BSTR bNodeName,[in] BSTR bConName)
HRESULT DisconnectAllOutputs ([in] BSTR bNodeName,[in] BSTR bConName)
HRESULT Exists ([in] BSTR szNodeName,[out, retval] RtBOOL *pVal)
HRESULT IsRenderable ([in] BSTR szNodeName,[out, retval] RtBOOL *pVal)
HRESULT IsLight ([in] BSTR szNodeName,[out, retval] RtBOOL *pVal)
HRESULT IsCamera ([in] BSTR szNodeName,[out, retval] RtBOOL *pVal)
HRESULT ConDataType ([in] BSTR szNodeName,[in] BSTR szConName,[out, retval] VARIANT *pVal)
HRESULT SelectedCount ([out, retval] RtUlong *pNumSelected)
HRESULT Selected ([in] RtUlong index,[out, retval] VARIANT *pVal)
HRESULT Select ([in] BSTR szNodeName)
HRESULT Selection ([out, retval] VARIANT *pVal)
HRESULT SelectionLength ([in] BSTR bsNodeSelection,[out, retval] RtUlong *pSelectionLength)
HRESULT SelectionGetAt ([in] BSTR bsNodeSelection,[in] RtUlong index,[out, retval] VARIANT *pVal)
HRESULT ShortName ([in] BSTR bsFullNodeName,[out, retval] VARIANT *pVal)


Detailed Description

The IRiNodeItem interface provides very important methods for manipulating, inspecting and connecting objects and their attributes on the scene.

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


Member Function Documentation

HRESULT IRiNodeItem::Value [in] BSTR  bNodeName,
[in] BSTR  bConName,
[out, retval] VARIANT *  pVal
 

Gets value of given connector of given object

Parameters:
bNodeName - full name identification of object
bConName – connector name
pVal – returns value of the connector, if exists
Example: get value of the 'ObjMatrix' connector from Cube object
 val = Node.Value('/Project/Space 3D/Cube', 'ObjMatrix') 

HRESULT IRiNodeItem::Value [in] BSTR  bNodeName,
[in] BSTR  bConName,
[in] VARIANT  newVal
 

Sets value of given connector for given object

Parameters:
bNodeName - full name identification of object
bConName – connector name
newVal – new value of the connector
Example: set value of the 'Matrix' connector for Cube object
 Node.Value('/Project/Space 3D/Cube', 'Matrix') = val 

HRESULT IRiNodeItem::Create [in] BSTR  idName,
[in] VARIANT  vOwner,
[out, retval] VARIANT *  pVal
 

Creates object instance of given type in particular encapsulator

Parameters:
idName – identifier of tS object prototype (see Nodes reference doc for full list of available objects)
vOwner – full name of owner (encapsulator) for newly created object
bName – returns full name of newly created object
Example: create new encapsulator object
 Encaps = Node.Create('Kernel Package/Object', '/Project/Space 3D') 

HRESULT IRiNodeItem::Delete [in] BSTR  nodeName  ) 
 

Deletes given object (and all its connections if any)

Parameters:
nodeName – full name of object to be deleted
Example: delete Cube object form the scene
 Node.Delete( '/Project/Space 3D/Cube')  

HRESULT IRiNodeItem::ConnectTo [in] BSTR  bSourceNodeName,
[in] BSTR  bSourceConName,
[in] BSTR  bDestNodeName,
[in] BSTR  bDestConName
 

Creates new link between 2 objects

Parameters:
bSourceNodeName – full name of source object for link
bSourceConName - name of source (output) connector in the source object
bDestNodeName – full name of destination object for link
bDestConName - name of destination (input) connector in the destination object
Example: connect subobjects in the Gear object
 Node.ConnectTo(Gear, 'outMesh', Shape,'Input Mesh')  

HRESULT IRiNodeItem::Disconnect [in] BSTR  bSourceNodeName,
[in] BSTR  bSourceConName,
[in] BSTR  bDestNodeName,
[in] BSTR  bDestConName
 

Erases existing link between 2 objects

Parameters:
bSourceNodeName – full name of source object for link
bSourceConName - name of source (output) connector in the source object
bDestNodeName – full name of destination object for link
bDestConName - name of destination (input) connector in the destination object
Example: disconnect subobjects in the Gear object
 Node.Disconnect(Gear, 'outMesh', Shape,'Input Mesh' 

HRESULT IRiNodeItem::ExportConnector [in] BSTR  bSourceNodeName,
[in] BSTR  bSourceConName,
[in] BSTR  bDestNodeName,
[in] VARIANT  vConnect,
[in] VARIANT  vSetValue,
[out, retval] VARIANT *  pVal
 

Exports given input or output connector

Parameters:
bSourceNodeName – full name of source object for link
bSourceConName - name of source (output) connector in the source object
bDestNodeName – full name of destination object for link (if empty, owner object will be used by default)
vConnect – connect immediately flag
vSetValue – set value immediately flag
Val - returns name of the newly created exported connector
Example: Export connector from Shape subobject
 Node.ExportConnector(Shape, 'Mesh', '', 1, 1); 

HRESULT IRiNodeItem::ConRemove [in] BSTR  szNodeName,
[in] BSTR  szConName
 

Removes given connector

Parameters:
szNodeName – full name of object
szConName - name of connector to be removed
Example: Remove connector
 Node.ConRemove('/Project/Space 3D/Cube', 'Mesh') 

HRESULT IRiNodeItem::ConReset [in] BSTR  szNodeName,
[in] BSTR  szConName
 

Resets given connector (i.e. sets default value for it)

Parameters:
szNodeName – full name of object
szConName - name of connector to be removed
Example: Reset connector
 Node.ConReset('/Project/Space 3D/Cube', 'Mesh') 

HRESULT IRiNodeItem::Rename [in] BSTR  bsFullNodeName,
[in] BSTR  bsNewShortNodeName,
[out, retval] VARIANT *  pVal
 

Renames given object. Note: use SafeRename variant if you cannot ensure new name not exists already in the scene

Parameters:
bsFullNodeName – full name of object
bsNewShortNodeName – new short name of object (without full path)
newName – returns full name of object after renaming
Example: Rename object
 Node.Rename('/Project/Space 3D/Cube', 'MyNiceCube') 

HRESULT IRiNodeItem::ConCreate [in] BSTR  szNodeName,
[in] BSTR  szNewConName,
[in] BSTR  szNewType,
[in] VARIANT  vNewflags
 

Creates new connector

Parameters:
szNodeName – full name of object
szNewConName - name of connector to be created
szNewType – new connector type (float, double, string, ulong)
vNewflags – flags of the new connector (4 = input, 2 = output, 32 = hidden …)
Example: Create new output connector of string type
 Node.ConRemove('/Project/Space 3D/Cube', 'Note', 'string',2) 

HRESULT IRiNodeItem::Copy [in] VARIANT  idName,
[in] VARIANT  vOwner,
[out, retval] VARIANT *  pVal
 

Makes copy of the given object

Parameters:
idName – full name of source object
vOwner – full name of owner object for newly created copy
newName – returns full name of the created object
Example: Copy object
 Node.Copy('/Project/Space 3D/Cube', '/Project/Space 3D/MyGroup')  

HRESULT IRiNodeItem::SafeRename [in] BSTR  bsFullNodeName,
[in] BSTR  bsNewShortNodeName,
[out, retval] VARIANT *  pVal
 

Safely renames given object. If object with desired name already exists, similar name will be generated instead (e.g. 'Cube, 1' instead of 'Cube')

Parameters:
bsFullNodeName – full name of object
bsNewShortNodeName – new short name of object (without full path)
newName – returns full name of object after renaming
Example: Safe Rename object
 Node.SafeRename('/Project/Space 3D/Cube', 'MyNiceCube') 

HRESULT IRiNodeItem::DisconnectAll [in] BSTR  bNodeName,
[in] BSTR  bConName
 

Disconnects all links from given connector of given node

Parameters:
bNodeName – full name of the object
bConName - name of connector to disconnect
Example: Disconnect the connector
 Node.DisconnectAll('/Project/Space 3D/Cube', 'Matrix')) 

HRESULT IRiNodeItem::ConRename [in] BSTR  bsFullNodeName,
[in] BSTR  bsConName,
[in] BSTR  bsNewConName,
[out, retval] VARIANT *  pVal
 

Renames existing connector

Parameters:
bsFullNodeName – full name of object
bsConName - name of connector to be renamed
bsNewConName – desired new connector name
newName – returns actual new connector name
Example: Rename connector of string type
 Node.ConRename('/Project/Space 3D/Cube', 'Mesh', 'MyMesh') 

HRESULT IRiNodeItem::SetFrame [in] BSTR  szRootName,
[in] RtFloat  frame
 

Set animation frame for given object / scene

Parameters:
szRootName – full name of object / scene
frame - frame number (floating)

HRESULT IRiNodeItem::ConExists [in] BSTR  szNodeName,
[in] BSTR  szConName,
[out, retval] RtBOOL *  pVal
 

Tests for given connector existence (by connector name)

Parameters:
szNodeName – full name of object
szConName - name of connector to test
bExist – returns true if the connector exists, false otherwise
Example: Test connector existence
 if (Node.ConExists('/Project/Space 3D/Cube', 'Matrix')) 
  System.Alert('Connector Matrix exists in the object'); 

HRESULT IRiNodeItem::ConDataTypeExists [in] BSTR  szNodeName,
[in] BSTR  szDataType,
[out, retval] RtBOOL *  pVal
 

Tests for given connector existence. (by connector type)

Parameters:
szNodeName – full name of object
szDataType - name of data type (data object) to test
bExist – returns true if at least one connector of given data type exists in the object, false otherwise
Example: Test mesh data type connector existence
 if (Node.ConDataTypeExists('/Project/Space 3D/Cube', ' Space 3D Package/Mesh Data')) 
  System.Alert('mesh is present in the object'); 

HRESULT IRiNodeItem::SubObjectCount [in] BSTR  szNodeName,
[out, retval] RtUlong *  pNumSubObjs
 

Gets number of subobjects of given object

Parameters:
szNodeName – full name of object
nSubObj – returns number of subobjects
Example: Traverse subobjects of Cube object
 nSubObj = Node.SubObjectCount('/Project/Space 3D/Cube'); 
 for (i = 0; i < nSubObj; i++) 
  System.Trace(Node.SubObject('/Project/Space 3D/Cube', i)); 

HRESULT IRiNodeItem::SubObject [in] BSTR  szNodeName,
[in] RtUlong  index,
[out, retval] VARIANT *  pVal
 

Gets subobject name for given object and index

Parameters:
szNodeName – full name of object
index – index of subobject (from range 0 .. SubObjectCount)
subObjName – returns short name of subobject
Example: Traverse subobjects of Cube object
 nSubObj = Node.SubObjectCount('/Project/Space 3D/Cube'); 
 for (i = 0; i < nSubObj; i++) 
  System.Trace(Node.SubObject('/Project/Space 3D/Cube', i)); 

HRESULT IRiNodeItem::Owner [in] BSTR  szNodeName,
[out, retval] VARIANT *  pVal
 

Gets owner (parent) of given object

Parameters:
szNodeName – full name of object
ownerName – returns full name of the owner object
Example: Traverse subobjects of Cube object
 owner = Node.Owner('/Project/Space 3D/Cube'); 

HRESULT IRiNodeItem::FirstSelected [out, retval] VARIANT *  pVal  ) 
 

Gets the first object from the current selection

Parameters:
objName - returns full name of the first object from current selection
ownerName – returns full name of the owner object
Example: Get selection
 selName = Node.FirstSelected() 

HRESULT IRiNodeItem::Move [in] VARIANT  idName,
[in] VARIANT  vOwner,
[out, retval] VARIANT *  pVal
 

Moves the object

Parameters:
idName – full name of the source object
vOwner – full name of the new owner object (the source object will be moved there)
newName – returns full name of the moved object
Example: Move object
 Node.Move('/Project/Space 3D/Cube', '/Project/Space 3D/MyGroup') 

HRESULT IRiNodeItem::DisconnectAllInputs [in] BSTR  bNodeName,
[in] BSTR  bConName
 

Disconnects all input links from given connector of given node (usefull mainly for encapsulators where one connector can have input and output links as well – subobjects exports are also links)

Parameters:
bNodeName – full name of object
bConName - name of connector to diconnect
Example: Disconnect all input links of the connector
 Node.DisconnectAllInputs('/Project/Space 3D/Cube', 'Matrix')) 

HRESULT IRiNodeItem::DisconnectAllOutputs [in] BSTR  bNodeName,
[in] BSTR  bConName
 

Disconnects all output links from given connector of given node (usefull mainly for encapsulators where one connector can have input and output links as well)

Parameters:
bNodeName – full name of object
bConName - name of connector to diconnect
Example: Disconnect output links of the connector
 Node.DisconnectAllOutputs('/Project/Space 3D/Cube', 'Mesh')) 

HRESULT IRiNodeItem::Exists [in] BSTR  szNodeName,
[out, retval] RtBOOL *  pVal
 

Tests existence of given object (by name)

Parameters:
szNodeName – full name of object
pVal - returns TRUE if the object exists in the scene, FALSE otherwise
Example: Test object existence
 if (Node.Exists('/Project/Space 3D/Cube')) 
  System.Alert('the object exists!'); 

HRESULT IRiNodeItem::IsRenderable [in] BSTR  szNodeName,
[out, retval] RtBOOL *  pVal
 

Tests if given object is renderable (i.e. it contains mesh, matrix, material so it is recognized by renderers )

Parameters:
szNodeName – full name of object
pVal - returns TRUE if the object is renderable, FALSE otherwise
Example: Test if object is renderable
 if (Node.IsRenderable('/Project/Space 3D/Cube')) 
  System.Alert('the object is renderable!'); 

HRESULT IRiNodeItem::IsLight [in] BSTR  szNodeName,
[out, retval] RtBOOL *  pVal
 

Tests if given object is a light (i.e. it contains light-specific attributes(s))

Parameters:
szNodeName – full name of object
pVal - returns TRUE if the object is a light, FALSE otherwise
Example: Test if object is a light
 if (Node.IsLight('/Project/Space 3D/SpotLight, 1')) 
  System.Alert('the object is a light!'); 

HRESULT IRiNodeItem::IsCamera [in] BSTR  szNodeName,
[out, retval] RtBOOL *  pVal
 

Tests if given object is a camera (i.e. it contains camera-specific attributes(s))

Parameters:
szNodeName – full name of object
pVal - returns TRUE if the object is a camera, FALSE otherwise
Example: Test if object is a camera
 if (Node.IsLight('/Project/Space 3D/Camera')) 
  System.Alert('the object is a camera!'); 

HRESULT IRiNodeItem::ConDataType [in] BSTR  szNodeName,
[in] BSTR  szConName,
[out, retval] VARIANT *  pVal
 

Gets data type (in string form) of given connector in the given node

Parameters:
szNodeName – full name of object
szConName - connector name
pVal - returns data type identification

HRESULT IRiNodeItem::SelectedCount [out, retval] RtUlong *  pNumSelected  ) 
 

Gets number of currently selected objects

Parameters:
pNumSelected – returns number of selected objects

HRESULT IRiNodeItem::Selected [in] RtUlong  index,
[out, retval] VARIANT *  pVal
 

Gets one objects from current selection

Parameters:
index – zero based index of object to be retrieved (0..SelectedCount)
pVal - returns full name of i-th selected object

HRESULT IRiNodeItem::Select [in] BSTR  szNodeName  ) 
 

Selects given object (the object will be the only one selected after this operation)

Parameters:
szNodeName – full name of object

HRESULT IRiNodeItem::Selection [out, retval] VARIANT *  pVal  ) 
 

Gets entire objects selection in one string (semicolon separated object names) Usefull whan you need to remember original selection

Parameters:
pVal – returns entire objects selection string

HRESULT IRiNodeItem::SelectionLength [in] BSTR  bsNodeSelection,
[out, retval] RtUlong *  pSelectionLength
 

Gets length (number of objects) in given selection string (obtained using the Selection method)

Parameters:
bsNodeSelection – objects selection string (semicolon separated full object names)
pSelectionLength – returns length of given selecton (number of objects)

HRESULT IRiNodeItem::SelectionGetAt [in] BSTR  bsNodeSelection,
[in] RtUlong  index,
[out, retval] VARIANT *  pVal
 

Gets one object from selection string (obtained using the Selection method)

Parameters:
bsNodeSelection – objects selection string (semicolon separated full object names)
index – zero based index of object to be retrieved (0..SelectionLength)
pVal – returns i-th object name from the selection passed
Example: Loop trough the selection and perform complex stuff
 sel = Node.Selection();
 for (i = 0; i < Node.SelectionLength(sel); i++) {
  Node.Select(Node.SelectionGetAt(sel, i)); 
        // do some stuff here
    }

HRESULT IRiNodeItem::ShortName [in] BSTR  bsFullNodeName,
[out, retval] VARIANT *  pVal
 

Gets object's short name (the name without full path, usefull e.g. when passed later into the Rename method)

Parameters:
bsFullNodeName – full name of object
pVal – returns short name extracted from the full object's name


Generated on Tue Jan 31 21:00:25 2006 for trueSpace7 Script Objects by doxygen 1.3.2