Background
The griptape-nodes-engine added a save_temp_file project situation that gives nodes a project-managed path for scratch files — OVERWRITE collision policy, resolves to the project's {temp} directory, and auto-creates directories. Nodes declare a ProjectFileParameter(situation="save_temp_file") to get a deterministic, project-visible path instead of writing to the OS temp dir.
Problem
nuke_nodes/nuke_script_node.py currently uses raw tempfile module calls to create scratch files during node execution. This means:
- Scratch files land in the OS temp dir, invisible to the project system
- Re-runs accumulate indexed copies instead of overwriting
- Cleanup is manual (explicit
finally blocks and atexit hooks)
Proposed Change
Migrate the following call-site groups in nuke_nodes/nuke_script_node.py to use ProjectFileParameter(situation="save_temp_file"):
- Lines ~812 — output placeholder files in
run_step() (NamedTemporaryFile)
- Lines ~802 — image sequence directory in
run_step() (mkdtemp)
- Lines ~630, 651 —
_artifact_to_path() URL/bytes download helpers (NamedTemporaryFile)
Out of Scope
These are infrastructure-level temp files and should stay as-is:
execution/direct.py — IPC manifest JSON for subprocess communication
script_parser/sidecar.py — atomic write (mkstemp + rename) pattern
nuke_plugin/griptape_annotator_panel.py — same atomic write pattern inside Nuke GUI
publish_gizmo/run_button.py — runs inside Nuke's Python, not the Griptape runtime
Acceptance Criteria
Background
The griptape-nodes-engine added a
save_temp_fileproject situation that gives nodes a project-managed path for scratch files — OVERWRITE collision policy, resolves to the project's{temp}directory, and auto-creates directories. Nodes declare aProjectFileParameter(situation="save_temp_file")to get a deterministic, project-visible path instead of writing to the OS temp dir.Problem
nuke_nodes/nuke_script_node.pycurrently uses rawtempfilemodule calls to create scratch files during node execution. This means:finallyblocks andatexithooks)Proposed Change
Migrate the following call-site groups in
nuke_nodes/nuke_script_node.pyto useProjectFileParameter(situation="save_temp_file"):run_step()(NamedTemporaryFile)run_step()(mkdtemp)_artifact_to_path()URL/bytes download helpers (NamedTemporaryFile)Out of Scope
These are infrastructure-level temp files and should stay as-is:
execution/direct.py— IPC manifest JSON for subprocess communicationscript_parser/sidecar.py— atomic write (mkstemp+ rename) patternnuke_plugin/griptape_annotator_panel.py— same atomic write pattern inside Nuke GUIpublish_gizmo/run_button.py— runs inside Nuke's Python, not the Griptape runtimeAcceptance Criteria
nuke_nodes/useProjectFileParameter(situation="save_temp_file")path resolutiontempfilemodule calls remain innuke_nodes/finallyblocks removed where OVERWRITE policy makes them redundantuv run pytest tests/unit/)