Skip to main content
Stefan-Gabriel
Participant
December 16, 2021
Answered

Does a Transaction system exist for modifying a project/sequence in ExtendedScript?

  • December 16, 2021
  • 1 reply
  • 393 views

Hi!

 

My goal is to apply many modification operations to a sequence from ExtendedScript and I have a few questions:

 

1) Is there a transaction system where if something does wrong, I could drop the modifications and leave the sequence untouched? 

1.1) If not, such a system could be created by working on a temp sequence clone, but could the clone then overwrite the original? 

 

2) Is there a system to freeze the undo/redo stack while I do the changes so that everything changed is just in one undo step? (All I could find in the QE dom under QEProject are undo/redo/undoStackIndex methods)

 

Thank you,

- Stefan

This topic has been closed for replies.
Correct answer Bruce Bullis

1. No.

1.1 Safest approach = duplicate the sequence first, and operate on the duplicate. Once successful, you can delete the original (or preserve it in a safety bin somewhere).

2. No; In PPro, ExtendScript operates outside the Undo stack. QE DOM is neither recommended nor supported. 

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
December 16, 2021

1. No.

1.1 Safest approach = duplicate the sequence first, and operate on the duplicate. Once successful, you can delete the original (or preserve it in a safety bin somewhere).

2. No; In PPro, ExtendScript operates outside the Undo stack. QE DOM is neither recommended nor supported. 

Stefan-Gabriel
Participant
December 16, 2021
quote

In PPro, ExtendScript operates outside the Undo stack.


By @Bruce Bullis


Not sure I understand, as every operation I do creates an undo step, is that not supposed to happen? 

What about code that runs in the Panel environment, can that help me bulk all ops into one step?

Bruce Bullis
Legend
December 16, 2021

Yes, ExtendScript actions generate undo items; that is supposed to happen. "Outside" may have been the wrong term; "independently of" might be better.

ExtendScript run from within a CEP panel is still ExtendScript, and behaves in similar fashion.


I've added your vote to DVAPR-4235114, a feature request to provide Undo stack grouping capabilities to ExtendScript.