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

Node documentation example #8

Closed
bitbrain opened this issue Sep 22, 2022 · 11 comments · Fixed by #66
Closed

Node documentation example #8

bitbrain opened this issue Sep 22, 2022 · 11 comments · Fixed by #66
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested

Comments

@bitbrain
Copy link

I am wondering how I would generate in engine docs tor custom nodes coming from a GDExtension? It would be phenomenal if this template extension could show how to do it.

@paddy-exe paddy-exe added documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested labels Sep 22, 2022
@bitbrain
Copy link
Author

@paddy-exe looks like stuff is happening: godotengine/godot#67217

we might be able to do it now? Could you have a look?

@paddy-exe
Copy link
Owner

@bitbrain I had another look at it and you can already have custom docs in the editor that get's automatically generated with the Extension (whether it's a Node or a ReferenceObject):
There only seems to be a bug with the Argument names (but that could be on my side as well)
image
image

@bitbrain
Copy link
Author

in the editor that get's automatically generated with the Extension

@paddy-exe I remember someone saying that the automatic generation only works for debug builds (since the debug info is part of the extension so it can infer it). I'd expect us to require defining XML files like we do for Godot itself: https://github.com/godotengine/godot/tree/master/doc but I haven't seen any documentation about it how this would work with a GDExtension.

@paddy-exe
Copy link
Owner

paddy-exe commented Oct 12, 2022

@bitbrain Just to be on the same page: Do you mean by debug build the editor, the extension or both? Because compiling the extension for a release build still creates the docs

@bitbrain
Copy link
Author

Because compiling the extension for a release build still creates the docs

Interesting. How does it generate things like descriptions for signals methods /arguments without us having any .xml files specified?

@paddy-exe
Copy link
Owner

@bitbrain
Copy link
Author

godotengine/godot#67298 looks promising

@Splizard
Copy link

@bitbrain yes, the issue regarding _unamed_arg has been fixed. I'm not as familiar with the C++ extension interface and usage but if you know how to set the name of an argument it should be respected within the editor docs.

@paddy-exe
Copy link
Owner

godotengine/godot#67298 looks promising

Good to know! I will have a look when the next beta launches👍🏻

@paddy-exe
Copy link
Owner

@bitbrain @Splizard :
#17
I merged some a PR that should address at least a bit of an enhancement for the class docs:
image

@paddy-exe
Copy link
Owner

My latest PR introduces the ability to load documentation for GDExtension classes: #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants