Porting MaxPlus.AssetManager to 3ds Max 2021

Porting MaxPlus.AssetManager to 3ds Max 2021

Anonymous
Not applicable
724 Views
1 Reply
Message 1 of 2

Porting MaxPlus.AssetManager to 3ds Max 2021

Anonymous
Not applicable

Hi there,

I have to porting python script for getting assets path on 3ds Max 2021(witch not include MaxPlus).

I tried pymxs.runtime.AssetManager, but return a little different assets list.


Code from Listener in 3dsMax 2020.

>>> textures_MaxPlus = set([assets.ResolvedFileName for assets in MaxPlus.AssetManager.GetAssets()])
>>> len(textures)
28
>>> am = pymxs.runtime.AssetManager
>>> textures_pymxs = set([am.GetAssetByIndex(i).getfilename() for i in range(1,am.GetNumAssets())])
>>> len(names)
57
>>> textures_MaxPlus.difference(textures_pymxs)
set([u'Z:\\test\\samples\\test_scene\\T-OTGums.TGA'])

 

How porting "[assets.ResolvedFileName for assets in MaxPlus.AssetManager.GetAssets()]" on 3dsMax 2021?

 

Thanks

Przemyslaw

0 Likes
725 Views
1 Reply
Reply (1)
Message 2 of 2

denisT.MaxDoctor
Advisor
Advisor
am = pymxs.runtime.AssetManager
assets = [am.GetAssetByIndex(k) for k in xrange(int(am.GetNumAssets()))]
[a.GetFullFilePath() for a in assets if (a and a.CanGetFullFilePath(a.GetFileName()))]
0 Likes