Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
dbpeek([allObjects=boolean], [count=uint], [operation=string], [outputFile=string], [type=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.
|string||Query of operation yields a string array with available operations|
|string||Query of specific operation without an output file returns a string with help information for that operation|
|int||Query 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.
debug, node, attribute
dbcount, dgInfo, dgdirty, dgeval, dgmodified
allObjects, count, operation, outputFile, type
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.
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 type
cmds.dbpeek( query=True, op='nodes' )
# Return: 'The operation 'nodes' understands type flags 'attributes, visible'.
The 'visible' flag filters the display list to ignore any hidden
or internal nodes. Default is to show all nodes
Normal display will show a count of nodes in the scene of each
type. Adding the 'attributes' flag includes the attribute count
for each node as well, segregated by static, extension, and dynamic types.
# Describe the detail of a single available operation
cmds.dbpeek( query=True, op='plugIterator' )
# Return: 'The test 'plugIterator' doesn't have any type flags.
Suggested iteration count minimum is 1000000 for which the test machine
measured a time of 19.234s.
This tests the performance of the class which iterates over all of the
networked plugs in a plug tree.
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', type='summary' )
# Return: 'Node planeLuckShape : face( TestStream )' #