You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making GDTLancer, and I tend to rename nodes in a way that name is indicative of data (i.e. star size).
And I am actually copying it all from a spreadsheet.
Describe the problem or limitation you are having in your project
An example of entering an invalid name symbol (dot):
Results to:
Would be better this way:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
See above.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It will put underscores in place of illegal symbols in node names, instead of just removing them.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Otherwise it should be done manually.
Is there a reason why this should be core and not an add-on in the asset library?
I assume it is a matter of adding a singe symbol in the code where it handles the node names and replaces illegal symbols with empty character, but I don't know where it is to adjust it myself.
The text was updated successfully, but these errors were encountered:
Calinou
changed the title
Invalid node name symbols to be replaced with underscore "_"
Replce invalid node name symbols with an underscore instead of nothing
Feb 3, 2023
Related: godotengine/godot#67701. Curiously, the current behavior of validate_identifier() is to replace rather than remove an invalid character, unlike validate_node_name(). Removal is the most straightforward option, unlike replacement. If several characters in a row are invalid, should they be replaced with several _ or one? Should it be possible to specify a different replacement character?
If you're generating these names with code, then what's the problem with replacing . with _before assigning a name?
YuriSizov
changed the title
Replce invalid node name symbols with an underscore instead of nothing
Replace invalid node name symbols with an underscore instead of nothing
Feb 3, 2023
I have pondered this issue a while ago, because I have a document archive in which I am trying to sanitize names prior to backing it up, and honestly - I haven't figured out what is the best way to do it.
If you're generating these names with code, then what's the problem with replacing . with _ before assigning a name?
It is not like that. I am just copying values from spreadsheet manually, and renaming things manually too.
I know I can pre-format the fields to ease it up otherwise, but it is just weird that invalid characters are not replaced with placeholders.
Describe the project you are working on
Making GDTLancer, and I tend to rename nodes in a way that name is indicative of data (i.e. star size).
And I am actually copying it all from a spreadsheet.
Describe the problem or limitation you are having in your project
An example of entering an invalid name symbol (dot):
Results to:
Would be better this way:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
See above.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It will put underscores in place of illegal symbols in node names, instead of just removing them.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Otherwise it should be done manually.
Is there a reason why this should be core and not an add-on in the asset library?
I assume it is a matter of adding a singe symbol in the code where it handles the node names and replaces illegal symbols with empty character, but I don't know where it is to adjust it myself.
The text was updated successfully, but these errors were encountered: