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

Synopsis

dbpeek([allObjects=boolean], [detail=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.

Return value

string[] Query of types yields a string array with available types
string[] Query of specific type yields a string array with available detail flags
string[] If no stream specified then peek information will be returned, one string per line
int Dumping peek information to a stream will return error count

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

Keywords

debug, node, attribute

Related

dbcount, dgInfo, dgdirty, dgeval, dgmodified

Flags

allObjects, detail, outputFile, type
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 type of peek being performed - see the flag documentation for details on what it means for a given type. By default if no objects are selected or specified then it will behave as though this flag were set.
detail(d) string createquerymultiuse
Specify the type of detail desired in string form. The acceptable values for the detail string are documented in the flag to which they will be applied.
outputFile(of) string createquery
Specify the location of a file to which the information is to be dumped. Default will dump to stdout. 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.
type(t) string createquery
Specify the type of peeking to perform. The various types 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 type accepts and a description of what it does.

In query mode, this flag can accept a value.


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 types
cmds.dbpeek( type=True, query=True )
# Return: [metadata, nodes, references] #
// Describe the detail of a single available type
cmds.dbpeek( query=True, type='nodes' )
The peek type 'nodes' understands detail 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.
# Return: 1 #
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( type='metadata', detail='summary' )
Node planeLuckShape : face( TestStream[3] )