Skip to content

RGBAChannelsPlugValueWidget : Add search field to menu - #7276

Open
LinasBeres wants to merge 1 commit into
GafferHQ:1.7_maintenancefrom
LinasBeres:channelsMenuSearch
Open

LinasBeres wants to merge 1 commit into
GafferHQ:1.7_maintenancefrom
LinasBeres:channelsMenuSearch

Conversation

@LinasBeres

Copy link
Copy Markdown

This adds a search field to the Viewer's channels menu, making it easier to find a layer when an image has many AOVs.

Typing is enabled as soon as the menu opens and uses the existing fuzzy search from the searchable menus.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.
Screenshot 2026-11-18 at 17 13 51

@LinasBeres
LinasBeres changed the base branch from main to 1.7_maintenance November 18, 2026 17:17

@johnhaddon johnhaddon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LinasBeres! I was recently looking at a shot with well north of 500 channels, so this looks like it'll be handy.

Apart from the minor inline comments, our only other thought was whether the search field might be annoying when there aren't very many AOVs. Did you have any ideas around that? We do have a similar search field in the Render Pass menu though, so there's definitely precedent for the approach you've taken...

Cheers...
John

"/Next" : False,
"/First" : False,
}
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this particular test would be better off in ImageViewTest?

Comment on lines +49 to +56
@staticmethod
def __waitForUpdate( widget ) :

with GafferTest.ParallelAlgoTest.UIThreadCallHandler() as handler :
widget._PlugValueWidget__callUpdateFromValues.flush( widget )
auxiliaryPlugs = itertools.chain( *widget._PlugValueWidget__auxiliaryPlugs )
if any( Gaffer.PlugAlgo.dependsOnCompute( p ) for p in auxiliaryPlugs ) :
handler.assertCalled()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very similar to PlugValueWidgetTest.waitForUpdate(), with the main difference being that it considers the private __auxiliaryPlugs too. Rather than duplicate the functionality, it'd be better to make PlugValueWidgetTest aware of the auxiliary plugs and use that. The whole approach needs changing anyway (see #7082), so avoiding duplication is extra worthwhile.

@LinasBeres

Copy link
Copy Markdown
Author

Thanks for the comments!

To be honest, I can't really think of a way of hiding the search bar. I would rather not hide it below a small amount of AOVs, since any cutoff would be fairly subjective and be confusing for artists.

I also don't think it gets in the way too much since all the old functionality is still there. Also the search bar only "activates" when the user starts typing.

I may give this some more thought as maybe there might be something.

I've also addressed your test comments as well in the latest push.

This makes it easier to find a layer in the Viewer when an image has many AOVs. Layers are matched on their full name, and the search can be disabled with `rgbaChannelsPlugValueWidget:searchable` metadata.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants