Jump to: Board index » General » Fusion

Text+ Simple expression bug? (inconsistent behaviour)

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

Sander de Regt

  • Posts: 3588
  • Joined: Thu Nov 13, 2014 10:09 pm

Text+ Simple expression bug? (inconsistent behaviour)

PostMon Feb 02, 2015 10:07 pm

Hi,

I was trying some stuff out in Fusion trying to display the Fontname you're using in a Text+ tool.

Now if I create a simple expression and just type in 'Font' (without the 's) it shows the Font that is selected. This is as it's supposed to work, I guess.
But when I want to elaborate and put something on the screen like 'The font you're using is Arial'
I thought I could do it by writing ("The font you're using is "..Font) in the same way ("Hello ".."World") results in 'Hello World' on screen.

Now here's the bug: 'Font' works. '(Font)' works, other combinations like '(Size.."World")' work, but I can't get anything to combine with 'Font'.

This seems like a bug to me. Is it?
Last edited by Sander de Regt on Thu Feb 05, 2015 9:42 am, edited 1 time in total.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Blazej Floch

  • Posts: 191
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: Text+ Simple expression bug?

PostThu Feb 05, 2015 12:15 am

Hi Sander,

Font is not what it seems to be. Try:
Code: Select all
"I like my " .. Font.Value


You can tell that an variable is an object and not a string if you try:
Code: Select all
Text(Font)

or
Code: Select all
tostring(Font)


If it is a struct of a certain type you should try .Value

If possible you should rename the thread to solved or Not-Bug or 42.

Cheers,
Bla'
Offline

Sander de Regt

  • Posts: 3588
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Text+ Simple expression bug?

PostThu Feb 05, 2015 9:42 am

Hi Blazej,

Thanks for the help. I don't quite agree with you that this isn't a bug.
At the very least it's inconsistent behaviour.

If in the same field the same expression works in some cases and not in others, it's confusing.
Like I said: if I just type 'Font' it shows the same thing as 'Font.Value'
To someone who doesn't know what 'structs' are or what 'tostring' means it's just not clear.
At least in my opinion.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Blazej Floch

  • Posts: 191
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: Text+ Simple expression bug? (inconsistent behaviour)

PostThu Feb 05, 2015 11:46 am

An expression field is a Lua field.
Objects may be interpretable but you can not concatenate for sure objects of different types.

I disagree to the sentence as it basically means: I should be able to use programming without understanding programming. The worst that could happen is that the expression fields were replaced by a pseudo expression language, which is easier to use but does not have all the language features.

just keep in mind that certain objects need the .Value, especially when you want to combine them.
this also applies for connecting inputs.

proper documentation, I agree, is needed.
Offline

Sander de Regt

  • Posts: 3588
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Text+ Simple expression bug? (inconsistent behaviour)

PostThu Feb 05, 2015 10:29 pm

Blazej Floch wrote: I should be able to use programming without understanding programming.


I thought that is why it was called a 'simple' expression. :-)
At the very least, I should be able to 'pickwhip' the field with the + button to get the correct syntax.

So yes. A better documentation is in order.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Text+ Simple expression bug? (inconsistent behaviour)

PostFri Feb 06, 2015 1:07 am

But when you pickwhip something, how would Fusion be able to tell what it is that you want? Do you want Font, or Font.Value? Both can be useful in different cases. It would be a bit of a stretch to expect Fusion to be able to interpret and predict incomplete code.

I agree with what is said about the need for documentation, very strongly, and the lack of it is what caused this topic to be necessary. Inconsistent this is not, though.
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Sander de Regt

  • Posts: 3588
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Text+ Simple expression bug? (inconsistent behaviour)

PostFri Feb 06, 2015 10:24 am

I thought that was the whole point of the pickwhip: to be able to drag towards what you want and then have the software fill in the part that you're pointing at.
Sander de Regt

ShadowMaker SdR
The Netherlands

Return to Fusion

Who is online

Users browsing this forum: No registered users and 61 guests