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

Variable name and node path generation refactoring #4

Merged
merged 1 commit into from
May 15, 2022
Merged

Variable name and node path generation refactoring #4

merged 1 commit into from
May 15, 2022

Conversation

DarkMessiah
Copy link
Contributor

  • Variable names generation became more universal.
  • Node path generation made by method 'path_to' instead of 'split'.

Copy link
Owner

@SanderVanhove SanderVanhove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for the PR again. I like how you did the new node path.

But I don't agree with the variable name, I don't want it to be capitalized because it is not a const.

@DarkMessiah
Copy link
Contributor Author

DarkMessiah commented Apr 21, 2022

What does it mean not a const?

Edit: In godot 4 you can change node's name casing in settings. Here example of naming: https://github.com/godotengine/godot/blob/master/editor/plugins/canvas_item_editor_plugin.cpp#L5477

https://docs.godotengine.org/en/stable/classes/class_string.html#class-string-method-capitalize

Edit 2: var name := node.name.capitalize().replace(" ", "_").to_lower() variable name doesn't become uppercased, here to_lower in the end. capitalized need only for splitting.

@SanderVanhove
Copy link
Owner

Oh ok, I see, didn't see the to_lower there, excuse me 😅 I was just looking at the code, will try it out as soon as I can and will get back after 😄

@DarkMessiah
Copy link
Contributor Author

Hehe, godotengine/godot#60879 :)

@SanderVanhove
Copy link
Owner

Hehe, godotengine/godot#60879 :)

Oh, that would actually be great! 😄

@SanderVanhove SanderVanhove merged commit 2b98183 into SanderVanhove:main May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants