Skip to content

Claude/add gitignore fix v17 ygw1 t#1

Open
hramirezedc wants to merge 12 commits intoTheFoundryVisionmongers:mainfrom
hramirezedc:claude/add-gitignore-fix-v17-Ygw1T
Open

Claude/add gitignore fix v17 ygw1 t#1
hramirezedc wants to merge 12 commits intoTheFoundryVisionmongers:mainfrom
hramirezedc:claude/add-gitignore-fix-v17-Ygw1T

Conversation

@hramirezedc
Copy link
Copy Markdown

No description provided.

Henry Ramirez and others added 12 commits March 12, 2026 15:47
- 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
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.

2 participants