I am working with Arnold 18.104.22.168 and Maya 2018. (I cannot remember what MtoA version I’m using) I am using Maya 2018 because I need to use the Shave and a Haircut plugin which is currently only released for Maya 2018 as it hasn’t been officially built for 2019 or 2020 and I’m unable to build it myself.
I believe Arnold 22.214.171.124 supports OSL but can you create a OSL shader in Maya itself and simply apply that shader like you would a AiStandardSurface shader in the Maya Hypershade by just selecting an object and applying the shader? I know that newer versions of Arnold have a AiOSL shader built in (or whatever it’s called?) where you can create a new OSL shader and write or paste in the OSL code. Does the older Arnold 5.2 support something like this? I’m trying to use PyMEL and Python to automatically create OSL shaders in a Maya scene and apply them to objects so does anyone know how can I do this using PyMEL?
Finally I’d like to also ask what Maya attribute on the mesh do I use to connect the shader using PyMEL and is it the shader/node name that I connect or something else?