By Robert Galanakis
Unleash the facility of Python in Maya and unencumber your creativity
About This Book
- Create and customise UIs utilizing commonplace instruments and libraries
- Understand how Maya can leverage complicated Python features
- Make your instruments, and Maya itself, totally automatable
Who This e-book Is For
If you're a developer trying to construct a strong procedure utilizing Python and Maya's features, then this booklet is for you. functional Maya Programming with Python is ideal for intermediate clients with easy adventure in Python and Maya who are looking to greater their wisdom and skills.
What you'll Learn
- Understand the structure of Python gadgets, Maya nodes, and PyMEL
- Write composable code that's modular and re-usable
- Make Maya "Pythonic" by utilizing decorators and context managers
- Learn approximately various Maya UI strategies and libraries
- Use PySide and PyQt to construct Maya consumer interfaces
- Turn Maya right into a server that may be managed remotely
- Understand tips on how to use Python with Maya's API
- Conquer customized nodes utilizing Python's dynamic variety creation
Autodesk Maya is a 3D special effects software program. It bargains an enormous and versatile set of gains using Python. it's not tricky to start utilizing Python in Autodesk Maya, however it should be tricky to head from writing procedural, MEL-inspired instruments to development the robust but basic platforms that Python promises.
Practical Maya Programming with Python may help you grasp either Python and Maya. With thorough causes, illustrative examples, and entire pattern tasks, you are going to how to use Python to allure Maya into obeying your each command. useful Maya Programming with Python will educate you the way PyMEL works in addition to how you can care for mistakes and write composable code in Python.
Read Online or Download Practical Maya Programming with Python PDF
Similar Computer Science books
Programming vastly Parallel Processors discusses easy strategies approximately parallel programming and GPU structure. ""Massively parallel"" refers back to the use of a giant variety of processors to accomplish a collection of computations in a coordinated parallel means. The booklet information a variety of recommendations for developing parallel courses.
No country – particularly the U.S. – has a coherent technical and architectural technique for fighting cyber assault from crippling crucial serious infrastructure prone. This booklet initiates an clever nationwide (and foreign) discussion among the overall technical group round right equipment for lowering nationwide possibility.
Cloud Computing: thought and perform presents scholars and IT execs with an in-depth research of the cloud from the floor up. starting with a dialogue of parallel computing and architectures and dispensed structures, the booklet turns to modern cloud infrastructures, how they're being deployed at major businesses equivalent to Amazon, Google and Apple, and the way they are often utilized in fields corresponding to healthcare, banking and technological know-how.
Platform Ecosystems is a hands-on consultant that gives a whole roadmap for designing and orchestrating shiny software program platform ecosystems. in contrast to software program items which are controlled, the evolution of ecosystems and their myriad contributors has to be orchestrated via a considerate alignment of structure and governance.
Extra info for Practical Maya Programming with Python
Four. attempt to get the __name__ characteristic, assuming obj is a module. there is a chance obj has a __name__ and no __module__ yet isn't a module. we are going to forget about this probability (see the part Code isn't whole later during this chapter). five. If obj doesn't have a __name__, hand over, and go back None. 6. If we do locate what we expect is a module identify, go back real if it starts with the string "pymel" and fake if not. we do not have to try out this functionality at once. we will be able to simply upload one other try to our current try out functionality. the hot assessments are in highlighted within the following code. def testpyto_helpstr(): def dotest(obj, ideal): consequence = pyto_helpstr(obj) assert end result == excellent, '%s ! = %s' % (result, perfect) dotest('maya rocks', 'search. html? q=maya+rocks') dotest(pmc. nodetypes, 'generated/pymel. middle. nodetypes. html' '#module-pymel. middle. nodetypes') dotest(pmc. nodetypes. Joint, 'generated/classes/pymel. middle. nodetypes/' 'pymel. middle. nodetypes. Joint. html' '#pymel. middle. nodetypes. Joint') dotest(pmc. nodetypes. Joint(), 'generated/classes/pymel. center. nodetypes/' 'pymel. middle. nodetypes. Joint. html' '#pymel. middle. nodetypes. Joint') dotest(pmc. nodetypes. Joint(). getTranslation, 'generated/classes/pymel. center. nodetypes/' 'pymel. center. nodetypes. Joint. html' '#pymel. middle. nodetypes. Joint. getTranslation') dotest(pmc. joint, 'generated/functions/pymel. center. animation/' 'pymel. center. animation. joint. html' '#pymel. center. animation. joint') dotest(object(), None) dotest(10, None) dotest(, None) dotest(sys, None) Reload minspect and run the try out functionality. the 1st new try out may still fail. Let's move in and edit our code in minspect. py so as to add aid for non-PyMEL gadgets. The alterations are highlighted. def pyto_helpstr(obj): if isinstance(obj, basestring): go back 'search. html? q=%s' % (obj. replace(' ', '+')) if now not ispymel(obj): go back None if isinstance(obj, kinds. ModuleType): go back ('generated/%(module)s. html#module-%(module)s' % dict(module=obj. __name__)) if isinstance(obj, kinds. MethodType): go back ('generated/classes/%(module)s/' '%(module)s. %(typename)s. html' '#%(module)s. %(typename)s. %(methname)s' % dict( module=obj. __module__, typename=obj. im_class. __name__, methname=obj. __name__)) if isinstance(obj, varieties. FunctionType): go back ('generated/functions/%(module)s/' '%(module)s. %(funcname)s. html' '#%(module)s. %(funcname)s' % dict( module=obj. __module__, funcname=obj. __name__)) if no longer isinstance(obj, type): obj = type(obj) go back ('generated/classes/%(module)s/' '%(module)s. %(typename)s. html' '#%(module)s. %(typename)s' % dict( module=obj. __module__, typename=obj. __name__)) it will be significant that the ispymel payment comes early so we do not attempt to generate PyMEL URLs for non-PyMEL items. we have a comparatively entire functionality we will be able to be happy with. Reload and run your checks to make sure every thing now passes. Designing with EAFP as opposed to LBYL In ispymel, we used a try/except assertion instead of fee if an item has an characteristic. This development is named more straightforward to invite for Forgiveness than Permission (EAFP). by contrast, checking issues prior to time is termed glance prior to You bounce (LBYL).