godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Add a `.gdextension` file editor, like the GDNative bottom panel editor #9898

Open greenfox1505 opened 5 months ago

greenfox1505 commented 5 months ago

Describe the project you are working on

I do a lot of GDExt tiny projects and expirements. It requires a lot of manual set up that could be easier with the tooling that we had for GDNative, as seen here: https://docs.godotengine.org/en/3.5/tutorials/scripting/gdnative/gdnative_c_example.html#platform-libraries

Describe the problem or limitation you are having in your project

Just consumes time to manually set up and verify .gdextension files. Typeos cause issues that are often hard to diagnose.

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

Basically, I just want this kind of tool again: https://docs.godotengine.org/en/3.5/tutorials/scripting/gdnative/gdnative_c_example.html#platform-libraries

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

Like this tool here: https://docs.godotengine.org/en/3.5/tutorials/scripting/gdnative/gdnative_c_example.html#platform-libraries

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

No. It wouldn't be a "a few lines of scripts". But it could be whole plugin.

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

Because it is a regression from GDNative. A feature that was offered now no longer exists.

AThousandShips commented 5 months ago

See also:

dsnopek commented 5 months ago

If we did something like this, we'd ideally need to allow unrecognized things in the .gdextension file to "pass through" when edited with older versions of Godot. I can imagine someone making a GDExtension which can be loaded by multiple versions of Godot, where it contains some stuff that'll only be recognized by newer versions of Godot, and we don't want that stuff to accidentally get stripped out by the editor. I don't know how practical it is to do that, though.

aaronfranke commented 2 months ago

I have made a basic .gdextension file editor in PR #90979:

Screenshot 2024-09-20 at 2 01 18 AM

In the first version of the PR, it included the ability to edit library paths, like the GDNative bottom panel editor, and also icon paths. However, there was feedback that editing this was a poor experience. After my PR is merged, someone could make a follow-up to expand the editor with more features.