Functional programming in Maya, with good and bad examples
![Maya scene for first example](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxFh71vBEy7NiFjfWqglqWqDSfhOnFjslOm8bXtlchzYB0WBtXVN9Jtg2sV2zE789rs5U4RIukUHyrVjP91S1V6b-v6NglxpPvmeYs5yOeN5bFp997PvFMhnX76o4VmTCdkoMAKndJEWU/s1600/joint_chain.jpg) |
1. Basic example |
https://github.com/parzival-roethlein/prmaya/blob/master/post/blog/python_in_maya/p2_functional_programming.py(2024-11-12 Update: Code embedding on blogger broke, switched to link)
Explicitly stating the constant is much much better for code readability.
ReplyDeleteconnectAttributes = ['tx', 'ty', 'tz', 'rx', 'ry', 'rz', 'sx', 'sy', 'sz', 'ro']
for attribute in connectAttributes:
...
Have constants defined if you use this more often.
Thanks for the note. I'll update the post with a better example.
Delete