View Full Version : Access referenced files

02 February 2005, 02:22 PM

I want to access all referenced files (such as textures (maybe also other scenes, if possible)) of the currently open scene.
What I need is an array (or the like) containing the paths of these files.

My (so far not successful) approach was to iterate through all nodes starting with the rootNode, then access the material of each node.
Well, here I'm stuck. If this is the way to go, does anyone know how to procceed?

Or is there a more simple way?

Thanks in advance,


02 February 2005, 04:49 PM
Take a look at the EnumerateFiles function - it rocks! (Read the MAXScript Reference for all details).

Here is a simple code that collects all external paths:

theFilesList = #() --init. an array to collect the paths.
fn collectFiles path = append theFilesList path --define a function to collect the paths
enumerateFiles collectFiles --call enumerateFiles, passing the above function as argument
theFilesList --take a look at the content of the array!...

CGTalk Moderation
02 February 2006, 05:00 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.