Claude/add gitignore fix v17 ygw1 t#1
Open
hramirezedc wants to merge 12 commits intoTheFoundryVisionmongers:mainfrom
Open
Claude/add gitignore fix v17 ygw1 t#1hramirezedc wants to merge 12 commits intoTheFoundryVisionmongers:mainfrom
hramirezedc wants to merge 12 commits intoTheFoundryVisionmongers:mainfrom
Conversation
- Add .gitignore to exclude .DS_Store, __pycache__, IDE files, etc. - Add auto-dependency installer in nt_loader/__init__.py that detects and installs missing packages (requests, pillow, fileseq) on startup, fixing the initialization failure on Hiero/Nuke 17+ environments where the bundled Python does not include these packages. - Update ntl_pip_dependency_installer.py with Nuke 17 path comments. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
In Nuke/Hiero 17+ on macOS, sys.executable points to the Nuke binary (not a Python interpreter), causing SIGSEGV when spawning a subprocess with "-m pip". Switch to pip._internal.cli.main which runs pip in-process, avoiding the crash entirely. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
tank_vendor and tank modules (from tk-core) are not bundled in Hiero 17.0v1. Add tk-core git URL to the auto-install list so it gets installed alongside requests, pillow, and fileseq. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
tk-core compiles Qt resource files against PySide2 and calls PySide2.QtCore.qRegisterResourceData at import time. Hiero 17 only ships PySide6, causing 'NoneType' attribute errors. This adds a comprehensive PySide2 shim that: - Creates a fake PySide2 module redirecting to PySide6 - Maps all common sub-modules (QtCore, QtGui, QtWidgets, etc.) - Provides no-op stubs for qRegisterResourceData and qUnregisterResourceData which were removed in PySide6 The shim runs before any tk-core import to prevent the crash. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
Remove the full PySide2 shim from __init__.py (menu.py already handles that) and replace it with a focused patch that adds qRegisterResourceData and qUnregisterResourceData stubs on both PySide6.QtCore and any PySide2.QtCore shim already in sys.modules. This avoids conflicts between two competing shims that could leave QtCore as None. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
Root cause: tk-core's QtImporter tries 'import shiboken2' in its PySide2 code path. Hiero 17 bundles shiboken6 (not shiboken2), so that path fails. The PySide6 fallback also fails, leaving QtCore=None which causes the 'NoneType has no attribute qRegisterResourceData' error. Fix: alias shiboken2→shiboken6 in sys.modules so tk-core's PySide2 path succeeds. Also set PySide2.__version__ which tk-core reads. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
The PySide2 shim from menu.py tricks tk-core's QtImporter into taking the PySide2 code path, but pyside2_patcher then fails because PySide6 modules lack Qt5-specific classes (e.g. QTextCodec). Fix: temporarily remove PySide2/shiboken2 from sys.modules while importing tank, so QtImporter skips PySide2 and uses its native PySide6 support (pyside6_patcher). After import, PySide2 shim is restored for other code. Also removes the shiboken2→shiboken6 shim which is no longer needed. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
Both PySide2 and PySide6 paths in tk-core's QtImporter can fail silently (missing pyside6_patcher, missing shiboken, etc.), leaving QtCore=None in qt_abstraction. This causes resources_rc.py to crash when login_dialog is imported later. Fix: after importing tank, check if qt_abstraction.QtCore is None and inject PySide6 modules directly. This guarantees resources_rc.py gets valid Qt modules regardless of which QtImporter path succeeded or failed. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
tk-core expects a PySide1-style API where QtGui contains all widget classes and model classes like QSortFilterProxyModel. In PySide6 these are split across QtGui, QtWidgets, and QtCore. Since both pyside2_patcher and pyside6_patcher fail in this environment, create a merged QtGui module that combines all three, matching the API that tk-core's authentication UI expects. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
fn_ui.py imports from qtpy which is not bundled with Hiero 17. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
fn_helpers.py imports cv2 which is not bundled with Hiero 17. https://claude.ai/code/session_014bBD7aMQkSA1bZsBr62usL
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.
No description provided.