Page 1 of 1

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

PostPosted: Tue Jan 18, 2022 2:30 am
by Darryl
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

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

PostPosted: Tue Jan 18, 2022 5:49 am
by Bryan Ray
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.

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

PostPosted: Tue Jan 18, 2022 6:58 am
by Darryl
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.