The dbcountcommand 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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
enabled (e) | bool | ||
|
|||
file (f) | unicode | ||
Destination file of the enabled count objects. Use the special names stdoutand stderrto redirect to your command window. As well, the special name msdevis available on NT to direct your output to the debug tab in the output window of Developer Studio. |
|||
keyword (k) | unicode | ||
|
|||
list (l) | bool | ||
|
|||
maxdepth (md) | int | ||
|
|||
quick (q) | bool | ||
|
|||
reset (r) | bool | ||
|
|||
spreadsheet (s) | bool | ||
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 commandFlag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.dbcount
Example:
import pymel.core as pm
pm.dbcount( e='on' ) # Enable counters
pm.dbcount( ) # Print all available counters
pm.dbcount( f='myCounts.txt' ) # Print all available counters to the file "myCounts.txt"
pm.dbcount( k='dirty' ) # Print all counters with "dirty" in their name
pm.dbcount( r=True, k='dirty' ) # Reset counters with "dirty" in their name
pm.dbcount( l=True ) # List all counters
pm.dbcount( l=True, k='dirty' ) # List all counters with "dirty" in their name
pm.dbcount( s=True, f='xls.txt' ) # Print all counters in spreadsheet form to the file "xls.txt"