how to edit text in an existing title using Lua scripting

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

spinhead

  • Posts: 11
  • Joined: Sun Mar 01, 2020 6:39 pm
  • Location: PHX AZ
  • Real Name: Joel D Canfield

how to edit text in an existing title using Lua scripting

PostWed Jun 18, 2025 12:30 pm

this inserts a Title at the playhead in the current timeline
Code: Select all
local simple_title = currentTimeline:InsertTitleIntoTimeline('Text')

how can I change the text of the Title using Lua?
Offline

Andy Mees

  • Posts: 4143
  • Joined: Wed Aug 22, 2012 7:48 am

Re: how to edit text in an existing title using Lua scriptin

PostWed Jun 18, 2025 4:07 pm

I'm not sure that the (basic) Text title is scriptable...

With a Fusion-based Text+ title though, you could get the composition using something like my_composition = my_title.GetFusionCompByIndex(1), then its Text+ tool itself using something like my_text_tool = my_composition.GetToolList(False, "TextPlus")[1], and then get the text from its 'Styled Text' attribute, which would be something like my_text = my_text_tool.StyledText[0]

... note that I haven't tested this and am not guaranteeing these are the right calls and/or syntax, but I did something similar myself a few years ago and it was something along these lines.

Good luck.
Andy

Return to DaVinci Resolve

Who is online

Users browsing this forum: Google [Bot] and 206 guests