{
  "kind": "dsl",
  "metadata": {
    "title": "Export Timeline Clips As Separate Files",
    "descriptionMarkdown": "Exports video Track Items from the active sequence as separate files. Choose the full timeline result (all layers), the isolated clip with only directly applied clip effects, or the used source-file range without timeline effects. Scope can include selected clips, one numbered video track, or all video tracks, with muted tracks optional. An editable template supports project, sequence, track, clip, source, start-timecode, start-frame, and index tokens. Existing outputs are skipped or receive a numeric suffix; they are never overwritten. Non-file-backed graphics, titles, MOGRTs, and adjustment layers are conservatively skipped as clip jobs in every mode, while nested Sequences are supported only for the full timeline result. Per-clip skip and failure reasons are written to the Run Log."
  },
  "dsl": {
    "version": 0,
    "execution": {
      "transactionMode": "SAFE_AUTO_COMMIT"
    },
    "entry": "activeSequence",
    "blocks": {
      "activeSequence": {
        "type": "setVar",
        "inputs": {
          "name": "activeSequence",
          "value": {
            "type": "prGetActiveSequenceRef",
            "inputs": {}
          }
        },
        "next": "promptFields"
      },
      "promptFields": {
        "type": "setVar",
        "inputs": {
          "name": "promptFields",
          "value": []
        },
        "next": "addMode"
      },
      "addMode": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "SELECT",
              "label": "Render mode",
              "var": "renderMode",
              "options": [
                "Timeline result — all layers",
                "Isolated clip effects — no adjustment layers or audio",
                "Used source range — no timeline effects"
              ],
              "defaultValue": "Timeline result — all layers",
              "required": true
            }
          }
        },
        "next": "addScope"
      },
      "addScope": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "SELECT",
              "label": "Clips to export",
              "var": "clipScope",
              "options": [
                "Selected video clips",
                "One video track",
                "All video tracks"
              ],
              "defaultValue": "Selected video clips",
              "required": true
            }
          }
        },
        "next": "addTrackNumber"
      },
      "addTrackNumber": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "NUMBER",
              "label": "Video track number (V1 = 1; used only for one track)",
              "var": "trackNumber",
              "defaultValue": 1,
              "required": true
            }
          }
        },
        "next": "addMutedTracks"
      },
      "addMutedTracks": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "CHECKBOX",
              "label": "Include clips on muted video tracks",
              "var": "includeMutedTracks",
              "defaultValue": false
            }
          }
        },
        "next": "addRange"
      },
      "addRange": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "SELECT",
              "label": "Sequence range",
              "var": "sequenceRange",
              "options": [
                "Entire sequence",
                "Current In/Out"
              ],
              "defaultValue": "Entire sequence",
              "required": true
            }
          }
        },
        "next": "addHandles"
      },
      "addHandles": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "NUMBER",
              "label": "Handle frames (ignored for isolated mode)",
              "var": "handleFrames",
              "defaultValue": 0,
              "required": true
            }
          }
        },
        "next": "addNamingTemplate"
      },
      "addNamingTemplate": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "TEXT",
              "label": "Filename template",
              "var": "filenameTemplate",
              "defaultValue": "{sequence}_{track}_{startTC}_{clip}",
              "required": true
            }
          }
        },
        "next": "addCollisionPolicy"
      },
      "addCollisionPolicy": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "SELECT",
              "label": "When an output already exists",
              "var": "collisionPolicy",
              "options": [
                "Skip existing file",
                "Add numeric suffix"
              ],
              "defaultValue": "Skip existing file",
              "required": true
            }
          }
        },
        "next": "addPreset"
      },
      "addPreset": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "FILE",
              "label": "Premiere export preset (.epr)",
              "var": "presetPath",
              "types": [
                "epr"
              ],
              "required": true
            }
          }
        },
        "next": "addOutputFolder"
      },
      "addOutputFolder": {
        "type": "listPush",
        "inputs": {
          "name": "promptFields",
          "value": {
            "type": "uiPromptField",
            "inputs": {
              "kind": "FOLDER",
              "label": "Output folder",
              "var": "outputFolder",
              "required": true
            }
          }
        },
        "next": "prompt"
      },
      "prompt": {
        "type": "uiPromptForm",
        "inputs": {
          "title": "Export Timeline Clips",
          "message": "Render modes:\n\nTimeline result: Includes adjustment layers, graphics, overlapping tracks, transitions, captions, and the sequence audio mix.\n\nIsolated clip effects: Includes only the complete video Track Item and effects applied directly to it. It has no adjustment layers or audio. Sequence In/Out filters occurrences without trimming them.\n\nUsed source range: Maps the overlap with Sequence In/Out back to source time. It contains no timeline effects and requires Adobe Media Encoder. Nonlinear Time Remapping still needs review.\n\nFilename tokens:\n{project} — project name without .prproj\n{sequence}, {track}, {clip}, {source}\n{startTC} — sequence display format and zero point\n{startFrame} — frame 0 is the sequence start; display offset is ignored\n{index} — export order",
          "fields": {
            "var": "promptFields"
          },
          "cancelBehavior": "STOP"
        },
        "next": "validateNumbers"
      },
      "validateNumbers": {
        "type": "if",
        "inputs": {
          "branches": [
            {
              "condition": {
                "type": "logicOperation",
                "inputs": {
                  "op": "OR",
                  "a": {
                    "type": "logicCompare",
                    "inputs": {
                      "op": "LT",
                      "a": {
                        "var": "handleFrames"
                      },
                      "b": 0
                    }
                  },
                  "b": {
                    "type": "logicOperation",
                    "inputs": {
                      "op": "AND",
                      "a": {
                        "type": "logicCompare",
                        "inputs": {
                          "op": "EQ",
                          "a": {
                            "var": "clipScope"
                          },
                          "b": "One video track"
                        }
                      },
                      "b": {
                        "type": "logicCompare",
                        "inputs": {
                          "op": "LT",
                          "a": {
                            "var": "trackNumber"
                          },
                          "b": 1
                        }
                      }
                    }
                  }
                }
              },
              "body": [
                {
                  "type": "fail",
                  "inputs": {
                    "message": "Handle frames must be zero or greater, and the video track number must be 1 (V1) or higher."
                  }
                }
              ]
            }
          ]
        },
        "next": "frameRate"
      },
      "frameRate": {
        "type": "setVar",
        "inputs": {
          "name": "frameRate",
          "value": {
            "type": "prGetSequenceProperty",
            "inputs": {
              "sequence": {
                "var": "activeSequence"
              },
              "property": "VIDEO_FRAME_RATE"
            }
          }
        },
        "next": "handleSeconds"
      },
      "handleSeconds": {
        "type": "setVar",
        "inputs": {
          "name": "handleSeconds",
          "value": {
            "type": "mathArithmetic",
            "inputs": {
              "op": "DIVIDE",
              "a": {
                "var": "handleFrames"
              },
              "b": {
                "var": "frameRate"
              }
            }
          }
        },
        "next": "rangeStart"
      },
      "rangeStart": {
        "type": "setVar",
        "inputs": {
          "name": "rangeStart",
          "value": 0
        },
        "next": "rangeEnd"
      },
      "rangeEnd": {
        "type": "setVar",
        "inputs": {
          "name": "rangeEnd",
          "value": {
            "type": "prGetSequenceProperty",
            "inputs": {
              "sequence": {
                "var": "activeSequence"
              },
              "property": "END_SECONDS"
            }
          }
        },
        "next": "useInOut"
      },
      "useInOut": {
        "type": "if",
        "inputs": {
          "branches": [
            {
              "condition": {
                "type": "logicCompare",
                "inputs": {
                  "op": "EQ",
                  "a": {
                    "var": "sequenceRange"
                  },
                  "b": "Current In/Out"
                }
              },
              "body": [
                {
                  "type": "setVar",
                  "inputs": {
                    "name": "rangeStart",
                    "value": {
                      "type": "prGetSequenceProperty",
                      "inputs": {
                        "sequence": {
                          "var": "activeSequence"
                        },
                        "property": "IN_POINT_SECONDS"
                      }
                    }
                  }
                },
                {
                  "type": "setVar",
                  "inputs": {
                    "name": "rangeEnd",
                    "value": {
                      "type": "prGetSequenceProperty",
                      "inputs": {
                        "sequence": {
                          "var": "activeSequence"
                        },
                        "property": "OUT_POINT_SECONDS"
                      }
                    }
                  }
                },
                {
                  "type": "if",
                  "inputs": {
                    "branches": [
                      {
                        "condition": {
                          "type": "logicOperation",
                          "inputs": {
                            "op": "OR",
                            "a": {
                              "type": "logicCompare",
                              "inputs": {
                                "op": "EQ",
                                "a": {
                                  "var": "rangeStart"
                                },
                                "b": -400000
                              }
                            },
                            "b": {
                              "type": "logicCompare",
                              "inputs": {
                                "op": "EQ",
                                "a": {
                                  "var": "rangeEnd"
                                },
                                "b": -400000
                              }
                            }
                          }
                        },
                        "body": [
                          {
                            "type": "fail",
                            "inputs": {
                              "message": "Current In/Out was selected, but the active sequence has no explicit In/Out range."
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        "next": "extension"
      },
      "extension": {
        "type": "setVar",
        "inputs": {
          "name": "extension",
          "value": {
            "type": "prGetExportFileExtension",
            "inputs": {
              "sequence": {
                "var": "activeSequence"
              },
              "presetPath": {
                "var": "presetPath"
              }
            }
          }
        },
        "next": "projectNameRaw"
      },
      "projectNameRaw": {
        "type": "setVar",
        "inputs": {
          "name": "projectNameRaw",
          "value": {
            "type": "prGetProjectProperty",
            "inputs": {
              "property": "NAME"
            }
          }
        },
        "next": "projectName"
      },
      "projectName": {
        "type": "setVar",
        "inputs": {
          "name": "projectName",
          "value": {
            "type": "pathFileNameWithoutExtension",
            "inputs": {
              "path": {
                "var": "projectNameRaw"
              }
            }
          }
        },
        "next": "sequenceName"
      },
      "sequenceName": {
        "type": "setVar",
        "inputs": {
          "name": "sequenceName",
          "value": {
            "type": "prGetSequenceProperty",
            "inputs": {
              "sequence": {
                "var": "activeSequence"
              },
              "property": "NAME"
            }
          }
        },
        "next": "preflightAME"
      },
      "preflightAME": {
        "type": "if",
        "inputs": {
          "branches": [
            {
              "condition": {
                "type": "logicOperation",
                "inputs": {
                  "op": "AND",
                  "a": {
                    "type": "logicCompare",
                    "inputs": {
                      "op": "EQ",
                      "a": {
                        "var": "renderMode"
                      },
                      "b": "Used source range — no timeline effects"
                    }
                  },
                  "b": {
                    "type": "logicNegate",
                    "inputs": {
                      "value": {
                        "type": "prIsAMEInstalled",
                        "inputs": {}
                      }
                    }
                  }
                }
              },
              "body": [
                {
                  "type": "fail",
                  "inputs": {
                    "message": "Used source range requires a compatible installed Adobe Media Encoder."
                  }
                }
              ]
            }
          ]
        },
        "next": "candidateClips"
      },
      "candidateClips": {
        "type": "setVar",
        "inputs": {
          "name": "candidateClips",
          "value": []
        },
        "next": "collectClips"
      },
      "collectClips": {
        "type": "prForEachTrack",
        "inputs": {
          "sequence": {
            "var": "activeSequence"
          },
          "kind": "VIDEO",
          "order": "ASC",
          "trackVar": "trackRef",
          "indexVar": "trackIndex"
        },
        "body": [
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "type": "logicOperation",
                    "inputs": {
                      "op": "AND",
                      "a": {
                        "type": "logicOperation",
                        "inputs": {
                          "op": "OR",
                          "a": {
                            "type": "logicCompare",
                            "inputs": {
                              "op": "EQ",
                              "a": {
                                "var": "clipScope"
                              },
                              "b": "All video tracks"
                            }
                          },
                          "b": {
                            "type": "logicOperation",
                            "inputs": {
                              "op": "OR",
                              "a": {
                                "type": "logicCompare",
                                "inputs": {
                                  "op": "EQ",
                                  "a": {
                                    "var": "clipScope"
                                  },
                                  "b": "Selected video clips"
                                }
                              },
                              "b": {
                                "type": "logicOperation",
                                "inputs": {
                                  "op": "AND",
                                  "a": {
                                    "type": "logicCompare",
                                    "inputs": {
                                      "op": "EQ",
                                      "a": {
                                        "var": "clipScope"
                                      },
                                      "b": "One video track"
                                    }
                                  },
                                  "b": {
                                    "type": "logicCompare",
                                    "inputs": {
                                      "op": "EQ",
                                      "a": {
                                        "var": "trackIndex"
                                      },
                                      "b": {
                                        "type": "mathArithmetic",
                                        "inputs": {
                                          "op": "MINUS",
                                          "a": {
                                            "var": "trackNumber"
                                          },
                                          "b": 1
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "b": {
                        "type": "logicOperation",
                        "inputs": {
                          "op": "OR",
                          "a": {
                            "var": "includeMutedTracks"
                          },
                          "b": {
                            "type": "logicNegate",
                            "inputs": {
                              "value": {
                                "type": "prGetTrackProperty",
                                "inputs": {
                                  "track": {
                                    "var": "trackRef"
                                  },
                                  "property": "IS_MUTED"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "body": [
                    {
                      "type": "prForEachTrackItem",
                      "inputs": {
                        "track": {
                          "var": "trackRef"
                        },
                        "kind": "CLIP",
                        "fromSeconds": {
                          "var": "rangeStart"
                        },
                        "toSeconds": {
                          "var": "rangeEnd"
                        },
                        "order": "ASC",
                        "itemVar": "candidateRef"
                      },
                      "body": [
                        {
                          "type": "if",
                          "inputs": {
                            "branches": [
                              {
                                "condition": {
                                  "type": "logicOperation",
                                  "inputs": {
                                    "op": "AND",
                                    "a": {
                                      "type": "logicOperation",
                                      "inputs": {
                                        "op": "AND",
                                        "a": {
                                          "type": "logicOperation",
                                          "inputs": {
                                            "op": "OR",
                                            "a": {
                                              "type": "logicCompare",
                                              "inputs": {
                                                "op": "NEQ",
                                                "a": {
                                                  "var": "clipScope"
                                                },
                                                "b": "Selected video clips"
                                              }
                                            },
                                            "b": {
                                              "type": "prGetTrackItemProperty",
                                              "inputs": {
                                                "item": {
                                                  "var": "candidateRef"
                                                },
                                                "property": "IS_SELECTED"
                                              }
                                            }
                                          }
                                        },
                                        "b": {
                                          "type": "logicNegate",
                                          "inputs": {
                                            "value": {
                                              "type": "prGetTrackItemProperty",
                                              "inputs": {
                                                "item": {
                                                  "var": "candidateRef"
                                                },
                                                "property": "IS_DISABLED"
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "b": {
                                      "type": "logicOperation",
                                      "inputs": {
                                        "op": "AND",
                                        "a": {
                                          "type": "logicCompare",
                                          "inputs": {
                                            "op": "GT",
                                            "a": {
                                              "type": "prGetTrackItemProperty",
                                              "inputs": {
                                                "item": {
                                                  "var": "candidateRef"
                                                },
                                                "property": "DURATION_SECONDS"
                                              }
                                            },
                                            "b": 0
                                          }
                                        },
                                        "b": {
                                          "type": "logicOperation",
                                          "inputs": {
                                            "op": "AND",
                                            "a": {
                                              "type": "logicCompare",
                                              "inputs": {
                                                "op": "LT",
                                                "a": {
                                                  "type": "prGetTrackItemProperty",
                                                  "inputs": {
                                                    "item": {
                                                      "var": "candidateRef"
                                                    },
                                                    "property": "START_SECONDS"
                                                  }
                                                },
                                                "b": {
                                                  "var": "rangeEnd"
                                                }
                                              }
                                            },
                                            "b": {
                                              "type": "logicCompare",
                                              "inputs": {
                                                "op": "GT",
                                                "a": {
                                                  "type": "prGetTrackItemProperty",
                                                  "inputs": {
                                                    "item": {
                                                      "var": "candidateRef"
                                                    },
                                                    "property": "END_SECONDS"
                                                  }
                                                },
                                                "b": {
                                                  "var": "rangeStart"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "body": [
                                  {
                                    "type": "listPush",
                                    "inputs": {
                                      "name": "candidateClips",
                                      "value": {
                                        "var": "candidateRef"
                                      }
                                    }
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          }
        ],
        "next": "candidateCount"
      },
      "candidateCount": {
        "type": "setVar",
        "inputs": {
          "name": "candidateCount",
          "value": {
            "type": "listLength",
            "inputs": {
              "list": {
                "var": "candidateClips"
              }
            }
          }
        },
        "next": "requireCandidates"
      },
      "requireCandidates": {
        "type": "if",
        "inputs": {
          "branches": [
            {
              "condition": {
                "type": "logicCompare",
                "inputs": {
                  "op": "EQ",
                  "a": {
                    "var": "candidateCount"
                  },
                  "b": 0
                }
              },
              "body": [
                {
                  "type": "fail",
                  "inputs": {
                    "message": "No matching video clips overlap the chosen range."
                  }
                }
              ]
            }
          ]
        },
        "next": "initRendered"
      },
      "initRendered": {
        "type": "setVar",
        "inputs": {
          "name": "renderedCount",
          "value": 0
        },
        "next": "initSkipped"
      },
      "initSkipped": {
        "type": "setVar",
        "inputs": {
          "name": "skippedCount",
          "value": 0
        },
        "next": "initFailed"
      },
      "initFailed": {
        "type": "setVar",
        "inputs": {
          "name": "failedCount",
          "value": 0
        },
        "next": "initRetained"
      },
      "initRetained": {
        "type": "setVar",
        "inputs": {
          "name": "allRetainedSequences",
          "value": []
        },
        "next": "renderClips"
      },
      "renderClips": {
        "type": "forEachListItem",
        "inputs": {
          "list": {
            "var": "candidateClips"
          },
          "itemVar": "clipRef",
          "indexVar": "clipIndex"
        },
        "body": [
          {
            "type": "setVar",
            "inputs": {
              "name": "projectItemRef",
              "value": {
                "type": "prGetTrackItemProperty",
                "inputs": {
                  "item": {
                    "var": "clipRef"
                  },
                  "property": "PROJECT_ITEM_REF"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "mediaPath",
              "value": {
                "type": "prGetProjectItemProperty",
                "inputs": {
                  "item": {
                    "var": "projectItemRef"
                  },
                  "property": "MEDIA_PATH"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "isSequenceItem",
              "value": {
                "type": "prGetProjectItemProperty",
                "inputs": {
                  "item": {
                    "var": "projectItemRef"
                  },
                  "property": "IS_SEQUENCE"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "isOffline",
              "value": {
                "type": "prGetProjectItemProperty",
                "inputs": {
                  "item": {
                    "var": "projectItemRef"
                  },
                  "property": "IS_OFFLINE"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "clipName",
              "value": {
                "type": "prGetTrackItemProperty",
                "inputs": {
                  "item": {
                    "var": "clipRef"
                  },
                  "property": "NAME"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "sourceName",
              "value": {
                "type": "prGetProjectItemProperty",
                "inputs": {
                  "item": {
                    "var": "projectItemRef"
                  },
                  "property": "NAME"
                }
              }
            }
          },
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "type": "logicCompare",
                    "inputs": {
                      "op": "NEQ",
                      "a": {
                        "var": "mediaPath"
                      },
                      "b": ""
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "sourceName",
                        "value": {
                          "type": "pathFileNameWithoutExtension",
                          "inputs": {
                            "path": {
                              "var": "mediaPath"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "clipTimelineStart",
              "value": {
                "type": "prGetTrackItemProperty",
                "inputs": {
                  "item": {
                    "var": "clipRef"
                  },
                  "property": "START_SECONDS"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "trackLabel",
              "value": {
                "type": "textJoin",
                "inputs": {
                  "items": [
                    "V",
                    {
                      "type": "mathArithmetic",
                      "inputs": {
                        "op": "ADD",
                        "a": {
                          "type": "prGetTrackItemProperty",
                          "inputs": {
                            "item": {
                              "var": "clipRef"
                            },
                            "property": "TRACK_INDEX"
                          }
                        },
                        "b": 1
                      }
                    }
                  ]
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "startTC",
              "value": {
                "type": "prTimeToSequenceDisplayTimecode",
                "inputs": {
                  "timeSeconds": {
                    "var": "clipTimelineStart"
                  },
                  "sequence": {
                    "var": "activeSequence"
                  },
                  "mediaType": "VIDEO"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "startFrame",
              "value": {
                "type": "prTimeToFrames",
                "inputs": {
                  "timeSeconds": {
                    "var": "clipTimelineStart"
                  },
                  "frameRate": {
                    "var": "frameRate"
                  },
                  "roundingMode": "NEAREST"
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "indexNumber",
              "value": {
                "type": "mathArithmetic",
                "inputs": {
                  "op": "ADD",
                  "a": {
                    "var": "clipIndex"
                  },
                  "b": 1
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "indexText",
              "value": {
                "var": "indexNumber"
              }
            }
          },
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "type": "logicCompare",
                    "inputs": {
                      "op": "LT",
                      "a": {
                        "var": "indexNumber"
                      },
                      "b": 10
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "indexText",
                        "value": {
                          "type": "textJoin",
                          "inputs": {
                            "items": [
                              "00",
                              {
                                "var": "indexNumber"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                },
                {
                  "condition": {
                    "type": "logicCompare",
                    "inputs": {
                      "op": "LT",
                      "a": {
                        "var": "indexNumber"
                      },
                      "b": 100
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "indexText",
                        "value": {
                          "type": "textJoin",
                          "inputs": {
                            "items": [
                              "0",
                              {
                                "var": "indexNumber"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "eligible",
              "value": true
            }
          },
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "type": "logicOperation",
                    "inputs": {
                      "op": "AND",
                      "a": {
                        "type": "logicCompare",
                        "inputs": {
                          "op": "NEQ",
                          "a": {
                            "var": "renderMode"
                          },
                          "b": "Timeline result — all layers"
                        }
                      },
                      "b": {
                        "var": "isSequenceItem"
                      }
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "eligible",
                        "value": false
                      }
                    }
                  ]
                },
                {
                  "condition": {
                    "type": "logicOperation",
                    "inputs": {
                      "op": "AND",
                      "a": {
                        "type": "logicCompare",
                        "inputs": {
                          "op": "NEQ",
                          "a": {
                            "var": "renderMode"
                          },
                          "b": "Timeline result — all layers"
                        }
                      },
                      "b": {
                        "type": "logicNegate",
                        "inputs": {
                          "value": {
                            "var": "isSequenceItem"
                          }
                        }
                      }
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "isMergedClip",
                        "value": {
                          "type": "prGetProjectItemProperty",
                          "inputs": {
                            "item": {
                              "var": "projectItemRef"
                            },
                            "property": "IS_MERGED_CLIP"
                          }
                        }
                      }
                    },
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "isMulticamClip",
                        "value": {
                          "type": "prGetProjectItemProperty",
                          "inputs": {
                            "item": {
                              "var": "projectItemRef"
                            },
                            "property": "IS_MULTICAM_CLIP"
                          }
                        }
                      }
                    },
                    {
                      "type": "if",
                      "inputs": {
                        "branches": [
                          {
                            "condition": {
                              "type": "logicOperation",
                              "inputs": {
                                "op": "OR",
                                "a": {
                                  "var": "isMergedClip"
                                },
                                "b": {
                                  "var": "isMulticamClip"
                                }
                              }
                            },
                            "body": [
                              {
                                "type": "setVar",
                                "inputs": {
                                  "name": "eligible",
                                  "value": false
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "rawFileStem",
              "value": {
                "type": "textReplace",
                "inputs": {
                  "text": {
                    "type": "textReplace",
                    "inputs": {
                      "text": {
                        "type": "textReplace",
                        "inputs": {
                          "text": {
                            "type": "textReplace",
                            "inputs": {
                              "text": {
                                "type": "textReplace",
                                "inputs": {
                                  "text": {
                                    "type": "textReplace",
                                    "inputs": {
                                      "text": {
                                        "type": "textReplace",
                                        "inputs": {
                                          "text": {
                                            "type": "textReplace",
                                            "inputs": {
                                              "text": {
                                                "var": "filenameTemplate"
                                              },
                                              "from": "{project}",
                                              "to": {
                                                "var": "projectName"
                                              }
                                            }
                                          },
                                          "from": "{sequence}",
                                          "to": {
                                            "var": "sequenceName"
                                          }
                                        }
                                      },
                                      "from": "{track}",
                                      "to": {
                                        "var": "trackLabel"
                                      }
                                    }
                                  },
                                  "from": "{clip}",
                                  "to": {
                                    "var": "clipName"
                                  }
                                }
                              },
                              "from": "{source}",
                              "to": {
                                "var": "sourceName"
                              }
                            }
                          },
                          "from": "{startTC}",
                          "to": {
                            "var": "startTC"
                          }
                        }
                      },
                      "from": "{startFrame}",
                      "to": {
                        "var": "startFrame"
                      }
                    }
                  },
                  "from": "{index}",
                  "to": {
                    "var": "indexText"
                  }
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "fileStem",
              "value": {
                "type": "pathSanitizeFileNamePart",
                "inputs": {
                  "value": {
                    "var": "rawFileStem"
                  },
                  "fallback": {
                    "type": "textJoin",
                    "inputs": {
                      "items": [
                        "clip-",
                        {
                          "var": "indexText"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "outputPath",
              "value": {
                "type": "textJoin",
                "inputs": {
                  "items": [
                    {
                      "var": "outputFolder"
                    },
                    "/",
                    {
                      "var": "fileStem"
                    },
                    ".",
                    {
                      "var": "extension"
                    }
                  ]
                }
              }
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "collisionSuffix",
              "value": 2
            }
          },
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "type": "logicCompare",
                    "inputs": {
                      "op": "EQ",
                      "a": {
                        "var": "collisionPolicy"
                      },
                      "b": "Add numeric suffix"
                    }
                  },
                  "body": [
                    {
                      "type": "while",
                      "inputs": {
                        "condition": {
                          "type": "logicOperation",
                          "inputs": {
                            "op": "AND",
                            "a": {
                              "type": "fileExists",
                              "inputs": {
                                "path": {
                                  "var": "outputPath"
                                }
                              }
                            },
                            "b": {
                              "type": "logicCompare",
                              "inputs": {
                                "op": "LT",
                                "a": {
                                  "var": "collisionSuffix"
                                },
                                "b": 10000
                              }
                            }
                          }
                        }
                      },
                      "body": [
                        {
                          "type": "setVar",
                          "inputs": {
                            "name": "outputPath",
                            "value": {
                              "type": "textJoin",
                              "inputs": {
                                "items": [
                                  {
                                    "var": "outputFolder"
                                  },
                                  "/",
                                  {
                                    "var": "fileStem"
                                  },
                                  "_",
                                  {
                                    "var": "collisionSuffix"
                                  },
                                  ".",
                                  {
                                    "var": "extension"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        {
                          "type": "setVar",
                          "inputs": {
                            "name": "collisionSuffix",
                            "value": {
                              "type": "mathArithmetic",
                              "inputs": {
                                "op": "ADD",
                                "a": {
                                  "var": "collisionSuffix"
                                },
                                "b": 1
                              }
                            }
                          }
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "setVar",
            "inputs": {
              "name": "skipReason",
              "value": "unsupported clip type for this mode"
            }
          },
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "var": "isOffline"
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "skipReason",
                        "value": "offline media"
                      }
                    }
                  ]
                },
                {
                  "condition": {
                    "type": "logicOperation",
                    "inputs": {
                      "op": "AND",
                      "a": {
                        "var": "eligible"
                      },
                      "b": {
                        "type": "logicCompare",
                        "inputs": {
                          "op": "EQ",
                          "a": {
                            "var": "mediaPath"
                          },
                          "b": ""
                        }
                      }
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "skipReason",
                        "value": "no readable source media path"
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "if",
            "inputs": {
              "branches": [
                {
                  "condition": {
                    "type": "logicOperation",
                    "inputs": {
                      "op": "OR",
                      "a": {
                        "type": "logicOperation",
                        "inputs": {
                          "op": "OR",
                          "a": {
                            "var": "isOffline"
                          },
                          "b": {
                            "type": "logicNegate",
                            "inputs": {
                              "value": {
                                "var": "eligible"
                              }
                            }
                          }
                        }
                      },
                      "b": {
                        "type": "logicOperation",
                        "inputs": {
                          "op": "AND",
                          "a": {
                            "type": "logicCompare",
                            "inputs": {
                              "op": "EQ",
                              "a": {
                                "var": "mediaPath"
                              },
                              "b": ""
                            }
                          },
                          "b": {
                            "type": "logicNegate",
                            "inputs": {
                              "value": {
                                "type": "logicOperation",
                                "inputs": {
                                  "op": "AND",
                                  "a": {
                                    "var": "isSequenceItem"
                                  },
                                  "b": {
                                    "type": "logicCompare",
                                    "inputs": {
                                      "op": "EQ",
                                      "a": {
                                        "var": "renderMode"
                                      },
                                      "b": "Timeline result — all layers"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "skippedCount",
                        "value": {
                          "type": "mathArithmetic",
                          "inputs": {
                            "op": "ADD",
                            "a": {
                              "var": "skippedCount"
                            },
                            "b": 1
                          }
                        }
                      }
                    },
                    {
                      "type": "esConsoleLog",
                      "inputs": {
                        "message": {
                          "type": "textJoin",
                          "inputs": {
                            "items": [
                              "ENTRY|status=SKIPPED|clip=\"",
                              {
                                "var": "clipName"
                              },
                              "\"|reason=\"",
                              {
                                "var": "skipReason"
                              },
                              "\""
                            ]
                          }
                        }
                      }
                    }
                  ]
                },
                {
                  "condition": {
                    "type": "fileExists",
                    "inputs": {
                      "path": {
                        "var": "outputPath"
                      }
                    }
                  },
                  "body": [
                    {
                      "type": "setVar",
                      "inputs": {
                        "name": "skippedCount",
                        "value": {
                          "type": "mathArithmetic",
                          "inputs": {
                            "op": "ADD",
                            "a": {
                              "var": "skippedCount"
                            },
                            "b": 1
                          }
                        }
                      }
                    },
                    {
                      "type": "esConsoleLog",
                      "inputs": {
                        "message": {
                          "type": "textJoin",
                          "inputs": {
                            "items": [
                              "ENTRY|status=SKIPPED|clip=\"",
                              {
                                "var": "clipName"
                              },
                              "\"|reason=\"output exists: ",
                              {
                                "var": "outputPath"
                              },
                              "\""
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              ],
              "elseBody": [
                {
                  "type": "setVar",
                  "inputs": {
                    "name": "renderOk",
                    "value": false
                  }
                },
                {
                  "type": "setVar",
                  "inputs": {
                    "name": "renderCompletion",
                    "value": ""
                  }
                },
                {
                  "type": "setVar",
                  "inputs": {
                    "name": "retainedSequences",
                    "value": []
                  }
                },
                {
                  "type": "setVar",
                  "inputs": {
                    "name": "renderMessage",
                    "value": ""
                  }
                },
                {
                  "type": "if",
                  "inputs": {
                    "branches": [
                      {
                        "condition": {
                          "type": "logicCompare",
                          "inputs": {
                            "op": "EQ",
                            "a": {
                              "var": "renderMode"
                            },
                            "b": "Used source range — no timeline effects"
                          }
                        },
                        "body": [
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "renderMessage",
                              "value": "Adobe Media Encoder did not confirm a successful source render."
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "mediaDuration",
                              "value": {
                                "type": "prGetProjectItemMediaProperty",
                                "inputs": {
                                  "item": {
                                    "var": "projectItemRef"
                                  },
                                  "property": "DURATION"
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "sourceClipIn",
                              "value": {
                                "type": "prGetTrackItemProperty",
                                "inputs": {
                                  "item": {
                                    "var": "clipRef"
                                  },
                                  "property": "IN_POINT_SECONDS"
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "sourceClipOut",
                              "value": {
                                "type": "prGetTrackItemProperty",
                                "inputs": {
                                  "item": {
                                    "var": "clipRef"
                                  },
                                  "property": "OUT_POINT_SECONDS"
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "clipTimelineEnd",
                              "value": {
                                "type": "prGetTrackItemProperty",
                                "inputs": {
                                  "item": {
                                    "var": "clipRef"
                                  },
                                  "property": "END_SECONDS"
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "sourcePerTimelineSecond",
                              "value": {
                                "type": "mathArithmetic",
                                "inputs": {
                                  "op": "DIVIDE",
                                  "a": {
                                    "type": "mathArithmetic",
                                    "inputs": {
                                      "op": "MINUS",
                                      "a": {
                                        "var": "sourceClipOut"
                                      },
                                      "b": {
                                        "var": "sourceClipIn"
                                      }
                                    }
                                  },
                                  "b": {
                                    "type": "mathArithmetic",
                                    "inputs": {
                                      "op": "MINUS",
                                      "a": {
                                        "var": "clipTimelineEnd"
                                      },
                                      "b": {
                                        "var": "clipTimelineStart"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "intersectionStart",
                              "value": {
                                "type": "mathMinMax",
                                "inputs": {
                                  "op": "MAX",
                                  "a": {
                                    "var": "rangeStart"
                                  },
                                  "b": {
                                    "var": "clipTimelineStart"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "intersectionEnd",
                              "value": {
                                "type": "mathMinMax",
                                "inputs": {
                                  "op": "MIN",
                                  "a": {
                                    "var": "rangeEnd"
                                  },
                                  "b": {
                                    "var": "clipTimelineEnd"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "mappedSourceIn",
                              "value": {
                                "type": "mathArithmetic",
                                "inputs": {
                                  "op": "ADD",
                                  "a": {
                                    "var": "sourceClipIn"
                                  },
                                  "b": {
                                    "type": "mathArithmetic",
                                    "inputs": {
                                      "op": "MULTIPLY",
                                      "a": {
                                        "type": "mathArithmetic",
                                        "inputs": {
                                          "op": "MINUS",
                                          "a": {
                                            "var": "intersectionStart"
                                          },
                                          "b": {
                                            "var": "clipTimelineStart"
                                          }
                                        }
                                      },
                                      "b": {
                                        "var": "sourcePerTimelineSecond"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "mappedSourceOut",
                              "value": {
                                "type": "mathArithmetic",
                                "inputs": {
                                  "op": "ADD",
                                  "a": {
                                    "var": "sourceClipIn"
                                  },
                                  "b": {
                                    "type": "mathArithmetic",
                                    "inputs": {
                                      "op": "MULTIPLY",
                                      "a": {
                                        "type": "mathArithmetic",
                                        "inputs": {
                                          "op": "MINUS",
                                          "a": {
                                            "var": "intersectionEnd"
                                          },
                                          "b": {
                                            "var": "clipTimelineStart"
                                          }
                                        }
                                      },
                                      "b": {
                                        "var": "sourcePerTimelineSecond"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "if",
                            "inputs": {
                              "branches": [
                                {
                                  "condition": {
                                    "type": "prGetTrackItemProperty",
                                    "inputs": {
                                      "item": {
                                        "var": "clipRef"
                                      },
                                      "property": "IS_REVERSED"
                                    }
                                  },
                                  "body": [
                                    {
                                      "type": "setVar",
                                      "inputs": {
                                        "name": "mappedSourceIn",
                                        "value": {
                                          "type": "mathArithmetic",
                                          "inputs": {
                                            "op": "MINUS",
                                            "a": {
                                              "var": "sourceClipOut"
                                            },
                                            "b": {
                                              "type": "mathArithmetic",
                                              "inputs": {
                                                "op": "MULTIPLY",
                                                "a": {
                                                  "type": "mathArithmetic",
                                                  "inputs": {
                                                    "op": "MINUS",
                                                    "a": {
                                                      "var": "intersectionEnd"
                                                    },
                                                    "b": {
                                                      "var": "clipTimelineStart"
                                                    }
                                                  }
                                                },
                                                "b": {
                                                  "var": "sourcePerTimelineSecond"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "setVar",
                                      "inputs": {
                                        "name": "mappedSourceOut",
                                        "value": {
                                          "type": "mathArithmetic",
                                          "inputs": {
                                            "op": "MINUS",
                                            "a": {
                                              "var": "sourceClipOut"
                                            },
                                            "b": {
                                              "type": "mathArithmetic",
                                              "inputs": {
                                                "op": "MULTIPLY",
                                                "a": {
                                                  "type": "mathArithmetic",
                                                  "inputs": {
                                                    "op": "MINUS",
                                                    "a": {
                                                      "var": "intersectionStart"
                                                    },
                                                    "b": {
                                                      "var": "clipTimelineStart"
                                                    }
                                                  }
                                                },
                                                "b": {
                                                  "var": "sourcePerTimelineSecond"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              ]
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "sourceIn",
                              "value": {
                                "type": "mathMinMax",
                                "inputs": {
                                  "op": "MAX",
                                  "a": 0,
                                  "b": {
                                    "type": "mathArithmetic",
                                    "inputs": {
                                      "op": "MINUS",
                                      "a": {
                                        "var": "mappedSourceIn"
                                      },
                                      "b": {
                                        "var": "handleSeconds"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "sourceOut",
                              "value": {
                                "type": "mathMinMax",
                                "inputs": {
                                  "op": "MIN",
                                  "a": {
                                    "var": "mediaDuration"
                                  },
                                  "b": {
                                    "type": "mathArithmetic",
                                    "inputs": {
                                      "op": "ADD",
                                      "a": {
                                        "var": "mappedSourceOut"
                                      },
                                      "b": {
                                        "var": "handleSeconds"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "prRenderFileToAME",
                            "inputs": {
                              "path": {
                                "var": "mediaPath"
                              },
                              "outputPath": {
                                "var": "outputPath"
                              },
                              "presetPath": {
                                "var": "presetPath"
                              },
                              "range": "IN_OUT",
                              "inPointSeconds": {
                                "var": "sourceIn"
                              },
                              "outPointSeconds": {
                                "var": "sourceOut"
                              },
                              "removeUponCompletion": true,
                              "startQueueImmediately": true,
                              "waitForCompletion": true,
                              "onError": "CONTINUE",
                              "storeResultIn": "renderOk"
                            }
                          }
                        ]
                      },
                      {
                        "condition": {
                          "type": "logicCompare",
                          "inputs": {
                            "op": "EQ",
                            "a": {
                              "var": "renderMode"
                            },
                            "b": "Isolated clip effects — no adjustment layers or audio"
                          }
                        },
                        "body": [
                          {
                            "type": "prRenderTimelineClip",
                            "inputs": {
                              "item": {
                                "var": "clipRef"
                              },
                              "mode": "ISOLATED_CLIP_EFFECTS",
                              "outputPath": {
                                "var": "outputPath"
                              },
                              "presetPath": {
                                "var": "presetPath"
                              },
                              "onError": "CONTINUE",
                              "storeOkIn": "renderOk",
                              "storeCompletionIn": "renderCompletion",
                              "storeRetainedSequencesIn": "retainedSequences",
                              "storeMessageIn": "renderMessage"
                            }
                          }
                        ]
                      }
                    ],
                    "elseBody": [
                      {
                        "type": "setVar",
                        "inputs": {
                          "name": "clipStart",
                          "value": {
                            "type": "mathMinMax",
                            "inputs": {
                              "op": "MAX",
                              "a": {
                                "var": "rangeStart"
                              },
                              "b": {
                                "type": "mathArithmetic",
                                "inputs": {
                                  "op": "MINUS",
                                  "a": {
                                    "type": "prGetTrackItemProperty",
                                    "inputs": {
                                      "item": {
                                        "var": "clipRef"
                                      },
                                      "property": "START_SECONDS"
                                    }
                                  },
                                  "b": {
                                    "var": "handleSeconds"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      {
                        "type": "setVar",
                        "inputs": {
                          "name": "clipEnd",
                          "value": {
                            "type": "mathMinMax",
                            "inputs": {
                              "op": "MIN",
                              "a": {
                                "var": "rangeEnd"
                              },
                              "b": {
                                "type": "mathArithmetic",
                                "inputs": {
                                  "op": "ADD",
                                  "a": {
                                    "type": "prGetTrackItemProperty",
                                    "inputs": {
                                      "item": {
                                        "var": "clipRef"
                                      },
                                      "property": "END_SECONDS"
                                    }
                                  },
                                  "b": {
                                    "var": "handleSeconds"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      {
                        "type": "prRenderTimelineClip",
                        "inputs": {
                          "item": {
                            "var": "clipRef"
                          },
                          "mode": "FULL_TIMELINE_RESULT",
                          "startSeconds": {
                            "var": "clipStart"
                          },
                          "endSeconds": {
                            "var": "clipEnd"
                          },
                          "outputPath": {
                            "var": "outputPath"
                          },
                          "presetPath": {
                            "var": "presetPath"
                          },
                          "onError": "CONTINUE",
                          "storeOkIn": "renderOk",
                          "storeCompletionIn": "renderCompletion",
                          "storeRetainedSequencesIn": "retainedSequences",
                          "storeMessageIn": "renderMessage"
                        }
                      }
                    ]
                  }
                },
                {
                  "type": "if",
                  "inputs": {
                    "branches": [
                      {
                        "condition": {
                          "type": "logicCompare",
                          "inputs": {
                            "op": "GT",
                            "a": {
                              "type": "listLength",
                              "inputs": {
                                "list": {
                                  "var": "retainedSequences"
                                }
                              }
                            },
                            "b": 0
                          }
                        },
                        "body": [
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "allRetainedSequences",
                              "value": {
                                "type": "listConcat",
                                "inputs": {
                                  "a": {
                                    "var": "allRetainedSequences"
                                  },
                                  "b": {
                                    "var": "retainedSequences"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    ]
                  }
                },
                {
                  "type": "if",
                  "inputs": {
                    "branches": [
                      {
                        "condition": {
                          "var": "renderOk"
                        },
                        "body": [
                          {
                            "type": "setVar",
                            "inputs": {
                              "name": "renderedCount",
                              "value": {
                                "type": "mathArithmetic",
                                "inputs": {
                                  "op": "ADD",
                                  "a": {
                                    "var": "renderedCount"
                                  },
                                  "b": 1
                                }
                              }
                            }
                          }
                        ]
                      }
                    ],
                    "elseBody": [
                      {
                        "type": "setVar",
                        "inputs": {
                          "name": "failedCount",
                          "value": {
                            "type": "mathArithmetic",
                            "inputs": {
                              "op": "ADD",
                              "a": {
                                "var": "failedCount"
                              },
                              "b": 1
                            }
                          }
                        }
                      },
                      {
                        "type": "esConsoleLog",
                        "inputs": {
                          "message": {
                            "type": "textJoin",
                            "inputs": {
                              "items": [
                                "ENTRY|status=FAILED|clip=\"",
                                {
                                  "var": "clipName"
                                },
                                "\"|output=\"",
                                {
                                  "var": "outputPath"
                                },
                                "\"|message=\"",
                                {
                                  "var": "renderMessage"
                                },
                                "\""
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "if",
                        "inputs": {
                          "branches": [
                            {
                              "condition": {
                                "type": "logicCompare",
                                "inputs": {
                                  "op": "EQ",
                                  "a": {
                                    "var": "renderCompletion"
                                  },
                                  "b": "OUTPUT_TIMEOUT"
                                }
                              },
                              "body": [
                                {
                                  "type": "esConsoleLog",
                                  "inputs": {
                                    "message": {
                                      "type": "textJoin",
                                      "inputs": {
                                        "items": [
                                          "Clip export timed out; temporary sequences retained: ",
                                          {
                                            "type": "jsonStringify",
                                            "inputs": {
                                              "value": {
                                                "var": "retainedSequences"
                                              }
                                            }
                                          },
                                          ". ",
                                          {
                                            "var": "renderMessage"
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              ]
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }
        ],
        "next": "summary"
      },
      "summary": {
        "type": "uiShowMessage",
        "inputs": {
          "message": {
            "type": "textJoin",
            "inputs": {
              "items": [
                "Exported ",
                {
                  "var": "renderedCount"
                },
                " of ",
                {
                  "var": "candidateCount"
                },
                " matching clip(s) to ",
                {
                  "var": "outputFolder"
                },
                ". Skipped ",
                {
                  "var": "skippedCount"
                },
                " and failed ",
                {
                  "var": "failedCount"
                },
                ". Details for each skipped or failed clip are available in the Run Log. Retained temporary sequences: ",
                {
                  "type": "jsonStringify",
                  "inputs": {
                    "value": {
                      "var": "allRetainedSequences"
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  }
}
