NodeEditor align nodes

This one will be quick post about nodeEditor in maya.
Lately I am in rigging a bit- learning, organizing etc ... so I worked in hypergraph/nodeEditor more than ever. Align nodes is what I need!

So during working with nodes, connecting and moving them back and forth I said "no way, i don't like it at all". But then I remembered that I've seen one day great stuff that deals with that on lesterbanks. Yeap ... and it was "NodeAlignDeez" by Character Rigger at Blur Studio so called by lesterbanks editor :) Check here

So my first thought was - maybe it is easily accesible by mel/python. I spent few hours trying to
get/set node positions using nodeEditor command. I even asked a question on autodeskArea - no replies unfortunately.

After that ... I decided to use script that I mentioned above (alignDeez)- why not, it's already there.
Lets get it and start working with pleasure. So I went to github and to my surprise script wasn't there.
Because alignDeez post is one yearl old .... I wonder if source was ever there?

Ok... so how the hell would i know how to acces positions if nodeEditor doesn't give you such interface ... and it struck me- "hey what about bookmarks, if maya keeps it between session it must be somewhere". And that was it.

All I had to do was code it.
- create tempBookmark -  "nodeEditor -e -createInfo"
Be carefull- it does't return any node name, so we're forced here to read all scene nodes in search for "nodeGraphEditorBookmarkInfo type before and after "nodeEditor -e -createInfo" to know which one has been added 
- read positions for selected nodes
- calculate average,min,max etc
- set positions attributes in tempBookmark
- load node editor bookmark - "nodeEditor -e -restoreInfo"
- remove tempBookmark
- additionaly I "inject" small ui into nodeEditor and that's it

I know ... kind of clunky, but works. I don't really know how alignDeez is made. If it also based on bookmarks sorry for doubling If not maybe someone could give me a clue how char.Rigger at Blur approached this... ?? I just want to satisfy curiosity. I think he accesing ui in qt because it ui looks super responsive... but ... just would be cool to know.

Script is here btw ... highend3d
All you need to do is load in script editor and execute it.
It is worth to mention that most UIControls names are hardcoded so sometimes it may not work.
Additionaly what I found out is that in maya 2017 lsUI -window don't work supposedly because in 2017 autodesk introduced QT5. So that's why I don't bother for proper UI code.
Script definietly needs more work, but I don't want "waste" to much time. Autodesk will add it for sure ;)


  1. Hey man, great adition and very usefull, but the link to Highend is broken, :)

  2. Thanks for sharing this information.
    Yes Done is the best online site for on demand home services, professional service providers in Jaipur, Rajasthan. We are providing top services like carpenter, cleaning, TV, and many more services at your doorstep in Jaipur, Rajasthan. For more services visit our website.

  3. This is really amazing blog and like to share Hindustan Tradecom.

    Hindustan Tradecom is the best website where you can open your Demat Account in Jaipur, jodhpur, Bikaner, Kota, Rajasthan. We provide best services opening a Free Deamt Account. We also help you opening Demat Account in Different Banks. For other services like Equity Trading, Commodity trading, Currency Derivatives, Easy-IPOs, Mutual Funds, and many more. Please visit our website.

  4. Wow, what a nice blog. I have read it and really impressed by its writing.
    Meerahini is the best site to buy Jaipur Salwar Suits Online and Hand block Kurta sets. We have straight suit sets, anarkali suit sets, kurta and plazzo sets, and Sharara Sets. We have premium clothing collection of Rang and Utsav.

  5. Nice Blog information.
    GIEC Global is the Best Education Consultants in Melbourne, Australia and education consultant in Melbourne, Sydney, Brisbane, Perth, Adelaide,Australia.Education Consultants in Melbourne, Best Education Agent in Melbourne, Sydney, Adelaide, Perth, and Brisbane is GIEC Global. We are Melbourne Migration and Education Consultants, Education Migration Agent Melbourne, Melbourne Study Abroad, and Performance Education Melbourne

  6. GIEC GLOBAL is the best education consultant in melbourne. We are formost education consultants in melbourne. We are prime education migration agent in melbourne and best performance education in melbourne. For the study and work in melbourne. Our services are in melbourne as migration and education consultants. we are education agents in Australia and provide education migration services in Australia.


Post a Comment