Open jacobfoxe opened 8 months ago
Perforce integration requires linking against a proprietary library, so an integration can't be made official like for the Git plugin.
If VCS metadata can be written without linking against the proprietary library, then it should be possible to add Perforce as an option in the project manager creation dialog as done for Git.
I'd rather go for option 1 and leave the integration to the community
Describe the project you are working on
Large- and small-scale games.
Describe the problem or limitation you are having in your project
Currently, I use perforce for gamedev across several projects. As it stands, the editor only supports Git VCS natively, and it'd be nice to use only one window while developing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Adding Perforce support into the editor would work in tandem with a p4 GDExtension plugin, similar to https://github.com/godotengine/godot-git-plugin.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Path 1: Modify VCS API to make the editor VCS-agnostic
Explored in this issue: #4369.
Currently, VCS have to be hard-coded in the editor, then extended via GDExtension VCS plugins.
Path 2: Echo git implementation for p4
Modify Editor
In editor_vcs_interface.h:
enum class VCSMetadata { NONE, GIT, P4, };
Here's an example of the metadata selection at project creation:
As above, this enhancement requires a GDExtension plugin to be fully leveraged. I've been working on one based on the godot-git-plugin here: https://github.com/jacobfoxe/godot-p4-plugin
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not cleanly, no. With a different VCS implementation (see Path 1 above), this could all be abstracted out to a plugin. As it stands, this two-part fix is necessary for the add.
Is there a reason why this should be core and not an add-on in the asset library?
With the current VCS implementation in Godot, some core changes need to be made. https://github.com/godotengine/godot-proposals/issues/4369 discusses changing the VCS API to abstract this feature set out.