-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add and expose a method for getting a list of script documentation in the Script class #62928
Conversation
The CI fails because you have edited the documentation files by hand. Please run the doctool instead. |
Thanks for the reminder, I have fixed this |
doc/classes/Script.xml
Outdated
<description> | ||
</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to add documentation for this... documentation method.
core/object/script_language.cpp
Outdated
Array doc_dicts; | ||
for (int idx = 0; idx < classes.size(); idx++) { | ||
DocData::ClassDoc p_class = classes[idx]; | ||
Dictionary json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should call this variable json
, so we don't confuse future contributors. This API is agnostic.
Needs a rebase. And addressing the review notes from Akien and myself. I haven't tested it, but it looks straight-forward. Would be nice to have some tests/examples of its usage. |
Oops, looks like I messed up something, I will reopen a PR to address this |
For the record: this is NOT merged, the PR was just changed to include no commits, so GitHub decided to mark it as merged for whatever reason. |
Part modified from #39849 by @ThakeeNathees
This allows users to access script documentation through scripts when
tools=yes
, making it easy to export script documentation to xml/json/bbcode/markdown etc, or create any tool based on it.Partial implementation godotengine/godot-proposals#177
This should allow more freedom than exporting several preset document formats through the editor UI, allowing community to easily create various addons to export documents in different formats.