I’m reviewing a lot of code lately and I’ve seen a lot of different styles of using the cmds
module. In particular, I find a lot of clutter in the commands that need to combine object names and attribute names. I’m curious to know what style feels most natural or readable to other TA’s (ignore, for the time being how to make things read like this and concentrate on what you’d find easiest to understand and maintain
- cmds.setAttr(myobject + “.tx”, 10)
- cmds.setAttr("{}.tx".format(myobject), 10)
- set_attrib(myobj, “tx”, 10)
- myobject.tx = 10
0 voters
And of course chime in to discuss below…