-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Allow to disable automatic property linking #75534
Allow to disable automatic property linking #75534
Conversation
5afc4ca
to
312c936
Compare
I think to fully closes the linked issue we should add the functionality to retain whether it has been set to be linked or not most probably through some meta property. It wouldn't replace this as what is done here is also good for the first time you see a property editor. |
This is tracked separately in #73432. |
@@ -1751,7 +1751,7 @@ void EditorPropertyVector2::setup(double p_min, double p_max, double p_step, boo | |||
if (!p_link) { | |||
linked->hide(); | |||
} else { | |||
linked->set_pressed(true); | |||
linked->set_pressed(EDITOR_GET("interface/inspector/enable_vector_property_linking_by_default")); |
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.
Should this be cached to avoid fetching editor settings multiple times every time the inspector refreshes?
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.
I'll look into it, but editor properties are instantiated each time, so it needs to be cached somewhere in the inspector itself.
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.
Although things like "interface/inspector/horizontal_vector2_editing"
don't seem to be cached 🤔
This is accessed once per linked vector property, so I think it's fine to use EDITOR_GET.
Needs rebase. |
I actually had an alternative idea recently. The link status can be easily stored per Node/property using project metadata. I think that's what users more expect. I'll give it a try, it will supersede this PR. |
Superseded by #77135. |
Adds a new editor setting that makes linking disabled by default.
Closes #68165 probably