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

By: Galanakis, RobertContributor(s): Three-dimensional display systemsMaterial type: TextTextPublication details: Mumbai : Shroff Publishers 2014Description: viii, 334 pages : illustrationsISBN: 9781849694735; 9789351107620Subject(s): Maya (Computer file) | Computer animationDDC classification: 006.6
Contents:
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.
Summary: n Detail Autodesk Maya is a 3D computer graphics software. It offers a vast and flexible set of features utilizing Python. It is not difficult to get started using Python in Autodesk Maya, but it can be difficult to go from writing procedural, MEL-inspired tools to building the powerful yet simple systems that Python promises. Practical Maya Programming with Python will help you master both Python and Maya. With thorough explanations, illustrative examples, and complete sample projects, you will learn how to use Python to charm Maya into obeying your every command. Practical Maya Programming with Python will teach you how PyMEL works as well as how to deal with errors and write composable code in Python. Approach "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. Who this book is for If you are a developer looking to build a powerful system using Python and Maya's capabilities, then this book is for you. Practical Maya Programming with Python is perfect for intermediate users with basic experience in Python and Maya who want to better their knowledge and skills.
Tags from this library: No tags from this library for this title. Log in to add tags.
Star ratings
    Average rating: 0.0 (0 votes)
Holdings
Item type Current library Collection Call number Status Date due Barcode Item holds
Reference Books Reference Books Main Library
Reference
Reference 006.6 GAL (Browse shelf(Opens below)) Available 015563
Total holds: 0

Originally published in Birming ham by Packt Publishing, 2014.

Includes index

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.

n Detail Autodesk Maya is a 3D computer graphics software. It offers a vast and flexible set of features utilizing Python. It is not difficult to get started using Python in Autodesk Maya, but it can be difficult to go from writing procedural, MEL-inspired tools to building the powerful yet simple systems that Python promises. Practical Maya Programming with Python will help you master both Python and Maya. With thorough explanations, illustrative examples, and complete sample projects, you will learn how to use Python to charm Maya into obeying your every command. Practical Maya Programming with Python will teach you how PyMEL works as well as how to deal with errors and write composable code in Python. Approach "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. Who this book is for If you are a developer looking to build a powerful system using Python and Maya's capabilities, then this book is for you. Practical Maya Programming with Python is perfect for intermediate users with basic experience in Python and Maya who want to better their knowledge and skills.

There are no comments on this title.

to post a comment.

© University of Vavuniya

---