[Closed] Finding ALL materials in max file
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,
Everzen
I might be wrong, but I could only guess that your map file paths are not in UNC format…
e.g.
Local Format:
“C:\3dsmax6\maps\backgrounds\LAKESIDE.jpg”
- 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…
currentMaterialLibrary()
sceneMaterials()
meditMaterials()
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
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.