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

Godot v4.2.1.stable.official [b09f793f5] Errors on opening table view #55

Open
tivec opened this issue Feb 23, 2024 · 6 comments
Open

Comments

@tivec
Copy link

tivec commented Feb 23, 2024

Hello, I am getting a lot of errors whenever I open up the tab for the ResourceTables.

Plugin version reported as 2.7 in the plugins view, installed from the Godot AssetLib
Using Godot v4.2.1.stable.official [b09f793f5]

 res://addons/resources_spreadsheet_view/import_export/formats_edit/edit_tres.gd:8 - Invalid get index 'entries' (on base: 'Resource (BattleUpgradeTechUnlock)').
 res://addons/resources_spreadsheet_view/typed_cells/cell_editor_array.gd:18 - Invalid call. Nonexistent function 'size' in base 'Nil'.

The errors are all in the shape as above. I have removed all filters, but this seems to happen whenever I select a directory that contain mixed resource types or in its sub folders.

It also corrupts the view whenever the errors happen, see below video where I switch to a directory that only contains one type, and then as I switch back to its parent that has a lot of different types in its subdirectories:
https://github.com/don-tnowe/godot-resources-as-sheets-plugin/assets/717574/01e3acb8-8695-4cb5-a3f2-bd6eb718f4a0

@don-tnowe
Copy link
Owner

mixed resource types

Yeah, that's not here yet.

#38

@tivec
Copy link
Author

tivec commented Feb 23, 2024

mixed resource types

Yeah, that's not here yet.

#38

Yes, I am aware of this. However, this error continues to happen even if I put in a filter that would filter down to the type I want...

godot_lXgXQGmG7F.mp4

@don-tnowe
Copy link
Owner

I just implemented editing with several types, so I'd like to know if it works now. Branch:

https://github.com/don-tnowe/godot-resources-as-sheets-plugin/tree/Godot-4

Does it work fast if you have lots of resources? Does it create any errors when opening/editing/multi-selecting?

@tivec
Copy link
Author

tivec commented Feb 23, 2024

I just implemented editing with several types, so I'd like to know if it works now. Branch:

https://github.com/don-tnowe/godot-resources-as-sheets-plugin/tree/Godot-4

Does it work fast if you have lots of resources? Does it create any errors when opening/editing/multi-selecting?

With a directory of 71 .tres files, it takes a few seconds for it to refresh, but after that everything is snappy. Trying to open up a folder with around 150 .tres files of a variety of types, some with a lot of fields, takes... a long time and finally spit out:
res://addons/resources_spreadsheet_view/main_screen/selection_manager.gd:89 - Out of bounds get index '93' (on base: 'Array[Object]')

Would it be possible to somehow collect the types of resources and put it in a dropdown so you only edit one type at a time, or is that a limitation until we are able to use the 4.3 goodies of getting class names?

@don-tnowe
Copy link
Owner

Hmm, you made me test it for performance myself - it does seem to be worse than the old method, but only because of 2x as many cell editors being instantiated. Adding more rows has the same reload time, but merging another folder made it 2x slower.

The error indicates that a cell editor didn't instantiate. But also that you have at least 93 properties, wow, which is likely causing the performance hit. I'll work on making column hiding (arrow on column header -> Hide) improve performance. I've detected a handful more problems, and will try to fix these.

A dropdown of resource types is actually planned and in fact already possible, but it might need more work as a proper feature. One might need to filter for a class AND all subclasses, so the feature might require more work to detect if a resource's class is a subclass of the filtered class. Didn't know of that 4.3 feature, though - that might allow querying ClassDB for inheritance! Or just read the script contents without using that.

@tivec
Copy link
Author

tivec commented Feb 23, 2024

You're doing good work, absolutely appreciate this addon :) I'll keep an eye on the upcoming changes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants