Page 1 of 1

Beta5 - Fusion Composition Width/Height

PostPosted: Thu Jun 14, 2018 11:20 am
by Nick Verlinden
Now that Beta5 lets Fusion use clips by it's native resolution, I wonder if I can get the current timeline frame size in an expression.

For instance, when I apply Fusion fx to a picture that is 320x240 and create a new Background generator, that generator has the same size as the picture. I can manually change this to HD by manually inputting 1920 and 1080, but I would like to create templates that do not have a fixed output resolution, but take the resolution of timeline.

An example use case: You want to create a reusable template that can be applied to low-res youtube clips. The fusion template will scale it relative to the timeline frame size but add a little margin, put a border around it, and a background pattern.

Does anybody know how to get the timeline frame size, or if it's even possible now that the behavior has changed?

UPDATE:
I was digging around, and it would seem logic to me, that the composition frame format is set to the timeline format. Then we can call it like this:
Code: Select all
Lua> dump(comp:GetPrefs("Comp.FrameFormat.Width"))
160
Lua> dump(comp:GetPrefs("Comp.FrameFormat.Rate"))
60


As you can see above, it currently returns the width of the image.

Re: Beta5 - Fusion Composition Width/Height

PostPosted: Fri Jun 15, 2018 2:11 pm
by Nick Verlinden
I have tested several scenarios and came to the following conclusion:

Compound Clip, Nested Timeline and "New Fusion Clip": Creates fusion composition with the Frame Format set to the size of the project. If you change the project resolution, it adapts automatically. Takes into account the scaling set in the preferences.

Clip: Fusion takes native clip frame format, and there is seemingly no way to get the current project's resolution in an expression.

I would really like to have the opportunity to create a background that is the size of the project in a clip composition, this way you can position smaller clips in a composition.

If the code below would work in an expression ,the problem would be solved. But at the moment it does not work. Probably because the Resolve function is unavailable for expressions.

Code: Select all
Resolve():GetProjectManager():GetCurrentProject():GetSetting("timelineResolutionWidth")