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?
Ah you're right, I appreciate the help however. Some advanced scripting would be needed to test for adjacency and if something. 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
Thanks so much for the reply Eltarbos! 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…
You don't have to use "polyEvaluate". You can also use "size" to return the number of selected components. 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.
Hi, You can try to make a procedure to return the type of the selection. Something like this: proc string returnSelectType()<br> {<br> string $selectionType = "";<br> if (size(`filterExpand -ex true -sm 12`) !=0) {<br> $selectionType = "object"; }<br> if (size(`filterExpand -ex true -sm 9`) !=0) {<br> $selectionType =…