## [Submission] se_ScriptScript [SUBMITTED]

Moderator: SecondMan

SirEdric
Fusionator
Posts: 1822
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 97 times
Contact:

### [Submission] se_ScriptScript

Many times one has to do *really* simple things in script. Like setting all Loaders to postMultiply by Alpha.
Normally, this are just three lines like

Code: Select all

if tool.PostMultiplyByAlpha then
tool.PostMultiplyByAlpha[1] = 1
end
But to actually share stuff like that with a larger team, one has to write all that shizbang for comp:, toollist(), flow, maybe a Dialog, and of course an Undo event.
So instead of three lines you end up with 50.

Now here comes ScriptScript into play.
A home for all those snippets and small routines. Along with documentation for your co-workers.
You can keep the dialogue open on the second monitor, as it will always pick the current comp.
Large monster-scripts could be called externally from this dialogue as well, but primarily ScriptScript is for those nifty little every day tidbits.
While this is still in Beta, development will go on.

For up to date information on the latest and greatest

Code: Select all

Atom {
Name = "ScriptScript",
Category = "Scripts/Comp",
Author = "Eric "SirEdric" Westphal",
Version = 0.85,
Date = {2018, 02, 18},
Description = [[<h1 align="center"><sup>&#91;se&#93;</sup>SrciptScript </h1> <h3 align="center"> Comp Script Framework</h3>
<p>Many times one has to do *really* simple things in script. Like setting all Loaders to postMultiply by Alpha.
Normally, this are just three lines like
<pre>if tool.PostMultiplyByAlpha then
tool.PostMultiplyByAlpha[1] = 1
end
</pre>
But to actually share stuff like that with a larger team, one has to write all that shizbang for comp:, toollist(), flow, maybe a Dialog, and of course an Undo event.
So instead of three lines you end up with 50.<br>
Now here comes ScriptScript into play.<br>
A home for all those snippets and small routines. Along with documentation for your co-workers.
You can keep the dialogue open on the second monitor, as it will always pick the current comp.
Large monster-scripts could be called externally from this dialogue as well, but primarily ScriptScript is for those nifty little every day tidbits.<br>
While this is still in Beta, development will go on.<br>

For up to date information on the latest and greatest
</p>]]],
Donation = {
URL = [[https://www.paypal.me/SirEdric]],
Amount = "€5.00 EUR",
},

Deploy = {
"Scripts/comp/SirEdric/se_ScriptScript.lua",
},
}

com.SirEdric.se_ScriptScript.zip
Cheers.

Eric.
Last edited by SirEdric on Tue Feb 20, 2018 9:29 pm, edited 2 times in total.

ChristopherNodal
Fusioneer
Posts: 165
Joined: Mon Jan 11, 2016 1:42 pm

### Re: [se] ScriptScript

This looks great. Thank you SirEdric. A worthy Reactor submission if you ask me!

SirEdric
Fusionator
Posts: 1822
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 97 times
Contact:

### Re: [se] ScriptScript

Thanks for the thanks Christopher...
The thing is, it actually is a real timesaver in our environment from the first day on.
Both in terms of saving dev times, getting solutions out faster, receiving less questions from colleagues.
Three. That was three things....

SecondMan
Posts: 3416
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 78 times
Contact:

### Re: [Submission] se_ScriptScript

Hey Eric,

Finally I'm getting around to looking at your terrific submission!

A couple of things caught my eye. First your Author name. It's set to Eric "SirEdric" Westphal which causes a little bit of trouble in the Atom file, as your code then ends up as Author = "Eric "SirEdric" Westphal", and your string ends at "Eric " and then some nonsense for a Lua interpreter

Author = "Eric 'SirEdric' Westphal", should work fine instead.

Your Deploy is set to "Scripts/comp/SirEdric/se_ScriptScript.lua",. The Comp directory in Fusion is uppercase Comp (Windows won't complain, but others will...

Also, since your description contains special characters like [ and ], it's more reliable to use the HTML encoded entity for them as described here

I've gone ahead and done the adjustments in the Atom, if you would like to verify them and perhaps update your own archive to match?

If you are good with all of them we can deploy soon

Thanks!
com.SirEdric.se_ScriptScript.zip

SecondMan
Posts: 3416
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 78 times
Contact:

### Re: [Submission] se_ScriptScript

As one of your current beta testers, a pair of notes...

In the ScriptScript, there is this entry:

Code: Select all

{"Ext Set all Mat", "External", "externalScript", [[<h3 align="center">Do something outside the box.</h3><br>starts externally!]], [[Q:\_assets\FusionScripts\Comp\MO_MultiOBJtoSPX.lua]],},
That points to an external location named Q:\ - if this is added as an example maybe use something descriptive?

Also, I managed to crash Fusion using your script. All I needed to do is load up the script and then switch between different scripts as fast as I can on the left. Of course now that I am writing this I can't reproduce it. But I do get a good chuckle out of a certain error message that briefly appears when I try to

SirEdric
Fusionator
Posts: 1822
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 97 times
Contact:

### Re: [Submission] se_ScriptScript  [SUBMITTED]

Hey Pieter.

Thanks a lot for taking the time and looking into it!
Much appreciated and, yes, I'm totally fine with the corrections...

Cheers & all the best.

Eric.

SecondMan
Posts: 3416
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 78 times
Contact:

### Re: [Submission] se_ScriptScript

Submitted!

Enjoy everyone!

SirEdric
Fusionator
Posts: 1822
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 97 times
Contact:

### Re: [Submission] se_ScriptScript

Thanks, Pieter!
You rock!

SirEdric
Fusionator
Posts: 1822
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 97 times
Contact:

### Re: [Submission] se_ScriptScript

Did I promise updates? I certainly did...
And since I'm always trying to fulfill my promises here comes...an update!
Apart from a few minor improvements, one can now filter the Categories using the combo in the upper right.
And...it comes with a new snippet called "The Gradiator".
How many times when you create a gradient you spent time to evenly spread out those tiny little triangles?
Gradiator_01.png (3.79 KiB) Viewed 144 times
These times are over, because The Gradiator does exactly that. Spacing out those triangles nice and even.
Gradiator_02.png (3.83 KiB) Viewed 144 times
But wait! There's more!
You can also create hard transitions (or soft-ish transitions, based on the threshold) between those triangles.
Gradiator_03.png (3.75 KiB) Viewed 144 times
Enjoy!
se_ScriptScript.lua