pymel.core.context.texSmudgeUVContext

texSmudgeUVContext(*args, **kwargs)

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

Flags:
Long name (short name) Argument Types Properties
dragSlider (ds) unicode ../../../_images/query.gif ../../../_images/edit.gif
 
radius | none Enables the drag slider mode. This is to support brush resizing while holding the ‘b’ or ‘B’ button.
effectType (et) unicode ../../../_images/query.gif ../../../_images/edit.gif
 

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 ../../../_images/create.gif
 
Returns true or false depending upon whether the specified object exists. Other flags are ignored.
functionType (ft) unicode ../../../_images/query.gif ../../../_images/edit.gif
 
exponential | linear | constant. Specifies how UVs fall off from the center of influence.
history (ch) bool ../../../_images/create.gif
 
If this is a tool command, turn the construction history on for the tool in question.
image1 (i1) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
   
image2 (i2) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
   
image3 (i3) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Contexts support up to three icons that represent the tool associated with the context.
name (n) unicode ../../../_images/create.gif
 
If this is a tool command, name the tool appropriately.
pressure (prs) float ../../../_images/query.gif ../../../_images/edit.gif
 
Pressure value when effect type is set to smudge.
radius (r) float ../../../_images/query.gif ../../../_images/edit.gif
 
Radius of the smudge tool. All UVs within this radius are affected by the tool
smudgeIsMiddle (sim) bool ../../../_images/query.gif ../../../_images/edit.gif
 

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

# 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')

Previous topic

pymel.core.context.texSmoothContext

Next topic

pymel.core.context.texWinToolCtx

Core

Core Modules

Other Modules

This Page