Maya Scripting
Scripting
To use Unwrella through MEL scripting in Autodesk Maya, use the command:
unwrellaSome previously available properties have been deprecated to simplify the plug-in. These properties can still be used for backwards compatibility and will not cause an error, but they no longer affect the plug-in operation.
Flags
The following flags can be used with the unwrella command to control the unwrap process.
Destination UV Set
-mapchannel (-mc) : stringDestination UV set. This is where the generated UV map will be stored.
Unwrap Type
-unwrap_type (-t) : intUnwrap type used by Unwrella:
0— Standard unwrap type optimized for organic shapes1— Unwrap type for hard-surface shapes2— Pack existing UV data without unwrapping3— Projection unwrap for directional area optimization
Stretch
-stretch (-st) : floatThe amount of stretching allowed.
0.0means no stretching is allowed1.0means any amount of stretching can be used
Padding
-padding (-pad) : intDistance between charts in the texture.
Width
-width (-w) : intTexture width of the UV and the baked map.
Height
-height (-h) : intTexture height of the UV and the baked map.
Keep Seams
-keep_seams (-ks) : booleanIf True, the unwrapping process retains already existing borders as long as the given constraints allow.
If False, all existing borders are discarded and Unwrella places new borders automatically.
Use Grooves
-use_grooves (-ug) : booleanIf True, the unwrapping process automatically adds borders to edges at grooves between mesh faces.
Groove Angle
-groove_angle (-ga) : floatDefines the angle used for automatic groove borders.
Use Ridges
-use_ridges (-ur) : booleanIf True, the unwrapping process automatically adds borders to edges at ridges between mesh faces.
Ridge Angle
-ridge_angle (-ra) : floatDefines the angle used for automatic ridge borders.
Pack Mode
-pack_mode (-p) : intSpecifies the packing engine used:
0— Classic1— Efficient2— High Quality
Rescale
-rescale (-re) : booleanIf True, the individual charts are rescaled depending on the amount of mesh surface they cover.
Pre-Rotate
-pre_rotate (-pr) : booleanDetermines if each chart should be individually rotated into an optimized base rotation.
Rotation
-rotation (-ro) : intDefines the angle steps that each chart gets rotated by.
The values 0 to 3 correspond to the buttons in the user interface.
Full Rotation
-full_rotation (-fr) : booleanIf True, counterparts for each rotation step that are rotated by 180 degrees will be considered.
Tile Number X
-tile_numx (-tx) : intThe number of horizontal tiles along the U coordinate.
Tile Number Y
-tile_numy (-ty) : intThe maximum number of tiles to be used. If more charts exist, they will be grouped together automatically.
Camera
-camera (-c) : stringThe camera used to determine view location and direction.
Camera Angle
-cam_angle (-ca) : floatThe view angle of the camera object.
Camera Extend
-cam_extend (-ce) : floatThe tolerance angle for which backfacing polygons are included in the projection unwrap.
Camera Orthographic
-cam_ortho (-co) : booleanWhen set to True, an orthogonal projection is used, ignoring the view angle.
Example Script
This example creates a sphere and unwraps it with a very small amount of stretching.
polySphere -r 10;
unwrella -st 0.01 -pad 1 -w 1000 -h 1000;