UVMapping¶
4 tools. Back to the index.
clear_uv_channel¶
Destructive, idempotent.
Drop all UVs from one UV channel on a static mesh. Idempotent on already-empty channels. Resizes the UV-channel count if the cleared channel is the highest one (UE 5.8 doesn't auto-shrink channel count, so callers that want to "remove" a UV channel should follow up with set_num_uv_channels).
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Asset path to the UStaticMesh |
uv_channel |
number | no | Index of the UV channel to clear (0-based; default 0) |
Returns: { static_mesh_path, uv_channel, uv_channel_count_before, uv_channel_count_after, cleared, saved }
get_uv_health_report¶
Read-only.
Read-only diagnostic summary for one UV channel on a static mesh: counts, lightmap status, in-unit-square ratio, overlap count, and unique UVs.
| Parameter | Type | Required | Description |
|---|---|---|---|
mesh_path |
string | yes | Static mesh path (e.g. /Game/Meshes/Cube) |
lod_index |
number | no | LOD index to inspect (default 0) |
uv_channel |
number | no | UV channel index to inspect (default 0) |
Returns: { mesh_path, lod_index, uv_channel, vertex_count, triangle_count, lightmap_coordinate_index, no_lightmap_configured: bool, is_lightmap_hard_failing: bool, approx_overlap_count, in_unit_square_triangle_ratio, approx_unique_islands, per_triangle_iteration_error?: string } -- approx_unique_islands counts distinct UV positions (rounded to 4 decimals), not islands; when per_triangle_iteration_error is set the per-triangle counters stay 0.
list_uv_channels¶
Read-only.
Per-LOD inventory of UV channels on a static mesh (read-only, no MarkDirty / no save).
| Parameter | Type | Required | Description |
|---|---|---|---|
mesh_path |
string | yes | Static mesh path (e.g. /Game/Meshes/Cube) |
lod_index |
number | no | Optional LOD index to inspect, or -1 to inventory every LOD (default -1) |
Returns: { mesh_path: string, total_lods: int, lods: [{lod_index, uv_channel_count, vertex_count, triangle_count, lightmap_coordinate_index, has_lightmap, channels: [{channel, is_lightmap, vertex_count}]}] }
set_triangle_uvs¶
Destructive, idempotent.
Set the 3 UV corners of a single triangle in one UV channel. Use this for granular UV edits without a full repack / regeneration. The triangle becomes an isolated UV island (the engine allocates fresh UV elements per call). Triangle IDs are 0-based into the mesh's triangle list. The bIsValidTriangle out-param surfaces the engine's validity verdict (false if TriangleID is out of range, the UV channel doesn't exist, or the resulting topology would be invalid).
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Asset path to the UStaticMesh |
uv_channel |
number | no | UV channel index (default 0) |
triangle_id |
number | no | Triangle ID to update (0-based; default 0) |
uv0 |
array | no | First triangle corner as a [u, v] pair. Read by the local ParseUV helper, which the extractor cannot follow, so this hint is what puts the param in the schema at all -- documenting the three on one line made all three unparseable and the tool had NO way to pass UVs. |
uv1 |
array | no | Second corner as [u, v]. |
uv2 |
array | no | Third corner as [u, v]. Alternatively pass the six flat numbers u0/v0/u1/v1/u2/v2 instead of the three arrays. |
Returns: { static_mesh_path, uv_channel, triangle_id, is_valid_triangle, modified, saved }