Go to: Synopsis. Return value. Flags. Python examples.
sculptKeyCtx(
contextName
, [activeMode=int], [affectsTime=boolean], [affectsTimeAll=string], [brushScaling=int], [editingRadius=boolean], [editingStrength=boolean], [exists=boolean], [falloffCurve=string], [falloffCurveAll=string], [history=boolean], [image1=string], [image2=string], [image3=string], [minRadius=float], [minStrength=float], [minStrengthAll=string], [mode=int], [modeMinStrength=[int, float]], [modeStrength=[int, float]], [name=string], [radius=float], [reset=boolean], [strength=float], [strengthAll=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
sculptKeyCtx is undoable, queryable, and editable.
This command creates a context which may be used to
deform key frames with a sculpt brush. This context
only works in the graph editor.
In query mode, return type is based on queried flag.
activeMode, affectsTime, affectsTimeAll, brushScaling, editingRadius, editingStrength, exists, falloffCurve, falloffCurveAll, history, image1, image2, image3, minRadius, minStrength, minStrengthAll, mode, modeMinStrength, modeStrength, name, radius, reset, strength, strengthAll
Long name (short name) |
Argument types |
Properties |
|
activeMode(am)
|
int
|
|
|
Used to query the current active sculpt mode. This can differ from the base
mode if the user is holding down the shift hotkey to temporarily switch to
smooth mode.
|
|
affectsTime(at)
|
boolean
|
 
|
|
Specifies whether or not the sculpt tools affect the time as well as the value of the keys.
|
|
affectsTimeAll(ata)
|
string
|
 
|
|
Specifies whether or not the sculpt tools affect the time as well as the value of the keys
for all modes.
|
|
brushScaling(brs)
|
int
|
 
|
|
Specifies how the sculpt brush scales relative to the Graph Editor.
1 = no scaling,
2 = scaling based on time,
3 = scaling based on value
|
|
editingRadius(er)
|
boolean
|

|
|
Enables or disables interactive radius scaling.
|
|
editingStrength(es)
|
boolean
|

|
|
Enables or disables interactive strength scaling.
|
|
exists(ex)
|
boolean
|
|
|
Returns true or false depending upon whether the
specified object exists. Other flags are ignored.
|
|
falloffCurve(fc)
|
string
|
 
|
|
Specifies the falloff curve of the sculpting effect.
|
|
falloffCurveAll(fca)
|
string
|
 
|
|
Internal flag used to save/restore falloff curves for all modes.
|
|
history(ch)
|
boolean
|
|
|
If this is a tool command, turn the construction history on
for the tool in question.
|
|
image1(i1)
|
string
|
 
|
|
First of three possible icons representing the tool
associated with the context.
|
|
image2(i2)
|
string
|
 
|
|
Second of three possible icons representing the tool
associated with the context.
|
|
image3(i3)
|
string
|
 
|
|
Third of three possible icons representing the tool
associated with the context.
|
|
minRadius(mr)
|
float
|
 
|
|
Specifies the minumum radius the sculpt brush will take due to stylus pressure.
Cannot be more than the base brush radius.
|
|
minStrength(ms)
|
float
|
 
|
|
Specifies the minumum strength of sculpting due to stylus pressure.
Cannot be more than the base strength.
|
|
minStrengthAll(msa)
|
string
|
 
|
|
Internal flag used to save/restore min strength for all modes.
|
|
mode(m)
|
int
|
 
|
|
Specifies the base sculpt mode.
0 = grab,
1 = smooth
2 = smear
3 = reduce
|
|
modeMinStrength(mms)
|
[int, float]
|
 
|
|
Specifies the min strength for the specified mode.
|
|
modeStrength(mst)
|
[int, float]
|
 
|
|
Specifies the strength for the specified mode.
|
|
name(n)
|
string
|
|
|
If this is a tool command, name the tool appropriately.
|
|
radius(r)
|
float
|
 
|
|
Specifies the radius of the sculpt brush.
|
|
reset(rs)
|
boolean
|

|
|
Internal flag used to reset current tool mode settings.
|
|
strength(s)
|
float
|
 
|
|
Specifies the strength of the sculpting effect for the current mode.
Each mode can have a different strength.
|
|
strengthAll(sa)
|
string
|
 
|
|
Internal flag used to save/restore strength for all modes.
|
|
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
# Create a sculpt key context in grab mode.
cmds.sculptKeyCtx('sculptKeyContext', mode=0)
# Switch to smooth mode and set the sculpt radius to 50.
cmds.sculptKeyCtx('sculptKeyContext', edit=True, mode=1, radius=50)
# Set the strength for the grab and smooth modes to 50.
cmds.sculptKeyCtx('sculptKeyContext', edit=True, modeStrength=((0,50),(1,50)))
# Set the strength for all modes to 80.
cmds.sculptKeyCtx('sculptKeyContext', edit=True, strengthAll=(80, 80, 80))
// Activate affects time option
cmds.sculptKeyCtx('sculptKeyContext', edit=True, affectsTime=1)