Fusion Studio and the Fusion page have control over their undo stack when running scripted tasks in Lua and Python that modify the composite. This undo stack event history "grouping" functionality would be very handy to have in the other Resolve pages, too.
Syntax ExampleIt would be great to have fine-grained undo stack control in Resolve with a pair of functions like:
- Code: Select all
resolve:StartUndo("Apply Grade")
...
resolve:EndUndo(true)
Existing BMD Reference DocsThe "Fusion 8 Script Manual.pdf" document on page 92 lists the existing "Composition.StartUndo()" function and page 70 describes the existing "Composition.EndUndo()" function:
- Code: Select all
Composition.StartUndo(name) Start an undo event.
The StartUndo() function is always paired with an EndUndo() function. Any changes made to the composition by the lines of script between StartUndo() and EndUndo() are stored as a single Undo event.
Changes captured in the undo event can be undone from the GUI using CTRL-Z, or the Edit menu. They can also be undone from script, by calling the Undo function.
Should be used sparingly, as the user (or script) will have no way to undo the preceding commands.
name specifies the name displayed in the Edit/Undo menu of the Fusion GUI a string containing the complete path and name of the composition to be saved.
Actual changes must be made to the composition (forcing a “dirty” event) before the undo will be added to the stack.