-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add methods to get target filter and repeat #66546
Conversation
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 to me!
Looks good to me, my only concern is the naming which it kind of weird, as I am not really sure what "target" means here. |
Renamed. |
Looks great! Thanks |
I think this PR is good and it makes sense it was merged, but given this is core engine I would appreciate being asked next time. |
Anything SceneTree or core nodes (Node, CanvasItem, Control, Node2D, Node3D, Viewport, etc) is core. |
I'm making use of this for #67288 but discovered that it doesn't seem to respect the default texture filter project setting when the all of the nodes up the tree are set to inherit. It seems like it's giving me linear in a project where all the nodes are set to inherit but the project setting is nearest. Should I open an issue for that? |
Yeah that sounds incorrect. |
get_texture_filter()
andget_texture_repeat()
in CanvasItem return the filter/repeat of the current node, but if it's set to "inherit", the returned value isn't what one would expect. To get accurate value, you'd need something likeis_visible_in_tree()
, but for filter and repeat.Luckily such thing exists and it's called
texture_filter_cache
andtexture_repeat_cache
. This PR exposes these properties via public methodsget_target_texture_filter()
andget_target_texture_repeat()
.This is needed for #60149 and #57596
The methods are not exposed to scripting for now.