Scripting

To use Unwrella through MEL script use the command ‘unwrella’

Some of the previously available properties have been deprecated to simplify usage of the plug-in. Those properties can still be used without causing an error for backwards compatibility but they will no longer affect the plug-in operation.

Flags

-mapchannel (-mc) : string

Destination UV set. This is where the generated UV map will be stored.

-unwrap_type (-t) : int

Unwrap type used by Unwrella: 0 - Standard unwrap type optimized for organic shapes, 1 - Unwrap type for hard surface shapes, 2 - Pack existing uv data without unwrapping, 3 - Projection unwrap for directional area optimization.

-stretch (-st) : float

The amount of stretching allowed. 0.0 means no stretching is allowed, 1.0 means any amount of stretching can be used.

-padding (-pad) : int

Distance between charts in the texture.

-width (-w) : int

Texture width of the UV and the baked map.

-height (-h) : int

Texture height of the UV and the baked map.

-keep_seams (-ks) : boolean

If True the unwrapping process will retain already existing borders as long as the given constraints allow. If False all already existing borders are discarded and Unwrella places new borders autonomously.

-use_grooves (-ug) : boolean

If True the unwrapping process will automatically add borders to edges at grooves between mesh faces.

-groove_angle (-ga) : float

Defines the angle used for the automatic groove borders.

-use_ridges (-ur) : boolean

If True the unwrapping process will automatically add borders to edges at ridges between mesh faces.

-ridge_angle (-ra) : float

Defines the angle used for the automatic ridge borders.

-pack_mode (-p) : int

Specifies the packing engine used. 0: Classic, 1: Efficient, 2: High Quality

-rescale (-re) : boolean

If True the indivudial charts are rescaled depending on the amount of mesh surface they cover.

-pre_rotate (-pr) : boolean

Determines if each chart should be individually rotated into an optimized base rotation.

-rotation (-ro) : int

Defines the angle steps that each chart gets rotated by. The values 0 to 3 correspond to the buttons in the user interface.

-full_rotation (-fr) : boolean

If True counterparts for each rotation step that are rotated by 180 degrees will be considered.

-tile_numx (-tx) : int

The number of horizontal tiles along the U coordinate.

-tile_numy (-ty) : int

The maximum number of tiles to be used. If more charts exist they will be grouped together automatically.

-camera (-c) : string

The camera that is used to determine view location and direction.

-cam_angle (-ca) : float

The view angle of the camera object.

-cam_extend (-ce) : float

The tolerance angle for which backfacing polygons are included in the projection unwrap.

-cam_ortho (-co) : boolean

When set to True an orthogonal projection ignoring the view angle is used.

Example Script

This example creates a sphere, applies the modifier to it and unwraps it with a very small amount of stretching.

polySphere -r 10;
unwrella -st 0.01 -pad 1 -w 1000 -h 1000;