Robert Vinluan

rvinluan

About Me

EXPERTISE
Developer

Connect

LOCATION
Canada
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Houdini 20.5-python3.11 pyside2 support question Aug. 30, 2024, 8:04 a.m.

Are you by any chance running your code from a regular Python interpreter instead of from Houdini/hython?

If that's the case, then you need to tell PySide/Qt where the Qt plugins are located on disk since Houdini ships the Qt plugins in a non-standard location. To do that, you can either set QT_PLUGIN_PATH=%HFS%/bin/Qt_pluginsin the environment or add this bit of code before you create the QApplication:
QApplication.setLibraryPaths(["{}/bin/Qt_plugins".format(os.environ["HFS"])])

Cheers,
Rob

Houdini 20.5-python3.11 pyside2 support question Aug. 20, 2024, 4:58 p.m.

Hi Lukas,

You are correct. The VFX Reference Platform calls for Qt6/PySide6 and Python 3.11 this year but unfortunately, we were not able to accommodate Qt6/PySide6 support in time for the Houdini 20.5 gold release. The Houdini 20.5 development cycle was shorter than usual and we were concerned about stability if we rushed the Qt6/PySide6 port in order to make it for release day.

The plan, however, is to release Qt6/PySide6 support later this year in a production build update. We are actively working on support and squashing bugs.

You can check out this help page, which tracks Qt/PySide versions as well as adherence to the VFX Reference Platform:
https://www.sidefx.com/docs/houdini/licenses/ [www.sidefx.com]

As for PySide2, if you are unable to use pipto setup your venv, then you can try having your venv use Houdini's PySide2 packages by setting the PYTHONPATHenvironment variable. For example:
  • on Linux,
    export PYTHONPATH=$HFS/python/lib/python3.11/site-packages-forced
    
  • on macOS,
    export PYTHONPATH=$HFS/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages-forced
    
  • on Windows,
    set PYTHONPATH=%HFS%/python311/Lib/site-packages-forced
    

On Windows, you need to also add this bit of code at the beginning of your Python script before importing PySide2:
import os
os.add_dll_directory("{}/bin".format(os.environ["HFS"])

from PySide2 import QtCore, QtGui, QtWidgets

The call above is needed so that Houdini's PySide2 modules can locate the Qt5 .dll libraries that are in the Houdini distro. Note that the code above assumes that you have %HFS% set in your environment. If not, then you can instead hard-code the HFS path instead of calling os.environ["HFS"]

Cheers,
Rob

Please help me understand PDGDeadline Aug. 19, 2024, 12:06 p.m.

monomon
Awesome information here.

My point was more (and I have no idea how PDG works internally) about serially submitting batches, that are "debounced", accumulated over some time period. Then, something akin to the MQ server would serialize the submission, ensuring there are no concurrent submissions.

I think there is no point in allowing behavior that is known to be broken. So I wouldn't expose the old behavior.

By the way is there a way to learn more about the compiled core of PDG? Maybe a header file, or documentation.

Sorry for the late reply.

I'll keep your points in mind but I may end up adding the toggle anyway. What's interesting is that the race condition only occurs for a subset of users. There are users that never hit the issue (perhaps dumb luck?). So I could see the toggle being useful for them in order to get back to the old behaviour without any downside.

I checked with our lead PDG developer and he pointed out that there are PDG headers in the HDK ($HFS/toolkit/include/PDG/*.h). There's also high level documentation in the HDK docs with a bit of information on different core constructs, cooking, etc and an example of writing a custom partitioner:
https://www.sidefx.com/docs/hdk/_h_d_k__op_basics__top_intro.html [www.sidefx.com]

The HDK headers also have a bunch of comments as well.

I hope that helps.

Cheers,
Rob