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

Automatically create directory when creating a new project #4749

Closed
nathanfranke opened this issue Jun 25, 2022 · 5 comments · Fixed by godotengine/godot#56420
Closed

Automatically create directory when creating a new project #4749

nathanfranke opened this issue Jun 25, 2022 · 5 comments · Fixed by godotengine/godot#56420
Milestone

Comments

@nathanfranke
Copy link

Describe the project you are working on

Haven't made it yet

Describe the problem or limitation you are having in your project

When creating a new project, there are many steps to create a typical directory structure.

  • Type the directory name you want (e.g. my-new-project)
  • Click "Create Folder"
  • Re-type the project name you want (e.g. My New Project)

Since I make so many projects for testing, this can get tedious.

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

  • Replace the "Create Folder" button with a CheckButton, enabled by default.

When "Create Folder" is active:

  • The project name will be converted to the project directory using some algorithm. I propose: My Project Name->my-project-name, Test1->test1.
  • Changing the project name will modify the project path (only if the path wasn't previously changed).
  • The user is allowed to change the project path and it will not be automatically changed unless the user reverts their changes and changes the project name.
  • Browsing to a path will create a new folder under that path.

When "Create Folder" is inactive:

  • The project path is never changed by the engine.
  • The project path must exist before the project can be created.

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

demo.mp4

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

Cannot be worked around without modifying the project manager

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

The project manager is already part of the editor

@Calinou
Copy link
Member

Calinou commented Jun 25, 2022

Related to #2754.

@AaronRecord
Copy link

I think the project folder name should use snake casing as that's what godot and the Godot demo projects use: https://github.com/godotengine/godot-demo-projects/tree/master/2d

@nathanfranke
Copy link
Author

I think the project folder name should use snake casing as that's what godot and the Godot demo projects use

hmm, most of my major projects have a git repository and I usually name those with dashes (e.g. godot-proposals).

@Calinou
Copy link
Member

Calinou commented Jul 8, 2022

Does this proposal address godotengine/godot#60332, or do extra steps need to be taken for this? This is something users regularly stumble upon, so we should try to address it for 4.0.

@nathanfranke
Copy link
Author

nathanfranke commented Jul 9, 2022

I wouldn't say this proposal would solve that issue, since (at least in my PR) disabling Create Folder basically behaves the same as it did before (thus allowing users to brick their engine). A fail safe is definitely a good idea, I'll probably add that to my PR.

(Edit: implemented in PR)

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

Successfully merging a pull request may close this issue.

4 participants