summaryrefslogtreecommitdiff
path: root/scene/main/missing_node.cpp
diff options
context:
space:
mode:
authorQuentin Quaadgras <email@quentinquaadgras.com>2022-10-12 21:23:34 +1300
committerQuentin Quaadgras <email@quentinquaadgras.com>2022-10-12 21:23:34 +1300
commit6bc16660cc14d16193d758e906e355a24d4d8353 (patch)
treef156fb6bc0a8491fa5ffdb3d33bc1998ac202d78 /scene/main/missing_node.cpp
parentd5ae80c8bdeaa8761a359728cefe652340dd5f9b (diff)
Fix _unnamed_arg so that arguments defined by GDExtension show up in docs.
The Godot API (gdnative_interface.h) allows methods to be registered on extension classes with `classdb_register_extension_class_method` a `GDNativeExtensionClassMethodInfo` can be provided to this function along with a `get_argument_info_func` which according to the comment indicates that argument names should be definable here. Unfortunately, setting the name field in the `GDNativePropertyInfo` struct has no effect on the editor documentation, which continues to display "_unnamed_arg" for each argument. I discovered that `get_argument_info` is responsible for this as it always overrides the `info.name`. I've added an if condition that will only override the name when it is empty. I've tested this with my GDExtension module and I can confirm that with this commit, the argument name shows up in the builtin docs. eg. in Lookup Symbol.
Diffstat (limited to 'scene/main/missing_node.cpp')
0 files changed, 0 insertions, 0 deletions