Jump to content
Sign in to follow this  
DominikL

Python Panel hou.ui problem

Recommended Posts

Hello,

i am new to this and i don't understand why hou.ui functions stop working when you reopen a panel. Example video.
The example code that i used:

from PySide2 import QtWidgets

class testUi(QtWidgets.QWidget):
    def __init__(self):
        QtWidgets.QWidget.__init__(self)
        
        button1 = QtWidgets.QPushButton()
        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(button1)
        self.setLayout(layout)
        button1.clicked.connect(openSel)
        
def openSel():
    list1 = ["1","2","3"]
    sel1 = hou.ui.selectFromList(list1, exclusive=True)
    print sel1
def createInterface():
    return testUi()

 

Share this post


Link to post
Share on other sites

Might be that the panel is only made the first time and the next time you open the panel. It reopens the one that was made before, skipping the Init.

 

Share this post


Link to post
Share on other sites

I wasn't able to reproduce your issue. It's re-opening fine for me. which version of Houdini are you using ? 

-J

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×