Got a little problem with Python and API Contexts examples.
Can some one share examples of custom context tool realisation via Python ?
There are many C++ examples in books and Maya API documentation.
But no python scripts. The python scripts i saw are just a dummy like in this thread.
I am looking for something more complex with doPress and doRelease methods and MSelectionMask.
Well what are you trying to make? For the most part all the stuff in the c++ docs applied to the maya python API. You just have to do some manual grunt work with MScriptUtil to take care of pointers.
Well the main reason that i’m looking for python scripts is that i didn’t know C++.
I mean i can read the syntax but can not translate it to python.
So, to better understand this process i need examples to compare.
As for the tool i’m trying to make, i want write PickReferenceTool for Maya.
Tool that in one Context allow user to select edges or faces as reference to orientation of previous manipulator(Move,Scale etc).
And i want it to work without any modificators to switch between type of components to select.
Maya Python for Games and Film has an excellent chapter on deciphering C++ and converting it to Python. This is an extremely valuable skills as most of the examples are provided in C++.