fix: interactive point placement on Nuke 16 (Qt6)#3
Open
semx2a wants to merge 3 commits into
Open
Conversation
The package had no Nuke-level init.py, so ./gizmos was never added to the plugin path (H2_SamViT: "Unknown command") and the H2_SamViT_Gizmo package itself was not importable from gizmo knob callbacks. Add an init.py that registers ./gizmos and puts the package's parent on the plugin path (which Nuke also adds to sys.path). Also ignore .codegraph/ tool artifacts.
Replace the ad-hoc pip installer (which failed on sam2/sam3 source builds: missing setuptools/bdist_wheel under --no-build-isolation) with uv: - pyproject.toml declares the full dependency set; torch/torchvision pinned to the CUDA 12.6 wheel index; sam2/sam3 build via [tool.uv.extra-build-dependencies] (setuptools/wheel injected into their isolated builds); triton-windows for sam3's `import triton` on Windows. - uv.lock committed for byte-identical installs across machines. - install.py becomes a thin driver: bootstraps uv, runs `uv sync`, records the venv in env_config.json, verifies imports. - --venv <path> installs a machine-local env (faster cold starts); the shared ./venv next to the plugin remains the zero-setup default.
The mode-based viewer click workflow was fully wired but dead:
- viewer_events imported PySide2 only (NameError on import under Nuke 16's
PySide6) and was never installed by anything — install it from menu.py.
- Qt6 wraps the viewer GL surface as a plain QWidget (QGLWidget is gone),
so the class-name gate rejected every click; detect the surface via the
"Viewer.N" ancestor objectName + size instead, and use event.position()
with a pos() fallback.
- Clicks now fall back to the node that entered an edit mode, instead of
silently requiring the H2 node to stay selected in the DAG.
- ui_overlay: forward slashes in Read-node file knobs (Windows backslashes
are mangled as escape sequences) and serial-numbered overlay files so the
file-knob change triggers the reload — knob("reload").execute() from a
click event raised "I'm already executing something else" on every point.
- callbacks: the legacy add_fg/bg_point checkbox shim now only fires for
Boolean knobs (on current gizmos they are PyScript buttons, where
setValue(False) is setCommand → TypeError spam).
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.
Part 3 of the series — builds on #2 (review the last commit only).
The click-to-place workflow is fully wired but currently dead on Nuke 16:
viewer_eventsimports PySide2 only (NameError under Nuke 16's PySide6) and itsinstall()is never called by anything — now PySide6-first and installed frommenu.py.QGLWidget, so the viewer GL surface wraps to Python as a plainQWidgetand the class-name gate rejected every click; the surface is now detected via theViewer.Nancestor objectName + size, andevent.position()is used with apos()fallback.ui_overlay: forward slashes in Read-node file knobs (Windows backslashes are mangled as escapes) and serial-numbered overlay files so the file-knob change triggers the reload —knob('reload').execute()from a click event raises Nuke's "I'm already executing something else" on every placed point.callbacks: the legacy add_fg/bg_point checkbox shim only fires for Boolean knobs (on current gizmos these are PyScript buttons, wheresetValue(False)maps tosetCommand→ TypeError).