Jump to: Board index » General » Fusion

Has n1, n2, etc in Custom Tool been depracated?

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

Darryl

  • Posts: 23
  • Joined: Sat May 05, 2018 12:07 am
  • Real Name: Darryl Severn

Has n1, n2, etc in Custom Tool been depracated?

PostTue Jan 18, 2022 2:30 am

Although I use Fusion regularly, it has intentionally been at a simple level. I am now working on a sequence where I want something a bit more complex and with COVID time on my hands I thought I would use the Custom Tool to hold some common variables accessed by other nodes. This is working with one slight issue.

The last time I used Custom Tool I thought I used "n1" instead of "NumberIn1" and so on, but that no longer seems to be working. Has something changed or have I missed a setup step or something?

The Custom Tool is isolated and not connected to other nodes - they just reference the values. I tried connecting a background node to it just in case it needed something to initialise everything, but no change. Part of what I am doing is pre-calculating a movement delta. I can do it, but the expression is so long that it can't all fit in the window which increases the chances of mistakes greatly. What I was hoping to write was:
Point((p1x-p2x)/n2, (p1y-p2y)/n2)

What I ended up writing was:
Point((PointIn1.X-PointIn2.X)/NumberIn2, (PointIn1.Y-PointIn2.Y)/NumberIn2)

Anyone know how to utilise the original notation?

thanks,
Darryl
Darryl Severn
Darbeth Business Tech and Communications

(BMPCC 4K and DaVinci Resolve user.)
Offline
User avatar

Bryan Ray

  • Posts: 2160
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Has n1, n2, etc in Custom Tool been depracated?

PostTue Jan 18, 2022 5:49 am

The n1, n2, p1x, p1y, etc shortcuts only work in the expression fields on the Channels, Intermediate and Setup tabs. If you set up Simple Expressions on the controls, they have to use the full control names like expressions elsewhere.

You might find it a bit easier to use the Expression Modifier, where you can use the shortcut notation in the Point Out fields and also not have to deal with the Point() function.
Last edited by Bryan Ray on Tue Jan 18, 2022 4:28 pm, edited 1 time in total.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Darryl

  • Posts: 23
  • Joined: Sat May 05, 2018 12:07 am
  • Real Name: Darryl Severn

Re: Has n1, n2, etc in Custom Tool been depracated?

PostTue Jan 18, 2022 6:58 am

Thanks Bryan.

Legibility - one of the eternal issues of scripting languages in this context where you are trying to add a script in a field that is really designed to record short parameter lists.
Darryl Severn
Darbeth Business Tech and Communications

(BMPCC 4K and DaVinci Resolve user.)

Return to Fusion

Who is online

Users browsing this forum: No registered users and 11 guests