Optimize the custom doc for shaders.

Remove add_doc for gdshader files without documentation.
Standardize the class_doc.name for custom documentation.
This commit is contained in:
Magian
2025-11-21 01:12:09 +08:00
parent 7864ac8019
commit 42c683d450
2 changed files with 12 additions and 11 deletions

View File

@ -4338,10 +4338,7 @@ void EditorInspector::update_tree() {
// `|` separators used in `EditorHelpBit`.
if (theme_item_name.is_empty()) {
if (p.name.contains("shader_parameter/")) {
ShaderMaterial *shader_material = Object::cast_to<ShaderMaterial>(object);
if (shader_material) {
doc_tooltip_text = "property|" + shader_material->get_shader()->get_path() + "|" + propname;
}
doc_tooltip_text = "property|" + p.class_name + "|" + property_prefix + propname;
} else if (p.usage & PROPERTY_USAGE_INTERNAL) {
doc_tooltip_text = "internal_property|" + classname + "|" + propname;
} else {