Stalkerx777 159 Posted February 13, 2014 (edited) Hi, guys! Just wanted to share with you some of my experiments. huilib - is a simple Python wrapper around Houdini's native .ui language. It has been written "just for fun", so no warranty if it works for you, but I think it's pretty usable for a simple UI, in situations, when using PyQt is not an option Maybe someday we'll see something similar from SESI Feel free to use it. https://github.com/alexxbb/huilib Edited November 24, 2020 by Stalkerx777 Updated link 8 Share this post Link to post Share on other sites
Green-Man 3 Posted February 14, 2014 (edited) Thanks for sharing. Decent name, bro Edited February 14, 2014 by Green-Man Share this post Link to post Share on other sites
Doum 22 Posted February 18, 2014 Can we do something similar with pop up windows ? ei mixing drop down menu with text box and a 3 buttons selection? Maybe this lib can do that ? Sorry I'm still new to this programming world and I'm trying to create some basic tool, like loading cam(alembic) and create new scene with naming convention, etc ... thanks Share this post Link to post Share on other sites
Stalkerx777 159 Posted February 20, 2014 Can we do something similar with pop up windows ? ei mixing drop down menu with text box and a 3 buttons selection? Maybe this lib can do that ? Sorry I'm still new to this programming world and I'm trying to create some basic tool, like loading cam(alembic) and create new scene with naming convention, etc ... thanks Yes, it actually what this library supposed to do. Simple pop up dialogs for simple things =) 1 Share this post Link to post Share on other sites
grau 3 Posted February 21, 2014 Very nice, I like how the code is almost the same as PyQt/PySide. Share this post Link to post Share on other sites
riviera 4 Posted March 31, 2014 Very nice! Cheers! (Also, the function you use, hou.ui.createDialog() doesn't seem to be documented anywhere in the 13.0 docs, so your code is extra useful...) Share this post Link to post Share on other sites
goldleaf 102 Posted June 4, 2014 Very cool! Is there a way to use this library without launching Houdini? (I'm guessing not, but just in case...) Thanks! Share this post Link to post Share on other sites
Stalkerx777 159 Posted June 10, 2014 Very cool! Is there a way to use this library without launching Houdini? (I'm guessing not, but just in case...) Thanks! No, unfortunately not Share this post Link to post Share on other sites
willow wafflebeard 16 Posted September 16, 2014 (edited) thanks for the huilib nice tool. i found a little error in the HVector, i think i fixed it though by changing from assert 2 < size <= 4, "HVectorField size can be 2, 3 or 4" to assert 1 < size <= 4, "HVectorField size can be 2, 3 or 4" from the huilib.py i also found out that when i launch the interface and just run my code right away the setValue() outputs blank, instead of 0 which is what the interface seem to show. it fixes itself though if you drag the slider out and back to 0. then it outputs 0 i also have a problem with setValue() with HVector in 2d. it works if the size =3 but if its 2 and i tried self.someNameofVector.setValue([0,1]). or ((0,1)), it errors something like index out of range. with something about _multivalue thingy. Edited September 16, 2014 by willow wafflebeard Share this post Link to post Share on other sites
waterzhou 1 Posted May 10, 2016 very useful tools! thaks! i have a question about the(self.stringField = huilib.HStringField('field1', 'meName')): ########################################################## import huilib from huilib import * class meDialogxx(HDialog): def __init__(self, name, title): super(meDialogxx, self).__init__(name, title) self.setWindowLayout('vertical') self.setWindowAttributes(stretch = True, margin = 0.13, spacing = 0.1, min_width = 3) colx1 = HColumnLayout() ### self.stringField = huilib.HStringField('field1', 'meName') self.stringField.setEnabled(True) #self.geoFileField.getValue() #print self.stringField self.addGadget(self.stringField) rowx1 = HRowLayout() self.a000 = HButton('aa','COM_0') self.a001 = HButton('bb','COM_1') rowx1.addGadget(self.a000) rowx1.addGadget(self.a001) colx1.addLayout(rowx1) self.a000.connect(self.cb_printStringFields) self.a001.connect(self.cb_printStringFields1) self.addLayout(colx1) # This method should always be called last!! self.initUI() def cb_printStringFields(self): a=self.stringField.setValue('aaaaaa') self.stringField.getValue() print self.stringField def cb_printStringFields1(self): self.stringField.setValue('a+b') if __name__ != '__main__': ui = meDialogxx(name = 'import_dlg', title = 'what the F$%%^%&*^*') ui.show() ##################################################################### how can i get the (self.stringField) value?please!!! Share this post Link to post Share on other sites
Stalkerx777 159 Posted May 10, 2016 18 hours ago, waterzhou said: very useful tools! thaks! ################################### how can i get the (self.stringField) value?please!!! So what's a problem? It works, just checked. self.stringField.setValue("MyValue") # Set value print self.stringField.getValue() # Pring Value Share this post Link to post Share on other sites
waterzhou 1 Posted May 11, 2016 (edited) ooooo yeah!!!it work,very very very thank you ... Edited May 11, 2016 by waterzhou Share this post Link to post Share on other sites
ftaswin 17 Posted June 14, 2017 Thanks for this wonderful tool. I got 2 questions: 1. How to implement a proper HIconButton with built in icon? 2. Is there any way to query an opened window and close it first before committing a new one? Thanks Share this post Link to post Share on other sites
Stalkerx777 159 Posted June 21, 2017 On 6/13/2017 at 11:02 PM, cloud68 said: Thanks for this wonderful tool. I got 2 questions: 1. How to implement a proper HIconButton with built in icon? 2. Is there any way to query an opened window and close it first before committing a new one? Thanks 2 1. I've tried many times, but couldn't make it work. Need to ask SESI support how to use ACTION_ICONBUTTON gadget. 2. Yes: # Find the dialog by name ui = huilib.findDialog('test') if ui: # If found you can show(), hide(), and close() it ui.close() will close and delete the dialog ui = TestDialog(name='test', title='Test UI') ui.show() Share this post Link to post Share on other sites
ftaswin 17 Posted June 27, 2017 Thanks a lot, Alex 1 Share this post Link to post Share on other sites
efxlab 1 Posted April 6, 2019 hey Alex, I dont know what is this line purpose : if __name__ == '__main__': I removed it because else not it doesn't work. Great library, thanks a lot 1 Share this post Link to post Share on other sites
Ippokratis 4 Posted September 30, 2019 (edited) Hi Alex, many thanks for sharing your code. Kind regards Edited September 30, 2019 by Ippokratis 1 Share this post Link to post Share on other sites