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

Synopsis

dynPref([autoCreate=boolean], [echoCollision=boolean], [runupFrom=int], [runupToCurrentTime=boolean], [saveOnQuit=boolean], [saveRuntimeState=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

dynPref is undoable, queryable, and NOT editable.

This action modifies and queries the current state of "autoCreate rigid bodies", "run up to current time", and "run up from" (previous time or start time).

Return value

None

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

Flags

autoCreate, echoCollision, runupFrom, runupToCurrentTime, saveOnQuit, saveRuntimeState
Long name (short name) Argument types Properties
autoCreate(ac) boolean createquery
If on, autoCreate rigid bodies.
echoCollision(ec) boolean createquery
If on, will cause particle systems to echo to the Script Editor the command that they are running for each particle collision event. If off, only the output of the command will be echoed.
runupFrom(rf) int createquery
If on, run up from previous time; if 2, run up from start time
runupToCurrentTime(rt) boolean createquery
If on, run up the scene to current time
saveOnQuit(sq) boolean createquery
If on, save the current values of preferences to userPrefs file.
saveRuntimeState(sr) boolean createquery
If on, runtime state as well as initial state of all particle objects will be saved to file. If off, only initial state will be saved.

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

# Sets autoCreate rigid bodies to "on"
cmds.dynPref( autoCreate=1 )