By Robert Galanakis
Unleash the ability of Python in Maya and liberate your creativity
About This Book
- Create and customise UIs utilizing normal instruments and libraries
- Understand how Maya can leverage complicated Python features
- Make your instruments, and Maya itself, absolutely automatable
Who This booklet Is For
If you're a developer seeking to construct a strong approach utilizing Python and Maya's features, then this ebook is for you. functional Maya Programming with Python is ideal for intermediate clients with simple event in Python and Maya who are looking to higher 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 diverse Maya UI recommendations and libraries
- Use PySide and PyQt to construct Maya consumer interfaces
- Turn Maya right into a server that may be managed remotely
- Understand find out how to use Python with Maya's API
- Conquer customized nodes utilizing Python's dynamic sort creation
Autodesk Maya is a 3D special effects software program. It bargains an unlimited and versatile set of beneficial properties using Python. it isn't tricky to start utilizing Python in Autodesk Maya, however it may be tricky to head from writing procedural, MEL-inspired instruments to development the robust but easy structures that Python promises.
Practical Maya Programming with Python can assist you grasp either Python and Maya. With thorough causes, illustrative examples, and whole pattern tasks, you are going to easy methods to use Python to allure Maya into obeying your each command. sensible Maya Programming with Python will train you the way PyMEL works in addition to the best way to care for mistakes and write composable code in Python.
Read or Download Practical Maya Programming with Python PDF
Best Computer Science books
Programming vastly Parallel Processors discusses uncomplicated innovations approximately parallel programming and GPU structure. ""Massively parallel"" refers back to the use of a big variety of processors to accomplish a collection of computations in a coordinated parallel approach. The ebook information a variety of recommendations for developing parallel courses.
"TCP/IP sockets in C# is a superb booklet for someone drawn to writing community functions utilizing Microsoft . internet frameworks. it's a detailed mix of good written concise textual content and wealthy conscientiously chosen set of operating examples. For the newbie of community programming, it is a solid beginning e-book; nevertheless execs make the most of first-class convenient pattern code snippets and fabric on themes like message parsing and asynchronous programming.
The rising box of community technological know-how represents a brand new form of study which may unify such traditionally-diverse fields as sociology, economics, physics, biology, and computing device technology. it's a strong software in interpreting either ordinary and man-made platforms, utilizing the relationships among avid gamers inside those networks and among the networks themselves to achieve perception into the character of every box.
The recent ARM variation of desktop association and layout contains a subset of the ARMv8-A structure, that's used to offer the basics of applied sciences, meeting language, desktop mathematics, pipelining, reminiscence hierarchies, and I/O. With the post-PC period now upon us, desktop association and layout strikes ahead to discover this generational switch with examples, workouts, and fabric highlighting the emergence of cellular computing and the Cloud.
Extra resources for Practical Maya Programming with Python
Animation. joint') dotest(object(), None) dotest(10, None) dotest(, None) dotest(sys, None) Reload minspect and run the attempt functionality. the 1st new attempt should still fail. Let's pass in and edit our code in minspect. py so as to add aid for non-PyMEL items. 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, forms. 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 money comes early so we do not try and generate PyMEL URLs for non-PyMEL items. we've a comparatively whole functionality we will be able to be pleased with. Reload and run your checks to make sure every little thing now passes. Designing with EAFP as opposed to LBYL In ispymel, we used a try/except assertion instead of cost if an item has an characteristic. This trend is named more uncomplicated to invite for Forgiveness than Permission (EAFP). against this, checking issues prior to time is termed glance prior to You jump (LBYL). the previous is taken into account even more Pythonic and usually ends up in shorter and extra powerful code. ponder the diversities among the next 3 ways of writing the second one try/except contained in the ispymel functionality. # model 1 >>> module = None >>> if isinstance(obj, forms. ModuleType): ... module = obj. __name__ # model 2 >>> module = None >>> if hasattr(obj, '__name__'): ... module = obj. __name__ # model three >>> module = getattr(obj, '__name__', None) # model four >>> attempt: ... module = obj. __name__ ... other than AttributeError: ... module = None model 1 is punctiliously LBYL and will as a rule be shunned. we're drawn to the __name__ characteristic, now not even if obj is a module or no longer, so we must always search for or entry the characteristic rather than checking the sort. models 2 and three are utilizing LBYL via checking for the __name__ characteristic yet will be an development over model 1 because they aren't checking the kind. those models are in regards to the related, with model three being extra concise. model four is totally EAFP. Use the fashion of code that ends up in the main readable outcome, yet err at the facet of EAFP. there's even more to the controversy, and we will be seeing extra situations of EAFP as opposed to LBYL all through this e-book. Code is rarely whole be aware that the code during this bankruptcy will not be whole. As Donald Knuth stated: watch out for insects within the above code; i've got basically proved it right, now not attempted it.