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

Optimize the custom doc for shaders. #97616

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

magian1127
Copy link
Contributor

  1. Remove add_doc for gdshader files without documentation.
  2. Standardize the class_doc.name for custom documentation.

@magian1127 magian1127 marked this pull request as ready for review September 29, 2024 11:22
@magian1127 magian1127 marked this pull request as draft September 29, 2024 11:49
@magian1127 magian1127 force-pushed the 4.0gdshader branch 3 times, most recently from e75fc09 to d4d6a20 Compare September 29, 2024 12:37
@AThousandShips AThousandShips added this to the 4.x milestone Sep 29, 2024
@magian1127 magian1127 marked this pull request as ready for review September 29, 2024 13:29
DocData::ClassDoc class_doc;
class_doc.name = get_path();
class_doc.is_script_doc = true;
bool generate_doc = EditorHelp::get_doc_data() != nullptr && Engine::get_singleton()->is_editor_hint() && !get_path().is_empty();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified if #95821 is merged. You should not need to check whether get_doc_data() != nullptr, the helper methods EditorHelp::add_doc()/remove_doc() etc can make those checks :)



1. Remove `add_doc` for gdshader files without documentation.
2. Standardize the `class_doc.name` for custom documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants