Syntax
- string assetFitSize(searchQuery, axisSize, maxScaleError)
Parameters
- searchQuery—stringSearch query to apply on list of all files in the workspace. See fileSearch / filesSearch for details about the syntax.
- axisSize—string{ "x" | "y" | "z" | "xy" | "xz" | "yz" | "xyz" }—Axes for the current scope.
- maxScaleError—floatFloat value to control file selection. If it is 0 all files are allowed. If the value is > 0, only a subset of files is allowed: 0.1 means that maximum +-10% scaling is allowed.
Returns
Random asset (according to axisSize) which is in the maxScaleError range.
Description
The assetFitSize function returns one of the assets in the maxScaleError range, from the file list specified in searchQuery, according to the specified axisSize string.
Related
Examples
assetFitSize("assets/*.obj", "xz", 0.2)
# result = "assets/chosenAsset.obj"