This command is used to create a UV Texture Editor and to query or edit the texture editor settings. The UV Texture Editor displays texture mapped polygon objects in 2D texture space. Only active objects are visible in this window. The UV Texture Editor has the ability to display two types of images. The Texture Image is a visualisation of the current texture and associated placement parameters. The Editor Image is a user specified image loaded from disk. A UV Texture Editor can be invoked by selecting the “Window -UV Texture Editor...” menu item from the main maya menu listing that appears at the top of the maya window. It can also be invoked by selecting the “Panel -UV Texture Editor” item under the “Panels” menu item that appears at the top right hand corner of the view. As a UV Texture Editor typically exists at start-up time, and as only one of these can exist at any given time, this command is normally used to query and edit the editor settings.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
backFacingColor (bfc) | float, float, float, float | ||
changeCommand (cc) | unicode, unicode, unicode, unicode | ||
Parameters: First string: commandSecond string: editorNameThird string: editorCmdFourth string: updateFuncCall the command when something changes in the editor The command should have this prototype :command(string $editor, string $editorCmd, string $updateFunc, int $reason)The possible reasons could be : 0: no particular reason1: scale color2: buffer (single/double)3: axis4: image displayed5: image saved in memory |
|||
clearImage (ci) | bool | ||
|
|||
control (ctl) | bool | ||
Query only. Returns the top level control for this editor. Usually used for getting a parent to attach popup menus. Caution: It is possible, at times, for an editor to exist without a control. This flag returns “NONE” if no control is present. |
|||
defineTemplate (dt) | unicode | ||
Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template. |
|||
displayAxes (dax) | bool | ||
|
|||
displayDivisionLines (ddl) | bool | ||
|
|||
displayGridLines (dgl) | bool | ||
|
|||
displayImage (di) | int | ||
|
|||
displayLabels (dl) | bool | ||
|
|||
displaySolidMap (dsm) | bool | ||
Display an solid over lay for the active texture map.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
displayStyle (dst) | unicode | ||
Set the mode to display the image. Valid values are: “color” to display the basic RGB image”mask” to display the mask channel”lum” to display the luminance of the image |
|||
divisions (d) | int | ||
|
|||
docTag (dtg) | unicode | ||
|
|||
doubleBuffer (dbf) | bool | ||
|
|||
drawAxis (da) | bool | ||
drawSubregions (dsr) | bool | ||
exists (ex) | bool | ||
|
|||
filter (f) | unicode | ||
|
|||
forceMainConnection (fmc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. This is a variant of the -mainListConnection flag in that it will force a change even when the connection is locked. This flag is used to reduce the overhead when using the -unlockMainConnection , -mainListConnection, -lockMainConnection flags in immediate succession. |
|||
forceRebake (frb) | bool | ||
|
|||
frameAll (fa) | bool | ||
|
|||
frameSelected (fs) | bool | ||
|
|||
frontFacingColor (ffc) | float, float, float, float | ||
highlightConnection (hlc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will synchronize with its highlight list. Not all editors have a highlight list. For those that do, it is a secondary selection list. |
|||
imageBaseColor (ibc) | float, float, float | ||
|
|||
imageDisplay (id) | bool | ||
|
|||
imageNames (imn) | bool | ||
|
|||
imageNumber (imageNumber) | int | ||
Sets the number of the Texture Image to display This depends on the number of textures corresponding to the current selection. If there are N textures, then the possible Texture Image numbers are 0 to N-1. |
|||
imagePixelSnap (ip) | bool | ||
Sets a mode so that uv transformations in the UV Texture Editor will cause uv values to snap to image pixel corners. Which pixels are used depends on whether a Texture Image or an Editor Image is being displayed, if both are displayed the Texture Image pixels will be used. |
|||
imageRatio (imr) | bool | ||
Sets the window to draw using the Texture Image’s height versus width ratio. If the width is greater than the height than than the width is set to be 1 “unit” in the window and the height is adjusted by width divided by height. This only affects the display of a Texture Image, not an Editor Image. |
|||
imageSize (imageSize) | bool | ||
|
|||
imageTileRange (itr) | float, float, float, float | ||
Sets the UV range of the display. The 4 values specify the minimum U, V and maximum U, V in that order. When viewing a Texture Image, these values affect how many times the image is tiled based on appropriate parameters (e.g. Repeat UV, Mirror, Wrap, etc...) When viewing an Editor Image these values determine the visible size of the image. For example, setting the range to ( 0, 0, 2, 1 ) will cause the Editor Image to be loaded into a 2x1 rectangle, distorting it as necessary to fill the available space. |
|||
imageUnfiltered (iuf) | bool | ||
|
|||
internalFaces (internalFaces) | bool | ||
|
|||
labelPosition (lp) | unicode | ||
|
|||
loadImage (li) | unicode | ||
|
|||
lockMainConnection (lck) | bool | ||
Locks the current list of objects within the mainConnection, so that only those objects are displayed within the editor. Further changes to the original mainConnection are ignored. |
|||
mainListConnection (mlc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. |
|||
maxResolution (mrs) | int | ||
|
|||
nbImages (nim) | bool | ||
|
|||
numUvSets (nuv) | bool | ||
|
|||
numberOfImages (ni) | int | ||
|
|||
panel (pnl) | unicode | ||
Specifies the panel that the editor belongs to. By default if an editor is created in the create callback of a scripted panel it will belong to that panel. If an editor doesn’t belong to a panel it will be deleted when the window that it is in is deleted. |
|||
parent (p) | unicode | ||
|
|||
realSize (rs) | bool | ||
|
|||
relatedFaces (rf) | bool | ||
|
|||
removeAllImages (ra) | bool | ||
|
|||
removeImage (ri) | bool | ||
|
|||
reset (r) | bool | ||
|
|||
saveImage (si) | bool | ||
save the current Editor Image to memory. Saved Editor Images are stored in an Editor Image Stack. The most recently saved image is stored in position 0, the second most recently saved image in position 1, and so on... To set the current Editor Image to a previously saved image use the “di/displayImage” flag. |
|||
scaleBlue (sb) | float | ||
|
|||
scaleGreen (sg) | float | ||
|
|||
scaleRed (sr) | float | ||
|
|||
selectInternalFaces (sif) | bool | ||
|
|||
selectRelatedFaces (srf) | bool | ||
|
|||
selectionConnection (slc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will synchronize with its own selection list. As the user selects things in this editor, they will be selected in the selectionConnection object. If the object undergoes changes, the editor updates to show the change. |
|||
setUvSet (suv) | int | ||
|
|||
singleBuffer (sbf) | bool | ||
|
|||
size (s) | float | ||
|
|||
spacing (sp) | float | ||
|
|||
stateString (sts) | bool | ||
Query only flag. Returns the MEL command that will edit an editor to match the current editor state. The returned command string uses the string variable $editorName in place of a specific name. |
|||
style (st) | int | ||
|
|||
toggle (tgl) | bool | ||
|
|||
unParent (up) | bool | ||
|
|||
unlockMainConnection (ulk) | bool | ||
|
|||
updateMainConnection (upd) | bool | ||
|
|||
useFaceGroup (uf) | bool | ||
|
|||
useTemplate (ut) | unicode | ||
|
|||
uvSets (uvs) | bool | ||
This flag will return strings containing uv set and object name pairs for selected objects in the texture window. The syntax of each pair is “objectName | uvSetName”, where | is a literal character. |
|||
viewPortImage (vpi) | bool | ||
|
|||
writeImage (wi) | unicode | ||
|
Derived from mel command maya.cmds.textureWindow
Example:
import pymel.core as pm
# As a UV Texture Editor typically exists on start-up, you normally
# will not need to create one.. Hence all the examples that follow
# explain how to query and edit the editor settings.
# Get the panel that the editor belongs to.
texWinName = pm.getPanel(sty='polyTexturePlacementPanel')
# Get the space between main grid lines
pm.textureWindow(texWinName[0], q=True, sp=True)
# Result: 3.0 #
# Change the space between main grid lines
pm.textureWindow( texWinName[0], e=True, sp=0.1 )
# Result: u'polyTexturePlacementPanel1' #
# Get the size of the grid
pm.textureWindow( texWinName[0], q=True, s=True )
# Result: 12.0 #
# Change the size of the grid
pm.textureWindow( texWinName[0], e=True, s=0.8 )
# Result: u'polyTexturePlacementPanel1' #
# Zoom on the whole scene
pm.textureWindow( texWinName[0], e=True, fa=True )
# Result: u'polyTexturePlacementPanel1' #
# Set display mode to related (connected) faces
pm.textureWindow(texWinName[0], e=True, rf=True )
# Result: u'polyTexturePlacementPanel1' #