2017-03-03

Python in Maya #2: functional programming

Functional programming in Maya, with good and bad examples
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)

2 comments:

  1. Explicitly stating the constant is much much better for code readability.

    connectAttributes = ['tx', 'ty', 'tz', 'rx', 'ry', 'rz', 'sx', 'sy', 'sz', 'ro']
    for attribute in connectAttributes:
    ...

    Have constants defined if you use this more often.

    ReplyDelete
    Replies
    1. Thanks for the note. I'll update the post with a better example.

      Delete