GDExtensionSummator icon indicating copy to clipboard operation
GDExtensionSummator copied to clipboard

Node documentation example

Open bitbrain opened this issue 3 years ago • 10 comments

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.

bitbrain avatar Sep 22 '22 10:09 bitbrain

@paddy-exe looks like stuff is happening: https://github.com/godotengine/godot/pull/67217

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

bitbrain avatar Oct 11 '22 08:10 bitbrain

@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

paddy-exe avatar Oct 11 '22 14:10 paddy-exe

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.

bitbrain avatar Oct 11 '22 15:10 bitbrain

@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

paddy-exe avatar Oct 12 '22 14:10 paddy-exe

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?

bitbrain avatar Oct 12 '22 14:10 bitbrain

https://github.com/godotengine/godot/pull/67298 looks promising

bitbrain avatar Oct 12 '22 16:10 bitbrain

@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.

Splizard avatar Oct 12 '22 20:10 Splizard

https://github.com/godotengine/godot/pull/67298 looks promising

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

paddy-exe avatar Oct 13 '22 12:10 paddy-exe

@bitbrain @Splizard : https://github.com/paddy-exe/GDExtensionSummator/pull/17 I merged some a PR that should address at least a bit of an enhancement for the class docs: image

paddy-exe avatar Oct 23 '22 19:10 paddy-exe

My latest PR introduces the ability to load documentation for GDExtension classes: https://github.com/paddy-exe/GDExtensionSummator/pull/66

paddy-exe avatar Jul 02 '24 18:07 paddy-exe