stevearc / godot_parser

Python library for parsing Godot scene files
MIT License
54 stars 11 forks source link

Add groups to node section #5

Closed richard-gebbia closed 3 years ago

richard-gebbia commented 3 years ago

Hi!

First of all thank you so much for making this project! It's so far saved me quite a bit of time on my own Godot project.

However, my project requires that the nodes that I'm generating have groups (this is normally done in Godot by manually assigning a node to a group in the inspector). It looks like groups was on your todo-list based on the code comments, so I tried my best to implement them. Implementing these changes locally has allowed me to export nodes with groups.

I'm relatively new to Python development and I wasn't sure how to test my changes, so please let me know if this is an acceptable change, and if it's not I would appreciate some direction to make it so.

stevearc commented 3 years ago

The change looks great! To test it and make sure it's working I'd recommend either adding a new case in test_parser.py or simply adding some groups to this last test case:

https://github.com/stevearc/godot_parser/blob/89d9d25a867e84003fc4c4474ba27ff6e7bcdf0e/tests/test_parser.py#L82-L90

Tests are currently failing because of lint. It looks like black was updated to have some different formatting preferences. You can apply those changes by running tox -e format.

richard-gebbia commented 3 years ago

Thank you for the direction! I've done the formatting and added some test code to cover my additions. Please let me know if there's anything else I need to do.

stevearc commented 3 years ago

Thanks for the submission!