Hey Guys,
Are there any examples/tutorials out there to set up simple context dependent hotkeys in maya, based on selection type and selection count
for example if faces are selected execute selectadjacentface.mel, or selectadjacentvertex.mel for vertex selection, etc?
Replies
You can try to make a procedure to return the type of the selection. Something like this:
I haven't scripted anything so I just wanted to make sure, for selection count, would I then modifiy this template with
https://help.autodesk.com/cloudhelp/2016/CHS/Maya-Tech-Docs/Commands/polyEvaluate.html,
For example if 2 edges are selected that share an open face I'd like to run bridge, but if 2 edges are on the same row I'd like run connect edge, if one edge is selected I'd like to split the edge with a vertex...
This might be way to advanced for a non scripter but I was curious because I badly want to optimize my hotkeys in Maya similar to what has been done in Max already haha
The main difficulty of what you try to achieve is to return the position of the components. It's not so easy to test if a component is on the same row as another one.
Is size a mel command? your template + size would allow me at least 6 commands tied to macro, like 1 edge vs more than 1, and for face and vertex, and even object