- Practical Maya Programming with Python
- Robert Galanakis
- 177字
- 2021-09-03 10:05:26
Summary
In this chapter, we learned how to write composable code. We saw examples of non-composable MEL style code, such as Maya's listing functions. We learned how to turn this legacy code into clean, composable functions, such as head
, tail
, first_or_default
, and is_exact_type
. We created a reusable library for converting a hierarchy of transforms into joints. We used that library for a configurable character creator module that can easily be called through a UI. Along the way, we learned about list comprehensions, contracts, selecting and filtering, closures, refactoring, docstrings, and improving PyMEL performance.
Writing composable code, and the topics in this chapter, are the foundation for a successful and enjoyable experience programming Python in general, and Python in Maya particularly. This is the way of the Pythonista.
Unfortunately, despite the composability of our functions, the care and craft of our projects, the documentation we provide, and no matter how Pythonic our code is, there will be problems. Mistakes will be made. Edge cases exploited. Bugs found. Dealing with these errors is the topic of the next chapter.
- Learn ECMAScript(Second Edition)
- 實用防銹油配方與制備200例
- Apache Spark Graph Processing
- Python應用輕松入門
- 組態軟件技術與應用
- Learning JavaScript Data Structures and Algorithms
- PySpark Cookbook
- 機器學習與R語言實戰
- Multithreading in C# 5.0 Cookbook
- C#開發案例精粹
- Java編程從入門到精通
- Orchestrating Docker
- JavaScript從入門到精通(視頻實戰版)
- Mastering Bootstrap 4
- 青少年Python趣味編程