This command creates a context for smudge UV tool. This context only works in the texture UV editor.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
dragSlider (ds) | unicode | ||
|
|||
effectType (et) | unicode | ||
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. |
|||
exists (ex) | bool | ||
|
|||
functionType (ft) | unicode | ||
|
|||
history (ch) | bool | ||
|
|||
image1 (i1) | unicode | ||
image2 (i2) | unicode | ||
image3 (i3) | unicode | ||
|
|||
name (n) | unicode | ||
|
|||
pressure (prs) | float | ||
|
|||
radius (r) | float | ||
|
|||
smudgeIsMiddle (sim) | bool | ||
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 commandFlag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.texSmudgeUVContext
Example:
import pymel.core as pm
import maya.cmds as cmds
# Create a poly plane
pm.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
# Result: [nt.Transform(u'pPlane1'), nt.PolyPlane(u'polyPlane1')] #
# Select all UVs
pm.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
pm.texSmudgeUVContext('texSmudgeUVContext1', effectType='smudge', r=0.1, prs=0.2)
# Result: u'texSmudgeUVContext1' #
pm.setToolTo('texSmudgeUVContext1')