Dynamic texture path


(I am using maya 2016 & Arnold)

Instead of setting explicit paths to textures, I am interested in the ability to set a dynamic path that depends upon a variable.

What I had in mind was something like the ‘render token’ you can use when setting the ‘file name prefix’ in the Render Settings.


So instead of making explicit connections to textures, they could be dynamic and depend upon a variable (?).

This way you could use generic shaders on lots of different objects, but the textures would be specific to each object.

So if you had a leather shader you could apply it to some shoes, a jacket and a belt.
The texture path would something like this
The textures directories would have to arranged like this

Hope this makes sense, I would very much appreciate the help!

Many thanks,