Ivan DeWolf

ivan

About Me

Connect

LOCATION
Canada
WEBSITE

Houdini Skills

Availability

Not Specified

My Talks

obj-image HUG
Generating G-Code

Recent Forum Posts

multiprocessing in Houdini Python panel Sept. 1, 2023, 9:06 p.m.

ok, well, if anyone else comes across this thread, here is 1 working bit of code. Thank you for holding the duck.

from PySide2 import QtWidgets
from PySide2 import QtGui
from PySide2 import QtCore
import time

class VideoThread(QtCore.QThread):
    def setStuff(self, vidscr, butt):
        self.vidscr = vidscr
        self.butt = butt

    def run(self):
        loop = True
        while loop:
            # blink blink
            pm = QtGui.QPixmap(320, 240)
            pm.fill(QtGui.QColor('darkGray'))
            self.vidscr.setPixmap(pm)
            time.sleep(1)
            pm.fill(QtGui.QColor('cyan'))
            self.vidscr.setPixmap(pm)
            time.sleep(1)
            if not self.butt.isChecked():
                loop = False

class vidWidg(QtWidgets.QWidget):
    def buildUI(self):
        self.videoScreen = QtWidgets.QLabel(self)
        self.startButton = QtWidgets.QPushButton("run blinky", self)
        self.startButton.setCheckable(True)
        self.startButton.toggled.connect(self.togg)
        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(self.videoScreen)
        layout.addWidget(self.startButton)
        self.setLayout(layout)
       
    def togg(self, val):
        if val:
            self.thread = VideoThread()
            self.thread.setStuff(self.videoScreen, self.startButton)
            self.thread.start()
        else:
            self.thread.wait()
            self.thread.quit()
           

def createInterface():
     root_widget = vidWidg()
     root_widget.buildUI()

     return root_widget

multiprocessing in Houdini Python panel Sept. 1, 2023, 2:24 p.m.

I'm trying to get qthreads running in a python panel, it's been problematic, Are there any samples anywhere of this working?

no threading Dec. 9, 2022, 2:31 p.m.

is there a simple way to launch a Houdini session in Windoze 10 single threaded? I see how to launch with the -j option on the commandline, but, I use the newfangled Houdini launcher in windows, is it possible to set it there? or, set it after I open Houdini? just trying to do a quick performance test of single threaded....