Syntax
- string imageBestRatio(searchQuery, axesRatio)
Parameters
- searchQuery—stringSearch query to apply on list of all files in the workspace. See fileSearch / filesSearch for details about the syntax.
- axesRatio—string{ "xy" | "xz" | "yx" | "yz" | "zx" | "zy" }—Defines which scope axes ratio is used as a reference.
Returns
Returns texture with best ratio match (according to axesRatio).
Description
The imageBestRatio function returns the texture with the best ratio match, from the list specified in searchQuery, according to the specified combination of axes.
Note:
In case multiple files share the best ratio, a random file is returned among those.
Related
Examples
Setting up texturing based on the best pixel ratio
The goal is to set up the texturing, depending on the best pixel ratio of the list of desired textures. The following textures all have different resolutions. | |
|