It is possible to recompile OSL shaders quickly by updating the renderview. Is there a similar function for C++ shaders? Any way to reload the DLL without relaunching Maya? I have tried writing a script to unload and reload the entire mtoa.mll plugin while keeping Maya running, but haven't had success getting it to work without crashing Maya. Right now, the best workflow seems to be to kick out an ASS from my Maya test scene and run it with Kick, which is a little faster than reopening Maya every time, though it is a bit more cumbersome and loses some flexibility.
Solved! Go to Solution.
Solved by maxtarpini. Go to Solution.
It's not cumbersome and you really don't lose any flexibility but really the opposite.
Would you mind expanding on that? With Maya, I can easily relink things in the Hypershade, change my scene to test the shader in different lighting or conditions, and review updates to metadata and template files. What are the advantages to working with Kick directly, other than iteration speed?
You have probably to break shader dev down in two steps. First step is when you really code and probably debug your shaders. And for that a CLI (kick+ass scenes) is all you need really. Second step is when you make it usable in the DCC (UI etc.). Of course in the latter step it may be cool to not have to reload maya over and over again but that's the way it goes.
I mean what can be better than this workflow 🙂 You have your code editor, your ass scene and your terminal. start your rendering with [-ipr m] and you get a minimal interactive mode. if you need to change some simple value and shader graph connection, - it's super easy to do it directly in the ass file, same goes for renderer settings. here some ref for kick rendering: https://support.solidangle.com/pages/viewpage.action?pageId=36110428
btw, just discovered that in linux (ubuntu here) if you fully stop arnold (ie. start a new arnold session with the maya render view and then stop it) you can compile your lib and arnold will just pick it up without having to restart maya 🙂 (just the 'code' I mean not anything related to UI etc).
Very cool, I'll have to test if it picks up DLL changes in Windows doing that sometime.
I see it hard on win because it kinda locks the dll on maya/arnoldplugin startup .. I can't even compile it until I haven't quit maya.