Jump to: Board index » General » Fusion

What exactly is a Script? And what does it do?

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

Edwin Rivera

  • Posts: 160
  • Joined: Wed Aug 03, 2016 4:53 pm

What exactly is a Script? And what does it do?

PostSun Feb 05, 2017 9:03 pm

Hi guys

Im still a noobie trying to go intermediate
I have never worked on a script before, don't know what's for? Can you help me understand it

Also i checked out some options that the script has in fusion 8 that other past tutorials never had

-Edit
-Bake Animation
-Combine Strokes
-Edit Multistroke

^what exactly are these for?

Thanks a lot,
I appreciate the help

Have a great day
Offline
User avatar

Blazej Floch

  • Posts: 191
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: What exactly is a Script? And what does it do?

PostMon Feb 06, 2017 7:10 am

I understand your confusion as there is multiple meanings for the word "script" in this industry.
However in Fusion "script" means a piece of code based of a scripting language: https://en.wikipedia.org/wiki/Scripting_language

Fusion supports both the Lua and Python Scripting Language. With these and a bit of knowledge about programming you can access most of Fusions functionality in order to automate tasks that are repetitive, prone to human error, hard to do manually etc. Similarly you can extend Fusions functionality if possible with the given access to underlying functionality.

To give you a simple example, imagine you want to automate the task of disabling all savers in the composision, but the selected.
In written English a script could do the following task:
Code: Select all
for each saver tool in the composition:
    if the current saver tool is not selected:   
          set this saver tool to pass-through

The computer does not understand this though. To see how this would work in a real script the quick start tutorial in the Fusion 8 scripting guide:
https://www.blackmagicdesign.com/manual ... _Guide.pdf

As you mentioned Fusion ships with a few scripts. In most (bigger) companies "Technical Directors" write more custom functionality. Scripting is just one way to extend Fusion. Here all possible interfaces beyond the graphical user interface that most users are familiar with:

  • Scripts (Lua/Python, mainly change the properties, nodes etc. - can not change image data directly)
  • Fuses (scripted Plugins in the Lua programming Language. May create own 2D filters and nodes (change image data), even allows for GPU evaluation via OpenCL kernels)
  • Native Plugins (in the C++ Programming Language. Similar to Fuses but go beyond its functionality, allow extending 3D, Fileformats and more - Requires the SDK)
  • Comp format (yes, the .comp is actually just a (Lua-Table) text file. Nothing stops you from messing with it, or generating it from scratch)
  • Settings (simple preset of the properties of a tool, stored on disk/in bin)
  • Macros (like presets, but group/aggregation of tools that may provide its own interface)
  • Expressions (allows for complex connection of properties / calculations of properties)

Hope that helps.
Offline
User avatar

Blazej Floch

  • Posts: 191
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: What exactly is a Script? And what does it do?

PostMon Feb 06, 2017 7:11 am

Just a small addition about scripts:

There is different types of scripts, and they appear in different places in the user interface. Compare the guide.
Offline

Edwin Rivera

  • Posts: 160
  • Joined: Wed Aug 03, 2016 4:53 pm

Re: What exactly is a Script? And what does it do?

PostMon Feb 06, 2017 8:48 pm

I have a friend who told me to learn Python, but i want to learn Fusion First before i do

Which Site or tutorial do you recommend for Python,
and also how did you start your path at coding?


Thanks You so much Sir
Offline
User avatar

Blazej Floch

  • Posts: 191
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: What exactly is a Script? And what does it do?

PostTue Feb 07, 2017 3:17 am

Without reach to books or the internet, as a 10 year old I basically just copied samples in QBasic line by line and figured what it did. https://en.wikipedia.org/wiki/QBasic

20 years later and I work as a programmer. I would not recommend this learning path :D

There is websites like Khan Academy and Code Academy. Give it a go and see if scripting is for you.
Other than that: read books. The best books, do not bother the: become a X in Y hours, type of books.
Amazon reviews usually give good hints.

Just keep in mind: There is brilliant compositors out there that have never written a single line of code.
I do not believe scripting is for everyone. I had success teaching to individuals but I also saw failure. See if you feel comfortable with it. If you feel it is not for you then probably it's good you did not waste much time or money.
Offline
User avatar

Adelson Munhoz

  • Posts: 273
  • Joined: Thu Mar 05, 2015 5:44 pm

Re: What exactly is a Script? And what does it do?

PostTue Feb 07, 2017 10:27 am

I also suggest the CodeProject site:

https://www.codeproject.com/

Well organized and a great community of coders, too.
Offline

Alaz Soytemiz

  • Posts: 137
  • Joined: Tue Nov 11, 2014 8:26 am

Re: What exactly is a Script? And what does it do?

PostTue Feb 07, 2017 10:53 am

And what do think is the correct path for learning?
C++ or Python?
Windows 10 Pro 64Bit
Processor: Intel(R) Core(TM) i9-11900K
Ram: 128GB
Graphics Card: NVIDIA GeForce RTX 3070 Ti
Disks: Samsung SSD 980 PRO
Offline
User avatar

Bryan Ray

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

Re: What exactly is a Script? And what does it do?

PostWed Feb 08, 2017 1:35 am

For Fusion and general VFX scripting, learn Python. You won't need C unless you want to write plug-ins or applications. If you aren't planning on writing scripts for anything other than Fusion, I'd learn Lua. It's a little easier to get started, and it's useful in other parts of Fusion, like expressions and fuses.

The skills from learning any scripting or programming language easily transfer to other languages, though, so if you start with Lua and decide later that you need Python, or even C++, then it's not all that difficult to make the switch.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 36 guests