Skin Tools Python API
Skin Tools is meant to be used primarily from the UI. However, it is possible to access some of its functionality from Python.
Architecture at a glance
Skin Tools is built of the following layers:
- C++ binary. Implemented as a Maya plugin, it provides plugin-specific commands and node types. This is where most of the computing heavy-lifting is done; the exposed functions and objects are not intended to be used directly, therefore the lack of documentation for plugin itself
- API layer in Python - everything in ngSkinTools2.api namespace. This section of the code is decoupled from Maya’s UI and provides a slightly higher level of abstraction on top of the C++ binary. This namespace is intended to be usable from outside of the plugin as well
- UI layer in Python - provides the end-user interface of Skin Tools. This part is not intended to be reusable. However, as UI builds on top of the API layer, it might serve you as example of how the API is intended to be consumed.
This documentation primarily focuses on API layer.
IDE setup
If you have IDE that is able to parse documentation from code, consider configuring your project to index the plugin source directly.
For example, in PyCharm, go to Settings | Project | Project Structure, click "Add Content Root" and add the following directory which can be found inside your Maya install directory: runTime/plug-ins/ngSkinTools/scripts/ngSkinTools2
After configuring this, you should be able to see documentation directly in UI, and have auto-complete on various API objects, e.g. attributes for Layer properties. For example, press ctrl + q to quickly check function reference.
