Hi. Is there a way in maya to automatically switch file image name suffixes or prefixes depending on situation.
Say, I have the few file nodes connected to a shader: for roughness, albedo, height, normal etc. The files themselves have their own naming convention: brick_height, brick_albedo, brick_roughness etc.
It could be usefull to change only one texture at a time, when the other file nodes take common part of filepath and replace only one particular part of it.
Leave “C:\textures\bricks\brick_***.exr” and change only symbols in *** part with a _albedo,_roughness etc.
I have simple expression
string $A=`getAttr -x file1.ftn`;
string $Disp = `substitute "Albedo" $A "Displacement"`;
setAttr -type "string" file.fileTextureName $Disp;
But the last line evaluating only once, I need some condiition when it happens everytime I change Albedo texture in particular filenode.
For the record. I’ve seen few recomendations to use File texture manager or built-in File path editor, but it’s not what I need, and that is why…
In FTM I need more operations to make changes even for one texture set.
- launch FTM
- press analyze
- chose particular texture checkbox
- set new target directory.
- manually copy and paste Old String
- manually copy and paste New String
- press set path
But I need an automation to change the whole texture set by replacing the only one path in single filenode.
Thanks!