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

MeshLibrary Inspector Panel should allow Adding/Deleting/Reordering #6447

Open
SirLich opened this issue Mar 6, 2023 · 5 comments
Open

MeshLibrary Inspector Panel should allow Adding/Deleting/Reordering #6447

SirLich opened this issue Mar 6, 2023 · 5 comments

Comments

@SirLich
Copy link

SirLich commented Mar 6, 2023

Describe the project you are working on

A 3D card-based island-builder, with hex-grid tiles. I am using a self-rolled solution, but I would consider using GridMaps if they were more fully featured.

Describe the problem or limitation you are having in your project

The Inspector Panel for 'Grid Maps' is not intuitive. Unlike most other resources, the grid-map resource is completely blank:

image

One may initially think that it's impossible to actually do anything with this resource.

If you know what to look for however, there exists an editor inside of the 3D Viewport. After clicking 'add item', you actually do get data inside of the asset, and can use the Inspector to fill in the data:

image

Once created, these items don't appear to be real resources, however. The normal tools available to resources (make local to scene, save, etc) are not available. You also seemingly cannot delete them, once added.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

My suggestion is to move a subset of this functionality directly into the resource. The gold-standard for me would be something like this, which allows for: adding, deleting, and re-ordering:

image

I'm not suggesting that ALL functionality is moved over. I think the 'Import from Scene' stuff is already well-situated.

Additionally I feel that the child type here (MeshLibraryItem?) should be it's own resource type, if it's not already.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Mockup available above. I would be looking for a proper array editor, as shown in other places in Godot Engine.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It's a UX flow issue. It can be worked around.

Is there a reason why this should be core and not an add-on in the asset library?

Once again, it's a UX flow. I don't think external assets have anything to do with it; really it's just about the expected way for a core asset to behave.

@barbaros83

This comment was marked as off-topic.

@PoolloverNathan

This comment was marked as off-topic.

@Hiiamwilliam
Copy link

Once created, these items don't appear to be real resources, however.

They aren't. Each MeshLibrary item shows a bunch of related Resources/data bundled by an integer index (cell ID). Some are proper Resources, like Mesh and Navigation Mesh, others are just information stored directly into the MeshLibrary.

You also seemingly cannot delete them, once added.

This was reported (again) recently: godotengine/godot#74388. Although it's reported for Godot 4, Godot 3 also has it. I imagine using this menu is uncommon - I myself only discovered it a few months ago.


MeshLibrary could be updated to use an Array of MeshLibraryItems yes, but then GridMap would also need to be reworked. Currently, GridMap associates the ID to painted cells. So if you reorder the MeshLibraryItems, the painted cells would also change.
To avoid problems, GridMap would need to work with something other than cell ID (#3523).


For autotile, there's this: https://www.youtube.com/watch?v=bwcEh2HffoY.

@SirLich
Copy link
Author

SirLich commented Mar 7, 2023

Thanks for the additional information @Hiiamwilliam ! Honestly the whole 'GridMap' implementation feels pretty weak. I would be happy to see it reworked completely, just as the 2D TileMaps were.

I'm not sure it's very high priority though. I also heard there was a suggestion to delete the whole thing from core, and move it into a supported plugin. That seems good to me as well.

@Calinou
Copy link
Member

Calinou commented Mar 8, 2023

I also heard there was a suggestion to delete the whole thing from core, and move it into a supported plugin. That seems good to me as well.

That proposal was rejected: #5561

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

No branches or pull requests

6 participants