Skip to content

feat: ImageSequenceArtifact as input to NukeScriptNode #62

Description

@hutchinson

Background

PR #57 landed ImageSequenceArtifact support as an output from NukeScriptNode
when a Nuke script renders a frame sequence, we collect the files and return them as a
ListArtifact[ImageUrlArtifact]. Kate's review comment surfaced the gap: feeding a
frame sequence into a Nuke script is equally common (e.g. upstream render → Nuke comp
→ downstream deliverable) and is currently unsupported.

Current State

  • ImageSequenceArtifact appears in _OUTPUT_ARTIFACT_TYPES (Annotator panel) and is
    handled in _path_to_artifact() in nuke_script_node.py.
  • It is absent from _INPUT_ARTIFACT_TYPES in the Annotator panel.
  • input_types on dynamically created input parameters does not include
    ImageSequenceArtifact (or ListArtifact).
  • _artifact_to_path() in nuke_script_node.py has no branch for list/sequence inputs.
  • The gizmo builder (nuke_gizmo_builder.py) does not treat image-sequence inputs as
    media inputs, so no Input node would be wired up in the generated gizmo graph.

Acceptance Criteria

  • The Annotator panel's _INPUT_ARTIFACT_TYPES includes ImageSequenceArtifact.
  • NukeScriptNode adds ImageSequenceArtifact / ListArtifact to the input_types
    of annotated input parameters.
  • _artifact_to_path() handles a ListArtifact[ImageUrlArtifact] input: downloads /
    resolves each frame to a local path and returns the printf-style pattern Nuke
    expects (e.g. /tmp/frames/frame.%04d.exr).
  • The gizmo builder treats image-sequence inputs as media inputs (wires an Input
    node into the internal graph, similar to VideoUrlArtifact).
  • Unit tests cover _artifact_to_path() for the sequence case.
  • Integration test (gated on NUKE_EXECUTABLE) verifies a sequence can be passed in
    and read by a Read node inside the script.

Notes

The tricky part is the path-pattern convention: Nuke's Read node expects a printf-style
frame pattern (%04d). When receiving a ListArtifact we need to either:

  • download all frames to a temp directory with a consistent naming scheme, or
  • require that frame URLs already follow a naming convention we can infer.

The first approach (temp dir with normalised names) is safer and matches how
_artifact_to_path() already handles BlobArtifact → temp PNG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions