How to Access MASH Point Data Through the Maya API

How to Access MASH Point Data Through the Maya API

Ian Waters shows how you can focus on performance by accessing MASH point data through Maya’s API.

Maya’s motion graphics toolkit, MASH, lets you access all default data types through its Breakout and Python nodes.It can also be done through the Maya API. MASH’s Breakout node was built for users who wanted pass MASH data into float or vector attributes. It can do this through simple connections rather than through scripting.

Good news, MASH only uses Maya’s default data types, so all MASH data can be accessed via normal Maya APIs

The Python node in MASH gives users the ability to access the raw data, which can be manipulated in any way.

If you like to focus on performance, or if you want to write your own MASH nodes, it’s helpful to know a few things about  data types and the Maya API. Ian walks through a few simple examples to help you get started. “In the following example we’ll get a MASH node (a Waiter), get it’s output data, and print a list of all the channels it contains along with the MASH point positions.” Ian says. “please remember, data getting/setting in Maya should only be done with connections otherwise Parallel Evaluation performance will suffer, so what I’m about to show you should never be run in an expression node.”

Ian also notes that MASH Data can only be extracted with either the CAPI or PyAPI 1.0. The PyAPI 2.0 isn’t finished yet and thus can’t be used with MASH.

Visit Ian Water’s complete article for Accessing MASH point Data with the Maya API here.