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

Deleting only repeating "Scripted Variables" props #58443

Conversation

object71
Copy link
Contributor

@object71 object71 commented Feb 22, 2022

Fixes #58239
Fixes #43491
Fixes #54410

As described in the linked issue more properties were deleted from the initial "Scripted Variables" section than needed. My changes will perserve additional properties defined in _get_property_list but it won't categorize them properly when a few user scripts are extended.

Bugsquad edit: Also fixes #63454

@TheSecondReal0
Copy link
Contributor

This is an absolute life saver! I'd just finished porting my project to 4.0 alpha 3 to find that all of my custom exports were broken and this PR fixed it. I've been using the build artifact ever since and everything seems to be working as expected even when I'm doing some weird stuff with inherited custom classes.

@object71 object71 force-pushed the fix-editor-properties-deleted-by-mistake branch from 19114bb to 220c331 Compare March 6, 2022 14:02
@object71
Copy link
Contributor Author

object71 commented Mar 9, 2022

btw do i need to do something for a PR to get reviewed?

@Calinou
Copy link
Member

Calinou commented Mar 9, 2022

btw do i need to do something for a PR to get reviewed?

No, but since there is a lot of backlog for reviewing PRs, it may take a while for this PR to be merged. Sorry for the inconvenience.

@object71
Copy link
Contributor Author

btw do i need to do something for a PR to get reviewed?

No, but since there is a lot of backlog for reviewing PRs, it may take a while for this PR to be merged. Sorry for the inconvenience.

Thanks, there is no inconvenience.

@object71 object71 force-pushed the fix-editor-properties-deleted-by-mistake branch from 220c331 to f9dba44 Compare May 4, 2022 06:10
@reduz
Copy link
Member

reduz commented Jun 23, 2022

@vnen It looks like this is something that happened apparently as a change to GDScript so I am unsure if it needs to be fixed in the inspector. Let me know when you have time to lend me a hand understanding it.

@object71
Copy link
Contributor Author

Indeed the problem is that get_script_property_list on line 3609 doesn't produce all the properties that are related to a single script (the missing ones are the ones defined by the user in gdscript but not through the export keyword. My solution on the other hand solves the problem by not deleting any properties that couldn't be categorized which is somewhere to start from and would solve the general issue and any further issues of this kind.

It is still better to not be trigger-happy with the deleting of properties and then solve the problem of them not being categorized in the proper script.

@YuriSizov
Copy link
Contributor

YuriSizov commented Jul 27, 2022

So while investigating #63454 I've run into issues with code from #32428 as well, came to the same conclusions, and that in turn led me here. It's a very weird solution, originally, to remove everything from the bottom item until the next category. It doesn't support _get_property_list for some reason (might be a GDScript module issue), and it doesn't work with the new grouping annotations.

This PR seems to fix #63454 and it works correctly with the issues it was set to fix, according to my limited testing. I'm going to approve it, as the code and the approach makes more sense to me than what we have right now. But I think this piece of code, the entire _update_script_class_properties method, is problematic. Even if there are issues on the GDScript side, it's in need of fixing in the inspector as well.

@akien-mga akien-mga merged commit ba2aa30 into godotengine:master Jul 27, 2022
@akien-mga
Copy link
Member

Thanks!

@reduz
Copy link
Member

reduz commented Jul 28, 2022

I have no problem in merging this, but it should have comments of what it fixes and why because its basically a hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment