Practical Maya Programming with Python unleash the power of Python in Maya and unlock your creativity

""Practical Maya Programming with Python"" is a practical tutorial packed with plenty of examples and sample projects which guides you through building reusable, independent modules and handling unexpected errors. If you are a developer looking to build a powerful system using Py...

Descripción completa

Detalles Bibliográficos
Otros Autores: Galanakis, Robert, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : [Packt] Publishing 2014.
Edición:1st edition
Colección:Community experience distilled.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629411306719
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Introspecting Maya, Python, and PyMEL; Creating your library; Using the interpreter; Finding a place for our library; Choosing a development root; Creating a function in your IDE; Reloading code changes; Exploring Maya and PyMEL; Creating an introspection function; Understanding Python and MEL types; Using the method resolution order; PyNodes all the way down; Understanding PyMEL data and math types; Leveraging the REPL; Building the pmhelp function
  • Creating a query string for a PyMEL objectCreating more tests; Adding support for modules; Adding support for types; Adding support for methods; Adding support for functions; Adding support for non-PyMEL objects; Designing with EAFP versus LBYL; Code is never complete; Opening help in a web browser; Summary; Chapter 2: Writing Composable Code; Defining composability; Identifying anti-patterns of composability; Avoiding the use of Boolean flags; Evolving legacy code into composable code; Rewriting code for composability; Getting the first Item in a sequence; Writing head and tail functions
  • Learning to use list comprehensionsImplementing is_exact_type; Saying goodbye to map and filter; Writing a skeleton converter library; Writing the docstring and pseudocode; Understanding docstrings and reStructured Text; Writing the first implementation; Breaking the first implementation; Understanding interface contracts; Extracting the safe_setparent utility function; Learning how to refactor; Simplifying the node to joint conversion; Learning how to use closures; Dealing with node connections; Dealing with namespaces; Wrapping up the skeleton converter; Writing a character creator
  • Stubbing out the character creatorImplementing convert_hierarchies_main; Implementing convert_hierarchies; Decomposing into composable functions; Implementing convert_hierarchy; Supporting inevitable modifications; Improving the performance of PyMEL; Defining performance; Refactoring for performance; Rewriting inner loops to use maya.cmds; Summary; Chapter 3: Dealing with Errors; Understanding exceptions; Introducing exception types; Explaining try/catch/finally flow control; Explaining traceback objects; Explaining the exc_info tuple; Living with unhandled exceptions
  • Handling exceptions at the application levelGolden rules of error handling; Focus on the critical path; Keep the end user in mind; Only catch errors you can handle; Avoid partial mutations; Practical error handling in Maya; Dealing with expensive and mutable state; Leveraging undo blocks; Dealing with Maya's poor exception design; Leveraging the Maya application; Dealing with the Maya application; Leveraging Python, which is better than MEL; Building a high-level error handler; Understanding sys.excepthook; Using sys.excepthook in Maya; Creating an error handler; Improving the error handler
  • Inspecting Python code objects