Go to: Synopsis. Return value. Flags. Python examples.
threadCount([numberOfThreads=int])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
threadCount is undoable, queryable, and NOT editable.
This command sets the number of threads to be used by Maya in regions of code that are multithreaded. By default the number of threads is equal to the number of logical CPUs, not the number of physical CPUs. Logical CPUs are different from physical CPUs in the following ways: A physical CPU with hyperthreading counts as two logical CPUsNone
In query mode, return type is based on queried flag.
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
numberOfThreads(n)
|
int
|
|||
|
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 # sets Maya to use 4 threads for multithreaded evaluation cmds.threadCount( n=4 ) # sets Maya to use one thread per logical CPU cmds.threadCount( n=0 ) # query number of threads currently set cmds.threadCount( q=True, n=True )