The .webfile
parameter is an AssetID, which is a type of GUID (globally unique ID). In MaxScript, this can be obtained from an AssetUser
object, which represents a single bitmap or asset file, and AssetUser
objects can be obtained from the AssetManager
.
Note that some assets are accessed by filename, and others by AssetID, in MaxScript. IES files for Photometric Lights, such as Target Lights and Free Lights (applicable when their Light Distribution is set to Photometric Web) are referred to by AssetID. Bitmaps for BitmapTextures are referred to by filename.
Example in MaxScript:
-- Create a photometric light and define the path to the IES file
exampleLight = Target_Light()
iesDir = "C:/Program Files/Autodesk/3ds Max 2018/sceneassets/photometric/"
iesFile = "point_recessed_wallwash_250W.ies"
iesFilepath = (iesDir + iesFile)
-- Set Light Distribution parameter to "Photometric Web"
exampleLight.Distribution = 3
-- Fetch the AssetUser value from AssetManager
iesAssetUser = AssetManager.getasset iesFilepath #Photometric
-- Fetch the AssetID value from the AssetUser
exampleLight.webfile = iesAssetUser.getAssetID()