Module vrScenegraph
[frames] | no frames]

Module vrScenegraph

The vrScenegraph class contains all necessary functions to work in a scenegraph system. It supports all basic node functions for changing and rearranging the scenegraph structure.

Functions
bool
addNodeTag(node, tag)
Deprecated: Use vrMetadataService.addTags in API v2.
bool
addNodeTag(nodes, tag)
Deprecated: Use vrMetadataService.addTags in API v2.
bool
addNodeTags(node, tags)
Deprecated: Use vrMetadataService.addTags in API v2.
bool
addNodeTags(nodes, tags)
Deprecated: Use vrMetadataService.addTags in API v2.
list of vrNodePtrs
getNodesWithTag(tag)
Deprecated: Use vrScenegraphService.getNodesWithAnyTag in API v2.
list of vrNodePtrs
getNodesWithTag(node, tag)
Deprecated: Use vrScenegraphService.getNodesWithAnyTag in API v2.
list of vrNodePtrs
getNodesWithTags(tags, matchAllTags)
Deprecated: Use vrScenegraphService.getNodesWithAnyTag or vrScenegraphService.getNodesWithAllTags in API v2.
list of vrNodePtrs
getNodesWithTags(node, tags, matchAllTags)
Deprecated: Use vrScenegraphService.getNodesWithAnyTag or vrScenegraphService.getNodesWithAllTags in API v2.
 
removeNodeTag(node, tag)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
removeNodeTag(nodes, tag)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
removeNodeTags(node, tags)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
removeNodeTags(nodes, tags)
Deprecated: Use vrMetadataService.removeTags in API v2.
 
replaceNodeTag(node, oldTag, newTag)
Deprecated: Use vrMetadataService.renameTag in API v2.
 
replaceNodeTag(nodes, oldTag, newTag)
Deprecated: Use vrMetadataService.renameTag in API v2.
 
setIgnoreMaterialGroup(nodepath, ignore)
Deprecated: Use vrNodeService.findNodeWithPath() and vrdMaterialNode.setEnabled() in API v2, with enabled = not ignore.
 
setIgnoreMaterialGroup(node, ignore)
Deprecated: Use vrdMaterialNode.setEnabled() in API v2, with enabled = not ignore.
 
addChilds(node, children)
Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.
 
applyMaterial(nodes, mats, applyToMaterialGroupParent, skipMaterialGroupChilds)
Deprecated: Use vrMaterialService.applyMaterialToNodes() in API v2.
 
clearFindCache()
Deprecated: Use vrNodeService.clearFindCache() in API v2.
 
cloneMirrorAxisNode(node, deep, flush, axis)
Deprecated: Use vrScenegraphService.cloneNodesMirrorAxis() in API v2.
 
cloneMirrorNode(node, deep, flush)
Deprecated: Use vrScenegraphService.cloneNodesMirrorAxis() in API v2.
vrNodePtr
cloneNode(node, deep)
Deprecated: Use vrScenegraphService.cloneNodes() in API v2.
 
convertCore(node, type)
Deprecated: Use vrScenegraphService.convertNode() in API v2.
bool
copyNode(node)
Deprecated: Use vrScenegraphService.copyNodes() in API v2.
bool
copyNodes(nodes)
Deprecated: Use vrScenegraphService.copyNodes() in API v2.
 
copyTransformation(source, target, copyTranslation, copyRotation, copyScale, copyRotatePivot, copyScalePivot, copyShearing)
Deprecated: Use vrScenegraphService.copyTransformations() in API v2.
vrNodePtr
createNode(type, name, parent)
Deprecated: Use vrScenegraphService.createNode() in API v2.
bool
cutNode(node)
Deprecated: Use vrScenegraphService.cutNodes() in API v2.
bool
cutNodes(nodes)
Deprecated: Use vrScenegraphService.cutNodes() in API v2.
bool
deleteNode(node, force)
Deprecated: Use vrScenegraphService.deleteNodes() in API v2.
bool
deleteNodes(nodes, force)
Deprecated: Use vrScenegraphService.deleteNodes() in API v2.
 
deselectAll()
Deprecated: Use vrScenegraphService.clearSelection() in API v2.
 
enableScenegraph(status)
Deprecated: Beginning from API v2, the scenegraph module will only be updated when it is open.
vrNodePtr
findNode(node_name, regex)
Deprecated: Use vrNodeService.findNodes() in API v2.
vrNodePtr
findNodePath(node_path, regex)
Deprecated: Use vrNodeService.findNodeWithPath() in API v2.
list of vrNodePtrs
findNodes(node_name, node_names, regex)
Deprecated: Use vrNodeService.findNodes() in API v2.
vrNodePtr
findUniquePath(unique_path)
Deprecated: Use vrNodeService.findNodeWithUniquePath() in API v2.
 
fixDepthOfField(node)
Adjusts the f-stop and ISO values of all cameras beneath the selected root to match the depth of field of older versions.
list of vrNodePtrs
getAllNodes()
Deprecated: Use vrScenegraphService.getAllNodes() in API v2.
list of vrNodePtrs
getClipboard()
Deprecated: Use vrScenegraphService.getNodesInClipboard() in API v2.
vrNodePtr
getHeadlight()
Deprecated: Use vrLightService.getHeadlight() in API v2.
vrNodePtr
getInternalRootNode()
Deprecated: Use vrScenegraphService.getInternalRootNode() in API v2.
unsigned integer
getNodeID(name)
Deprecated: Use vrdNode.getObjectId() in API v2.
string
getNodeName(node)
Deprecated: Use vrdNode.getName() in API v2.
string
getNodePath(node)
Deprecated: Use vrdNode.getPath() in API v2.
 
getNodeTags(node)
Deprecated: Use vrMetadataService.getTags() in API v2.
vrNodePtr
getRootNode()
Deprecated: Use vrScenegraphService.getRootNode() in API v2.
list of strings
getSceneSwitches()
Finds all the switches in the scene.
vrNodePtr
getSelectedNode()
Deprecated: Use vrScenegraphService.getSelectedNode() in API v2.
list of vrNodePtrs
getSelectedNodes()
Deprecated: Use vrScenegraphService.getSelectedNodes() in API v2.
list of vrNodePtrs
getSelectedRootNodes()
Deprecated: Use vrScenegraphService.getSelectedRootNodes() in API v2.
vrNodePtr
getSuperRootNode()
Deprecated: Use vrScenegraphService.getSuperRootNode() in API v2.
vrNodePtr
getTransformRootNode()
Deprecated: Use vrScenegraphService.getTransformRootNode() in API v2.
string
getUniquePath(node)
Deprecated: Use vrdNode.getUniquePath() in API v2.
 
groupSelection()
Deprecated: Use vrScenegraphService.groupNodes() in API v2.
 
hasNodeTag(node, tag)
Deprecated: Use vrMetadataService.hasTag() in API v2.
 
hasNodeTags(node, tag)
Deprecated: Use vrMetadataService.getTags() in API v2.
 
hideNode(node)
Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.
 
hideNodes(nodes)
Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.
 
ignoreAutoHeadlight()
Ignores the automatic headlight if another lightsource is set.
 
initFindCache()
Deprecated: Use vrNodeService.initFindCache() in API v2.
 
insertParentNode(node, newParent)
Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.
 
invertSelection()
Deprecated: Use vrScenegraphService.invertGeometrySelection() in API v2.
 
invertSelectionInGroup()
Deprecated: Use vrScenegraphService.invertGeometrySelectionInGroup() in API v2.
 
isCloned(node)
Deprecated: Use vrdNode.isShared() in API v2.
 
macget()
 
moveNode(node, from, to)
Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.
 
moveNodes(nodes, froms, tos)
Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.
 
moveNodesAfter()
Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.
 
pasteNode(node)
Deprecated: Use vrScenegraphService.pasteNodes() in API v2.
 
pasteNodes(nodes)
Deprecated: Use vrScenegraphService.pasteNodes() in API v2.
 
rebuildClones()
Rebuilds all clone nodes in case a operation has broken the cloning.
 
removeSelectedNodes(nodes)
Deprecated: Use vrScenegraphService.deleteNodes() in API v2.
 
selectAll()
Deprecated: Use vrScenegraphService.selectTopLevel() in API v2.
 
selectNode(node, name, status)
Deprecated: Use vrScenegraphService.setSelection() in API v2.
 
selectNodes(nodes, status)
Deprecated: Use vrScenegraphService.setSelection() in API v2.
 
selectNodesNoUndo(nodes, status)
Deprecated: Use vrScenegraphService.setSelection() in API v2.
 
selectParent()
Deprecated: Use vrScenegraphService.selectCommonParent() in API v2.
 
setBoundingBoxSelection(enabled)
Sets bounding box selection mode.
 
setSwitchChoiceByTag(node, tags)
Deprecated: Use vrScenegraphService::setSwitchChoiceByAnyTag in API v2.
 
setSwitchChoiceByTags(node, tags, matchAllTags)
Deprecated: Use vrScenegraphService::setSwitchChoiceByAnyTag or vrScenegraphService::setSwitchChoiceByAllTags in API v2.
 
showComponents(enabled)
Deprecated: Use vrScenegraphService.setShowComponents() in API v2.
 
showNode(node)
Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.
 
showNodes(nodes)
Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.
 
showScenegraph(status)
Shows/hides the scenegraph widget.
 
splitGeometryTris()
Deprecated: Use vrGeometryService::splitGeometry in API v2.
 
subChilds(node, children)
Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.
 
uncreateNode(node, type, name, parent)
Deprecated: Use vrUndoService.undo() in API v2.
 
undeleteNode(node)
Deprecated: Use vrUndoService.undo() in API v2.
 
undeleteNodes(nodes)
Deprecated: Use vrUndoService.undo() in API v2.
vrNodePtr
unshareNode(node)
Deprecated: Use vrNodeService.unshareNodes() in API v2.
 
unsplitGeometryTris()
Deprecated: Use vrGeometryService::unsplitFromPrimitives in API v2.
 
updateScenegraph(force)
Deprecated: Emit the vrScenegraphService.scenegraphChanged() signal to update UI in API v2.
Function Details

addNodeTag(node, tag)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a tag to the node.

Parameters:
  • node (NodePtr) - The node to add the tag to.
  • tag (string) - The tag string to add.
Returns: bool
true: The tag could be added.

addNodeTag(nodes, tag)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a tag to the node.

Parameters:
  • nodes (list of NodePtr) - The nodes to add the tag to.
  • tag (string) - The tag string to add.
Returns: bool
true: The tag could be added.

addNodeTags(node, tags)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a list of tags to the node.

Parameters:
  • node (NodePtr) - The node to add the tag to.
  • tags (list of strings) - The tag strings to add.
Returns: bool
true: The tag could be added.

addNodeTags(nodes, tags)

 

Deprecated: Use vrMetadataService.addTags in API v2.

Adds a list of tags to a list of node.

Parameters:
  • nodes (list of NodePtr) - The nodes to add the tag to.
  • tags (list of strings) - The tag strings to add.
Returns: bool
true: The tag could be added.

getNodesWithTag(tag)

 

Deprecated: Use vrScenegraphService.getNodesWithAnyTag in API v2.

Returns a list of nodes which have the metadatatag assigned starting from the root node.

Parameters:
  • tag (string) - The tag string to check.
Returns: list of vrNodePtrs
The selected nodes.

getNodesWithTag(node, tag)

 

Deprecated: Use vrScenegraphService.getNodesWithAnyTag in API v2.

Returns a list of nodes which have the metadatatag assigned starting from the root node.

Parameters:
  • node (NodePtr) - The root node to start the search.
  • tag (string) - The tag string to check.
Returns: list of vrNodePtrs
The selected nodes.

getNodesWithTags(tags, matchAllTags)

 

Deprecated: Use vrScenegraphService.getNodesWithAnyTag or vrScenegraphService.getNodesWithAllTags in API v2.

Returns a list of nodes which have the metadatatag assigned.

Parameters:
  • tags (string) - The list of tag strings to check.
  • matchAllTags (bool) - If true only nodes which contain all give tags are returns. If false any node that contains at least one tag is returned.
Returns: list of vrNodePtrs
The selected nodes.

getNodesWithTags(node, tags, matchAllTags)

 

Deprecated: Use vrScenegraphService.getNodesWithAnyTag or vrScenegraphService.getNodesWithAllTags in API v2.

Returns a list of nodes which have the metadatatag assigned.

Parameters:
  • node (NodePtr) - The root node to start the search.
  • tags (string) - The list of tag strings to check.
  • matchAllTags (bool) - If true only nodes which contain all give tags are returns. If false any node that contains at least one tag is returned.
Returns: list of vrNodePtrs
The selected nodes.

removeNodeTag(node, tag)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes a tag from a node.

Parameters:
  • node (NodePtr) - The node to remove the tag from.
  • tag (string) - The tag string to remove.

removeNodeTag(nodes, tag)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes a tag from the given nodes.

Parameters:
  • nodes (List of NodePtr) - The nodes to remove the tag from.
  • tag (string) - The tag string to remove.

removeNodeTags(node, tags)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes the tags from a node.

Parameters:
  • node (NodePtr) - The node to remove the tag from.
  • tags (list of strings) - The list of tag strings to remove.

removeNodeTags(nodes, tags)

 

Deprecated: Use vrMetadataService.removeTags in API v2.

Removes the tags from the given nodes.

Parameters:
  • nodes (List of NodePtr) - The nodes to remove the tag from.
  • tags (list of strings) - The list of tag strings to remove.

replaceNodeTag(node, oldTag, newTag)

 

Deprecated: Use vrMetadataService.renameTag in API v2.

Replaces an existing tag.

Parameters:
  • node (NodePtr) - The node in question.
  • oldTag (string) - The tag string to remove.
  • newTag (string) - The tag string to add instead.

replaceNodeTag(nodes, oldTag, newTag)

 

Deprecated: Use vrMetadataService.renameTag in API v2.

Replaces an existing tag.

Parameters:
  • nodes (List of NodePtr) - The nodes to replace the tags.
  • oldTag (string) - The tag string to remove.
  • newTag (string) - The tag string to add instead.

setIgnoreMaterialGroup(nodepath, ignore)

 

Deprecated: Use vrNodeService.findNodeWithPath() and vrdMaterialNode.setEnabled() in API v2, with enabled = not ignore.

Ignores a material group.

Parameters:
  • nodepath (string) - The full path of the node. Use '/' to separate the hierarchy levels.
  • ignore (Bool) - Whether or not the material group should be ignored.

setIgnoreMaterialGroup(node, ignore)

 

Deprecated: Use vrdMaterialNode.setEnabled() in API v2, with enabled = not ignore.

Ignores a material group.

Parameters:
  • node (NodePtr) - The node.
  • ignore (Bool) - Whether or not the material group should be ignored.

addChilds(node, children)

 

Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.

Adds a list of child nodes to a node.

Example:: See also deprecated/addChildren.py

Parameters:
  • node (NodePtr) - The node.
  • children (list of vrNodePtrs) - The list of children.

applyMaterial(nodes, mats, applyToMaterialGroupParent, skipMaterialGroupChilds)

 

Deprecated: Use vrMaterialService.applyMaterialToNodes() in API v2.

Applies a list of materials to a list of nodes.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes.
  • mats (list of vrMaterialPtrs) - The materials.
  • applyToMaterialGroupParent (bool) - Apply the material to the group parent of the provided node: On/Off.
  • skipMaterialGroupChilds (bool) - Skip application the material to the material group children of the provided node: On/Off.

clearFindCache()

 

Deprecated: Use vrNodeService.clearFindCache() in API v2.

Clears the find cache. The find cache is an internal cache structure to speed up the execution of the findNode(s) command. After changing the scenegraph the findcache is no longer valid and needs to be rebuilt! clearFindCache() Invalidates the cache so all find calls will no longer use the cache resulting in longer search times. Example:: See also example find2.py

cloneMirrorAxisNode(node, deep, flush, axis)

 

Deprecated: Use vrScenegraphService.cloneNodesMirrorAxis() in API v2.

Clone mirrors a subtree at a specific axis.

Parameters:
  • node (NodePtr) - The node.
  • deep (bool) - Deep clone: On/Off.
  • flush (bool) - Flush transformations: On/Off.
  • axis (Vec3f) - The mirror axis.

cloneMirrorNode(node, deep, flush)

 

Deprecated: Use vrScenegraphService.cloneNodesMirrorAxis() in API v2.

Clone mirrors a subtree at the y-axis.

Parameters:
  • node (NodePtr) - The node.
  • deep (bool) - Deep clone: On/Off.
  • flush (bool) - Flush transformations: On/Off.

cloneNode(node, deep)

 

Deprecated: Use vrScenegraphService.cloneNodes() in API v2.

Clones a subtree.

Parameters:
  • node (NodePtr) - The node.
  • deep (bool) - Deep clone: On/Off.
Returns: vrNodePtr
The clone node.

convertCore(node, type)

 

Deprecated: Use vrScenegraphService.convertNode() in API v2.

Converts the core of a node to another type.

The type of a core can be found in the Node Editor.

To convert a Shell or Surface node to a Mesh, pass "Mesh" as type.

Parameters:
  • node (vrNodePtr) - The node.
  • type (string) - The new core type.

copyNode(node)

 

Deprecated: Use vrScenegraphService.copyNodes() in API v2.

Copy a node from the scenegraph.

Parameters:
  • node (NodePtr) - The node to copy.
Returns: bool
True on success, false otherwise.

copyNodes(nodes)

 

Deprecated: Use vrScenegraphService.copyNodes() in API v2.

Copy a list of nodes from the scenegraph.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to copy.
Returns: bool
True on success, false otherwise.

copyTransformation(source, target, copyTranslation, copyRotation, copyScale, copyRotatePivot, copyScalePivot, copyShearing)

 

Deprecated: Use vrScenegraphService.copyTransformations() in API v2.

Copies the transformation of one node to another. If only source and target node are provided a full copy will be done, otherwise

only the chosen attributes will be copied if the target is a standard transform. If the target is a matrix transform, the full matrix will always be copied.

Parameters:
  • source (NodePtr) - The source node.
  • target (NodePtr) - The target node.
  • copyTranslation (bool) - copy translation values.
  • copyRotation (bool) - copy rotation values.
  • copyScale (bool) - copy scaling values.
  • copyRotatePivot (bool) - copy rotation pivot values.
  • copyScalePivot (bool) - copy scale pivot values.
  • copyShearing (bool) - copy shearing values.

createNode(type, name, parent)

 

Deprecated: Use vrScenegraphService.createNode() in API v2.

Deprecated: Use vrScenegraphService.createNode() in API v2.

Deprecated: Use vrScenegraphService.createNode() in API v2.

Deprecated: Use vrScenegraphService.createNode() in API v2.

Deprecated: Use vrScenegraphService.createNode() in API v2.

Creates a new node of a given type ans name into the scenegraph as a child of given parent.

Actually there are three functions:

createNode(typeString, name)

createNode(typeString, checkUniqueNaming)

createNode(typeString, name)

createNode(typeString, name, checkUniqueNaming)

createNode(typeString, name, parent)

createNode(typeString, name, parent, checkUniqueNaming)

Types can be:

  • Group
  • MaterialGroup
  • StateSortingGroup
  • Tranform
  • ComponentTransform
  • Billboard
  • Switch
  • StereoSwitch
  • DistanceLOD
  • LighEnv
  • DirectionalLight
  • PointLight
  • SpotLight
  • Sound
  • SoundObstructor
  • any type that is supported by OpenSG
Parameters:
  • type (string) - The type of the node.
  • name (string) - The name of the node.
  • parent (vrNodePtr) - The parent of the node.
Returns: vrNodePtr
The created node.

cutNode(node)

 

Deprecated: Use vrScenegraphService.cutNodes() in API v2.

Cut a node from the scenegraph.

Parameters:
  • node (NodePtr) - The node to cut.
Returns: bool
True on success, false otherwise.

cutNodes(nodes)

 

Deprecated: Use vrScenegraphService.cutNodes() in API v2.

Cut a list of nodes from the scenegraph.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to cut.
Returns: bool
True on success, false otherwise.

deleteNode(node, force)

 

Deprecated: Use vrScenegraphService.deleteNodes() in API v2.

Deletes a node.

Parameters:
  • node (NodePtr) - Node to delete.
  • force (bool) - Force delete: If true, otherwise undeleteable nodes are also deleted. Optional parameter. Default is false.
Returns: bool
True on success, false otherwise.

deleteNodes(nodes, force)

 

Deprecated: Use vrScenegraphService.deleteNodes() in API v2.

Deletes a list of nodes.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to delete.
  • force (bool) - Force delete: If true, otherwise undeleteable nodes are also deleted. Optional parameter. Default is false.
Returns: bool
True on success, false otherwise.

deselectAll()

 

Deprecated: Use vrScenegraphService.clearSelection() in API v2.

Deselects all objects from scenegraph.

enableScenegraph(status)

 

Deprecated: Beginning from API v2, the scenegraph module will only be updated when it is open.

Enables scenegraph updates.

Parameters:
  • status (boolean) - Enable/disable update: true enables and false disables scenegraph updates.

findNode(node_name, regex)

 

Deprecated: Use vrNodeService.findNodes() in API v2.

Finds the node via name. Actually there are two functions to find a named node:

findNode(node_name): finds a node depending on its name.

findNode(node_name,regex): finds a node depending on a regular expression.

Be aware that this a costly operation. To speed up use the function initFindCache once your scenegraph structure does no longer change.

Confirm the validity of the resulting vrNodePtr by checking nodePtr.isValid().

Parameters:
  • node_name (string) - The name of the node.
  • regex (boolean) - Use regular expressions: On/Off.
Returns: vrNodePtr
The found node.

findNodePath(node_path, regex)

 

Deprecated: Use vrNodeService.findNodeWithPath() in API v2.

Finds the node via path name. Actually there are two functions to find a named node:

Actually there are two functions:

findNodePath(node_path): finds a node depending on its node path.

findNodePath(node_path,regex): finds a node depending on a regular expression.

Parameters:
  • node_path (string) - The names of the ancestor nodes and the node itself concatenated by a slash (/), e.g. "Root/Group/Geometry123".
  • regex (boolean) - Use regular expressions: On/Off.
Returns: vrNodePtr
The found node.

findNodes(node_name, node_names, regex)

 

Deprecated: Use vrNodeService.findNodes() in API v2.

Finds the node via name. Actually there are four functions to find named nodes:

findNodes(node_name): finds a list of nodes depending on their name.

findNodes(node_name,regex): finds a list of nodes depending on a regular expression.

findNodes(node_name,regex,include_components): finds a list of nodes depending on a regular expression. Also searches below shells.

findNodes(node_names): finds a list of nodes depending on a list of names.

findNodes(node_names,regex): finds a list of nodes depending on a list of regular expressions.

findNodes(node_names,regex): finds a list of nodes depending on a list of regular expressions. Also searches below shells.

Be aware that this a costly operation. To speed up use the function initFindCache once your scenegraph structure does no longer change.

Parameters:
  • node_name (string) - The name of the node.
  • node_names (list of strings) - The list of names of the nodes.
  • regex (boolean) - Use regular expressions: On/Off.
Returns: list of vrNodePtrs
The found nodes.

findUniquePath(unique_path)

 

Deprecated: Use vrNodeService.findNodeWithUniquePath() in API v2.

Finds the node via path unique path

Parameters:
  • unique_path (string) - Unique path name with index:name for each node in the path
Returns: vrNodePtr
The found node.

fixDepthOfField(node)

 

Adjusts the f-stop and ISO values of all cameras beneath the selected root to match the depth of field of older versions.

Parameters:
  • node (NodePtr) - The root node.

getAllNodes()

 

Deprecated: Use vrScenegraphService.getAllNodes() in API v2.

Returns a list of all scenegraph nodes.

Returns: list of vrNodePtrs
All the nodes in the scenegraph.

getClipboard()

 

Deprecated: Use vrScenegraphService.getNodesInClipboard() in API v2.

Returns a list of all nodes in the clipboard. E.g. when you select a node and press ctrl+c (or copy from the menu), the copied node is in the clipboard.

Returns: list of vrNodePtrs
All the nodes in the clipboard.

getHeadlight()

 

Deprecated: Use vrLightService.getHeadlight() in API v2.

Returns the headlight node.

Returns: vrNodePtr
The headlight node.

getInternalRootNode()

 

Deprecated: Use vrScenegraphService.getInternalRootNode() in API v2.

Returns the internal root node.

Returns: vrNodePtr
The internal root node.

getNodeID(name)

 

Deprecated: Use vrdNode.getObjectId() in API v2.

Returns the node id of the node with the provided name.

Parameters:
  • name (string) - The name of node.
Returns: unsigned integer
The node id.

getNodeName(node)

 

Deprecated: Use vrdNode.getName() in API v2.

Returns the name of a node.

Parameters:
  • node (NodePtr) - The node.
Returns: string
The name of node.

getNodePath(node)

 

Deprecated: Use vrdNode.getPath() in API v2.

Returns the whole path name of a node.

Parameters:
  • node (NodePtr) - The node.
Returns: string
The path name of node.

getNodeTags(node)

 

Deprecated: Use vrMetadataService.getTags() in API v2.

Returns the list of tags attached to the given node.

Parameters:
  • node (NodePtr) - The node to check.

getRootNode()

 

Deprecated: Use vrScenegraphService.getRootNode() in API v2.

Returns the root node.

Returns: vrNodePtr
The root node.

getSceneSwitches()

 

Finds all the switches in the scene.

Returns: list of strings
The found switches.

getSelectedNode()

 

Deprecated: Use vrScenegraphService.getSelectedNode() in API v2.

Returns the selected node.

Returns: vrNodePtr
The selected node.

getSelectedNodes()

 

Deprecated: Use vrScenegraphService.getSelectedNodes() in API v2.

Returns a list of selected nodes.

Returns: list of vrNodePtrs
The selected nodes.

getSelectedRootNodes()

 

Deprecated: Use vrScenegraphService.getSelectedRootNodes() in API v2.

Returns a list of selected root nodes.

Returns: list of vrNodePtrs
The selected root nodes.

getSuperRootNode()

 

Deprecated: Use vrScenegraphService.getSuperRootNode() in API v2.

Returns the super root node.

Returns: vrNodePtr
The super root node.

getTransformRootNode()

 

Deprecated: Use vrScenegraphService.getTransformRootNode() in API v2.

Returns the transform root node.

Returns: vrNodePtr
The transform root node.

getUniquePath(node)

 

Deprecated: Use vrdNode.getUniquePath() in API v2.

Returns a unique path for this node.

Parameters:
  • node (NodePtr) - The node.
Returns: string
The unique path of node.

groupSelection()

 

Deprecated: Use vrScenegraphService.groupNodes() in API v2.

Groups the selected nodes under a newly created Transform3D node.

hasNodeTag(node, tag)

 

Deprecated: Use vrMetadataService.hasTag() in API v2.

Checks if a node has a certain tag.

Parameters:
  • node (NodePtr) - The node to check.
  • tag (string) - The tag string to check.

hasNodeTags(node, tag)

 

Deprecated: Use vrMetadataService.getTags() in API v2.

Checks if a node has a certain tag.

Parameters:
  • node (NodePtr) - The node to check.
  • tag (string) - The tag string to check.

hideNode(node)

 

Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.

Hide the node from the perspective view and disable it on the scenegraph.

Parameters:
  • node (NodePtr) - The node to hide.

hideNodes(nodes)

 

Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.

Hide the nodes in the list from the perspective view and disable them on the scenegraph.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to hide.

initFindCache()

 

Deprecated: Use vrNodeService.initFindCache() in API v2.

Build up an internal cache structure to speed up execution of the python commands findNode and findNodes. E.g. for a scene with 10000 nodes it is about 700 times faster. Be aware that this cache is no longer valid after you have deleted or created nodes.

Example:: See also example find2.py

insertParentNode(node, newParent)

 

Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.

Insert a new parent node.

Parameters:
  • node (NodePtr) - The node.
  • newParent (NodePtr) - The new parent node.

invertSelection()

 

Deprecated: Use vrScenegraphService.invertGeometrySelection() in API v2.

Inverts the current selection in the scenegraph.

invertSelectionInGroup()

 

Deprecated: Use vrScenegraphService.invertGeometrySelectionInGroup() in API v2.

Inverts the current selection inside the parent group in the scenegraph.

isCloned(node)

 

Deprecated: Use vrdNode.isShared() in API v2.

Checks if a node is cloned.

Parameters:
  • node (NodePtr) - The node to check.

moveNode(node, from, to)

 

Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.

Move a node from "from" to "to".

Parameters:
  • node (NodePtr) - The node to move.
  • from (NodePtr) - The node "from".
  • to (NodePtr) - The node "to".

moveNodes(nodes, froms, tos)

 

Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.

Move a List of nodes from a list "from" to a list "to".

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to move.
  • froms (list of vrNodePtrs) - From the actual parent nodes "from".
  • tos (list of vrNodePtrs) - To their new parent nodes "to".

moveNodesAfter()

 

Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.

Internal function.

pasteNode(node)

 

Deprecated: Use vrScenegraphService.pasteNodes() in API v2.

Paste a node into the scenegraph.

Parameters:
  • node (NodePtr) - The node to paste.

pasteNodes(nodes)

 

Deprecated: Use vrScenegraphService.pasteNodes() in API v2.

Paste some nodes into the scenegraph.

Parameters:
  • nodes (list of vrNodePtr) - The nodes to paste.

removeSelectedNodes(nodes)

 

Deprecated: Use vrScenegraphService.deleteNodes() in API v2.

Removes the selected node

Deprecated: Use vrScenegraphService.deleteNodes() in API v2.

Removes a list of nodes.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to delete.

selectAll()

 

Deprecated: Use vrScenegraphService.selectTopLevel() in API v2.

Selects all objects from the scenegraph.

selectNode(node, name, status)

 

Deprecated: Use vrScenegraphService.setSelection() in API v2.

Select/Deselect a node.

There are four valid sets of parameters:

selectNode(node, status): Select/Deselect a node.

selectNode(node): Select a node.

selectNode(name, status): Select/Deselect a node by name.

selectNode(name): Select a node by name.

Parameters:
  • node (NodePtr) - The node to select.
  • name (string) - The name of the node to select.
  • status (boolean) - Status for de-/selection: true to select and false to deselect.

selectNodes(nodes, status)

 

Deprecated: Use vrScenegraphService.setSelection() in API v2.

Select/Deselects multiple nodes.

There are two valid sets of parameters:

selectNodes(nodes, status): Select/Deselects all nodes from a list of nodes.

selectNodes(nodes): Selects all nodes from a list of nodes.

Parameters:
  • nodes (list of vrNodePtrs) - The list of nodes.
  • status (boolean) - Status for de-/selection: true to select and false to deselect.

selectNodesNoUndo(nodes, status)

 

Deprecated: Use vrScenegraphService.setSelection() in API v2.

Select/Deselects multiple nodes.

There are two valid sets of parameters:

selectNodes(nodes, status): Select/Deselects all nodes from a list of nodes without adding an entry to the undo stack.

selectNodes(nodes): Selects all nodes from a list of nodes without adding an entry to the undo stack.

Parameters:
  • nodes (list of vrNodePtrs) - The list of nodes.
  • status (boolean) - Status for de-/selection: true to select and false to deselect.

selectParent()

 

Deprecated: Use vrScenegraphService.selectCommonParent() in API v2.

Selects the parent node from the currently selected node in the scenegraph.

setBoundingBoxSelection(enabled)

 

Sets bounding box selection mode.

Parameters:
  • enabled (bool) - true, false.

setSwitchChoiceByTag(node, tags)

 

Deprecated: Use vrScenegraphService::setSwitchChoiceByAnyTag in API v2.

Sets the choice of a switch node based on the given tag.

Parameters:
  • node (NodePtr) - The switch node.
  • tags (string) - The tag to check.

setSwitchChoiceByTags(node, tags, matchAllTags)

 

Deprecated: Use vrScenegraphService::setSwitchChoiceByAnyTag or vrScenegraphService::setSwitchChoiceByAllTags in API v2.

Sets the choice of a switch node based on the given tags.

Parameters:
  • node (NodePtr) - The switch node.
  • tags (string) - The list of tag strings to check.
  • matchAllTags (bool) - If true only nodes which contain all give tags are returns. If false any node that contains at least one tag is returned.

showComponents(enabled)

 

Deprecated: Use vrScenegraphService.setShowComponents() in API v2.

Sets show components mode.

Parameters:
  • enabled (bool) - true, false.

showNode(node)

 

Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.

Show the node in the perspective view and enable it on the scenegraph.

Parameters:
  • node (NodePtr) - The node to show.

showNodes(nodes)

 

Deprecated: Use vrScenegraphService.setNodeVisibility() in API v2.

Show the nodes in the list from the perspective view and enable them on the scenegraph.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to show.

showScenegraph(status)

 

Shows/hides the scenegraph widget.

Parameters:
  • status (boolean) - Enable/disable: true shows and false hides.

splitGeometryTris()

 

Deprecated: Use vrGeometryService::splitGeometry in API v2.

Splits a geometry into triangles.

subChilds(node, children)

 

Deprecated: Use vrdNode.children to get and manipulate the children of a node in API v2.

Remove a list of children from a node.

Parameters:
  • node (NodePtr) - The node.
  • children (list of vrNodePtrs) - The list of children.

uncreateNode(node, type, name, parent)

 

Deprecated: Use vrUndoService.undo() in API v2.

Uncreates node with node, type, name, and parent.

Parameters:
  • node (vrNodePtr) - The node.
  • type (string) - The type of the node.
  • name (string) - The name of the node.
  • parent (vrNodePtr) - The parent of the node.

undeleteNode(node)

 

Deprecated: Use vrUndoService.undo() in API v2.

Undeletes a node.

Parameters:
  • node (NodePtr) - The node to undelete.

undeleteNodes(nodes)

 

Deprecated: Use vrUndoService.undo() in API v2.

Undelete a list of nodes.

Parameters:
  • nodes (list of vrNodePtrs) - The nodes to undelete.

unshareNode(node)

 

Deprecated: Use vrNodeService.unshareNodes() in API v2.

Unshares a subtree.

Parameters:
  • node (NodePtr) - The node.
Returns: vrNodePtr
The new unshared node.

unsplitGeometryTris()

 

Deprecated: Use vrGeometryService::unsplitFromPrimitives in API v2.

Merges a geometry that was split into triangles back to one geometry.

updateScenegraph(force)

 

Deprecated: Emit the vrScenegraphService.scenegraphChanged() signal to update UI in API v2.

Updates scenegraph.

Parameters:
  • force (boolean) - Enable/disable force: true enables and false disables force.