The AssetManager
interface exposes methods to get information about and manipulate scene assets (external files). Individual scene assets are represented by objects of the AssetUser
class, which contains methods to query those assets.
For example to get a list of assets in a scene:
from pymxs import runtime as rt
num_assets = rt.AssetManager.getNumAssets()
for i in range(1,num_assets+1):
ass = rt.AssetManager.getAssetByIndex(i)
print(ass.getFileName())
The output depends on the scene, but could look something like:
C:\3ds Max\OSL\UberBitmap.osl
C:\3ds Max\maps\uvwunwrap\UV_Checker.png
C:\3ds Max\Maps\fx\StandardFX11.fx
C:\3ds Max\OSL\OSLBitmap.osl
C:\3ds Max\OSL\BlackBody.osl
C:\3ds Max\OSL\Candy.osl
...