[Closed] strip map paths
I’m looking for a script that will just strip out all the map paths in my scene at once. Not clean out the material and delete the maps, just strip the map path.
We changed the name of our server and now all of our old archived max scenes take FOREVER to search for the maps. Need an easy way to update them. Thanks for any help guys.
http://www.scriptspot.com/3ds-max/relink-bitmaps
This won’t strip them, but if you just disconnect the network drive, and open the file so they all go missing, then you can use this script to relink them to a new server.
Coding of the top of my head here, but you can give this a try:
bitmapArray = FOR map in (getClassInstances bitmapTexture target:sceneMaterials) DO map.filename = ""
That should remove the actual path leaving the rest of the material untouched, including the bitmapTexture map itself. Make sure you run the line right after loading the scene as the sceneMaterials variable can be a bit tricky to work with otherwise.
hey thinks for the bit of code. Is there anyway to strip paths out of a scene without opening it>?
I doubt it very much.
You could however modify the script so that it would run automatically on a bunch of files one after the other… it wouldn’t make it faster but you could go watch a movie or something in the meantime instead of manually doing it for ever file…
Or maybe there is a way of keeping max for automatically looking for the bitmaps…that I wouldn’t know…
I don’t think you want to strip them of their entire filename…because there will be no way of getting the map names back…
if you want to strip them preserving filenames this will work
(
for map in (getClassInstances BitmapTexture) do (
if (isProperty map #filename) then (
newFilename = filenameFromPath map.filename
map.filename = newFilename
)
)
)
As far as getting the files open, you may want to hook any ol’ box to the network with the old server name… Max will resolve the unc path and fail alot faster…
Or you could place an entry in the HOSTS file to 127.0.0.1
Or what I do frequently, just disconnect your lan connection (in network settings) for a short period…
-Johan