Page 1 of 1

Query styled text content with python

PostPosted: Fri May 27, 2016 7:58 pm
by Richard Yao
I'm having a hard time getting the text out of the styled text field of Text+ tool with Python. Thanks in advance!

Re: Query styled text content with python

PostPosted: Sat May 28, 2016 7:37 am
by Eric Westphal
As most other controls in Fusion, the StyledText is animatable,
so even it's not animated, you'll have to query the value at a specific time:

Code: Select all
Text1.StyledText[CurrentTime]

or
Code: Select all
=Text1.StyledText[0]

with the value in square brackets being the frame of the comp you want to get the value at.

Re: Query styled text content with python

PostPosted: Sat May 28, 2016 4:02 pm
by Richard Yao
Eric Westphal wrote:As most other controls in Fusion, the StyledText is animatable,
so even it's not animated, you'll have to query the value at a specific time:

Code: Select all
Text1.StyledText[CurrentTime]

or
Code: Select all
=Text1.StyledText[0]

with the value in square brackets being the frame of the comp you want to get the value at.


Thank you Eric! You are a life saver again!