Go to: Synopsis. Return value. Keywords. Flags. Python examples.
dbcount([enabled=boolean], [file=string], [keyword=string], [list=boolean], [maxdepth=uint], [quick=boolean], [reset=boolean], [spreadsheet=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
dbcount is NOT undoable, NOT queryable, and NOT editable.
The dbcount command is used to print and manage a list of statistics
collected for counting operations. These statistics are displayed
as a list of hits on a particular location in code, with added reference
information for pointers/strings/whatever.
If -reset is not specified then statistics are printed.
None
debug, count, filter
enabled, file, keyword, list, maxdepth, quick, reset, spreadsheet
Long name (short name) |
Argument types |
Properties |
enabled(e)
|
boolean
|
|
|
Set the enabled state of the counters ('on' to enable, 'off' to disable).
Returns the list of all counters affected.
|
|
file(f)
|
string
|
|
|
Destination file of the enabled count objects. Use the special names
stdout and stderr to redirect to your command window. As
well, the special name msdev is available on NT to direct your
output to the debug tab in the output window of Developer Studio.
|
|
keyword(k)
|
string
|
|
|
Print only the counters whose name matches this keyword (default is all).
|
|
list(l)
|
boolean
|
|
|
List all available counters and their current enabled status. (The only
thing you can do when counters are disabled.)
|
|
maxdepth(md)
|
uint
|
|
|
Maximum number of levels down to traverse and report. 0 is the default and
it means continue recursing as many times as are requested.
|
|
quick(q)
|
boolean
|
|
|
Display only a summary for each counter type instead of the full details.
|
|
reset(r)
|
boolean
|
|
|
Reset all counters back to 0 and remove all but the top level counters.
Returns the list of all counters affected.
|
|
spreadsheet(s)
|
boolean
|
|
|
Display in spreadsheet format instead of the usual nested braces.
This will include a header row that contains 'Count Level1 Level2 Level3...',
making the data suitable for opening directly in a spreadsheet table.
|
|
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
cmds.dbcount( e='on' ) # Enable counters
cmds.dbcount( ) # Print all available counters
cmds.dbcount( f='myCounts.txt' ) # Print all available counters to the file "myCounts.txt"
cmds.dbcount( k='dirty' ) # Print all counters with "dirty" in their name
cmds.dbcount( r=True, k='dirty' ) # Reset counters with "dirty" in their name
cmds.dbcount( l=True ) # List all counters
cmds.dbcount( l=True, k='dirty' ) # List all counters with "dirty" in their name
cmds.dbcount( s=True, f='xls.txt' ) # Print all counters in spreadsheet form to the file "xls.txt"