ENGLISH

Maya Python for Games and Film: A Complete Reference for Maya Python and the Maya Python API

Book information

Publisher
CRC Press
Year
2011
ISBN
0123785782, 9780123785787
Language
english
Format
PDF
Filesize
8 MB (8611227 bytes)
Edition
1
Pages
381\382
Time added
2022-05-03 11:22:56

Description

Maya Python for Games and Film is the first book to focus exclusively on how to implement Python with Maya. Written by trusted authorities in the field, this in-depth guide will help you master Maya Python, whether you're a seasoned technical artist looking to make the transition from MEL to Python or an aspiring artist not wanting to scramble for information. 1 Maya Command Engine and User Interface Interacting with Maya Maya Embedded Language Python C++ Application Programming Interface Python API Executing Python in Maya Command Line Script Editor Maya Shelf Maya Commands and the Dependency Graph Introduction to Python Commands Flag Arguments and Python Core Object Types Numbers Strings Lists Tuples Booleans Flag = Object Type Command Modes and Command Arguments Create Mode Edit Mode Query Mode Python Command Reference Synopsis Return Value Related Flags Python Examples Python Version Python Online Documentation Concluding Remarks 2 Python Data Basics Variables and Data Variables in MEL Keywords Python’s Data Model Mutability Reference Counting del The None Type Using Variables with Maya Commands Capturing Results getAttr and setAttr Compound Attributes connectAttr and disconnectAttr Working with Numbers Number Types Basic Operators Working with Booleans Boolean and Bitwise Operators Working with Sequence Types Operators Concatenation Indexing and Slicing String Types Escape Sequences and Multiline Strings Raw Strings Unicode Strings Formatting Strings More on Lists del Nested Lists Other Container Types Sets Operators Dictionaries Operators Dictionaries in Practice Concluding Remarks 3 Writing Python Programs in Maya Creating Python Functions Anatomy of a Function Definition Function Arguments Default Arguments Keyword Arguments Variable-Length Argument Lists with the * Operator Variable-Length Keyword Argument Lists with the ** Operator Return Values Maya Commands Listing and Selecting Nodes The file Command Adding Attributes Iteration and Branching The for Statement range Branching if, elif, and else Using Comparison Operations Emulating Switches continue and break List Comprehensions The while Statement Error Trapping try, except, raise, and finally Designing Practical Tools Concluding Remarks 4 Modules What Is a Module? Modules and Scope Module Encapsulation and Attributes The __main__ Module Creating a Module The spike Module Default Attributes and help Packages create.py math.py __init__.py Importing Modules import versus reload The as Keyword The from Keyword Attribute Naming Conventions and the from Keyword Python Path sys.path Temporarily Adding a Path userSetup Scripts userSetup.py userSetup.mel sitecustomize Module sitecustomize.py Setting Up a PYTHONPATH Environment Variable Maya-Specific Environment Variables with Maya.env Systemwide Environment Variables and Advanced Setups Windows OS X Using a Python IDE Downloading an IDE Wing IDE Eclipse Basic IDE Configuration Views Selecting an Interpreter Automatic Code Completion Projects Connecting to Maya Debugging Concluding Remarks 5 Object-Oriented Programming in Maya Object-Oriented versus Procedural Programming Basics of Class Implementation in Python Instantiation Attributes Data Attributes Methods __str__ __repr__ Properties Class Attributes Static Methods and Class Methods Human Class Inheritance Procedural versus Object-Oriented Programming in Maya Installing PyMEL Introduction to PyMEL PyNodes PyMEL Features Advantages and Disadvantages A PyMEL Example Concluding Remarks 6 Principles of Maya Tool Design Tips When Designing for Users Communication and Observation Ready, Set, Plan! Simplify and Educate Tools in Maya Selection Marking Menus Options Windows Concluding Remarks 7 Basic Tools with Maya Commands Maya Commands and the Maya GUI Basic GUI Commands Windows Building a Base Window Class Menus and Menu Items Executing Commands with GUI Objects Passing a Function Pointer Passing a String Using the functools Module Layouts and Controls Basic Layouts and Buttons Form Layouts Complete AR_OptionsWindow Class Extending GUI Classes Radio Button Groups Frame Layouts and Float Field Groups Color Pickers Creating More Advanced Tools Pose Manager Window Separating Form and Function Serializing Data with the cPickle Module Working with File Dialogs Concluding Remarks 8 Advanced Graphical User Interfaces with Qt Qt and Maya Docking Windows Installing Qt Tools The Qt SDK Qt Designer Widgets Signals and Slots Qt Designer Hands On Loading a Qt GUI in Maya The loadUI command Accessing Values on Controls Mapping Widgets with Signals and Slots PyQt Installing PyQt Using PyQt in Maya 2011+ Using PyQt in Earlier Versions of Maya Concluding Remarks 9 Understanding C++ and the API Documentation Advanced Topics in Object-Oriented Programming Inheritance Virtual Functions and Polymorphism Structure of the Maya API Introducing Maya’s Core Object Class: MObject Manipulating MObjects Using Function Sets How Python Communicates with the Maya API How to Read the API Documentation Key Differences between the Python and C++ APIs MString and MStringArray MStatus Void* Pointers Proxy Classes and Object Ownership Commands with Arguments Undo MScriptUtil Concluding Remarks 10 Programming a Command Loading Scripted Plug-ins Anatomy of a Scripted Command OpenMayaMPx Module Command Class Definition doIt Command Creator Initialization and Uninitialization Adding Custom Syntax Mapping Rotation Orders Class Definition Syntax Creator Flag Arguments Command Objects Initialization of Syntax doIt Object Validation Storing Flag Arguments doItQuery Maya’s Undo/Redo Mechanism Supporting Multiple Command Modes and Undo/Redo Undo and Redo MDGModifier Command Modes Syntax Creator __init__ Initializing for isUndoable Other Data Attributes doIt Object Validation Selecting Query Mode Selecting Edit or Create Mode redoIt Creating New Nodes Editing the Transform Node undoIt Concluding Remarks 11 Data Flow in Maya Dependency Graph Dependency Nodes Attributes Plugs Data Blocks compute Data Handles Attributes and Data Flow Connections Lazy Evaluation and Push–Pull Triggering DG Evaluation Debugging the Dependency Graph Heat Map Display The dgTimer Command Directed Acyclic Graph DAG Paths and Instancing The Underworld Concluding Remarks 12 Programming a Dependency Node Anatomy of a Scripted Node The ar_averageDoubles Node Node Class Definition Node Creator Node Initializer compute Best Practices Initialization and Uninitialization Attributes and Plugs Attribute Properties Readable, Writable, and Connectable Storable Attributes and Default Values Cached Attributes Working with Arrays Logical and Physical Indices Implementing Plug Arrays Implementing Array Plugs Compound Attributes Concluding Remarks Maya Python for Games and Film: A Complete Reference for Maya Python and the Maya Python API Copyright Acknowledgments Introduction: Welcome to Maya Python Python versus MEL Companion Web Site Notes on Code Examples and Syntax Whitespace Line Breaks Our Approach Quotation Marks Comments Python Hands On Index A B C D E F G H I J K L M N O P Q R S T U V W

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF