PDA

View Full Version : Map List


SergioPascali
12-14-2006, 04:12 PM
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.

Thanks,

Rodrigo

Fabiomussarela
12-15-2006, 11:33 AM
Hi Pascali :) I think this link could be usefull to you:

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

antonv
12-15-2006, 02:56 PM
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?

Zbuffer
12-15-2006, 07:10 PM
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)
)
)

CGTalk Moderation
12-15-2006, 07:10 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.