Page 1 of 1

how to edit text in an existing title using Lua scripting

PostPosted: Wed Jun 18, 2025 12:30 pm
by spinhead
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?

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

PostPosted: Wed Jun 18, 2025 4:07 pm
by Andy Mees
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