Nodes/MKRShift_Nodes/After Effects Comp Import
ComfyUI Node

After Effects Comp Import

Pulling After Effects comp metadata into the graph

By criskb·Created 7 months ago·Updated 5 months ago· 0
After Effects Comp Import
    • ae_packet_json
    • render_context_json
    • summary_json
    after_effects_payload_json

    After Effects is a real ComfyUI neighbor these days - people build panels and scripts that drive ComfyUI workflows from inside AE, and the MKRShift pack returns the favor by giving ComfyUI a way to talk back. After Effects Comp Import is the metadata intake of that bridge. It takes a JSON payload describing an After Effects composition - project name, comp name, dimensions, frame rate, duration - and normalizes it into a standard bridge packet plus a render context that the rest of the graph can reason about.

    It's from the "host addons" lane of MKRShift Nodes (Cris K B's production pack, which ships an After Effects addon scaffold under addons/after_effects/). And like every import node in the lane, it's packet-first: the AE addon exports JSON, this node makes it predictable.

    How it works

    The single required input is after_effects_payload_json. The node parses it and pulls the fields that define a comp: project_name (default "Untitled.aep"), comp_name (default "Comp 1"), and the technical context - width, height, fps, and duration. These get repackaged into a canonical mkrshift_after_effects_bridge_v1 packet, so downstream nodes never have to know whether the payload came from AE's scripting API, a hand-typed test, or a saved file.

    The second output, render_context_json, is the one you actually build around: it's the trimmed-down context (comp name, fps, duration) that a downstream node would use to make render decisions - like knowing the comp runs at 24fps and 10 seconds long before you generate frames to drop into it. summary_json closes it out with comp name, project name, and parse warnings.

    Outputs

    • ae_packet_json - the normalized bridge packet (project, comp, dimensions, fps, duration)
    • render_context_json - the compact context for render-side decisions
    • summary_json - comp/project names plus warnings

    Installation

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

    Restart ComfyUI, or search "MKRShift Nodes" in ComfyUI Manager. No pip dependencies - this node is JSON normalization only.

    Common issues

    The standard host-bridge gotchas apply, with a metadata twist. If the payload doesn't parse, defaults kick in quietly - an empty comp becomes "Comp 1" at 0×0, 0fps, and a graph that assumes real values will do odd things downstream. The summary's warning count is your only signal, so check it. Second, this node imports metadata, not pixels. If you want the actual frame content from AE, that's the separate image-import node (MKRAfterEffectsImageImport) - the two are the "what is this comp" and "give me the plate" halves of the same bridge, and people routinely wire them together. Third, units: duration and fps arrive as floats and are passed through as-is, so a payload with frame counts instead of seconds (some AE scripts export duration = frameCount) will silently carry the wrong value. Keep the payload's contract straight and this node is a boring, reliable first step in the AE roundtrip.

    CategoryMKRShift Nodes/Addons/After Effects

    Inputs (1)

    NameTypeDefaultDescription
    after_effects_payload_jsonSTRING

    Outputs (3)

    NameTypeDescription
    ae_packet_jsonSTRING
    render_context_jsonSTRING
    summary_jsonSTRING