[Closed] Change User Path for textures
Hi everyone,
i’m looking for a solution to change User path of a 3dsMax file automatically.
We got a big production and we sent some works to freelances to help us. Then we took back their work to render it and here’s the problem… All the maps for textures are located on the freelance’s drives so we got to change the path file by file here… and we got lot of files
If someone has a solution, thanks thanks thanks
See ya
Orlenka
–change all the file paths to the selected dir
new_dir = getSavePath()
if ((new_dir != undefined) and (new_dir != “”)) do
(
mat_t = getClassInstances bitmaptexture
for mu in mat_t do
(
fis = getFilenameFile (mu.filename)
fis += getFilenameType (mu.filename)
mu.filename = (new_dir + fis)
)
)
there’s a great script you can get from scriptspot called Relink Bitmaps where you choose a directory and it will search recursively for the missing bitmaps and then ‘relink’ them. Works great and has a UI that shows you the missing maps so you know if there are still any missing after it has completed its search, at that point you could just choose another directory and have it serach there! Here’s the link: http://www.scriptspot.com/3ds-max/relink-bitmaps
thanks…
I won’t lie i’m new to maxscript. Can we launch those kind of script at the startup of the 3dsMax, like putting it in the max.ini or something else?
Thanks for the plug Gravey, if you have any question about running the Relink Bitmaps script please ask here, I’m lurking.
-Colin
Yes, you can add callbacks which run your scripts when you open a file. Look in reference for “callbacks”, they are explained really well.
thanks guys ! i give it a try to all your tips. I certainly come back with more questions:)
Adding a callback seems unnecessary for everytime you open a file.
Personally, most of my files don’t have missing bitmaps and when they do it’s as easy as clicking a button I created to the relink-bitmaps script.
Maxscript->open script->Relink Bitmaps v1.08.ms->CTRL-A->(click and drag the contents of the script to an empty space on your interface) and now you have a button to run the script when you like.
-Colin
Just as a thought, I’ve written scripts that open up a file, alters it saves it, closes it then moves onto the next until all the files in a list or directory have been altered accordingly. Let me know if you’d like to try that approach I can certainly help.
Dan
hi dmak !
yes your approach seems really interesting! we got a lot of files to open and modify and re-save them in other directory. We would like to make it automatically to earn time in our production. If you have some ideas they’re welcomed
Thanks guys