.fill(value)
Description
The fill method replaces all elements in an array with a specified value.
Parameters
value
: The value to fill the array with. Can be any valid OSL type.
Usage On Arrays
Important Notes
The original array is modified
Can fill with any OSL data type
Often used with the range operator to create arrays of a specific size
All elements reference the same value when filling with objects
Last updated
Was this helpful?