Hi everyone, I was wondering if someone could help me.
I'm working on a maxscript and I need to create an OSL Float1ofN map with more than the default amount of layers.
Having my node called as mapOSL, I can set the amount of layers using mapOSL.layers = 10 for example, however it won't update. I noticed that if I go to the OSL interface and click on the delete or add inputs, it will update, adding the extra layers. So, anyone knows how to make the map to update without having to access to the interface?
Thank you!
Solved! Go to Solution.
Solved by Swordslayer. Go to Solution.
Yeah, this is not a nice convenient texturemap, how that works right now is that a source code of the osl shader is read, then you search for //====LAYER-BEGIN==== and //====LAYER-END==== comments and edit what's in-between (as well as the value of the Layers parameter), and replace the original osl source code with the edited one (you might have noticed that when you click the button to add/delete, the original osl file is unlinked and marked as 'modified - stored in scene'). So you should do the same thing, read the source code, edit it and put it back to the map.OSLCode.
Thank you Vojtěch, I was thinking that that would be the only option, because I started modifying the code on the run, finding the layer amount, but then I noticed the layers begin and end so I thought that just changing the layer amount won't be enough. It would be nice to have access to the add button (but you can only access to it to change button's name) and I guess press it the number of times you need.
Thanks again for your help.
Can't find what you're looking for? Ask the community or share your knowledge.