Refactor the way module documentation is collected for classes
Obsolete
get_doc_classes()
in config.py
- no need to list individual classes (doesn't break compat).
By listing I mean having to write this:
get_doc_classes()
def get_doc_classes():
return [
"@VisualScript",
"VisualScriptBasicTypeConstant",
"VisualScriptBuiltinFunc",
"VisualScriptClassConstant",
"VisualScriptComment",
"VisualScriptComposeArray",
"VisualScriptCondition",
"VisualScriptConstant",
"VisualScriptConstructor",
"VisualScriptCustomNode",
"VisualScriptDeconstruct",
"VisualScriptEditor",
"VisualScriptEmitSignal",
"VisualScriptEngineSingleton",
"VisualScriptExpression",
"VisualScriptFunctionCall",
"VisualScriptFunctionState",
"VisualScriptFunction",
"VisualScriptGlobalConstant",
"VisualScriptIndexGet",
"VisualScriptIndexSet",
"VisualScriptInputAction",
"VisualScriptIterator",
"VisualScriptLists",
"VisualScriptLocalVarSet",
"VisualScriptLocalVar",
"VisualScriptMathConstant",
"VisualScriptNode",
"VisualScriptOperator",
"VisualScriptPreload",
"VisualScriptPropertyGet",
"VisualScriptPropertySet",
"VisualScriptResourcePath",
"VisualScriptReturn",
"VisualScriptSceneNode",
"VisualScriptSceneTree",
"VisualScriptSelect",
"VisualScriptSelf",
"VisualScriptSequence",
"VisualScriptSubCall",
"VisualScriptSwitch",
"VisualScriptTypeCast",
"VisualScriptVariableGet",
"VisualScriptVariableSet",
"VisualScriptWhile",
"VisualScript",
"VisualScriptYieldSignal",
"VisualScriptYield",
]
Use glob pattern to fetch all documentation within modules. This removes the need to manually list all classes for which documentation is written in config.py
via get_doc_classes()
method, so existing usages are removed from engine's built-in modules.
Removed get_doc_path()
methods from individual modules as well because all use the same doc path which is doc_classes
, so the default value is written in Sconstruct
instead. Modules can still override this path.
Similarly, the default path for module editor icons is provided for consistency with documentation path config mechanism.
The doc_data_class_path.gen.h
is renamed to modules_doc_data.gen.h
as it contains path remapping for module's class documentation only.
Tested with godot --doctool .