assetFitSize function

Syntax

  • string assetFitSize(searchQuery, axisSelector, maxScaleError)

Parameters

  1. searchQuerystring
    Search query to apply on list of all files in the workspace. See fileSearch for details about the syntax.
  2. axisSelectorstring
    { x | y | z | xy | xz | yz | xyz }—selector of axes for the current scope.
  3. maxScaleErrorfloat
    Float value to control file selection. If it is 0 all input files are returned, sorted depending on their size. If the value is > 0, only a subset of the input files is returned: 0.1 means that maximum +-10% scaling is allowed.

Returns

Random asset (according to axisSelector) 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 axisSelector.

Related

Examples

assetFitSize("assets/*.obj","xz",0.2)
	# result = "assets/chosenAsset.obj"

In this topic