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

Allow to disable automatic property linking #75534

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Mar 31, 2023

Adds a new editor setting that makes linking disabled by default.
Closes #68165 probably

@KoBeWi KoBeWi added this to the 4.x milestone Mar 31, 2023
@KoBeWi KoBeWi requested a review from a team as a code owner March 31, 2023 16:14
@KoBeWi KoBeWi requested a review from a team March 31, 2023 16:14
@KoBeWi KoBeWi force-pushed the if_you_disable_this_setting_you_don't_deserve_the_feature branch from 5afc4ca to 312c936 Compare March 31, 2023 17:03
@ajreckof
Copy link
Member

ajreckof commented Apr 1, 2023

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.

@kleonc
Copy link
Member

kleonc commented Apr 1, 2023

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

This is tracked separately in #73432.

@ajreckof
Copy link
Member

ajreckof commented Apr 1, 2023

This is tracked separately in #73432.

oooh didn't know of this one then #68165 is a duplicate of #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"));
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

@KoBeWi KoBeWi Apr 3, 2023

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.

@akien-mga akien-mga modified the milestones: 4.x, 4.1 May 16, 2023
@akien-mga
Copy link
Member

Needs rebase.

@KoBeWi
Copy link
Member Author

KoBeWi commented May 16, 2023

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.

@YuriSizov
Copy link
Contributor

Superseded by #77135.

@YuriSizov YuriSizov closed this May 29, 2023
@KoBeWi KoBeWi deleted the if_you_disable_this_setting_you_don't_deserve_the_feature branch May 29, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node3D Linked scale locks too often
6 participants