pymel.core.modeling.uvSnapshot¶
- uvSnapshot(*args, **kwargs)¶
Builds an image containg the UVs of the selected objects.
Flags:
Long Name / Short Name Argument Types Properties antiAliased / aa bool
When this flag is set, lines are antialiased. blueColor / b int
Blue component of line drawing. Default is 255. entireUVRange / euv bool
When this flag is set, the generated image will contain the entire uv range. Default is UV in 0-1 range. fileFormat / ff unicode
Output file format. Any of those keyword: iff, sgi, pic, tif, als, gif, rla, jpgDefault is iff. greenColor / g int
Green component of line drawing. Default is 255. name / n unicode
Name of the file to be created. overwrite / o bool
When this flag is set, existing file can be ovewritten. redColor / r int
Red component of line drawing. Default is 255. uMax / umx float
Optional User Specified Max value for U. Default value is 1. This will take precedence over the entire range-euv flag. uMin / umn float
Optional User Specified Min value for U. Default value is 0. This will take precedence over the entire range-euv flag. uvSetName / uvs unicode
Name of the uv set to use. Default is the current one. vMax / vmx float
Optional User Specified Max value for V. Default value is 1. This will take precedence over the entire range-euv flag. vMin / vmn float
Optional User Specified Min value for V. Default value is 0. This will take precedence over the entire range-euv flag. xResolution / xr int
Horizontal size of the image. Default is 512. yResolution / yr int
Vertical size of the image. Default is 512. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.uvSnapshot
Example:
import pymel.core as pm # Create a polygonal sphere pm.polySphere() # Result: [nt.Transform(u'pSphere1'), nt.PolySphere(u'polySphere1')] # # Save the UVs in a image pm.uvSnapshot( o=True, n='/tmp/uvImage2.iff', xr=256, yr=256 )