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

Synopsis

texSmudgeUVContext( contextName , [dragSlider=string], [effectType=string], [exists=boolean], [functionType=string], [history=boolean], [image1=string], [image2=string], [image3=string], [name=string], [pressure=float], [radius=float], [smudgeIsMiddle=boolean])

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

texSmudgeUVContext is undoable, queryable, and editable.

This command creates a context for smudge UV tool. This context only works in the texture UV editor.

Return value

string

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

Flags

dragSlider, effectType, exists, functionType, history, image1, image2, image3, name, pressure, radius, smudgeIsMiddle
Long name (short name) Argument types Properties
exists(ex) boolean create
Returns true or false depending upon whether the specified object exists. Other flags are ignored.
image1(i1) string createqueryedit
image2(i2) string createqueryedit
image3(i3) string createqueryedit
Contexts support up to three icons that represent the tool associated with the context.
history(ch) boolean create
If this is a tool command, turn the construction history on for the tool in question.
name(n) string create
If this is a tool command, name the tool appropriately.
effectType(et) string queryedit
fixed | smudge Specifies the effect of the tool. In fixed mode, the UVs move as if they are attached by a rubber band. In smudge mode the UVs are moved as the cursor is dragged over the UVs.
functionType(ft) string queryedit
exponential | linear | constant. Specifies how UVs fall off from the center of influence.
radius(r) float queryedit
Radius of the smudge tool. All UVs within this radius are affected by the tool
pressure(prs) float queryedit
Pressure value when effect type is set to smudge.
dragSlider(ds) string queryedit
radius | none Enables the drag slider mode. This is to support brush resizing while holding the 'b' or 'B' button.
smudgeIsMiddle(sim) boolean queryedit
By default, the left mouse button initiates the smudge. However, this conflicts with selection. When smudgeIsMiddle is on, smudge mode is activated by the middle mouse button instead of the left mouse button.

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

# Create a poly plane
cmds.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')

# Select all UVs
cmds.select('pPlane1.map[0:120]', r=True)

# Create a new smudge UV tool context, set the effect type to smudge mode, set the radius to 0.1 and pressure to 0.2, then switch to it
# In order to use this tool to smudge the UVs of pPlane1, you must open the texture UV editor
cmds.texSmudgeUVContext('texSmudgeUVContext1', effectType='smudge', r=0.1, prs=0.2)
cmds.setToolTo('texSmudgeUVContext1')