Notifications
Clear all

[Closed] Map List

Hi,

Does anyone know how to access all the scene maps and arrange them into an array? I did it using the sceneMaterials array, but there are some maps that are independent of Materials (they are not maps from the scene materials)… These maps I would like to get. I tryed the enumeratefiles but this function only returns the string names of those maps, not the maps objects.

Thanks,

Rodrigo

3 Replies

Hi rodrigo, Pascali has already asked the same question in another thread.

I hope this link help you out:

http://www.sloft.com/2005/11/26/maxscript-references/

See ya

Few weeks ago I stumbled upon a command that gives you all the maps in a scene, but for the life of me I cannot remember it or the script I used it for!!! I’ve spent some time yesterday looking for it in the reference but couldn’t find it…
Maybe someone else knows what I’m talking about?

Hi,

2 ways of doing this:

  1. using ‘getClassInstances’ :
    getClassInstances BitMapTexture

  2. using ‘enumeratefiles’

from The help :
(
BT=getClassInstances BitmapTexture

(
local mapfiles=#()
fn addmap mapfile =
(
local mapfileN=mapfile as name
local index=finditem mapfiles mapfileN
if index == 0 do append mapfiles mapfileN
)
enumeratefiles addmap
– meratefiles addmap #missing
sort mapfiles
for mapfile in mapfiles do print (mapfile as string)
)
)