set_texel_density
Scales an object's UVs to a target texel density while preserving UV island layout; repack afterward with pack_uv_islands(scale=False) to return islands to the 0-1 square.
Instructions
Scale an object's UVs to hit a target texel density.
Islands keep their layout and scale about their shared centre, so they may spill outside the 0-1 square; pack afterwards with pack_uv_islands(scale=False) to bring them back without undoing this.
Args: object_name: Mesh object with a UV map. density: Target pixels per metre, above 0 and up to 100000. texture_size: Texture width in pixels the UVs are meant for.
Returns: Dict with the density before and after.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| density | Yes | ||
| object_name | Yes | ||
| texture_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||