Detect Node Selection in Python

   1229   1   1
User Avatar
Member
6 posts
Joined: 5月 2009
Offline
I'm trying to create a Python Panel that provides me with a custom editor based on node selection. However, I can't find a good way of detecting when selection has changed, or what the current/last selected node is.

I see that there are callbacks that I can add on a per-node basis, but I feel like there is a feature that works more globally, like how all the native editors work, and I can't seem to find how to hook into it… (ie the Parameters panel, which updates based on node selection).
Edited by nascentparadigm - 2019年3月13日 19:05:58
User Avatar
Member
191 posts
Joined: 10月 2018
Offline
I haven't used it, but have you seen hou.ui.addSelectionCallback(). It sounds like what you're after.
  • Quick Links