Jump to: Board index » General » Fusion

Fusion scripting with text field

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

Chris Gosling

  • Posts: 69
  • Joined: Sun Sep 30, 2012 4:56 pm

Fusion scripting with text field

PostThu Apr 26, 2018 11:49 am

Like a lot of new posters on this part of the BMD forum, I have been intrigued by the inclusion of Fusion in Resolve. I have wanted to mess with it before, but as we all know when time is tight we fall back to what we know (After Effects). I can script/expression myself out of (and into) most of my problems - but the Fusion way of doing things is making me pull out what hair I have left.

But now I have decided to throw myself into it - and instead of "learning it sloppy" I'm trying to find the most effective ways to do things.

So my first question (of probably many in the future) is - is there a way via expressions/scripting, to parse a multi-line input from a text+ node, and return each individual line into its own text+ node?

Example:
Node 1:
My dog has fleas
and needs a bath

Node 2:
My dog has fleas

Node 3:
and needs a bath

Any help would be appreciated.
Offline

Sander de Regt

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

Re: Fusion scripting with text field

PostThu Apr 26, 2018 2:57 pm

I am not sure if it can be done, but I am curious what you'd need this for. Care to elaborate on the intended usage? It may trigger a couple of ideas on how to do it.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Chris Gosling

  • Posts: 69
  • Joined: Sun Sep 30, 2012 4:56 pm

Re: Fusion scripting with text field

PostThu Apr 26, 2018 3:02 pm

I need to a multi-line text animation, where I need to animate the lines moving down one after another. The effect has to be re-usable, and I will publish as a title effect.

I have found a way to do it all using 3 separate text+ boxes, but I would like to be able to just copy/paste text into 1 input box and let my Fusion nodes figure out the rest.

This is something that can be easily done using text animators in AE - and that's how I have originally done it - just thought it would be a good exercise to learn Fusion.

Chris

You can see the effect here: https://www.facebook.com/Illumsince1891/videos/2094137590603691/
Offline
User avatar

Andrew Hazelden

  • Posts: 536
  • Joined: Sat Dec 06, 2014 12:10 pm
  • Location: West Dover, Nova Scotia, Canada

Re: Fusion scripting with text field

PostThu Apr 26, 2018 4:01 pm

Chris Gosling wrote:I need to a multi-line text animation, where I need to animate the lines moving down one after another. The effect has to be re-usable, and I will publish as a title effect.


Hi Chris.

This post on the steakunderwater website shows how to load an external text file, one line at a time, into a Text+ node. It might give you some code snippets to work from for adding the individual paragraphs of text to your Text+ nodes using scripting:

https://www.steakunderwater.com/wesuckl ... 208#p12208

If you look at macro creation techniques on VFXPedia (and UserControls in particular) you can add a custom button element to your main Text+ node. This type of button would let you run an inline attached Lua script which could split your text apart and add new text+ nodes and animated keyframes to the composite for you when clicked.

If you copy a Text+ node from the Fusion Flow/Nodes view into your clipboard and paste that text into a programmers text editor like Notepad++ or BBEdit you can add a custom button control to the nodes GUI using a code chunk like this

Code: Select all
   TextButton = {
      LINKS_Name = "Split Multi-Line Text",
      LINKID_DataType = "Number",
      INPID_InputControl = "ButtonControl",
      BTNCS_Execute = [[
-- Add your Lua code here
-- ...
-- ...
      ]],
      ICS_ControlPage = "Controls"
   },
Mac Studio M2 Ultra / Threadripper 3990X | Fusion Studio 18.6.4 | Kartaverse 6

Return to Fusion

Who is online

Users browsing this forum: Xander1125 and 29 guests