Godot-proposals: Reverse the naming of built-in scripts

Created on 26 Feb 2020  路  5Comments  路  Source: godotengine/godot-proposals

Describe the project you are working on:
A project where I use built-in scripts A LOT.

Describe the problem or limitation you are having in your project:
I use lots of built-in scripts. They really help avoiding clutter in project files, it's awesome feature (despite some problems). There's an usability shortcoming though that comes with using lots of these scripts...
Name problem
You can give them names, but they appear at the end of the string in the script list. It makes it hard to distinguish which script is which by just looking at the list when the scene names are too long.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
The name of built-in scripts on the script list should be changed to display script name first, if available. So in my case (see above) it would become something like MapEvents::LakesideVillage or similar. If the script doesn't have name, they would appear like they do now, i.e. ID at the end (it's not helpful anyways).

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
It's a matter of changing this line:
https://github.com/godotengine/godot/blob/2d980f6f13cc761c1eb9329e7eaeba5e9d1a9b37/editor/plugins/script_editor_plugin.cpp#L1793

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

Is there a reason why this should be core and not an add-on in the asset library?:
Impossible as asset. Also it's just one line.

editor

Most helpful comment

Shouldn't the parent scene be considered the same as parent directory? Then it would make sense to follow the script list naming setting:

  • Full path: res://path/to/scene/SceneFile.tscn::ScriptName
  • Parent and name: SceneFile.tscn::ScriptName
  • Name: ScriptName

All 5 comments

Shouldn't the built-in script name be displayed after the scene name, to follow the existing convention where the most "significant" fragment is first?

While I understand the usability issue, we should try to not make things more confusing. Maybe we should use names like these?

ScriptName (Scene.tscn)

Shouldn't the built-in script name be displayed after the scene name, to follow the existing convention where the most "significant" fragment is first?

But the script name is the significant fragment.

Maybe we should use names like these?
ScriptName (Scene.tscn)

Yep, this could work. I agree that reverse :: thing would be confusing, so the actual syntax is up to be decided.

I agree that in script view, script name should be the most significant.

Shouldn't the parent scene be considered the same as parent directory? Then it would make sense to follow the script list naming setting:

  • Full path: res://path/to/scene/SceneFile.tscn::ScriptName
  • Parent and name: SceneFile.tscn::ScriptName
  • Name: ScriptName

I agree that changing the order would be helpful, but we shouldn't use :: to indicate this. I like @Calinou 's suggestion of ScriptName (Scene.tscn).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SpyrexDE picture SpyrexDE  路  3Comments

Dorifor picture Dorifor  路  3Comments

arkology picture arkology  路  3Comments

IllusiveS picture IllusiveS  路  3Comments

PLyczkowski picture PLyczkowski  路  3Comments