Skip to content

SG-45243 Fix Houdini 21.0.478 FPTR menu/shelf cache-refresh guard - #107

Draft
stevelittlefish wants to merge 1 commit into
masterfrom
ticket/SG-45243-houdini21-menu-shelf-cache-guard
Draft

stevelittlefish wants to merge 1 commit into
masterfrom
ticket/SG-45243-houdini21-menu-shelf-cache-guard

Conversation

@stevelittlefish

Copy link
Copy Markdown
Contributor

Summary

Fixes the Flow Production Tracking menu/shelf failing to load in Houdini 21.0 builds where the startup path cache refresh was silently skipped.

Houdini 21.0 caches filesystem search paths during startup, so the menu (MainMenuCommon.xml) and shelf (sg_shelf.xml) definitions that the engine writes into its temporary directory during initialization are not picked up. The result is Cannot find the definition of the shelf "Flow Production Tracking" and a missing FPTR menu, even though the engine, apps, and registered commands all initialize correctly.

SG-40163 (#92) added a workaround using hou.refreshStartupPathCacheDirectory, but guarded it with self._houdini_version >= (21, 0, 479). That API was introduced by SideFX in build 21.0.478, so build 21.0.478 exactly hit the same missing menu/shelf bug the workaround was meant to solve (off-by-one guard).

Changes

Lower the guard from (21, 0, 479) to (21, 0, 478) to match the build that introduced the API.

Add a hasattr(hou, "refreshStartupPathCacheDirectory") check so 21.0 builds older than 21.0.478 (which do not have the method) skip the call gracefully rather than risk an AttributeError.

Known limitation

Builds earlier than 21.0.478 cannot be fixed this way because the refresh API does not exist there. Users on those builds need Houdini 21.0.478 or newer to get the FPTR menu/shelf.

Testing

To be confirmed on a machine with Houdini installed: launch Houdini 21.0.478+ via FPTR Desktop and confirm the Flow Production Tracking menu and shelf load with File Open, File Save, Panel, and Publish actions present. Confirm no regression on Houdini 20.5 and on 21.0 builds below 21.0.478 (menu behavior unchanged, no error raised).

pre-commit run --files engine.py passes (black, ast, trailing whitespace, etc.).

The startup path cache refresh added in SG-40163 was guarded by
`>= (21, 0, 479)`, but hou.refreshStartupPathCacheDirectory was
introduced in build 21.0.478. As a result build 21.0.478 hit the same
missing menu/shelf regression the workaround was meant to fix.

Lower the guard to (21, 0, 478) to match the build that introduced the
API, and add a hasattr check so earlier 21.0 builds (which lack the
method) skip the call gracefully instead of risking an AttributeError.

Note: builds before 21.0.478 cannot be fixed this way because the API
does not exist there; those users need Houdini 21.0.478 or newer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant