RunTransformsV2PipelineAtTime Command
Overview
RunTransformsV2PipelineAtTime bridges Triage/command sequences to saved TransformsV2 PipelineDescriptor JSON files. It is registered from src/TransformsV2/register_transformsv2_commands.cpp and appears in CommandPickerDialog via the shared CommandRegistry.
The command loads a widget/library-format pipeline JSON (not DataManagerPipelineDescriptor), subsets one frame from an input DataManager key, runs the pipeline off-DataManager via executePipeline, then creates or updates the output key.
Source Files
| File | Role |
|---|---|
src/TransformsV2/Commands/RunTransformsV2PipelineAtTime.hpp |
Command + params struct |
src/TransformsV2/Commands/RunTransformsV2PipelineAtTime.cpp |
execute() implementation |
src/TransformsV2/Commands/RunTransformsV2PipelineAtTimeUIHints.hpp |
ParameterUIHints (path browse for pipeline_path) |
Parameters
struct RunTransformsV2PipelineAtTimeParams {
std::string input_key;
std::string output_key;
int64_t time = 0; // sequence JSON may use "${current_frame}" / "${mark_frame}"
std::string pipeline_path;
};| Field | Description |
|---|---|
input_key |
DataManager key of the source object for the frame subset |
output_key |
DataManager key where results are created or merged |
time |
Frame index; use "${current_frame}" or "${mark_frame}" in sequence JSON (expanded to a JSON number before deserialization, same as ClearLineDataAtTime) |
pipeline_path |
Absolute path to a pipeline JSON file (browse defaults to the user pipeline library) |
Execution Flow
- Validate
input_key,output_key, andpipeline_path; requireinput_keyin DataManager. loadPipelineFromFile(pipeline_path)builds a typedTransformPipeline.createTemporalSubset(input_key, [time, time])extracts a single-frame input.executePipeline(subset, pipeline)runs transforms off-DataManager (multi-stepPipelineStepDescriptorchains are supported when types chain correctly).- Store output:
- Inherit the input object’s
TimeKeywhen creating a new key. - If
output_keyexists and the result type supports merge-overwrite (MaskData,LineData,PointData), callmergeOverwriteData. Transient pipeline results are assigned the target key’s identity context before merge so each frame gets a distinct registry-backedEntityId. Repeated runs at differenttimevalues therefore accumulate frames in a pre-existing empty output key; re-running the sametimeoverwrites only that frame. - If
output_keyexists with an incompatible type, return an error. - Otherwise call
setDatato create or replace the output object.
- Inherit the input object’s
Terminal range_reduction entries in the JSON are loaded but not applied by executePipeline (same behavior as the TransformsV2 widget).
UI Hints
pipeline_path uses PathFieldKind::FilePath with file_dialog_id = "transformv2_pipeline_open". MainWindow registers a fallback directory via AutoParamWidget::registerDialogFallback() pointing at defaultUserPipelineDirectory(configDir()), sharing session path memory with TransformsV2Properties_Widget.
input_key and output_key set dynamic_combo = true. CommandRowWidget registers a DataManager observer and calls AutoParamWidget::updateAllowedValues() for those fields, filtered by the command’s supported_data_types.