By p3tamaxwell
I understand what you are saying.

I know Maya can find a texture if it is either located in the default "source images" directory or if the texture is in the same directory as the Maya file. How does it know to strip out all the front string?

In other words if I make a shader in Maya and link a texture to it using my hard drive and save. Then you take my Maya file and copy the textures associated with it to your "source images" directory on your hard drive... Maya has no problem finding the texture even though the path to it may be different.

Is it different because its built into the software and not a script?

Anyway I still love this tool... as I mentioned I am just lazy and want Maya to find the textures itself?

Thanks again for sharing your skills with the rest of us

User avatar
By deadalvs
well, the only really important point why i wanted this script is because i do not have all my textures in the maya sourceimages folder. i have them spread on different folders for each individual material.


so if i want to open a maya scene from a pc on a mac, maya has no chance to find the textures at all because they are not in the sourceimages folder.

this is where the script comes handy with the saved path...
By p3tamaxwell
Yeah I am the same... mine alos are spread out. The annoying thing is even if you do put all the Maxwell materials into the source images folder Maya still won't find them... (which is why your script is so bloody good)

Keep up the great work.

User avatar
By deadalvs
again the plain text cos my script server does not exist anymore...
if (`window -exists "PathWindow"` == 1){deleteUI "PathWindow";}

window -title "PathWindow" -mnb 0 -mxb 0 PathWindow;
columnLayout -adjustableColumn 1;
setParent ..;
setParent ..;

frameLayout -label "INFO AND USE" -cll true -collapse 1;
text -l "Texture Path Prefix Correcting";
text -l "scripted by deadalvs, feb 07";
text -l "";
text -l "1) input old drive name";
text -l "2) input new drive name";
text -l "3) all pahts are rewritten and";
text -l "the textures reloaded from there";
text -l "";
text -l "example";
text -l "old: T:/";
text -l "new: //volumes/user/";
setParent ..;
setParent ..;

frameLayout -label "DATA" -cll true -collapse 0;
text -l "scripted by deadalvs, jan 07";
text -l "";
text -l "IMPORTANT...";
text -l "exchange all \\ for / !!";
text -l "old Prefix";
textField -w 300 oldPrefix;
text -l "new Prefix";
textField -w 300 newPrefix;
text -l "";
button -label "RELOAD" -command "changePaths()";
setParent ..;
setParent ..;

showWindow PathWindow;

global proc changePaths()

string $fileNodes[] = `ls "file*"`;
string $oldPath;
string $oldPrefix = `textField -q -tx oldPrefix`;
string $newPrefix = `textField -q -tx newPrefix`;
for ($n=0; $n<size($fileNodes);$n++)

$oldPath = eval ("getAttr " + $fileNodes[$n] + ".fileTextureName;");
string $newPath = `substitute $oldPrefix $oldPath $newPrefix`;
string $command = $fileNodes[$n] + ".fileTextureName";
AEassignTextureCB $command $newPath "image";
By keithg
Does this script fix the problem where Maya doesn't see the file path for imported MXM material files into Maya?
User avatar
By deadalvs
i am not sure if i understand perfectly ...

this script can:
exchange the prefix of a file path.

for example if You move all Your textures to an other drive, all references would have to be done manually...

or similar.

if maya can not find a texture link from the .mxm itself (the process of READING the data inside the .mxm file) this script can not help. but that should not be a problem...
it «only» reloads all textures from a specific drive/folder.

or ... what could be the problem ?
Caustic render channels

Hello, Is it possible to have a pass with only th[…]

First Maxwell render for some time!

Hi, A just for fun project to model and render th[…]

Hi everyone, has anybody found a way to use and e[…]

Modeling from spline

Thanks - I came across the same thing myself recen[…]