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

Inspector does not display properties without category #54410

Closed
4d49 opened this issue Oct 30, 2021 · 5 comments · Fixed by #58443
Closed

Inspector does not display properties without category #54410

4d49 opened this issue Oct 30, 2021 · 5 comments · Fixed by #58443

Comments

@4d49
Copy link
Contributor

4d49 commented Oct 30, 2021

Godot version

v4.0.dev.custom_build [61786f803]

System information

Windows 10

Issue description

If script usages _get_property_list() method Inspector does not display properties without custom Category.

Steps to reproduce

Create a script with a _get_property_list() method without a category.

Minimal reproduction project

demo-project.zip

@Chaosus Chaosus added this to the 4.0 milestone Oct 30, 2021
@Calinou
Copy link
Member

Calinou commented Oct 30, 2021

@4d49 Does this occur in 3.3.4 or 3.4rc?

@4d49
Copy link
Contributor Author

4d49 commented Oct 30, 2021

@4d49 Does this occur in 3.3.4 or 3.4rc?

No, 3.4 parse properties like Script Variable.

изображение

@object71
Copy link
Contributor

object71 commented Nov 4, 2021

Seems like a few months ago someone added a change so that the "Scripted Variables" values in the inspector are moved to a category with the name of the script (for example instead of "Scripted Variables" you will get "test.gd"). You can notice that regular exported variables are shown under another category.

Problem that I noticed in the code is (EditorInspector::_update_script_class_properties())

  1. That it gets as an argument the script variables exported + custom from the override method _get_property_list
  2. Locates the "Script Variables" category
  3. Checks from which script they come and adds them under a category with the script name <<<--- here it checks against only the exported variables
  4. Clears all variables under the "Script Variables" category

@Calinou Here my question is - do we want them categorized as the exported variables under a category with the script name or should we just limit what gets deleted under "Script Variables" in the last step?

@object71
Copy link
Contributor

object71 commented Nov 8, 2021

@4d49 You can try with my pull request. I made it work correctly for GDScript and also extended scripts too.

@rosshadden
Copy link
Contributor

rosshadden commented Feb 23, 2022

I just ran into this as well. @object71 it seems you have closed your PR. Is there something that superseeds it?

Edit: Ah, I just found #58443.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
5 participants