Search code examples
pysidemaya

PySide gui, Maya hypershade updates


I am new to PySide and would like to have the QT gui update based on selections made by the user in the Maya hypershade. For instance, as the user changes selected nodes in the hypershade, the names of those nodes update in my PySide gui. I have the gui listing the selected node when it is launched, but I am not sure how to dynamically update the list as the user changes their selection in Maya. Thank you.


Solution

  • Sounds like you need a selection callback.

    With OpenMaya's api there's MEventMessage, and also scriptJob with cmds. Examples on both can be found here:

    How to get from Maya event of a change highlight objects in the scene?

    I suggest using MEventMessage instead of a scriptJob for performance reasons.