- Substance 3D home
- Painter Python API
- API
- Tutorials
uvtile
UVTile class
- class substance_painter.textureset.
UVTile
UVTile(u: int, v: int, _material_id: int) A UV Tile coordinates.
-
u
u The U coordinate of the UV Tile.
- Type
int
-
v
v The V coordinate of the UV Tile.
- Type
int
See also
-
get_resolution
get_resolution() → Resolution Get the UV Tile resolution.
- Returns
The resolution of this UV Tile in pixels.
- Return type
- Raises
- ProjectError – If no project is opened.
- ServiceNotFoundError – If Substance Painter has not started all its services yet.
- ValueError – If the UV Tile is invalid.
Note
The time complexity of this function is linear in the number of UV Tiles in the parent Texture Set. If you need to process multiple UV Tiles, please see
TextureSet.get_uvtiles_resolution
.See also
UVTile.set_resolution()
UVTile.reset_resolution()
TextureSet.get_uvtiles_resolution()
,
-
set_resolution
set_resolution(new_resolution: Resolution) Set the resolution of the UV Tile.
See resolution restrictions:
Resolution
.- Parameters
new_resolution (Resolution) – The new resolution for this UV Tile.
- Raises
- ProjectError – If no project is opened.
- ServiceNotFoundError – If Substance Painter has not started all its services yet.
- ValueError – If
new_resolution
is not square. - ValueError – If
new_resolution
is not a valid resolution. - ValueError – If the UV Tile is invalid.
Note
The time complexity of this function is linear in the number of UVTiles in the parent Texture Set. If you need to process multiple UVTiles, please see
TextureSet.set_uvtiles_resolution
.See also
UVTile.get_resolution()
,UVTile.reset_resolution()
,TextureSet.set_resolution()
,TextureSet.set_uvtiles_resolution()
,
-
reset_resolution
reset_resolution() Reset the resolution of the UV Tile to match the parent Texture Set.
- Raises
- ProjectError – If no project is opened.
- ServiceNotFoundError – If Substance Painter has not started all its services yet.
- ValueError – If the UV Tile is invalid.
Note
The time complexity of this function is linear in the number of UVTiles in the parent Texture Set. If you need to process multiple UVTiles, please see
TextureSet.reset_uvtiles_resolution
.See also
UVTile.get_resolution()
,UVTile.set_resolution()
,TextureSet.reset_uvtiles_resolution()
,
-
all_mesh_names
all_mesh_names() → List[str] Get the list of meshes of the UV Tile.
- Raises
- ProjectError – If no project is opened.
- ServiceNotFoundError – If Substance Painter has not started all its services yet.
- ValueError – If the UV Tile is invalid.
See also
-