So I’ve built a nice, shiny selector for my character rig, and everything works perfectly - except for one little detail. The selector code doesn’t survive a restart of Maya. That’s because when you restart Maya, it clears out all of the code that you’ve run from memory. I decided the best way to get it to work is to use a script node. I only want it for this one scene, and I only need for it to run once on loading the file.
The code runs perfectly if I copy-paste it into the script editor. However, if I put it into a script node that gets saved with the file, it starts giving me syntax errors. Now, my company doesn’t like for me to post source code, so before I do that, I want to eliminate any possible causes outside of my source code. So my questions are: does the Maya script node support Python, or is it MEL only? Do I need to do anything specific to the source code in order to get it to work? Am I going about this the wrong way altogether? I’m not married to using a script node, if I can get portable results another way (operative word being “portable”).
Thanks!