Posts Tagged ‘API’

MSyntax.enableQuery() and MSyntax.enableEdit() Break Object Parsing

Tuesday, January 12th, 2010

In Maya, many built-in commands support any of three modes: create, edit, and query. Although it may not be immediately obvious, each of these modes has some particularities that set them apart, and which consequently require some extra effort on the part of the programmer to support. Maya does have some built-in support, which is presently only partially functional, so it is helpful to understand what it actually gains you to use it and work around its issues.
(more…)

AM Tools 1.01

Saturday, January 2nd, 2010

I just uploaded version 1.01 of my AM Tools Python package today, which you can of course download from the Maya tools section. You can look through the files to see all of the changes that I made, but here are some of the major highlights.

  • amInsertParents is now a Python command. I have therefore retired the old MEL version.
  • Added API Debug Mode to menu. Enabling this mode overrides some Maya Python API classes for debugging. For this release, this mode overrides the __str__() functionality of MMatrix and MVector.
  • Substantially improved a number of utility functions for validating input.
  • Added validation for custom plug-ins.
  • Fixed some language-related bugs that existed for Maya 8.5.

As always, please let me know if you have any problems or other feedback!

Problems with allNodeTypes Command

Thursday, December 31st, 2009

Oftentimes, when loading your own custom tool set, you may want to confirm the existence of a plug-in on the client machine in order to prevent weird errors. Specifically, if you create a tool that works with a custom node, you may want to verify the node’s existence using the allNodeTypes command. Unfortunately, this command has a really quirky problem when used in Python.
(more…)

Problems with MItSelectionList Filters

Monday, December 14th, 2009

One of the most common tools in the Maya API for custom commands is the MItSelectionList class. Part of the reason why it is so valuable is because it allows for an optional filter in its constructor using the MFn::Type enum. Applying a filter allows us to effectively ignore certain types of objects in which we are not interested, and conceivably to code with some amount of impunity since we know what the objects inside the iterator will be. Conceivably…
(more…)

Maya Python – The Book

Thursday, July 2nd, 2009

Well we have finally wrapped up development on Touch KO! The last few weeks have been hectic as we had some last-minute requirements sort of indirectly imposed on us by Apple, but everything is wrapped up and sent off to Chillingo.

One of my next projects is a book on the Maya Python API for Morgan Kaufmann (publisher of David Gould’s Complete Maya Programming texts). Ryan Trowbridge and I will be working on this together over the next year, so it is sure to be fun and exciting. We have a pretty comprehensive plan for what the book will cover, but please do feel free to contact either of us if there are specific things you would like to see!

In other news, Crane Wars, the newest Blurst game, was released a couple weeks ago. Among other things, I focused primarily on the characters in it. I did a post awhile ago that showed the facial rigs I created for them. Go play it now!

Crane Wars logo