vrSceneplateService

class vrSceneplateService

(Inherits vrBaseService)

Base class for all work with scene plate.

Functions

vrSceneplateService.clearSelection()

Clears the current sceneplate selection.

vrSceneplateService.copyNodes(nodes)

Copy Nodes.

Parameters:nodes (List[vrdNode]) – List of nodes to be copied
vrSceneplateService.createGroupForNodes(nodes)

All given nodes will be moved to a new created group.

Parameters:nodes (List[vrdNode]) – Nodes to be grouped
Returns:Created group
Return type:vrdNode
vrSceneplateService.createNode(parent, type, name)

Creates a new sceneplate node.

Parameters:
  • parent (vrdNode) – Parent to add the new created node (has to be a child of scene plate root)
  • type (vrSceneplateTypes.NodeType) – The type of the new created node (e.g. frontplate)
  • name (string) – The name of the new created node
Returns:

Created node

Return type:

vrdNode

vrSceneplateService.createSwitchForNodes(nodes)

All given nodes will be moved to a new created switch.

Parameters:nodes (List[vrdNode]) – Nodes to be moved to switch
Returns:Created node
Return type:vrdSwitchNode
vrSceneplateService.cutNodes(nodes)

Cut nodes.

Parameters:nodes (List[vrdNode]) – List of nodes to be cut
vrSceneplateService.duplicateNodes(nodes)

Duplicate the nodes.

Each duplicated node is created as child of the same parent as the original node

Parameters:nodes (List[vrdNode]) – List of nodes to duplicate
vrSceneplateService.findNode(name)

Returns the first node found in sceneplate hierarchy with the given name.

Parameters:name (string) – Name of node
Returns:Node with given name
Return type:vrdNode
vrSceneplateService.findNodes(name)

Returns list of nodes found in sceneplate hierarchy with the given name.

Parameters:name (string) – Name of nodes
Returns:List of nodes with given name
Return type:List[vrdNode]
vrSceneplateService.getAllNodes()

Returns all nodes (sceneplates, groups and switches)

Returns:List of all nodes
Return type:List[vrdNode]
vrSceneplateService.getAllSceneplates()

Returns all sceneplates (excluding groups and switches)

Returns:List of all sceneplates
Return type:List[vrdSceneplateNode]
vrSceneplateService.getDefaultBackgroundColor()

Returns the default background color for new created (text) sceneplates.

Returns:Background color of a text sceneplate
Return type:QVector3D
vrSceneplateService.getDefaultBackgroundTransparency()

Returns the default background transparency for new created (text) sceneplates.

Returns:Background transparency
Return type:float
vrSceneplateService.getDefaultFont()

Returns the default font for new created (text) sceneplates.

Returns:Font name
Return type:string
vrSceneplateService.getDefaultFontColor()

Returns the default font color for new created (text) sceneplates.

Returns:Color of default font
Return type:QVector3D
vrSceneplateService.getPreviewImage(sceneplate)

Returns an image for a node, the image shows the current content of the sceneplate. If a group or switch is selected the content of the first visible sceneplate will be returned.

Parameters:sceneplate (vrdNode) –
Returns:Image showing content of sceneplate node
Return type:QImage
vrSceneplateService.getRootNode()

Returns the root node of all sceneplates.

Returns:Root node
Return type:vrdNode
vrSceneplateService.getSelectedNodes()

Returns the currently selected nodes.

Returns:Selected nodes
Return type:List[vrdNode]
vrSceneplateService.loadNodes(filename)

Load sceneplate nodes from file with the given name.

Parameters:filename (string) – File to load
Returns:True on success
Return type:bool
vrSceneplateService.pasteAllAttributes(nodes)

Paste all attributes from the first node in copy buffer to the given nodes.

Parameters:nodes (List[vrdSceneplateNode]) – Nodes to be changed
vrSceneplateService.pasteColorCorrection(nodes)

Paste color correction setting from the first node in copy buffer to the given nodes.

Parameters:nodes (List[vrdSceneplateNode]) – Nodes to be changed
vrSceneplateService.pasteNodes(targetRoot)

Paste nodes.

Parameters:targetRoot (vrdNode) – Pastes copies of nodes in copy buffer to the given root
vrSceneplateService.pasteProperties(nodes)

Paste properties (all information about the content) from the first node in copy buffer to the given nodes.

Parameters:nodes (List[vrdSceneplateNode]) – Nodes to be changed
vrSceneplateService.pasteSizeAndPosition(nodes)

Paste size and position from the first node in copy buffer to the given nodes.

Parameters:nodes (List[vrdSceneplateNode]) – Nodes to be changed
vrSceneplateService.reloadWebPage(nodes)

Reloads the web pages of the given nodes.

Parameters:nodes (List[vrdNode]) – Nodes to be reloaded
vrSceneplateService.removeAllGroups()

Removes all groups (not switches) from the sceneplate hierarchy.

vrSceneplateService.removeNodes(nodes)

Remove nodes from sceneplates.

Parameters:nodes (List[vrdNode]) – Nodes to be removed
vrSceneplateService.saveNodes(filename, nodes)

Saves the nodes to the file with the given name.

Parameters:
  • filename (string) – Target .osb file
  • nodes (List[vrdNode]) – Nodes to be saved
Returns:

True on success

Return type:

bool

vrSceneplateService.setDefaultBackgroundColor(color)

Sets the default background color for new created (text) sceneplates.

Parameters:color (QVector3D) – Background color for text sceneplates
vrSceneplateService.setDefaultBackgroundTransparency(transparency)

Sets the default background transparency for new created (text) sceneplates.

Parameters:transparency (float) – Background transparency
vrSceneplateService.setDefaultFont(font)

Sets the default font for new created (text) sceneplates.

Parameters:font (string) – Name of the font
vrSceneplateService.setDefaultFontColor(color)

Sets the default font color for new created (text) sceneplates.

Parameters:color (QVector3D) – Color for default font
vrSceneplateService.setSelectedNodes(nodes)

Sets the sceneplate selection.

Parameters:nodes (List[vrdNode]) – Nodes to be selected

Signals

vrSceneplateService.nodesAdded(nodes)

Notifies about nodes added to the sceneplate hierarchy.

Parameters:nodes (List[vrdNode]) – Added nodes
vrSceneplateService.nodesChanged()

Notifies about changes in node structure, e.g. after a new scene.

vrSceneplateService.nodesRemoved(nodes)

Notifies about nodes removed from the sceneplate hierarchy.

Parameters:nodes (List[vrdNode]) – Removed nodes
vrSceneplateService.nodesSelected(nodes)

Notifies about selection changes of sceneplates.

Sends the currently selected nodes, not the nodes that are added or removed from selection, but always the whole list of currently selected nodes.

Parameters:nodes (List[vrdNode]) – The currently selected nodes