SG-45243 Fix Houdini 21.0.478 FPTR menu/shelf cache-refresh guard - #107
Draft
stevelittlefish wants to merge 1 commit into
Draft
stevelittlefish wants to merge 1 commit into
stevelittlefish wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 isCannot 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 withself._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 anAttributeError.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.pypasses (black, ast, trailing whitespace, etc.).