Nodes/MKRShift_Nodes/TouchDesigner Import
ComfyUI Node

TouchDesigner Import

The TouchDesigner side of the bridge, as a JSON normalizer

By criskb·Created 7 months ago·Updated 5 months ago· 0
TouchDesigner Import
    • td_packet_json
    • controls_json
    • texture_manifest_json
    • summary_json
    touchdesigner_payload_json

    MKRTouchDesignerImport is the receive side of the MKRShift ↔ TouchDesigner bridge. Where MKRTouchDesignerFramePlan builds the contract for pushing an asset into TD, this node takes a payload that came out of TD and normalizes it into something the rest of your graph can use. If the frame plan is the "out" lane, this is the "in" lane.

    It's a parser, not a connector. You feed it one required input, touchdesigner_payload_json - the packet JSON that the TD addon (the MKRShiftBridgeExt.py extension in addons/touchdesigner/, sitting in a baseCOMP or .tox with a DAT storing the packet) hands off. The node runs normalize_touchdesigner_packet on it and splits the result into four strings: td_packet_json (the normalized packet), controls_json (the control values TD is sending you), texture_manifest_json (what textures are in the payload - it reports top_name, texture_count, and the texture list under schema mkrshift_touchdesigner_texture_manifest_v1), and summary_json (a plain-language rundown plus any warnings from the normalization).

    Why you'd reach for it

    If you're building the live visual lane - ComfyUI generating frames, TD modulating and performing them - you eventually want TD's parameters to drive ComfyUI state: a knob that changes a prompt weight, an audio-reactive value that picks a seed. That traffic arrives here as a packet, and this node is the door it walks through. The controls_json output is the part you'll actually wire onward if you're connecting TD controls to prompts, seeds, or sampler settings.

    The one input that matters

    • touchdesigner_payload_json - paste or wire the packet JSON from the TD addon's DAT. Garbage in, warnings out: malformed JSON won't crash the node, but you'll get an empty packet and a summary_json that tells you the parse failed. Always check that summary before wiring downstream - an empty packet parses fine as a dict and silently gives you nothing.

    Install

    Part of MKRShift Nodes - install the pack, not the node:

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

    or via ComfyUI Manager, search MKRShift_Nodes. Restart after cloning. No pip dependencies here - this node is pure JSON in, JSON out.

    Common issues

    The trap is treating it like a transport. It never touches a network; it only parses what you give it, so if you see nothing coming through, the payload itself isn't reaching the node - check that the DAT on the TD side is exporting the packet JSON you think it is. And remember the output strings are JSON-as-text: to actually use controls_json downstream you either wire it into a node that parses JSON strings or feed it through a JSON parse node first. That's normal for this pack's addon lane - the plans, packets, and manifests are all designed to be readable, loggable JSON rather than opaque tensors.

    CategoryMKRShift Nodes/Addons/TouchDesigner

    Inputs (1)

    NameTypeDefaultDescription
    touchdesigner_payload_jsonSTRING

    Outputs (4)

    NameTypeDescription
    td_packet_jsonSTRING
    controls_jsonSTRING
    texture_manifest_jsonSTRING
    summary_jsonSTRING