API: Undo Blocks Functions

  • Author
  • Message
Offline
User avatar

X-Raym

  • Posts: 153
  • Joined: Thu Apr 18, 2013 4:05 pm
  • Location: France
  • Real Name: Raymond Radet

API: Undo Blocks Functions

PostMon Jan 24, 2022 8:18 am

Hi,

Currently (v17.4), DaVinci Resolve scripts add undo points at any Set function call (and surely other functions).

This is not very handy : if I set color of 150 clips via scripts, I will have 150 undo points in undo history, so getting back to previous state will be very long.

In REAPER API, users can define their own undo block like this

Code: Select all
UndoBlock_Beging()
...
code
...
UndoBlock_End()


This allows to have only one (or at least, a controlled amount) of undo block left by running a script. allowing scripts to be considered as single action, without spamming undo history.

This will be a very welcome addition to scripting and make it less basic IMHO, more controlled.

Thx for listening!
My DaVinci Resolve Scripts: https://github.com/X-Raym/DaVinci-Resolve-Scripts
My Resolve Scripting API Doc: https://www.extremraym.com/en/resolve-api-doc-release/
Donation: https://paypal.me/extremraym
Offline
User avatar

roger.magnusson

  • Posts: 3874
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: FR (API): Undo Blocks Functions

PostMon Jan 24, 2022 12:19 pm

In addition, it would also be helpful if we could disable Resolve UI updates in the same way. The way it works now the UI makes scripts much slower than necessary.
Offline
User avatar

X-Raym

  • Posts: 153
  • Joined: Thu Apr 18, 2013 4:05 pm
  • Location: France
  • Real Name: Raymond Radet

Re: FR (API): Undo Blocks Functions

PostMon Jan 24, 2022 12:22 pm

@roger.magnusson
Indeed,
in REAPER you can do PreventUIRefresh function and scripts are hundreds of magnitude faster.

For resolve, coloring tons of items also takes a lot of time because of UI refreshing.

Though this might need a dedicated thread... I'm on it.
My DaVinci Resolve Scripts: https://github.com/X-Raym/DaVinci-Resolve-Scripts
My Resolve Scripting API Doc: https://www.extremraym.com/en/resolve-api-doc-release/
Donation: https://paypal.me/extremraym
Offline

Peter Chamberlain

Blackmagic Design

  • Posts: 14909
  • Joined: Wed Aug 22, 2012 7:08 am

Re: FR (API): Undo Blocks Functions

PostTue Feb 08, 2022 8:25 am

Raymond, this is the feature request sub forum.. please don't put FR at the head of every post... to me it looks like your are shouting for attention with the all caps.
DaVinci Resolve Product Manager
Offline

movalex

  • Posts: 120
  • Joined: Wed Sep 27, 2017 2:35 pm
  • Real Name: Alexey Bogomolov

Re: FR (API): Undo Blocks Functions

PostSun Apr 07, 2024 12:42 pm

Peter Chamberlain wrote:...it looks like your are shouting for attention with the all caps.

Well, frankly this is the type of feature request that literally screams to be implemented. There's also a post supported by multiple artists, about proper Undo stack implementation in Resolve, like the one currently existing in Fusion: viewtopic.php?f=33&t=177994

With more and more scripting API features added to Resolve, this is really odd that a proper Undo stack is still not being developed. I.e. if the script adds 1000 clips to existing 2000, in order to delete those we need to click undo 1000 times.

It would be great to hear any news on this matter.
Offline
User avatar

Joe Shapiro

  • Posts: 4259
  • Joined: Thu Jul 25, 2013 7:23 am
  • Location: Los Angeles CA USA

Re: FR (API): Undo Blocks Functions

PostSat Aug 24, 2024 7:06 pm

Peter Chamberlain wrote:Raymond, this is the feature request sub forum.. please don't put FR at the head of every post... to me it looks like your are shouting for attention with the all caps.

Peter: The handy thing about FR is when you do a search in the top-level forum the feature requests and regular posts are all mixed in - so it can be helpful to see clearly which is which.
Director, Editor, Problem Solver. Been cutting indie features for 24 years. FCP editor from version 2 to 7.
Resolve 20.0.3B
MacBook Pro 16 M1 Max 64GB RAM, macOS 14.7.2
MacBook Air 13 M1 8GB RAM, macOS 14.6.1
BMPCC4K 8.6 beta
BMCC6K 8.7 beta

Return to DaVinci Resolve Feature Requests

Who is online

Users browsing this forum: No registered users and 33 guests