From aefde680a4a1df4e5b57c6cf31c0b38fcd52602f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cambr=C3=A9?= Date: Sun, 18 Jul 2021 14:52:55 +0200 Subject: [PATCH] VisualScript-Drop-Custom-Nodes Allows to drop custom node scripts directly in VisualScript --- .../visual_script/visual_script_editor.cpp | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 8712bfa06b3..77bb7c469f5 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -2172,6 +2172,11 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da } if (String(d["type"]) == "files") { +#ifdef OSX_ENABLED + bool use_preload = Input::get_singleton()->is_key_pressed(KEY_META); +#else + bool use_preload = Input::get_singleton()->is_key_pressed(KEY_CTRL); +#endif Vector2 pos = _get_pos_in_graph(p_point); Array files = d["files"]; @@ -2187,13 +2192,22 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da if (!res.is_valid()) { continue; } + Ref