Houdini 21 support

Hi,

SideFX has just released H21 (py3.11), but the Flow menus don’t show in Houdini.
I’ve enabled the debug log, but it doesn’t show any errors.

The shelf was created successfully, but the menu was not.

That didn’t happen with previous versions.

Does anyone have a workaround?

Hi Guilherme,

We don’t support Houdini 21.0 yet but we are working on it and are facing the same issue.

I don’t have any workaround yet unfortunately. All I know for now is the menu seems to be generated too late for Houdini.

If I manually create a MainMenuCommon.xml before launching Houdini, I get my custom menu. But if I generate the menu in the “startup script” (launched by Houdini), then the menu does not show up.

That’s all I have for the moment. I don’t see any change in the documentation regarding Houdini menus: Customize menus.

I am not excluding that this is a regression coming from Houdini 21.0.440. So another course of action here would be report this issue to SideFx.

I hope this helps.

Thanks for the answer. If you come up with a solution, please add it here. We want to utilize the new animation tools for a new project starting soon, and there’s no alternative on H20.5, as Apex was not production-ready on 20.5.

1 Like

It does seem like SideFX has changed the way menu generation works since a few versions so possible something’s now changed and broken.

Hi,

We’re having the same issue, and need to use the new Apex tools. Forced to work without Flow for now.. If anything can be done to add support, or you discover a workaround please let us know! :folded_hands:

1 Like

I too see no menu Flow menu. However the Flow Production tracking shelf is present. Opening the Flow Production Panel works, more or less, I get lots of errors in the houdini python shell, poining to
PyCObject_AsVoidPtr

When I click on the “File Open” shelf icon I get this traceback :

Traceback (most recent call last):
File “\jackhammer\sharedev\shotgrid-configs\second\install\app_store\tk-multi-workfiles2\v0.15.6\python\tk_multi_workfiles\work_files.py”, line 137, in _show_f
ile_dlg
self._dialog_launcher(dlg_name, app, form, *args)
File “\jackhammer\sharedev\shotgrid-configs\second\install\app_store\tk-houdini\v1.9.5\engine.py”, line 985, in show_dialog
dialog, widget = self._create_dialog_with_widget(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “\jackhammer\sharedev\shotgrid-configs\second\install\core\python\tank\platform\engine.py”, line 1762, in _create_dialog_with_widget
dialog = self.create_dialog(title, bundle, widget, parent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “\jackhammer\sharedev\shotgrid-configs\second\install\app_store\tk-houdini\v1.9.5\engine.py”, line 923, in create_dialog
ctypes.pythonapi.PyCObject_AsVoidPtr.restype = ctypes.c_void_p
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.440\python311\Lib\ctypes_init
.py", line 389, in getattr
func = self.getitem(name)
^^^^^^^^^^^^^^^^^^^^^^
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.440\python311\Lib\ctypes_init.py”, line 394, in getitem
func = self._FuncPtr((name_or_ordinal, self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: function ‘PyCObject_AsVoidPtr’ not found

1 Like

Hi guys,

I’ve reported this issue to SideFx but haven’t got an response yet.

In the meantime, I’ve tested Houdini version 21.0.463 (daily build) and confirm the same problem exists.

Good news: I found a workaround :grinning_face: But please note:

  1. It has not been tested
  2. We still do not support Houdini 21.0 for the moment
  3. This should not be used in production environment

However, if some of you want to test it, here is the Pull Request:

Please let me know if that works for you guys. Either here or by commenting the PR.

Thanks!

3 Likes

Hi @Julien-L

I can confirm that with the SG-40163 branch I see the Shotgrid (aka Flow) menu in Houdini, however if for example I try a “file open”, ie start the workfiles2 app, I get the same error as before:

AttributeError: function ‘PyCObject_AsVoidPtr’ not found
(see my previous post)

Thanks for your feedback @donat!

Regarding the PYCObject errors, we have not been able to reproduce it yet. Could you confirm that this does not happen with older versions of Houdini? (20.5, 20.0, 19.5)

Also, what is the behaviour when this happen? Is the TK integration still working?

Thanks!

Hi @Julien-L

I tested on the same pipeline config in Houdini 20.0, using the same version of the tk-houdini-engine (i.e. the one from your git branch) : No issue to report. No problem launching the workfiles2 app.

Back in Houdini 21.0.440 Py3.11 on windows:

After launching, the SG menu is visible.

I can launch the Flow production tracking panel. The panel opens and is working (no error visible in the python shell except some download errors -HTTP Error 404: Not Found - but this might be my problem, not yours)

If I do “file open” I get errors in the python shell (complete log h21_file_open.log (25.6 KB)), but the engine continues to work

Doing a “current context /work area info” results in the same error : function ‘PyCObject_AsVoidPrt’ not found

“current context / jump to filesystem” does work
”current context / open lgg folder” does work

Opening the SG python console : does work

So it looks like this error happens only when the engine tries to create a floating dialog

BTW I’m testing on Windows 11

Regards

3 Likes

Hi @Julien-L ,

Thank you for the workaround!

We tested and can also confirm the Shotgrid menu works, but it errors when trying to open file (or pop up any other floating windows) and getting the same error message:
AttributeError: function 'PyCObject_AsVoidPtr' not found

Any chance of getting a workaround for the floating window dialog issue as well?
We really want to use some of the new Houdini fetures in a current production :sweat_smile: :folded_hands:

We’re on Houdini 21.0.440 and Windows 10

Alex

Hi @donat and @alex, thank you so much for testing and confirming that the menu now works and also to report the ‘PyCObject_AsVoidPtr’ not found error :grinning_face:.

Regarding the ‘PyCObject_AsVoidPtr’ not found error, I can now reproduce it. I was testing on Linux and macOS but this is a Windows-only problem :sweat_smile:
The good news is that it seems quite easy to fix!

I created a new Pull Request which contains both fixups (menu and pycobj):

Feel free to test it and let us know if that solves your issues. Also please let me know if you see any other problems with Houdini 21.0 :folded_hands:.



Not sure what this is about. Is this a Houdini 21.0 specific issue? If not, could you please create a new thread and explain the problem, please :folded_hands:?

2 Likes

Hi @Julien-L
I can confirm branch SG-40114 is working for me. No issues opening files, publishing. Thanks a lot, and thanks especially for sharing your advances here in the forum. I did not have the time to test it extensively, though

Regards

4 Likes

Hi @Julien-L

Thank you so much for being quick on the ball on this! Very appreciated :folded_hands:

I can confirm it’s working for us as well, and haven’t run into any issues the last couple of days. Will reprt back if we discover anything!

Cheers,

Alex

2 Likes

Here it doesn’t work. Usually, I update the toolkit apps through Tank.
I copied the branch to the Houdini-tk folder, and I overrode all the files.

Upon Houdini launch, it displayed messages indicating that it hadn’t been appropriately tested on H21—a feature that I believe was added for this branch, as it didn’t display that information previously.

But no success, nevertheless; no menus are showing up.

The “appropriately tested” dialog is just a warning. Indeed H21 is not officially supported yet.

There is a setting, however, that can make the dialog go away - in your env configuration, add compatibility_dialog_min_version: 22 (I guess both in project.yml, shot_step.yml, and potentially other environments that you use).

As for the menus not showing - are there errors in the console? Are you sure you applied the changes correctly?

Can confirm this temporary workaround works for us as well on 21.0.440. However, could not get the items of the Flow Production Tracking menu to populate (File Open, snapshot,etc.) on the daily builds. The menu itself shows up but doesn’t seem able to fetch the current context.

Regarding the menu issue, we are in contact with SideFx support and we received feedback today that they are aware of the issue and are looking for a solution.

This is related to the new “startup cache” feature in Houdini 21 and they provided a workaround to setup an HOUDINI_CACHE_SEARCH_PATHS_AT_STARTUP environment variable with value 0. I tested this workaround and it worked for me.

So for those who still have issues, I’d suggest to try the following:

  1. Set the HOUDINI_CACHE_SEARCH_PATHS_AT_STARTUP=0 to fix the menu
  2. Use this branch to fix the PyCObject_AsVoidPtr issue:
    SG-40284 Fixup PyCObject_AsVoidPtr error on Houdini 21.0 by julien-lang · Pull Request #87 · shotgunsoftware/tk-houdini · GitHub

Then please let us know if this fixes your issues.

1 Like

I can confirm it’s working, thanks!

  • What’s the best approach to use the app from another branch? I’ve just overriden.the app
  • How can I remove the floating windon saying sgtk was not fully tested with H21?

The best practice for this is to direct the app/engine to a different location altogether. First clone the engine somewhere and change to the new branch:

cd /tmp
git clone git@github.com:shotgunsoftware/tk-houdini.git tk-houdini-patched
cd tk-houdini-patched
# switch to branch
git checkout ticket/SG-40114-temp-workaround-houdini-21.0

Then in <project_path>/config/env/project.yml

...
tk-houdini:
  ...
  location: /tmp/tk-houdini-patched
  compatibility_dialog_min_version: 22

And probably have to do the same in <project_path>/config/env/shot_step.yml.

Note the compatibility version must be 22, i.e. higher than the version you want to use.

Cheers,

Mois