So I’m trying to do something a bit more tricky: I have a rigged character which supports multiple texture designs (skins, clothing, etc). I want the character to be fully customizable via the armature, so I want a bone or object property to control which skin is used on an individual material. This is of course achieved by using drivers in material nodes.
Doing it using a bone is easy: Just use the position of the bone to decide how much to blend in specific textures. I even created sets of 3 bones, which control the R G and B values of nodes so hair can be colorized by posing the armature!
But I’d like to make it possible to easily use custom textures as well, rather than manually specifying a fixed set of images and having a bone control the alpha value for each. So instead I’d prefer adding a custom property on the armature object, where I specify the name of the image texture. That way anyone would be able to select the armature object, go to the Object tab, Custom Properties, and type in the name of the image they want the character to use.
So what is the problem? Well it seems that the Image Texture material node in Cycles does not allow any flexibility when it comes to defining a texture. If I right-click the Image field on this node, I do not get the Add Driver option, so that the field can automatically be set to a property. I’d need something that would allow me to feed a texture defined in a string into the shader node.
Is there any way to do this? Either with drivers, or maybe even with a simple Python script? Thank you.