vrdUVLayoutSettings

class vrdUVLayoutSettings

(Inherits vrdData)

Holds settings for UV layout (packing of UV islands in the UV space) with Unfold3D. See vrUVService.layout(nodes, settings, uvSet).

Functions

vrdUVLayoutSettings.getBox()

Get the UV space box in which the islands will be packed (packing region).

Returns:Box as (U_min, U_max, V_min, V_max)
Return type:QVector4D
vrdUVLayoutSettings.getIslandPadding()
Returns:Padding between islands in UV unit
Return type:float
vrdUVLayoutSettings.getIterations()
Returns:Packing iterations. See vrdUVLayoutSettings.setIterations(i) for an explanation.
Return type:integer
vrdUVLayoutSettings.getPostScaleMode()
Returns:How the packed islands are scaled into the box after packing.
Return type:vrUVTypes.PostScaleMode
vrdUVLayoutSettings.getPreRotateMode()
Returns:How the islands are re-oriented before packing in a pre-process phase
Return type:vrUVTypes.PreRotateMode
vrdUVLayoutSettings.getPreScaleMode()
Returns:How the islands are rescaled in a pre-process phase before packing
Return type:vrUVTypes.PreScaleMode
vrdUVLayoutSettings.getResolution()
Returns:Packing grid resolution. See vrdUVLayoutSettings.setResolution(resolution) for an explanation.
Return type:integer
vrdUVLayoutSettings.getRotate()
Returns:Whether UV islands may be rotated during the packing process.
Return type:bool
vrdUVLayoutSettings.getRotateMax()

Get the maximum allowable orientation for UV islands during the packing process.

Returns:maximum allowable angle in degrees
Return type:float
vrdUVLayoutSettings.getRotateMin()

Get the minimum allowable orientation for UV islands during the packing process.

Returns:minimum allowable angle in degrees
Return type:float
vrdUVLayoutSettings.getRotateStep()
Returns:Get rotation step in degrees for the optimization of island orientation. See vrdUVLayoutSettings.setRotateStep(rStepDeg) for an explanation.
Return type:float
vrdUVLayoutSettings.getTileAssignMode()
Returns:How islands are distributed to the available tiles. See vrdUVLayoutSettings.setTilesU(tilesU) and vrdUVLayoutSettings.setTilesV(tilesV).
Return type:vrUVTypes.TileAssignMode
vrdUVLayoutSettings.getTilePadding()
Returns:Tile padding in UV unit
Return type:float
vrdUVLayoutSettings.getTilesU()
Returns:Number of tiles in the U direction for island distribution
Return type:integer
vrdUVLayoutSettings.getTilesV()
Returns:Number of tiles in the V direction for island distribution
Return type:integer
vrdUVLayoutSettings.getTranslate()
Returns:Whether UV islands may be moved during packing.
Return type:bool
vrdUVLayoutSettings.setBox(box)

Set the UV space box in which the islands will be packed (packing region).

Parameters:box (QVector4D) – Box as (U_min, U_max, V_min, V_max)
vrdUVLayoutSettings.setIslandPadding(padding)

Set padding between islands in UV unit.

Parameters:padding (float) – Padding in UV unit. Value must be >= 0.0, negative values are clamped to 0.
vrdUVLayoutSettings.setIterations(i)

Set the number of trials the packing algorithm will take to achieve the desired result. More iterations are slower, but can increase accuracy.

Parameters:i (integer) – Packing iterations. Default is 1
vrdUVLayoutSettings.setPostScaleMode(mode)
Parameters:mode (vrUVTypes.PostScaleMode) – Sets how the packed islands are scaled into the box after packing.
vrdUVLayoutSettings.setPreRotateMode(mode)
Parameters:mode (vrUVTypes.PreRotateMode) – Sets how the islands are re-oriented in a pre-process phase before packing
vrdUVLayoutSettings.setPreScaleMode(mode)
Parameters:mode (vrUVTypes.PreScaleMode) – Sets how the islands are rescaled in a pre-process phase before packing
vrdUVLayoutSettings.setResolution(resolution)

Determines the resolution of the packing grid used to place UV islands next to each other in the UV space. Higher values are slower, but produce better results when there are a lot of smaller islands.

Parameters:resolution (integer) – Packing grid resolution. Default is 256.
vrdUVLayoutSettings.setRotate(enable)
Parameters:enable (bool) – Set whether UV islands may be rotated during the packing process.
vrdUVLayoutSettings.setRotateMax(rMaxDeg)

Set the maximum allowable orientation for UV islands during the packing process. Only used if rotation is enabled with vrdUVLayoutSettings.setRotate(enable).

Parameters:rMaxDeg (float) – maximum angle in degrees
vrdUVLayoutSettings.setRotateMin(rMinDeg)

Set the minimum allowable orientation for UV islands during the packing process. Only used if rotation is enabled with vrdUVLayoutSettings.setRotate(enable).

Parameters:rMinDeg (float) – minimum angle in degrees
vrdUVLayoutSettings.setRotateStep(rStepDeg)

Set rotation step for the optimization of island orientation. Only used if rotation optimization is enabled with vrdUVLayoutSettings.setRotate(enable). Rotation optimization begins at the minimum value, see vrdUVLayoutSettings.setRotateMin(rMinDeg), then progressively increases by the rotation step as necessary, up to the maximum value, see vrdUVLayoutSettings.setRotateMax(rMaxDeg).

Parameters:rStepDeg (float) – angle step in degrees. Please note, rStepDeg = 0.0 disables the rotation optimization. Small values incur slower packing speeds. Default is 90 degrees.
vrdUVLayoutSettings.setTileAssignMode(mode)
Parameters:mode (vrUVTypes.TileAssignMode) – Set how islands are distributed to the available tiles. See vrdUVLayoutSettings.setTilesU(tilesU) and vrdUVLayoutSettings.setTilesV(tilesV).
vrdUVLayoutSettings.setTilePadding(padding)

Set padding on top/left/right/bottom of the tiles in UV unit.

Parameters:padding (float) – Padding in UV unit. Value must be >= 0.0, negative values are clamped to 0.
vrdUVLayoutSettings.setTilesU(tilesU)

Specify tiling to distribute islands to more than one tile. See vrdUVLayoutSettings.setTilesV(tilesV) and vrdUVLayoutSettings.setTileAssignMode(mode).

Parameters:tilesU (integer) – The number of tiles in the U direction (default is 1)
vrdUVLayoutSettings.setTilesV(tilesV)

Specify tiling to distribute islands to more than one tile. See vrdUVLayoutSettings.setTilesU(tilesU) and vrdUVLayoutSettings.setTileAssignMode(mode).

Parameters:tilesV (integer) – The number of tiles in the V direction (default is 1)
vrdUVLayoutSettings.setTranslate(enable)
Parameters:enable (bool) – Set whether UV islands may be moved during packing.