Good tip from eX-SI blog, former developer at Softimage and later Autodesk
How do you get the ICE Tree view in a menu callback? For example, if you add a menu item to the ICE Tree > User Tools, how does the menu item callback get the ICE Tree view?
The answer is actually in code I posted before, but that was in a blog post titled Getting the selected ICE nodes. So, with that title, you wouldn’t necessarily think to look there.
So what’s the answer? Uses Context.GetAttribute( “Target” ). For custom menus in the views like the ICE Tree view, the Fcurve Editor, and the Material Manager, the Target attribute is the View object. And once you have the View object, you can get the View attributes.
This post illustrates why indexes are a good thing…with them, you can find information no matter what page or heading contains the information.
For ICE trees, you’d…
View original post 20 more words