Jump to: Board index » General » Fusion

Why is scripting so poorly documented?

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

Dorkus

  • Posts: 18
  • Joined: Sat Jan 21, 2023 5:26 pm
  • Real Name: Hunter Bradford

Why is scripting so poorly documented?

PostMon May 27, 2024 1:39 am

Apologies if i'm just misinformed, but I've been trying to find reliable documentation about Fusion/Davinci Resolve's scripting capabilities and I have gotten nowhere. I might look pretty dumb if I am misinformed, given I'm about to go on a huge rant about the terrible documentation, but oh well!

It seems everywhere I look just leads to a dead end filled with outdated information or not containing info about the topics I'm interested in.

For example, I wanted to look into creating a GUI script. I logically consulted the the first manual I found, the Fusion 8 Scripting Guide. To my knowledge, this is the most recent version of the manual that's available. In that manual, there are some mentions of gui powered by IUP, but nothing like a full tutorial or api reference. Since this manual gave me more questions than answers I did some more searching and found a GUI example on the WeSuckLess forum that shows the use of a "new library"(or was new at the time of the post) called fu.UIManager(). So I of course started looking into that and once again found nothing. I have no clue what the fu Object is or any of its other functions and have no clue what gui elements can be created and what properties I can change. None of this seems to be documented anywhere, at least not easily accessible.

This is just one example of the documentation being a pain. The scripting README thats included from the Help menu of resolve documents the Fusion() function, simply stating it returns a Fusion object. But then fails to elaborate on what you can do with that object. And on the topic of the Fusion() function, I also cant seem to find any docs on whats a function and whats a global. Fusion() is a global function that has to be called to access its properties, while something like "comp" does not need to be called, its available for use at anytime. They dont seem to make it clear as to what context objects are accessible, even third party attempts to document the API has no clue. This third party documentation(https://emberlightvfx.github.io/Fusion- ... /UIManager) lists the UIManager as an object. So I assumed it could be called like UIManager(), given that Fusion() is also apparently an object. But that assumption is wrong, the UIManager has to be made via fu.UIManager. Where does fu come from? I have no clue, and the third party docs doesnt know either. What do you even do with the UIManager after its created anyway? The docs only seem to list what objects can be made but not the context in which their used. I have no clue how to properly use the UI manager after its been made.

Its such a headache trying to get into the scripting part of Fusion/Resolve when I have to spend hours browsing the internet for some sort of documentation that should be easily accessible.
Hunter Bradford
Offline
User avatar

Bryan Ray

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

Re: Why is scripting so poorly documented?

PostMon May 27, 2024 2:25 am

Yes, the scripting documentation has been lacking for ages. And the very release after they finally wrote docs, they obsoleted them with the addition of the entirely undocumented UIManager module.

The best reference for UIManager is a thread at the We Suck Less forums: https://www.steakunderwater.com/wesuckl ... php?t=1411

It's not proper documentation, but almost everything anyone has learned about the system is explained there. I also recommend getting the UI Manager Examples from Reactor. This is a collection of scripts that implement each of the major features in UI Manager in an effort to help people learn. It also includes a FusionScript Help Browser script that I've found useful to try to tease information out of the API. Or Roger Magnusson's Class Browser, also available in Reactor. Both of these scripts mine the API for information. Sometimes that includes help built into the functions and classes, but most often it'll just give you some bare-bones information about a class and what member functions and objects it contains.

We Suck Less is a friendly and helpful community that has helped many Fusion TDs make sense of Fusion's scripting API. The absolute fastest way to learn is to go there and ask questions. I'll specifically recommend reading this thread: https://www.steakunderwater.com/wesuckl ... php?t=1854
I wrote a relatively complex script out in the open, learned a lot while doing it, and tried to explain everything in detail as I went along.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

roger.magnusson

  • Posts: 3422
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Why is scripting so poorly documented?

PostMon May 27, 2024 10:20 am

It's not much but there is a bit of official documentation for UIManager distributed with DaVinci Resolve.

In the DaVinci Resolve menu, go to: Help > Documentation > Developer.
Then open /Workflow Integrations/readme.txt

I suppose the key to UIManager is knowing that the different control classes are just proxies for widgets in the Qt 5.15 framework. That's why UI classes displayed in the Class Browser shows a link to the corresponding Qt Widget documentation.

The documentation on emberlightvfx you found is made from the output of the Class Browser, with the added bonus of it being indexed by search engines.

I do agree about the issue of not knowing in which context things are available. That's a real mess and the only way to get started is to look at working examples.

Return to Fusion

Who is online

Users browsing this forum: Hendrik Proosa, KrunoSmithy, Majestic-12 [Bot] and 16 guests