Welcome to WSL!

New to the forum? Please read this and this.

[RELEASED] Class Browser

Where the future is being made, today.

Welcome to the WSL development corner!

In this forum, please post your development projects. You get kudos and feedback here.
Topics ideally have preset prefixes, and this is what they (might) mean:

  • [DEV] - very much work in progress, don't build a business on this, could go anywhere
  • [BETA] - should kinda do what it's supposed to do, please test, give feedback
  • [RC] - this may end up in Reactor soon, polishing up, now's the time for last minute thoughts
  • [ABD] - died a premature death, sadness, will not see the light of day ever (unless someone picks up the scraps)

Once a development project has been released (hurray), topics can be marked as - you guessed it - [RELEASED] :cheer:

Development topics only, please. For generic questions, how-to's, questions and inquiries about existing tools etc, please go to the appropriate other forums.
User avatar
roger
Posts: 23
Joined: Wed May 02, 2018 4:27 am
Been thanked: 2 times

[RELEASED] Class Browser

#1

Post by roger »

So, a while ago I created the Class Browser, a reference tool that I used when creating UIManager-based GUI:s. It's grown a bit since then and because it's not really targeted just for GUI creation I think it needs its own thread.

Image

The script allows you to browse all Fusion (and Resolve) classes it can find, including all properties and methods. It does this by looking at three things:
  • Fusion's built-in script documentation, GetHelp()
  • The global _G table
  • The binary files (yes, it's a simple and probably unreliable hack)
The binary files method came about when I started making a Fuse and soon became frustrated that there were some crucial pieces missing from VFXPedia. Without access to the official documentation it's really tricky. But I could see there was more stuff in the binaries just by looking at them.

Since classes found in the binaries don't come with a class hierarchy, not all classes will be placed correctly. In case I can't match a discovered class with a documented class I simply place it in the root. I assume there might also be instances where classes that have the same names are actually different classes in BMD:s source code and are meant for different contexts. But Fusion script writers are probably used to the fact that not all methods work in all areas of Fusion anyway.

To make a distinction between documented information and information discovered in the binary files I call the different sections "Properties", "Methods", "Discovered Properties" and "Discovered Methods".

When would I use it?
I think the biggest benefit is when creating Fuse scripts. The Operator, Image, and Request classes have a lot of stuff in them that isn't in the built-in documentation. You can also use it when you want to find out which attributes are applicable to an input control, like the MultiButtonControl. UIManager classes are in there too of course, but they don't have any parameter info so you have look them up on Qt.

Feedback
Since version 1.2.1 I believe I've reached the end of the road in regards to what information can be "easily" extracted from Fusion. But before I put it in Reactor I thought I would ask for some feedback.

Tag Map/Attributes/TagList
What do we call these? I'm currently calling them Tag Maps (mostly) since that's their name in the global table. But VFXPedia calls them attributes. TagList as I understand it is a specific class representing a Tag Map (collection of attributes).

Keep the "Filter class name" text box?
I'm thinking I should get rid of it. I never use it since you can type the first characters of a class in the TreeView and navigate there instantly. In the Nested View the filtering is incredibly slow when you remove the filter. And there are a few bugs in there as well.

Download
Class Browser 1.2.3.lua
Fusion 9 and Fusion/Resolve 16+ supported (Resolve 15 probably works as well). Windows, macOS, Linux.


Release Notes
v1.2.3 2021-03-18
  • Fixed: Startup crash in Resolve/Fusion v17.1 caused by class types that are no longer available
  • Fixed: Classes containing only ignored discovered methods (like _cast) caused properties to be skipped
  • Fixed: FuPath methods weren't being discovered
v1.2.2 2020-05-14
  • Fixed: The Plugins path was incorrect for Fusion on Windows
v1.2.1 2020-05-13
  • New: Additional properties discovered automatically
  • New: Several more files are probed for methods and properties
  • Fixed: Some PreviewControl classes weren't showing in the nested view
v1.2 2020-05-10
  • New: Tag Maps and Enum Maps
  • New: Additional methods that aren't documented in the help system are now discovered automatically
  • Fixed: Fusion v9 window layout issue
  • Fixed: Fusion v9 didn't show property types when available
  • Fixed: Fusion v9 error when registry entries contained tables, added workaround for dumptostring() bug
v1.1 2020-04-02
  • Added support for showing registry entries associated with a class
v1.0 2020-02-23
  • First!
You do not have the required permissions to view the files attached to this post.
Last edited by roger on Thu Mar 18, 2021 8:18 am, edited 4 times in total.

User avatar
Midgardsormr
Fusionator
Posts: 2110
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 24
Location: Los Angeles, CA, USA
Been thanked: 25 times
Contact:

Re: [RC] Class Browser

#2

Post by Midgardsormr »

Bug: In my Windows installs, the .plugin files are found in Plugins\\Blackmagic\\... The script failed to run, indicating that fuses.plugin was not found because it wasn't looking in the Blackmagic subdirectory. I altered lines 330 and 335 with the correct path, and it started up.

Added in 13 minutes 8 seconds:
I don't have an opinion regarding the Tag Map/Attribute/Whatever nomenclature.

I think keep the filter field. There might be times when someone would want to browse Controls, for instance. Since they're prefixed with their type, it's not easy to find them all, but the filter box lets you find the last part of the name. (Who knew there was an "ObloidControl"?)

Oh, and thanks again! I use this script frequently.

User avatar
roger
Posts: 23
Joined: Wed May 02, 2018 4:27 am
Been thanked: 2 times

Re: [RC] Class Browser

#3

Post by roger »

Hmm, wonder why that path would be different. One thing I can think of is if it's an upgraded installation from a previous version. I'll have to do something smarter then, like a recursive search for specific files. Thanks for doing the detective work!

Edit: Turns out the path is different in Fusion compared to Resolve. But it's still strange, I'll have to look at my Linux box tomorrow because I know I checked Fusion there without any issues.

User avatar
roger
Posts: 23
Joined: Wed May 02, 2018 4:27 am
Been thanked: 2 times

Re: [RC] Class Browser

#4

Post by roger »

Incorrect Plugins path for Fusion on Windows is now fixed, thanks Bryan.

User avatar
miaz3
Fusioneer
Posts: 228
Joined: Sat Jan 03, 2015 1:43 am
Location: Angoulême / France
Contact:

Re: [RC] Class Browser

#5

Post by miaz3 »

Excellent work, thank you !
Work well on centOS7, fusion studio 16.2.1

User avatar
danell
Fusioneer
Posts: 242
Joined: Mon Dec 12, 2016 6:32 am
Been thanked: 13 times

Re: [RC] Class Browser

#6

Post by danell »

I'm getting this error in F17 with Class Browser 1.2.2:
...ram\Fusion\Settings\Scripts\Comp\Class Browser 1.2.2.lua:69: table index is nil
And then nothing more happens.
Tried to figure out what's going on but I'm stuck :S

User avatar
Stephanein
Posts: 1
Joined: Fri Mar 20, 2015 3:49 pm

Re: [RC] Class Browser

#7

Post by Stephanein »

danell wrote: Mon Mar 08, 2021 7:40 am I'm getting this error in F17 with Class Browser 1.2.2:
...ram\Fusion\Settings\Scripts\Comp\Class Browser 1.2.2.lua:69: table index is nil
And then nothing more happens.
Tried to figure out what's going on but I'm stuck :S
It looks like the classes "CT_MtlGL3D" & "CT_LightGL3D" were removed in Fusion 17. To fix the Class Browser for now, I removed them from line 65 of Class Browser 1.2.2.

User avatar
roger
Posts: 23
Joined: Wed May 02, 2018 4:27 am
Been thanked: 2 times

Re: [RC] Class Browser

#8

Post by roger »

Thanks for the heads-up. v1.2.3 is now available in the first post.

User avatar
danell
Fusioneer
Posts: 242
Joined: Mon Dec 12, 2016 6:32 am
Been thanked: 13 times

Re: [RC] Class Browser

#9

Post by danell »

@roger This has bin in RC for a while now, any thought on releasing it to Reactor soon? :)

User avatar
roger
Posts: 23
Joined: Wed May 02, 2018 4:27 am
Been thanked: 2 times

Re: [RC] Class Browser

#10

Post by roger »

Actually that's why I popped in here almost a year later. Reading up on the submission process now. :-)