UVTile class
class substance_painter.textureset.UVTile(u: int, v: int, _material_id: int) {#substance_painter.textureset.UVTile}
A UV Tile coordinates.
Parameters:
u (int) – The U coordinate of the UV Tile.
v (int) – The V coordinate of the UV Tile.
_material_id (int)
[!TIP]
See also:
TextureSet.all_uv_tiles()property name: str {#substance_painter.textureset.UVTile.name}
The name of the UV Tile.
UV Tile names must be unique within a Texture Set.
Type: str
Getter: Get the UV Tile name.
Setter: Set the UV Tile name.
Raises:
- ProjectError – If no project is opened.
- ServiceNotFoundError – If Substance 3D Painter has not started all its services yet.
- ValueError – If the UV Tile is invalid.
- ValueError – If the name of the UV Tile contains reserved characters.
- ValueError – If the name of the UV Tile is not unique within the Texture Set.
property description: str {#substance_painter.textureset.UVTile.description}
The description of the UV Tile.
Type: str
Getter: Get the UV Tile description.
Setter: Set the UV Tile description.
Raises:
- ProjectError – If no project is opened.
- ServiceNotFoundError – If Substance 3D Painter has not started all its services yet.
- ValueError – If the UV Tile is invalid.
get_resolution() -> Resolution {#substance_painter.textureset.UVTile.get_resolution}
Get the UV Tile resolution.
Returns: The resolution of this UV Tile in pixels.
Return type: Resolution
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 seeTextureSet.get_uvtiles_resolution.[!TIP]
See also:
UVTile.set_resolution()UVTile.reset_resolution()TextureSet.get_uvtiles_resolution(),set_resolution(new_resolution: Resolution) {#substance_painter.textureset.UVTile.set_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_resolutionis not square.ValueError – If
new_resolutionis 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 seeTextureSet.set_uvtiles_resolution.[!TIP]
See also:
UVTile.get_resolution(),UVTile.reset_resolution(),TextureSet.set_resolution(),TextureSet.set_uvtiles_resolution(),reset_resolution() {#substance_painter.textureset.UVTile.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 seeTextureSet.reset_uvtiles_resolution.[!TIP]
See also:
UVTile.get_resolution(),UVTile.set_resolution(),TextureSet.reset_uvtiles_resolution(),all_mesh_names() -> List[str] {#substance_painter.textureset.UVTile.all_mesh_names}
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.
Return type: List[str]
[!TIP]
See also:
TextureSet.all_mesh_names()