size of text element

User avatar
mschmalenbach
Posts: 7
Joined: Thu Jun 13, 2019 10:37 pm

size of text element

#1

Post by mschmalenbach » Sun Jun 16, 2019 9:04 pm

Hi All

A mostly newbie to DaVinci/Fusion...

Is it possible to get the size of the text element of a Text+ tool?

I need to move the text an amount based on the amount of text in the Text+ tool - single line - scale may change at render time...

Any guidance/perspective much appreciated!

Cheers

Martin

User avatar
SecondMan
Site Admin
Posts: 3478
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 5
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: size of text element

#2

Post by SecondMan » Sun Jun 16, 2019 9:17 pm

Hi Martin,
mschmalenbach wrote:
Sun Jun 16, 2019 9:04 pm
an amount
Could you give a specific example?

Do you have to access it through scripting somewhere, or has it something to do with aligning text to something else?

There may be many ways to skin your cat... :)

User avatar
mschmalenbach
Posts: 7
Joined: Thu Jun 13, 2019 10:37 pm

Re: size of text element

#3

Post by mschmalenbach » Mon Jun 17, 2019 4:24 am

Thanks SecondMan!

I plan to have two text elements in a macro. The user defines the content of each text element.
These text elements will then move in to view, appearing out of nowhere it would seem, from a central point. One moves to the left as it appears, the other to the right as it appears.
I need to know how wide each text element appears so I know what size of translation/movement in the X axis I need to define - programmatically...
I don't want the two text elements to appear out of this central point at slightly different times either - they have to both start appearing at exactly the same time.

I should add that I need a similar macro to arrange a user-defined number of text elements on a frame with a consistent spread between them - but the user will be able to define the text/font size etc. So I need to be able to determine height too.

Cheers

Martin

User avatar
SirEdric
Fusionator
Posts: 1872
Joined: Tue Aug 05, 2014 10:04 am
Answers: 2
Real name: Eric Westphal
Been thanked: 112 times
Contact:

Re: size of text element

#4

Post by SirEdric » Mon Jun 17, 2019 5:32 am

Hi Martin.

Maybe querying the Text's DoD would be a starting point?
This example assumes that the Text itself is aligned centered, and that the Text tool's X-Center is 0.5.

Cheers.

Eric.
You do not have the required permissions to view the files attached to this post.

User avatar
mschmalenbach
Posts: 7
Joined: Thu Jun 13, 2019 10:37 pm

Re: size of text element

#5

Post by mschmalenbach » Mon Jun 17, 2019 5:57 am

Forgive my ignorance SirEric - but how do I load up a composition?

I'm in Resolve 16 beta 4

Cheers

Martin

Added in 10 minutes 48 seconds:
Worry not - I found out how to import a Fusion composition - I obviously need new spectacles!!

:)

Thanks.

Added in 1 minute 51 seconds:
Apologies SirEric - what is meant by the "Text's DoD"?

Added in 5 minutes 27 seconds:
This is closer to what I had in mind...
emerging names.comp
You do not have the required permissions to view the files attached to this post.

User avatar
SirEdric
Fusionator
Posts: 1872
Joined: Tue Aug 05, 2014 10:04 am
Answers: 2
Real name: Eric Westphal
Been thanked: 112 times
Contact:

Re: size of text element

#6

Post by SirEdric » Mon Jun 17, 2019 6:43 am

Hi Martin.

Hmmm...in that case it's even easier.
Just set the alignment of the Text+ and off you go.
Or do you want the size of the orange BG to adapt to the size of the text as well?
You do not have the required permissions to view the files attached to this post.

User avatar
mschmalenbach
Posts: 7
Joined: Thu Jun 13, 2019 10:37 pm

Re: size of text element

#7

Post by mschmalenbach » Mon Jun 17, 2019 9:17 am

Thanks SirEric.

I would need the size of the orange BG to adjust height & size too, just as you say.

Cheers

Martin

User avatar
SirEdric
Fusionator
Posts: 1872
Joined: Tue Aug 05, 2014 10:04 am
Answers: 2
Real name: Eric Westphal
Been thanked: 112 times
Contact:

Re: size of text element

#8

Post by SirEdric » Mon Jun 17, 2019 11:32 pm

For the Background, that one can be easily generated by the Text+ itself (and hence automagically adapts to the size...:-))

The issue is, that the actual text shall be animated while the BG remains static.
So what I did here was:
- Create an Instance of the Text+
- De-Instance the Center and remove the animation
- De-Instance the 'enabled' property in Shading[1] and deactivated it
- De-Instance the 'enabled' property in Shading[2] and activated it
- Played with the parameters in Shading [2] to create the BG look.
You do not have the required permissions to view the files attached to this post.

User avatar
SirEdric
Fusionator
Posts: 1872
Joined: Tue Aug 05, 2014 10:04 am
Answers: 2
Real name: Eric Westphal
Been thanked: 112 times
Contact:

Re: size of text element

#9

Post by SirEdric » Tue Jun 18, 2019 9:14 am

Just for the fun of it...:-)
You do not have the required permissions to view the files attached to this post.

User avatar
mschmalenbach
Posts: 7
Joined: Thu Jun 13, 2019 10:37 pm

Re: size of text element

#10

Post by mschmalenbach » Tue Jun 18, 2019 10:35 pm

Thanks SirEric - this should keep me out of most trouble tomorrow as I play around with it - looks great!!

Cheers

Martin

User avatar
SirEdric
Fusionator
Posts: 1872
Joined: Tue Aug 05, 2014 10:04 am
Answers: 2
Real name: Eric Westphal
Been thanked: 112 times
Contact:

Re: size of text element

#11

Post by SirEdric » Tue Jun 18, 2019 11:40 pm

You're welcome Martin!

Have a troublefree day...:-)