Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

dbpeek([allObjects=boolean], [argument=string], [count=uint], [evaluationGraph=boolean], [operation=string], [outputFile=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

dbpeek is NOT undoable, queryable, and NOT editable.

The dbpeek command is used to analyze the Maya data for information of interest. See a description of the flags for details on what types of things can be analyzed.

Return value

string[]Query of operation yields a string array with available operations
string[]Query of argument yields a string array with available argument definitions on the specified operation
stringQuery of specific operation without an output file returns a string with help information for that operation
intQuery of specific operation with an output file dumps the help information for that operation to that file and returns the number of errors encountered

In query mode, return type is based on queried flag.

Keywords

debug, node, attribute

Related

dbcount, dgInfo, dgdirty, dgeval, dgmodified

Flags

allObjects, argument, count, evaluationGraph, operation, outputFile
Long name (short name) Argument types Properties
allObjects(all) boolean createquery
Ignore any specified or selected objects and peek into all applicable objects. The definition of "allObjects" will vary based on the peek operation being performed - see the flag documentation for details on what it means for a given operation. By default if no objects are selected or specified then it will behave as though this flag were set.
argument(a) string createquerymultiuse
Specify one or more arguments to be passed to the operation. The acceptable values for the argument string are documented in the flag to which they will be applied. If the argument itself takes a value then the value will be of the form "argname=argvalue".

In query mode, this flag needs a value.

count(c) uint createquery
Specify a count to be used by the test. Different tests make different use of the count, query the operation to find out how it interprets the value. For example a performance test might use it as the number of iterations to run in the test, an output operation might use it to limit the amount of output it produces.
evaluationGraph(eg) boolean createquery
Ignore any nodes that are not explicitly part of the evaluation graph. Usually this means nodes that are affected either directly or indirectly by animation. May also tailor the operation to be EM-specific in the areas where the structure of the DG differs from the structure of the EM, for example, plug configurations. This is a filter on the currently selected nodes, including the use of the "allObjects" flag.
operation(op) string createquery
Specify the peeking operation to perform. The various operations are registered at run time and can be listed by querying this flag without a value. If you query it with a value then you get the detail values that peek operation accepts and a description of what it does.

In query mode, this flag can accept a value.

outputFile(of) string createquery
Specify the location of a file to which the information is to be dumped. Default will return the value from the command. Use the special names stdout and stderr to redirect to your command window. The special name msdev is available when debugging on Windows to direct your output to the debug tab in the output window of Visual Studio.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

import maya.cmds as cmds
// Find the available peek operations
cmds.dbpeek( op=True, query=True )
# Return: ['metadata', 'nodes', 'references', 'plugIterator'] #
// Describe the detail of a single available operation
cmds.dbpeek( query=True, op='nodes' )
# Return: '
Peek operation 'nodes':
    Normal display  will  show a count of nodes in the scene of each type.
Recognized 'argument' values:
    attributes
        Includes the attribute  count for each node as well, segregated by static, extension, and dynamic types.
    visible
        Filter the display  list to ignore any hidden or internal nodes. Default is to show all nodes.
'#
# Describe the detail of a single available operation
cmds.dbpeek( query=True, op='plugIterator' )
# Return: '
Peek operation 'plugIterator':
    This tests the performance of the class by iterating over all of the
    networked plugs in a plug tree.
    Suggested iteration count minimum is 1000000 for which the test machine
    measured a time of 19.234s.
This operation does not take any arguments.
'#
cmds.dbpeek( op='plugIterator', count=10000 )
# Return: 'Run 10,000 loops of plug iteration over a tree of size 51, depth 4
Total time:   17.0s
Maximum time: 0.81s
Minimum time: 0.23s
Average time: 0.30s
'#
# Run a performance test for 1000000 loops and store the results
cmds.dbpeek( op='plugIterator', count=1000000, outputFile='MyFile.txt' )
# Return: 0 #
cmds.loadPlugin( 'MetadataSample' )
cmds.polyPlane( name='planeLuck' )
cmds.dataStructure( asString='name=TestStructure:int32=ID )
cmds.importMetadata( asString='channel face\n stream\n TestStream\n TestStructure\n 0\n 99\n 1\n 999\n 2\n 9999\n endStream\n endChannel\n endAssociations" "planeLuckShape' )
# Peek at the newly created metadata
#
cmds.dbpeek( op='metadata', argument='summary' )
# Return: 'Node planeLuckShape : face( TestStream[3] )' #