add a filename input to the image-texture node.
Most of the nodes have some settings that can't be passed as an input, they have to be manually set. In this particular case I want the image-texture node to have an input for the filename instead of having to manually select it.
4 Comments
It sounds like what you want is already possible. You just need to use the data structures already built into Blender. You can have a file name programmatically set, but that's in the image datablock. The Image Texture node simply chooses which image datablock you want to use for that node. So, if you want to programmatically change things on the fly, you either change the associated image datablock or you create a new one with a new path.
* @Jason van Gumster * Here is example of wanting to pass a reference to a filename into a group so that multiple nodes can refer to it. I don't know how to do this accessing data-blocks as you suggested. In the programming world this is called a handle (or pointer) and is not some arcane approach. Any node with an internal setting that does not have an input for it of course has the same problem but it is particularly problematic with filenames.
This is a bit unclear. Some images or mock-ups would go a long way towards explaining the problem and describing your solution.
@Jason van Gumster: I totally changed the post and should not require any images now. I will probably get some "why would you want to do that?" comments. If you do serious node programming you will understand, otherwise you aren't likely to care. In fact, any node with settings without a corresponding input will limit a noodler. Noodling has far more math capabilities than programming abilities. (probably because shader logic is weird compared to regular programming)