-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Improve Scene Tree Dock's Node filter (Allow multiple terms & more) #65352
Improve Scene Tree Dock's Node filter (Allow multiple terms & more) #65352
Conversation
Notes for the future:
|
6c8f599
to
34a93e8
Compare
I had been waiting for the tags to show up all day at work! I'm really happy about this one. |
45ff7ba
to
68e8f0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, we should eventually find a way for the warning to be shown better than going to the toaster. Either text in red and a tooltip or a warning icon next to the line edit.
- Allows more than one parameter to be passed in the "Filter Node" search box, each term separated by spaces. - Grays out any parent Node not matching the search, but still having to be there because a child is. - Adds a `group:` filter. It matches any Node belonging to the passed group. If no argument is passed, it matches all Nodes belonging to any group. It also ignores groups used internally, and its alias is `g`.
68e8f0b
to
1c4095a
Compare
Thanks! |
This PR is a continuation of #65315, and a bit of a misnomer, because it actually does a whooping 3 things at once:
Allows more than one term to be passed in the "Filter Node" search box, each term separated by spaces.💙
Grays out any parent Node not matching the search, but still having to be there because a child does. This essentially (partially) supersedes Improve search filtering in scene tree editor #58481.
To test the waters of this new implementation, and potentially expand upon the concept in the future (Add search filter syntax to the scene tree dock godot-proposals#4986):
type:
(Add a way to filter nodes by type in scene tree dock. #58377), adds a newgroup:
filter. It matches any Node belonging to the passed group. If no argument is passed, it matches all Nodes belonging to any group. It also ignores groups used internally, and its alias isg
.Suppose we have this sample Scene:
Note that, and this is going to be in the test, ScaryObstacle1 and ScaryObstacle2 belong to the "enemy" group. ScarierObstacle belongs to the "enemy" and "horrifying" group.
Lastly, this implementation uses
String.contains()
overString.is_subsequence_of()
. While the subsequence lead to "quicker typing", it also showed very inconsistent and unexpected results.