Overview
extSceneLauncher is a scene-based preset launcher in the TDXMorph system for TouchDesigner.
It provides a flexible and performance-oriented interface for triggering “scenes” — each representing a preset with its own duration, delay, morph curve, script, and follow action.
This class acts as an alternative UI for the PresetManager, allowing users to:
- Build and manage scenes visually.
- Link each scene to a preset target.
- Define morph timing and interpolation curves.
- Create follow actions (like Next, Repeat, Any, etc.).
- Export and import full scenes and presets as
.jsonfiles. - Automatically build animations from existing scenes.
What changed in 4.x
- It attaches an external PresetManager through the
Presetmanagerparameter, and so inherits the shared multi-track engine: per-track timing, end modes, curve shapes and preset schema v2. See PresetManager. - The scene and preset lists are owned
ListViewinstances, replacing the palette Listers. The MIDI and OSC mapping inspectors are an ownedlistCOMPeditor. SceneLauncher carries no third-party content. - The ControlsMenu is fully themeable from an 18-parameter
ControlsMenupage onLib/Look, which is also where the accent and the row colours live. The component has no separate Colors page: the Looks icon in the header opens every page of the skin. - The OSC and MIDI header buttons appear only when the matching
OscandMidiCHOP parameters resolve, so the component ships showing four header icons rather than six. - Ships empty: no scenes, no presets,
Presetmanagerblank. Attaching a PresetManager is the first step under Getting started below.
Installation
- Download
SceneLauncher.toxfrom Patreon. - Drag the
.toxinto your TouchDesigner network, or use File > Import > Component. - Click the component's viewer to open the panel.
SceneLauncher needs a PresetManager. It is a user interface for an engine it deliberately does not contain, so on its own it has nothing to launch. PresetManager is free and MIT licensed, from this repository. Any component that already embeds one works too, including a ParameterMorpher container's internal manager.
The licence terms are in the LICENSE operator inside the component.
Getting started
The component opens empty: no scenes, and the Presetmanager parameter blank.
1. Give it a PresetManager with presets in it
Drop a PresetManager into your network, point it at the parameters you want, and store at least two presets. A SceneLauncher attached to a manager with no presets will show an empty target list and there will be nothing to cue.
2. Attach it
Set Presetmanager on the Config page to that component. The preset list on the right
of the panel fills in immediately.
If you attach a manager and the lists look stale, pulse Refresh on the same page.
3. Create a scene
Right Click empty space in the scene list and choose New scene.
The same menu holds the rest of the scene-level actions: Duplicate, Clear scenes, Clear actions, Clear scripts, Export presets, Import presets and Refresh.
4. Point the scene at a preset
Right Click the scene's Target cell. A menu opens listing the preset names in the attached manager. Pick one.
Curve and Action open on Right Click the same way: Curve chooses the interpolation shape, Action chooses the follow action that fires when the scene finishes: None, Repeat, Previous, Next, First, Last, Any (a random scene) or Other (a random scene other than this one). Target and Curve both start with None: a None target makes a script-only scene, and a None curve morphs with the preset's own curve.
Scene, Length, Delay and Script are inline text cells instead: click and type. The color swatch and the trash icon are left-click buttons.
A row reads, left to right: #, colour swatch, Scene, launch icon, Length, Delay, Target,
Curve, Action, Script, delete icon. Delay and Script are hidden unless Enabledelays and
Enablescripting are on, both of which ship enabled.
Note that editing a scene's Length or Curve also overwrites that value in the target preset's own stored data. This is destructive and deliberate, matching the behaviour of earlier versions: the scene is the authority on its own timing. Picking None as the curve leaves the preset alone.
5. Launch it
Click the launch icon in the scene's row, the fourth column, just right of the scene name.
That icon is the only thing that launches a scene. Double-clicking any other cell is deliberately inert, so editing a Curve or Action can never fire the scene by accident.
A scene with a Delay waits that long before it morphs and runs its Script. The last launch wins: any new launch (the launch icon, Go, a follow action or a Sequence step) cancels launches still waiting out their Delay, so delayed launches never stack.
A scene whose Target is None, or names a preset that no longer exists, starts no morph and opens no dialog. Its Script still runs, and in a Sequence the launcher moves on to the next scene.
Build up a few scenes, give them follow actions, and the launcher will run them as a cue
list. Totaldurationf and Totaldurations on the Info page report the total: every scene's
Length plus its Delay.
6. Where to go next
The Osc and Midi parameters on the Config page take CHOP references. Wire either one
and the Map header icon appears, six icons instead of the five it ships with, giving you
auto-learn mapping for the transport controls.
The ? icon at the right of the header opens a one page mouse and key reference for the whole component, without leaving TouchDesigner. The same sheet is on the Shortcuts pulse at the bottom of the Config page.
Full key and mouse reference: SHORTCUTS.md. Everything below this point is the Python API.
Initialization
launcher = op('SceneLauncher')
Architecture
| Attribute | Description |
|---|---|
| Class | extSceneLauncher |
| Role | Scene-based interface for controlling and launching presets. |
| Type | UI Controller |
| Design Pattern | Part of the TDXMorph MVC system. |
| Usage Context | Used to trigger and manage timed preset transitions (“scenes”). |
Stored Properties
| Property | Type | Description |
|---|---|---|
Scenes |
dict |
Stores all created scenes and their metadata (name, duration, delay, target, curve, action, script). |
Sequential |
bool |
Indicates whether the launcher is in sequential playback mode. |
Source |
obj |
Reference to the associated PresetManager. |
Row |
int |
The current selected row index. |
Col |
int |
The current selected column index. |
Scene |
int |
The currently active scene name. |
Target |
str |
The preset target associated with the active scene. |
Public Methods
Scene Management
-
LaunchScene(target)
Launches a scene by its table index number. -
CreateScene(name, target='None')
Creates a new scene entry with default parameters (length, delay, curve, color, etc.). -
DuplicateScene(name, sourceName)
CopiessourceNameinto a new scene and returns the name it got. It never overwrites: the same name as the source becomes<name>_copy, and a taken name gets a numeric suffix (_2,_3, ...). Returns''when there is no scene calledsourceName. -
WriteScenes()
Writes all scene data to the UI table and updates total duration information. -
ClearActions()
Resets all scene “Action” values to'None'. -
ClearScripts()
Removes all script references from the scene table. -
EnableScripting(enable=True)
Enables or hides the Script column in the scene list. -
EnableDelays(enable=True)
Enables or hides the Delay column in the scene list. -
WritePresets()
Writes the current list of presets into the internal presets table.
Scripting API (4.8.0)
Added in 4.8.0 for driving the component from a script, a MIDI/OSC handler or another
component. None of these opens a dialog; a call that cannot be honoured returns False,
[] or None.
-
GetScenes()
Scene names, in display order. -
GetScene(name)
A copy of one scene's data, orNoneif there is no such scene. -
RenameScene(old, new)
Renames a scene, keeping its row position.Falseifoldis unknown, ornewis blank or already taken. -
SetSceneField(name, field, value)
Sets one editable field:name,length,delay,target,curve,action,script,color. Settinglengthorcurvealso overwrites that value inside the scene's target preset, exactly as editing the cell by hand does. -
SetSceneTarget(name, target)
Points a scene at a preset;'None'detaches it.Falseif the preset does not exist on the attachedPresetManager. -
SetSceneCurve(name, curve)
Sets a scene's morph curve.'None'makes the scene morph with its preset's own curve and leaves that preset untouched.Falseon a curve the attached engine does not offer. -
DeleteScene(name)/ClearScenes()
Delete one scene, or all of them.ClearScenes()returnsTrueeven on an empty list. The transport stays on the scene it was on; deleting that scene moves it to the next one, andClearScenes()puts it back at the start. -
ReorderScenes(order)
Reorders scenes by current 0-based row indices, asorder[newRow] = oldRow. Refuses anything that is not a full permutation. The transport cue follows the row it was on. -
LaunchSceneByName(name)
Launches a scene by name.Falseif there is no such scene. -
GetPresetNames()/GetPreset(name)
Preset names in order, and a copy of one preset's stored data. Empty orNonewhen noPresetManageris attached. -
StorePreset(name)
Captures the current parameter state intoname.Falsewhen nothing is attached, the name is blank, or thePresetManagerhas no parameters to capture, which includes the case where one of its stored paths no longer resolves. -
RenamePreset(old, new)/DeletePreset(name)/ClearPresets()
Rename, delete, or delete all. Each one updates every scene aiming at the affected preset: a rename follows, a delete or a clear resets the target to'None'. A rename or a delete also refreshes the PresetManager's Target menu: a Target on the renamed preset follows it, and one on a deleted preset falls back to the first preset. -
ReorderPresets(order)
Same permutation rule asReorderScenes.
Preset and Morph Handling
-
GetCurrentCellValue(cellName)
Retrieves a cell’s value from the current scene row. -
SetCellColor(row, col, color)
Overlays a color highlight for a given scene cell in the list. -
GetMorphCurves()
Returns a list of available morph curves from the attachedPresetManager. -
SyncMorphCurveMenu()
Rebuilds the ControlsMenu CURVE selector from the attachedPresetManager's curve registry, so the two can never drift apart. Does nothing when noPresetManageris attached, leaving the existing menu in place. -
GetRandomDistributions()
Returns a list of available random distributions from the attachedPresetManager. -
SyncRandomDistributionMenu()
The twin ofSyncMorphCurveMenu()for the DIST readout. Does nothing when noPresetManageris attached, leaving the existing menu in place. -
SeatScopeReadouts(parName='')
Mirrors the attachedPresetManageronto the DIST and CURVE readouts and returns how many moved. Pass a single parameter name to seat just that one. No-op when none is attached. -
OnSourceAttached()
Re-derives both menus from the attachedPresetManagerand seats both readouts. Called when you set thePresetmanagerparameter, and safe to call yourself after attaching one in script. A PresetManager too old to drive follow actions, Sequence and the progress bar (3.x) is reported once: in a dialog when attached by hand, as a printed message from a script. -
SetMorphCurve(name)
Writes the attachedPresetManager's morph curve by name. ReturnsTruewhen the value moved,Falsewhen it was already there, when the engine cannot hold that name, or when noPresetManageris attached. Restored in 4.9.0, along with the CURVE selector that calls it. -
SetRandomDistribution(name)
The twin ofSetMorphCurvefor the random distribution.
Both write the engine by NAME, not by menu index, so a curve inserted upstream cannot silently remap them. Bear in mind that a preset carries its own morph time and curve, so launching a preset re-seats these from that preset's stored values.
-
GetCueActions()
Returns a list of available follow actions (None,Next,Repeat, etc.). -
EnableFollowActions(enable=True)
Arms or disarms the follow action that runs when the current morph completes. A scene launch arms it once its morph starts. Stop, a newer launch, or any other morph starting on the PresetManager disarms it, so only the scene's own morph fires its follow action. -
DelayedPresetTrigger(target, length, curve)
Executes a delayed preset morph, using the scene’s timing and curve.
Actions and Transport Control
Transport controls are linked to scene actions and follow modes.
They allow stepping through, randomizing, or looping scenes.
-
SequentialLaunch(data)
Handles the timing and triggering of sequential scene transitions. -
PerformAction(action, value=None)
Triggers an action from the transport menu (e.g., Next, Stop, Repeat). A launch, Stop, Randomize or Interpolate ends a pause, and the Play/Pause button returns to playing by itself.
Import and Export
-
ImportPresetsJSON()
Imports both presets and scenes from a.jsonfile.
The file is checked and its presets handed to the linkedPresetManagerbefore any scene is replaced, so a refused file leaves scenes and presets untouched. A file with no scenes (a PresetManager export) imports its presets and keeps your scenes; a scene whose preset is gone goes back to None. -
ExportPresetsJSON()
Exports all current scenes and presets into a single.jsonfile.
Includes morph curve, timing, and follow action data.
Utility and UI Methods
-
ReportResult(msg, title)
Displays a popup dialog and prints debug information to the console. -
StandardPopMenu(info, items, callback)
Opens a contextual popup menu. -
StandardPopDialog(text, title, buttons, callback, details=None, textEntry=False)
Opens a custom dialog window.
Animation
CreateAnimation()
Builds aPresetAnimatorusing all existing scenes and presets.
One key per scene, in order, with the scene's length; a scene's Delay holds the previous scene for that long. Scenes without a valid target are skipped, and with nothing to animate it is refused and creates nothing.
Design Philosophy
- Scene-Oriented Workflow: Treats presets as “cues” or “scenes” with their own transitions.
- Non-Destructive Editing: Scenes can be created, duplicated, and reordered freely.
- Integration-Ready: Connects seamlessly with
PresetManagerandParameterMorpher. - Automation-Driven: Designed for theatre, installation, and live performance contexts where sequence automation is essential.
- UI-Independent Core: Logic operates independently of specific interface designs.
Dependencies
TouchDesigner Components
PresetManager(external, attached through thePresetmanagerparameter)listScenesandlistPresets(ownedListViewinstances, withlistScenesCallbacksandlistPresetsCallbackssupplying their behaviour)Utils/ColorPicker2Actions/chopexec1Lib/Look(the ControlsMenu theme)op.TDResources(TouchDesigner's own pop-up menu and dialog host)
Python Libraries
TDStoreTools.StorageManagerjsonrandomcopy