Uv Operators

bpy.ops.uv.align(axis='ALIGN_AUTO')

Align selected UV vertices to an axis

Parameters:axis (enum in [‘ALIGN_AUTO’, ‘ALIGN_X’, ‘ALIGN_Y’], (optional)) – Axis, Axis to align UV locations on.
bpy.ops.uv.average_islands_scale()

Undocumented (contribute)

bpy.ops.uv.circle_select(x=0, y=0, radius=0, gesture_mode=0)

Select UV vertices using circle selection

Parameters:
  • x (int in [-inf, inf], (optional)) – X
  • y (int in [-inf, inf], (optional)) – Y
  • radius (int in [-inf, inf], (optional)) – Radius
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
bpy.ops.uv.cube_project(cube_size=1.0, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)

Undocumented (contribute)

Parameters:
  • cube_size (float in [0, inf], (optional)) – Cube Size, Size of the cube to project on.
  • correct_aspect (boolean, (optional)) – Correct Aspect, Map UV’s taking image aspect ratio into account.
  • clip_to_bounds (boolean, (optional)) – Clip to Bounds, Clip UV coordinates to bounds after unwrapping.
  • scale_to_bounds (boolean, (optional)) – Scale to Bounds, Scale UV coordinates to bounds after unwrapping.
bpy.ops.uv.cursor_set(location=(0.0, 0.0))

Set 2D cursor location

Parameters:location (float array of 2 items in [-inf, inf], (optional)) – Location, Cursor location in 0.0-1.0 coordinates.
bpy.ops.uv.cylinder_project(direction='VIEW_ON_EQUATOR', align='POLAR_ZX', radius=1.0, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)

Undocumented (contribute)

Parameters:
  • direction (enum in [‘VIEW_ON_EQUATOR’, ‘VIEW_ON_POLES’, ‘ALIGN_TO_OBJECT’], (optional)) – Direction, Direction of the sphere or cylinder.
  • align (enum in [‘POLAR_ZX’, ‘POLAR_ZY’], (optional)) – Align, How to determine rotation around the pole.
  • radius (float in [0, inf], (optional)) – Radius, Radius of the sphere or cylinder.
  • correct_aspect (boolean, (optional)) – Correct Aspect, Map UV’s taking image aspect ratio into account.
  • clip_to_bounds (boolean, (optional)) – Clip to Bounds, Clip UV coordinates to bounds after unwrapping.
  • scale_to_bounds (boolean, (optional)) – Scale to Bounds, Scale UV coordinates to bounds after unwrapping.
bpy.ops.uv.export_layout(filepath="", check_existing=True, export_all=False, mode='PNG', size=(1024, 1024), opacity=0.25)

Export UV layout to file

Parameters:
  • filepath (string, (optional)) – File Path, File path used for exporting the SVG file
  • check_existing (boolean, (optional)) – Check Existing, Check and warn on overwriting existing files
  • export_all (boolean, (optional)) – All UV’s, Export all UVs in this mesh (not just the visible ones)
  • mode (enum in [‘SVG’, ‘EPS’, ‘PNG’], (optional)) – Format, File format to export the UV layout to
  • size (int array of 2 items in [8, 32768], (optional)) – Dimensions of the exported file
  • opacity (float in [0, 1], (optional)) – Fill Opacity
File :

addons/io_mesh_uv_layout/__init__.py:132

bpy.ops.uv.follow_active_quads(mode='LENGTH')

Follow UVs from active quads along continuous face loops

Parameters:mode (enum in [‘EVEN’, ‘LENGTH’], (optional)) – Edge Length Mode, Method to space UV edge loops
File :startup/bl_operators/uvcalc_follow_active.py:244
bpy.ops.uv.hide(unselected=False)

Hide (un)selected UV vertices

Parameters:unselected (boolean, (optional)) – Unselected, Hide unselected rather than selected.
bpy.ops.uv.lightmap_pack(PREF_CONTEXT='SEL_FACES', PREF_PACK_IN_ONE=True, PREF_NEW_UVLAYER=False, PREF_APPLY_IMAGE=False, PREF_IMG_PX_SIZE=512, PREF_BOX_DIV=12, PREF_MARGIN_DIV=0.1)

Follow UVs from active quads along continuous face loops

Parameters:
  • PREF_CONTEXT (enum in [‘SEL_FACES’, ‘ALL_FACES’, ‘ALL_OBJECTS’], (optional)) – Selection
  • PREF_PACK_IN_ONE (boolean, (optional)) – Share Tex Space, Objects Share texture space, map all objects into 1 uvmap
  • PREF_NEW_UVLAYER (boolean, (optional)) – New UV Layer, Create a new UV layer for every mesh packed
  • PREF_APPLY_IMAGE (boolean, (optional)) – New Image, Assign new images for every mesh (only one if shared tex space enabled)
  • PREF_IMG_PX_SIZE (int in [64, 5000], (optional)) – Image Size, Width and Height for the new image
  • PREF_BOX_DIV (int in [1, 48], (optional)) – Pack Quality, Pre Packing before the complex boxpack
  • PREF_MARGIN_DIV (float in [0.001, 1], (optional)) – Margin, Size of the margin as a division of the UV
File :

startup/bl_operators/uvcalc_lightmap.py:560

bpy.ops.uv.minimize_stretch(fill_holes=True, blend=0.0, iterations=0)

Reduce UV stretching by relaxing angles

Parameters:
  • fill_holes (boolean, (optional)) – Fill Holes, Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.
  • blend (float in [0, 1], (optional)) – Blend, Blend factor between stretch minimized and original.
  • iterations (int in [0, inf], (optional)) – Iterations, Number of iterations to run, 0 is unlimited when run interactively.
bpy.ops.uv.pack_islands()

Undocumented (contribute)

bpy.ops.uv.pin(clear=False)

Set/clear selected UV vertices as anchored between multiple unwrap operations

Parameters:clear (boolean, (optional)) – Clear, Clear pinning for the selection instead of setting it.
bpy.ops.uv.project_from_view(orthographic=False, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)

Undocumented (contribute)

Parameters:
  • orthographic (boolean, (optional)) – Orthographic, Use orthographic projection.
  • correct_aspect (boolean, (optional)) – Correct Aspect, Map UV’s taking image aspect ratio into account.
  • clip_to_bounds (boolean, (optional)) – Clip to Bounds, Clip UV coordinates to bounds after unwrapping.
  • scale_to_bounds (boolean, (optional)) – Scale to Bounds, Scale UV coordinates to bounds after unwrapping.
bpy.ops.uv.reset()

Undocumented (contribute)

bpy.ops.uv.reveal()

Reveal all hidden UV vertices

bpy.ops.uv.select(extend=False, location=(0.0, 0.0))

Select UV vertice

Parameters:
  • extend (boolean, (optional)) – Extend, Extend selection rather than clearing the existing selection.
  • location (float array of 2 items in [-inf, inf], (optional)) – Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.
bpy.ops.uv.select_all(action='TOGGLE')

Change selection of all UV vertices

Parameters:action (enum in [‘TOGGLE’, ‘SELECT’, ‘DESELECT’, ‘INVERT’], (optional)) – Action, Selection action to execute
bpy.ops.uv.select_border(pinned=False, gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0)

Select UV vertices using border selection

Parameters:
  • pinned (boolean, (optional)) – Pinned, Border select pinned UVs only.
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
  • xmin (int in [-inf, inf], (optional)) – X Min
  • xmax (int in [-inf, inf], (optional)) – X Max
  • ymin (int in [-inf, inf], (optional)) – Y Min
  • ymax (int in [-inf, inf], (optional)) – Y Max
bpy.ops.uv.select_inverse()

Select inverse of (un)selected UV vertices

bpy.ops.uv.select_linked(extend=False)

Select all UV vertices linked to the active UV map

Parameters:extend (boolean, (optional)) – Extend, Extend selection rather than clearing the existing selection.
bpy.ops.uv.select_linked_pick(extend=False, location=(0.0, 0.0))

Select all UV vertices linked under the mouse

Parameters:
  • extend (boolean, (optional)) – Extend, Extend selection rather than clearing the existing selection.
  • location (float array of 2 items in [-inf, inf], (optional)) – Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.
bpy.ops.uv.select_loop(extend=False, location=(0.0, 0.0))

Select a loop of connected UV vertices

Parameters:
  • extend (boolean, (optional)) – Extend, Extend selection rather than clearing the existing selection.
  • location (float array of 2 items in [-inf, inf], (optional)) – Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.
bpy.ops.uv.select_pinned()

Select all pinned UV vertices

bpy.ops.uv.smart_project(angle_limit=66.0, island_margin=0.0)

This script projection unwraps the selected faces of a mesh. it operates on all selected mesh objects, and can be used unwrap selected faces, or all faces.

Parameters:
  • angle_limit (float in [1, 89], (optional)) – Angle Limit, lower for more projection groups, higher for less distortion.
  • island_margin (float in [0, 1], (optional)) – Island Margin, Margin to reduce bleed from adjacent islands.
File :

startup/bl_operators/uvcalc_smart_project.py:1135

bpy.ops.uv.snap_cursor(target='PIXELS')

Snap cursor to target type

Parameters:target (enum in [‘PIXELS’, ‘SELECTION’], (optional)) – Target, Target to snap the selected UV’s to.
bpy.ops.uv.snap_selection(target='PIXELS')

Snap selected UV vertices to target type

Parameters:target (enum in [‘PIXELS’, ‘CURSOR’, ‘ADJACENT_UNSELECTED’], (optional)) – Target, Target to snap the selected UV’s to.
bpy.ops.uv.sphere_project(direction='VIEW_ON_EQUATOR', align='POLAR_ZX', correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)

Undocumented (contribute)

Parameters:
  • direction (enum in [‘VIEW_ON_EQUATOR’, ‘VIEW_ON_POLES’, ‘ALIGN_TO_OBJECT’], (optional)) – Direction, Direction of the sphere or cylinder.
  • align (enum in [‘POLAR_ZX’, ‘POLAR_ZY’], (optional)) – Align, How to determine rotation around the pole.
  • correct_aspect (boolean, (optional)) – Correct Aspect, Map UV’s taking image aspect ratio into account.
  • clip_to_bounds (boolean, (optional)) – Clip to Bounds, Clip UV coordinates to bounds after unwrapping.
  • scale_to_bounds (boolean, (optional)) – Scale to Bounds, Scale UV coordinates to bounds after unwrapping.
bpy.ops.uv.stitch(use_limit=True, limit=0.01)

Stitch selected UV vertices by proximity

Parameters:
  • use_limit (boolean, (optional)) – Use Limit, Stitch UVs within a specified limit distance.
  • limit (float in [0, inf], (optional)) – Limit, Limit distance in normalized coordinates.
bpy.ops.uv.tile_set(tile=(0, 0))

Set UV image tile coordinates

Parameters:tile (int array of 2 items in [0, inf], (optional)) – Tile, Tile coordinate.

Unlink selected UV vertices from active UV map

bpy.ops.uv.unwrap(method='ANGLE_BASED', fill_holes=True, correct_aspect=True)

Undocumented (contribute)

Parameters:
  • method (enum in [‘ANGLE_BASED’, ‘CONFORMAL’], (optional)) – Method, Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower.
  • fill_holes (boolean, (optional)) – Fill Holes, Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.
  • correct_aspect (boolean, (optional)) – Correct Aspect, Map UV’s taking image aspect ratio into account.
bpy.ops.uv.weld()

Weld selected UV vertices together

Previous topic

Ui Operators

Next topic

View2D Operators