Nodes/MKRShift_Nodes/Nuke Script Import
ComfyUI Node

Nuke Script Import

Pull your Nuke script's Read nodes into ComfyUI as clean JSON

By criskb·Created 7 months ago·Updated 5 months ago· 0
Nuke Script Import
    • nuke_packet_json
    • read_manifest_json
    • script_context_json
    • summary_json
    nuke_payload_json

    MKRNukeScriptImport is the "host → ComfyUI" direction of the Nuke bridge - the opposite of the output lanes. The Nuke addon that ships with this pack (a bridge panel plus a gizmo) serializes what's in your script into a JSON payload, and this node normalizes that payload into structured, predictable pieces your ComfyUI graph can actually consume.

    In practice the payload arrives as a JSON blob describing the script: a name, a root format, a frame range, a viewer process, and a list of Read nodes (each with a name, path, and colorspace). ComfyUI can't do anything useful with a free-form blob directly, so this node's job is normalization: it defaults missing fields (untitled.nk, HD_1080, 1-100), sanitizes text, and reshapes the reads list into a clean array of {name, path, colorspace} records.

    The input

    Just one: nuke_payload_json - the payload from the Nuke bridge panel. Paste it in, or better, wire it from a node that received it over the pack's endpoint/transport lane so the whole thing stays automatic. If the payload isn't valid JSON, you get warnings rather than a crash, and the node does its best with defaults.

    The outputs

    • nuke_packet_json - the normalized bridge packet (schema mkrshift_nuke_bridge_v1). This is the canonical record of the script state; keep it if you want to persist "what Nuke looked like when I pulled it."
    • read_manifest_json - just the reads array. This is the useful one: a list of every Read node with its path. Feed it to anything that iterates assets, or use it to know exactly which plates you're working from.
    • script_context_json - root_format and viewer_process, the two fields that matter when you later want to write a render back at the right format or through the right viewer.
    • summary_json - script name, read count, frame range, warnings. Your sanity check that the import actually saw what you thought it saw.

    Why you'd reach for it

    If you're building a comp-aware workflow - pull the script's Reads, use the paths to load the same plates into ComfyUI, regenerate or paint over them, and write the results back through a read plan - this node is the front door. Without it you'd be hand-parsing a bridge payload in every workflow. With it, read_manifest_json gives you the asset list and script_context_json gives you the comp context in one clean pass.

    Installing and gotchas

    Part of the MKRShift Nodes pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/criskb/MKRShift_Nodes
    

    restart, or use ComfyUI Manager and search "MKRShift". No extra dependencies, no downloads.

    The gotcha is expectation-setting: this node processes JSON that the Nuke addon produces. If you feed it a random JSON document that isn't the bridge payload, you'll get an empty read_manifest_json and maybe a single sanitized Read record - it silently reshapes whatever it finds. So make sure the payload really came from the Nuke bridge panel, and check summary_json's read_count before trusting the manifest. It's a normalizer, not a mind-reader.

    CategoryMKRShift Nodes/Addons/Nuke

    Inputs (1)

    NameTypeDefaultDescription
    nuke_payload_jsonSTRING

    Outputs (4)

    NameTypeDescription
    nuke_packet_jsonSTRING
    read_manifest_jsonSTRING
    script_context_jsonSTRING
    summary_jsonSTRING