Skip to content

Commit 052baba

Browse files
committed
Merge pull request #107685 from KoBeWi/useless_documentation
Don't update script documentation when exporting
2 parents e0603ae + 0a94243 commit 052baba

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

editor/doc/editor_help.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3104,6 +3104,10 @@ void EditorHelp::load_script_doc_cache() {
31043104
return;
31053105
}
31063106

3107+
if (EditorNode::is_cmdline_mode()) {
3108+
return;
3109+
}
3110+
31073111
_wait_for_thread();
31083112

31093113
if (!ResourceLoader::exists(get_script_doc_cache_full_path())) {

editor/editor_node.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6015,6 +6015,11 @@ bool EditorNode::immediate_confirmation_dialog(const String &p_text, const Strin
60156015
return singleton->immediate_dialog_confirmed;
60166016
}
60176017

6018+
bool EditorNode::is_cmdline_mode() {
6019+
ERR_FAIL_NULL_V(singleton, false);
6020+
return singleton->cmdline_mode;
6021+
}
6022+
60186023
void EditorNode::cleanup() {
60196024
_init_callbacks.clear();
60206025
}

editor/editor_node.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ class EditorNode : public Node {
773773

774774
static bool immediate_confirmation_dialog(const String &p_text, const String &p_ok_text = TTR("Ok"), const String &p_cancel_text = TTR("Cancel"), uint32_t p_wrap_width = 0);
775775

776+
static bool is_cmdline_mode();
776777
static void cleanup();
777778

778779
EditorPluginList *get_editor_plugins_force_input_forwarding() { return editor_plugins_force_input_forwarding; }

editor/file_system/editor_file_system.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,8 +2285,10 @@ void EditorFileSystem::_process_update_pending() {
22852285
_update_script_classes();
22862286
// Parse documentation second, as it requires the class names to be loaded
22872287
// because _update_script_documentation loads the scripts completely.
2288-
_update_script_documentation();
2289-
_update_pending_scene_groups();
2288+
if (!EditorNode::is_cmdline_mode()) {
2289+
_update_script_documentation();
2290+
_update_pending_scene_groups();
2291+
}
22902292
}
22912293

22922294
void EditorFileSystem::_queue_update_script_class(const String &p_path, const ScriptClassInfoUpdate &p_script_update) {

0 commit comments

Comments
 (0)