I'm working on adding a sanity check script. Just after a simple UI element/dialog/window that is a text echo of scene settings/params with label (resolution, write paths, obj nodes to be rendered, etc). Not after any interaction.
This is my first time creating a UI element as opposed to tweaking an existing one and I'm not sure where to start.
I've found a few HScript commands like message that get me rudimentary one-line dialogs, but they don't appear able to do more than a single line.
Should I be looking at Python/PySide2 here instead?
Any help to get me to a launched window with even a few lines of test would be a huge help.
Thanks!
–
MC
Sanity Check Dialog Window - UI Help
1281 3 1-
- MoltenCrazy
- Member
- 86 posts
- Joined: April 2016
- Offline
-
- toadstorm
- Member
- 402 posts
- Joined: April 2017
- Offline
If you're only displaying text, you can probably get by with hou.ui.displayMessage() in Python. https://www.sidefx.com/docs/houdini/hom/hou/ui.html [www.sidefx.com]
If you need more control than that, you're probably stuck building your own PySide2 window. There's some example code here [www.sidefx.com] you can slog through.
If you need more control than that, you're probably stuck building your own PySide2 window. There's some example code here [www.sidefx.com] you can slog through.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
-
- MoltenCrazy
- Member
- 86 posts
- Joined: April 2016
- Offline
Thanks, toadstorm! Guess I blew right by that example when I was flipping through the cookbook last night. That's perfect; thanks.
Was also looking at huilib [bitbucket.org], but while it's a great contrib would rather stick to standard install libs for easy sharing.
Oh, and I think hou.ui.displayMessage() is restricted to a single message dialog. Haven't found any examples/usage that even allows for carriage returns/new lines.
–
MC
Was also looking at huilib [bitbucket.org], but while it's a great contrib would rather stick to standard install libs for easy sharing.
Oh, and I think hou.ui.displayMessage() is restricted to a single message dialog. Haven't found any examples/usage that even allows for carriage returns/new lines.
–
MC
-
- toadstorm
- Member
- 402 posts
- Joined: April 2017
- Offline
I think you could sneak that text into the “more details” text parameter, but I agree that that's a bit hacky. I'd lean towards a QPlainTextEdit inside a QDialog, should be quick and easy by Qt standards.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
-
- Quick Links