Jump to: Board index » General » Fusion

Query styled text content with python

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Richard Yao

  • Posts: 12
  • Joined: Tue Nov 18, 2014 8:10 am

Query styled text content with python

PostFri May 27, 2016 7:58 pm

I'm having a hard time getting the text out of the styled text field of Text+ tool with Python. Thanks in advance!
Offline
User avatar

Eric Westphal

  • Posts: 215
  • Joined: Thu Nov 20, 2014 1:59 pm

Re: Query styled text content with python

PostSat May 28, 2016 7:37 am

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.
my hovercraft is full of eels.
Offline

Richard Yao

  • Posts: 12
  • Joined: Tue Nov 18, 2014 8:10 am

Re: Query styled text content with python

PostSat May 28, 2016 4:02 pm

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!

Return to Fusion

Who is online

Users browsing this forum: NicholsMediaPress and 37 guests