Hey everyone,
So I've seen it happening everywhere, the good old:
import maya.mel as mel
mel.eval("vray addAttributesFromGroup \"" + shape + "\" vray_subdivision 1")
Even though it is possible to do:
import maya.cmds as mc
mc.vray("addAttributesFromGroup", shape, "vray_subdivision", 1)
Is there a particular reason why everyone is using mel.eval() or isn't anybody in the industry aware that this was possible? ;)
I've seen it happen so many times that I wanted to spread the word, actually I'm starting here!
Of course I'm hoping that someone corrects me if there's a particular reason that everyone kept with mel.eval().
In the meantime I've been building a repository and wiki to accompany the v-ray for maya commands.
It's still a quick draft containing only a brief overview and short code snippets, so you should consider it a work-in-progress!
Here is the repository:
https://github.com/BigRoy/mayaVrayCommandDocsThis is the wiki:
https://github.com/BigRoy/mayaVrayCommandDocs/wikiAnd here's my addAttributesFromGroup documentation for now:
https://github.com/BigRoy/mayaVrayCommandDocs/wiki/vray-addAttributesFromGroupTips are welcome and I hope it could even become a community effort to work on some clear instructions/documentation for working with V-ray for Maya through code.
Because Chaosgroup is really leaving the documentation out for the functions. :(
There's also a v-ray framebuffer fix script in the repository. Maybe useful for those people that still have it happening from time to time.Hope you learned something here.
-Roy Nieterau