Hi folks! I wanted to share with you my last development I released online.

It is a math library for maya. First of all let me quickly explain why I did it and how it differs from the others libs around.

I created this library because I got tired of having to redo over and over the same kind of procedures for vectors and matrix operation, implement a class overriding the operators, etc. Also doing the same kind of thing with nodes is just plain boring, for a simple vector subtraction might require me like 20 lines of code. Also many studio still don’t want to use pymel and most of the riggers don’t know or don’t use OpenMaya. That led me to write my own library and share it around.

The library is composed of two main part, a pure math implementation that you would expect from a regular math lib but the second part is also a complete mirror of the pure math implementation but it works with maya nodes. Let me give you a quick example.

Let’s say we have two vectors, vector A and B. We can do a subtraction by simply doing:

vecC = vecB - VecA

Now is those two vectors are a pure math vector you will get a static result, if they are NVec (which stands for node vectors) It will wire under the hood the needed nodes. The result is a really nice compact and easy to read code. Also passing from the pure math to the node implementation is really simple and require minimal adjustment of the code (Actually just the classes initialization).

Here there is a demo of the lib in action:

All the code is free and available on github:

https://github.com/giordi91/mMath

Also everything is well documented with getting started tutorial and classes documentation:

http://giordi91.github.io/mMath/

Every feedback is really appreciated and of course anyone willing to participate on github.

Cheers

PS: for now it supports vectors only but I will be implementing matrix support as soon as I get a bit of time V