doctorbob

doctorbob

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Houdini Crash Message when closed after using PyQt July 25, 2023, 12:32 a.m.

without knowing anything about your UI or what it's doing or how it's constructed...

if you're using qThreads and they're still running when you close the dialog, you'll usually get an insta-crash like this.

so something like

    def closeEvent(self, event):
        super(MyNodeUI, self).closeEvent(event)
        # self.worker is a reference to a QThread in this case
        if self.worker:
            logger.debug("waiting for worker thread")
            # wait for the thread to finish cleanly
            self.worker.wait()
        self.deleteLater()

Setting background image on render view using python July 18, 2023, 10:41 p.m.

Hey there,

you can do it, by calling a hscript command

copPath = "/my/plate/here.exr"
hou.hscript('imgdispopt -f %s' % copPath)

cheers,
chrisg

hou python action to update hda definitions Feb. 27, 2023, 5:45 p.m.

it's a method of the Node class - changeNodeType()
https://www.sidefx.com/docs/houdini/hom/hou/Node.html [www.sidefx.com]

terrible nom tested code
nd = hou.node('/obj/FlipsInNips1')
nd.changeNodeType("namespace::main::FlipsInNips::2.0")

cheers,
chrisg