Welcome to WSL!

New to the forum? Please read this and this.

Fu UITree method FindItems() is broken  [FIXED]

Moderator: Chad

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

UITree method FindItems() is broken

#1

Post by Midgardsormr »

Fusion versions:
17.2.1
16.2.3



OS and version: Windows 10 Professional



Additional relevant system info:



Description of the bug:
If I dump the results of FindItems() on a UI Manager Tree object in Fusion 9, I get the following output:

table: 0x028478c8
1 = UITreeItem (0x0000000034D9EDD0) [App: 'Fusion' on 127.0.0.1, UUID: 29a6fa49-cf83-49b9-b8b4-581cc75299c7]
2 = UITreeItem (0x0000000034D9FDD0) [App: 'Fusion' on 127.0.0.1, UUID: 29a6fa49-cf83-49b9-b8b4-581cc75299c7]

If I run the same script in Fusion 16 or 17, I get only a reference to an empty table.



Severity (Trivial, Minor, Major, Critical) Critical - numerous pipeline automation scripts are producing incorrect output.
edit: Upgraded to Critical. Some of these scripts manipulate files on disk. I'd really rather know that they're hitting only the files they're told to.



Steps to reproduce:

Run the attached script in Fusion 16 or 17. Unticking the 'Select All' box will do nothing. In addition, upon clicking the "Next" button, it is supposed to dump a list of rows to the Console, but it does not. In Fusion 9, unticking Select All will deselect the checkboxes in the other rows, and the console displays this:

Code: Select all

1: 
UITreeItem (0x000000003BBA1480) [App: 'Fusion' on 127.0.0.1, UUID: 64b5ef07-7fd3-466e-9439-e2c045db250d]
2: 
UITreeItem (0x000000003BBA3800) [App: 'Fusion' on 127.0.0.1, UUID: 64b5ef07-7fd3-466e-9439-e2c045db250d]
3: 
UITreeItem (0x000000003BBA4080) [App: 'Fusion' on 127.0.0.1, UUID: 64b5ef07-7fd3-466e-9439-e2c045db250d]


Please, if possible, provide a Fusion setup to help demonstrate the behaviour, either as an attachment or between [code] tags:
Tree-bug-hunt.lua
You do not have the required permissions to view the files attached to this post.

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

Re: UITree method FindItems() is broken  [FIXED]

#2

Post by Midgardsormr »

Update: Many thanks to @PeterLoveday for exploring this one with me. Turns out the bug is actually in Fusion 9; it should not have worked the way I was using it.

FindItems() requires arguments: https://doc.qt.io/qt-5/qtreewidget.html#findItems

FindItems("*", {MatchWildcard = true }, 0) will match all items in a tree.