Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetFilterUI : Support dropping set names onto nodes #5786

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

ericmehl
Copy link
Collaborator

This adds the ability to drag a list of set names onto a FilterSceneProcessor derived node, or a SetFilter node. As with dragging path lists, if the node does not have a SetFilter, one will be created and populated with the contents of the drag.

The handling of set expressions with anything but a simple list of set names is very simple for now. I'm just wrapping the existing expression in parenthesis before adding to the expression. As we talked about today, eventually it would be nice to parse the expression and come up with a cleaner expression.

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.

@ericmehl ericmehl marked this pull request as ready for review April 11, 2024 21:04
Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

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

Thanks Eric - I've found myself wanting this several times recently, so it's great to see it taking shape. Comments inline as usual...

python/GafferSceneUI/SetFilterUI.py Outdated Show resolved Hide resolved
python/GafferSceneUI/SetFilterUI.py Show resolved Hide resolved
python/GafferSceneUI/SetFilterUI.py Outdated Show resolved Hide resolved
python/GafferSceneUI/SetFilterUI.py Outdated Show resolved Hide resolved
python/GafferSceneUI/SetFilterUI.py Show resolved Hide resolved
resources/graphics.py Outdated Show resolved Hide resolved
src/GafferUI/Pointer.cpp Outdated Show resolved Hide resolved
@ericmehl ericmehl changed the base branch from main to 1.4_maintenance April 16, 2024 21:56
@ericmehl
Copy link
Collaborator Author

Looks like CI is happy, so ready for a new look!

python/GafferSceneUI/SetFilterUI.py Outdated Show resolved Hide resolved
python/GafferSceneUI/SetFilterUI.py Outdated Show resolved Hide resolved
python/GafferSceneUI/SetFilterUI.py Show resolved Hide resolved
resources/graphics.py Outdated Show resolved Hide resolved
Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

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

Thanks for the update Eric! I've resolved my previous comments where relevant, replied to a few, and made a few new comments in this review for things I spotted in a second round of testing...
Cheers...
John

@ericmehl ericmehl force-pushed the dragSetEditorToFilter branch 3 times, most recently from dab8c8b to f1ecf94 Compare April 18, 2024 15:13
@ericmehl
Copy link
Collaborator Author

My latest push fixes the outstanding notes, and also simplifies how we handle expressions with logic vs. simple lists of sets. Now any boolean or hierarchy operators will disable dropping onto the node. This was done because the desired end result of dropping onto such an expression is either not entirely clear, or quite complicated to integrate with the logic operations.

@ericmehl
Copy link
Collaborator Author

I pushed one small fixup just now that moves the changelog entry for this PR to the Improvements section, out of the Features section. Considering the other entries in Improvements, that seems like a better home for this entry.

@johnhaddon johnhaddon merged commit d87dd94 into GafferHQ:1.4_maintenance Apr 19, 2024
5 checks passed
@johnhaddon
Copy link
Member

Thanks Eric - squashed and merged!

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