demoAssets.py

demoAssets.py
1 '''
2  Lists all of the assets in a file.
3 '''
4 import MaxPlus
5 
6 assetTypes = {
7  MaxPlus.AssetType.OtherAsset: "other",
8  MaxPlus.AssetType.BitmapAsset: "bitmap",
9  MaxPlus.AssetType.XRefAsset: "xref",
10  MaxPlus.AssetType.PhotometricAsset: "photometric",
11  MaxPlus.AssetType.AnimationAsset: "animation",
12  MaxPlus.AssetType.VideoPost: "video post",
13  MaxPlus.AssetType.BatchRender: "batch render",
14  MaxPlus.AssetType.ExternalLink: "external link",
15  MaxPlus.AssetType.RenderOutput: "render output",
16  MaxPlus.AssetType.PreRenderScript: "pre-render script",
17  MaxPlus.AssetType.PostRenderScript: "post-render script",
18  MaxPlus.AssetType.SoundAsset: "sound",
19  MaxPlus.AssetType.ContainerAsset: "container",
20 }
21 
23 print "There are ", len(assets), " assets"
24 for i in range(len(assets)):
25  a = assets[i]
26  print "Asset", i, a.ResolvedFileName, " is a ", assetTypes[a.Type]
27  print " ", a.SpecifiedFileName