Get Text from Text+ in a LUA script

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

estebanjgarcia

  • Posts: 46
  • Joined: Wed Jul 14, 2021 8:24 am
  • Real Name: ESTEBAN GARCIA

Get Text from Text+ in a LUA script

PostWed Dec 07, 2022 5:42 am

Im trying to read the value in LUA script of the property StyledText from a Text+ and I can't get it.

x.StyledText returns
Input (0x0000021B2DE943C0) [App: 'Resolve' on 127.0.0.1, UUID: 245b15b2-084b-43e8-9649-a98bca0030a9]

x.StyledText.Value returns
nil

How can I extract a value from a Text+?
Cheers,

E.
Offline

estebanjgarcia

  • Posts: 46
  • Joined: Wed Jul 14, 2021 8:24 am
  • Real Name: ESTEBAN GARCIA

Re: Get Text from Text+ in a LUA script

PostWed Dec 07, 2022 12:24 pm

What I've notices with it is extremely weird is that

x.StyledText = 'value'
Works perfectly...
But not the other way around...
Offline
User avatar

roger.magnusson

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

Re: Get Text from Text+ in a LUA script

PostWed Dec 07, 2022 12:33 pm

You have to tell it which frame you want the value from.

x.StyledText[0]

or

x.StyledText[TIME_UNDEFINED]
Offline

estebanjgarcia

  • Posts: 46
  • Joined: Wed Jul 14, 2021 8:24 am
  • Real Name: ESTEBAN GARCIA

Re: Get Text from Text+ in a LUA script

PostWed Dec 07, 2022 12:51 pm

roger.magnusson wrote:You have to tell it which frame you want the value from.

x.StyledText[0]

or

x.StyledText[TIME_UNDEFINED]


Thank you so much!!!! It was driving me crazy!!!!!

In retrospect it makes sense but it hadnt occur to me...

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], James Ashbolt, Nick2021 and 157 guests