Namespace: Scene

sap.ve.dvl~ Scene

Methods

(static) ActivateStep(sceneId, dvlId, fromTheBeginning, continueToTheNext, stepTime) → {sap.ve.dvl.DVLRESULT}

Activates a step by playing its animation. Optionally plays steps that come after this step.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The identifier of the step or model view to activate.
fromTheBeginning boolean Play the step from beginning, or from the currently paused position.
continueToTheNext boolean What to do after the current step has finished playing: play the next steps, or stop.
stepTime number The time at which the step animation starts (in seconds). By default, stepTime is set to -1.
Providing a negative value results in a cross-fade transition to the step to activate, and starts playing that step from time = 0. Providing a value of 0 or more will instantaneously switch to the camera orientation of the step to activate, and starts playing that step from time = 0.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) BuildPartsList(sceneId, maxParts, maxNodesInSinglePart, MaxPartNameLength, type, sort, dvlidConsumedStep, substring) → {JSON|sap.ve.dvl.DVLRESULT}

Builds a parts list based on input parameter constraints.
Parameters:
Name Type Description
sceneId string Scene token.
maxParts number Maximum number of parts required.
maxNodesInSinglePart number Maximum number of nodes in a single part to be saved. If more nodes belong to a part, they will be ignored.
MaxPartNameLength number Maximum length of part name.
type sap.ve.dvl.DVLPARTSLISTTYPE The type of parts to search for.
sort sap.ve.dvl.DVLPARTSLISTSORT Specifies how to sort the parts list.
dvlidConsumedStep string The DVLID of the step for which to build the parts list. Only used when type is DVLPARTSLISTTYPE_CONSUMED_BY_STEP, set to DVLID_INVALID or any other value if not.
substring string Only parts that include substring are returned.
Returns:
An error code or an object with the following structure.
{
     "parts": [
         {
             "name":  string,
             "nodes": [string, ...]
         },
         ...
     ]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) ChangeNodeFlags(sceneId, dvlId, flags, flagop) → {sap.ve.dvl.DVLRESULT}

Changes some node flags.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
flags sap.ve.dvl.DVLNODEFLAG Bitfield combination of one or more DVLNODEFLAG flags.
flagop sap.ve.dvl.DVLFLAGOPERATION The flag operarion to apply.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) CreateNode(sceneId, parentNodeId, nodeName, insertBeforeNodeId) → {string}

Creates a new node.
Parameters:
Name Type Description
sceneId string Scene token.
parentNodeId string The ID of the parent node where the created node is added to.
nodeName string The name of the created node.
insertBeforeNodeId string The created node is added before this specified node.
Returns:
The ID of the created node.
Type
string

(static) CreateNodeCopy(sceneId, nodeId, parentNodeId) → {string}

Copies a node.
Parameters:
Name Type Description
sceneId string Scene token.
nodeId string The ID of the node to copy.
parentNodeId string The ID of the parent node where the copied node will be added to.
Returns:
The ID of the created node.
Type
string

(static) DeleteNode(sceneId, nodeId) → {sap.ve.dvl.DVLRESULT}

Deletes the specified node.
Parameters:
Name Type Description
sceneId string Scene token.
nodeId string The ID of the node to be deleted.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) Execute(sceneId, type, str) → {sap.ve.dvl.DVLRESULT}

Executes a query.
Parameters:
Name Type Description
sceneId string Scene token.
type sap.ve.dvl.DVLEXECUTE Query type.
str string Query string, see DVLEXECUTE for string format.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) FindNodes(sceneId, type, mode, str) → {JSON|sap.ve.dvl.DVLRESULT}

Finds a list of scene nodes by matching them using a string parameter (different search types are possible: by node name, asset ID or unique ID).
Parameters:
Name Type Description
sceneId string Scene token.
type sap.ve.dvl.DVLFINDNODETYPE Specifies what node information to use in the search.
mode sap.ve.dvl.DVLFINDNODEMODE Specifies the method to use for finding nodes.
str string String identifier to search on (depends on the value specified for the "type" parameter).
Returns:
An error code or an object with the following structure:
{
     "nodes": [string, ...]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) GetNodeLocalMatrix(sceneId, dvlId) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves the local matrix for the specified node.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
Returns:
An error code or an object with the following structure.
{
     "matrix": [number, ...] // A 4x4 matrix, 16 numbers
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) GetNodeSelectionInfo(sceneId) → {JSON|sap.ve.dvl.DVLRESULT}

Used for checking the node selection state. For example, "Show selected nodes" is only available if there is at least 1 invisible node selected.
Parameters:
Name Type Description
sceneId string Scene token.
Returns:
An error code or an object with the following structure:
{
     "HiddenSelectedNodesCount":  number,
     "TotalSelectedNodesCount":   number,
     "VisibleSelectedNodesCount": number
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) GetNodeWorldMatrix(sceneId, dvlId) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves a node's world matrix. This matrix is re-evaluated every frame during animation. If you specify the matrix via SetNodeWorldMatrix, it will override node matrix until SetNodeWorldMatrix(id, null) is performed.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
Returns:
An error code or an object with the following structure:
{
     "matrix": [number, ...] // A 4x4 matrix, 16 numbers
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) PauseCurrentStep(sceneId) → {sap.ve.dvl.DVLRESULT}

Pauses the current step, if any.
Parameters:
Name Type Description
sceneId string Scene token.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) PerformAction(sceneId, action)

Executes a particular action on the current scene.
Parameters:
Name Type Description
sceneId string Scene token.
action sap.ve.dvl.DVLSCENEACTION The action to execute.

(static) Release(sceneId)

Releases the scene, and deletes it if the reference count is zero.
Parameters:
Name Type Description
sceneId string Scene token.

(static) RetrieveLayerInfo(sceneId, dvlId) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves information about a particular Layer.
Parameters:
Name Type Description
sceneId string Token returned from LoadScene.
dvlId string The ID of the Layer.
Returns:
An error code or an object with the following structure:
{
    "name":           string,
    "description":    string,
    "isHotspotLayer": boolean,
    "nodes":          [string, ...]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) RetrieveMetadata(sceneId, dvlId) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves metadata for the specified node.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
Returns:
An error code or an object with the following structure:
{
     "metadata": {
         [JSON]
     }
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) RetrieveNodeInfo(sceneId, dvlId, flags) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves information about a particular node.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
flags sap.ve.dvl.DVLNODEINFO Bitfield combination of one or more DVLNODEINFO flags.
Returns:
An error code or an object with the following structure depending on flags:
{
     "NodeName":       string,
     "AssetID":        string,
     "UniqueID":       string,
     "ParentNodes":    [string, ...],
     "ChildNodes":     [string, ...],
     "Flags":          number,
     "Opacity":        number,
     "HighlightColor": number,
     "URIs":           [string, ...]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) RetrieveProcedures(sceneId) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves a list of procedures and portfolios in the scene.
Parameters:
Name Type Description
sceneId string Scene token.
Returns:
An error code or an object with the following structure:
{
     "procedures": [
         {
             "name": string,
             "id":   string,
             "steps": [
                 {
                     "name":        string,
                     "id":          string,
                     "description": string
                 },
                 ...
             ]
         },
         ...
     ],
     "portfolios": [
         {
             "name": string,
             "id":   string,
             "steps": [
                 {
                     "name":        string,
                     "id":          string,
                     "description": string
                 },
                 ...
             ]
         },
         ...
     ]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) RetrieveSceneInfo(sceneId, flags) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves information about the current scene.
Parameters:
Name Type Description
sceneId string Scene token.
flags sap.ve.dvl.DVLSCENEINFO Bitfield combination of one or more DVLSCENEINFO flags.
Returns:
An error code or an object with the following structure depending on flags:
{
     "ChildNodes":         [string, ...],
     "SelectedNodes":      [string, ...],
     "LocalizationPrefix": string,
     "SceneDimensions":    [number, number, number, number, number, number],
     "StepId":             string,
     "StepTime":           number,
     "Layers":             [string, ...]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) RetrieveThumbnail(sceneId, dvlId) → {string|sap.ve.dvl.DVLRESULT}

Retrieves a thumbnail of the specified step as a Base64 encoded string.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The step ID.
Returns:
An image encoded as a Base64 string or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) RetrieveVEIDs(sceneId, dvlId) → {JSON|sap.ve.dvl.DVLRESULT}

Retrieves VEID (Visual Enterprise ID) for the specified node.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
Returns:
An error code or an array of objects with the following structure:
{
    "type":   string,
    "source": string,
    "fields": [
        {
            "name":  string,
            "value": string
        },
        ...
    ]
}
Type
JSON | sap.ve.dvl.DVLRESULT

(static) SetNodeHighlightColor(sceneId, dvlId, color) → {sap.ve.dvl.DVLRESULT}

Sets the highlight color for a node.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
color number Highlight color value (32-bit ABGR, where A is amount of blending between material color and highlight color). Make sure you set the 'A' component to a non-zero value, otherwise the highlight will not be visible (as the amount would be '0'). For example, 0xFF0000FF gives 100% red highlight, and 0x7F00FF00 gives 50% green highlight. Set "color" to 0 to clear highlighting.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) SetNodeLocalMatrix(sceneId, dvlId, matrixopt) → {sap.ve.dvl.DVLRESULT}

Sets the local matrix for the specified node.
Parameters:
Name Type Attributes Description
sceneId string Scene token.
dvlId string The node ID.
matrix Array.<number> <optional>
A 4x4 matrix, 16 numbers.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) SetNodeOpacity(sceneId, dvlId, opacity) → {sap.ve.dvl.DVLRESULT}

Sets the opacity for a specified node.
Parameters:
Name Type Description
sceneId string Scene token.
dvlId string The node ID.
opacity number Opacity amount. The value can be anywhere from 0.0 (fully transparent) to 1.0 (fully opaque).
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) SetNodeWorldMatrix(sceneId, dvlId, matrixopt) → {sap.ve.dvl.DVLRESULT}

Sets a node's world matrix. If you set the matrix with this call, it will override node matrix evaluation. Animation for this node will not play.
Parameters:
Name Type Attributes Description
sceneId string Scene token.
dvlId string The node ID.
matrix Array.<number> <optional>
A 4x4 matrix, 16 numbers.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT