View Full Version : Finding ALL materials in max file

02 February 2006, 02:08 PM
Hi Guys,

Like Bebete I am also writing scripts about materials at the moment, thanks to Bebete and Galagast I have had many of my questions answered all ready, although I have one problem. When I am loading max files on different computers in the office I am getting missing file map complaints, these are messing up renders.

The problem is the missing maps are in materials that exist in the max scene file, but are not applied in the actual scene itself. This means they do not exist in the array collected from the "scenematerials" command. Is there any command for listing all materials in the max file, resulting in a list of all materials both applied to objects, and materials that are not applied to anything.

From there with the help written from bebete and galagast, I think I could loop through and solve the missing maps problem, but I need this TOTAL list of materials in the whole file in order to start solving it.

Any ideas guys, this has really got me stuck :(

Take care all,


02 February 2006, 02:52 PM
I might be wrong, but I could only guess that your map file paths are not in UNC format...

Local Format:
- this kind of format will usually have problems if you try to open it on a different computer ot render over the network.

UNC Foramt: (Universal Naming Convetion)
"\\your_machine\3dsmax6\maps\backgrounds\LAKESIDE.jpg (file://\your_machine3dsmax6mapsbackgroundsLAKESIDE.jpg)"
- this will work on any computer on your network as long as the "your_machine" is accessible on your network.

But if that's not the case... the 3 libraries are the only ones I know that you could get materials from...
yet I think that when max reports a missing map file, it will only get this information based on the sceneMaterials library...

and if you have problems with missing maps, there's a very usefull function in the help file called "enumerateFiles"... and it has a sample of listing everything, missing and non-missing.

hope this helps :D

02 February 2006, 07:35 AM
Hi EverZen !

Like Galagast said, i use a code available in the maxscript reference in EnumerateFiles.
It take all map even map in material not applied on an object.

Hope that help you. :thumbsup:

CGTalk Moderation
02 February 2006, 07:35 AM
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.