Stalkerx777 Posted February 13, 2014 Share 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 Quote Link to comment Share on other sites More sharing options...
Green-Man Posted February 14, 2014 Share Posted February 14, 2014 (edited) Thanks for sharing. Decent name, bro Edited February 14, 2014 by Green-Man Quote Link to comment Share on other sites More sharing options...
edward Posted February 14, 2014 Share Posted February 14, 2014 Nice! Quote Link to comment Share on other sites More sharing options...
Doum Posted February 18, 2014 Share 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 Quote Link to comment Share on other sites More sharing options...
symek Posted February 18, 2014 Share Posted February 18, 2014 Great! Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted February 20, 2014 Author Share 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 Quote Link to comment Share on other sites More sharing options...
grau Posted February 21, 2014 Share Posted February 21, 2014 Very nice, I like how the code is almost the same as PyQt/PySide. Quote Link to comment Share on other sites More sharing options...
riviera Posted March 31, 2014 Share 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...) Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted April 1, 2014 Share Posted April 1, 2014 Nice one! Quote Link to comment Share on other sites More sharing options...
goldleaf Posted June 4, 2014 Share 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! Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted June 10, 2014 Author Share 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 Quote Link to comment Share on other sites More sharing options...
willow wafflebeard Posted September 16, 2014 Share 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 Quote Link to comment Share on other sites More sharing options...
waterzhou Posted May 10, 2016 Share 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!!! Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted May 10, 2016 Author Share 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 Quote Link to comment Share on other sites More sharing options...
waterzhou Posted May 11, 2016 Share Posted May 11, 2016 (edited) ooooo yeah!!!it work,very very very thank you ... Edited May 11, 2016 by waterzhou Quote Link to comment Share on other sites More sharing options...
ftaswin Posted June 14, 2017 Share 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 Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted June 21, 2017 Author Share 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() Quote Link to comment Share on other sites More sharing options...
ftaswin Posted June 27, 2017 Share Posted June 27, 2017 Thanks a lot, Alex 1 Quote Link to comment Share on other sites More sharing options...
efxlab Posted April 6, 2019 Share 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 Quote Link to comment Share on other sites More sharing options...
Ippokratis Posted September 30, 2019 Share Posted September 30, 2019 (edited) Hi Alex, many thanks for sharing your code. Kind regards Edited September 30, 2019 by Ippokratis 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.