summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/etcpak/image_compress_etcpak.cpp69
-rw-r--r--modules/etcpak/image_compress_etcpak.h2
-rw-r--r--modules/gltf/doc_classes/EditorSceneFormatImporterBlend.xml2
-rw-r--r--modules/gltf/editor/editor_import_blend_runner.cpp68
-rw-r--r--modules/gltf/editor/editor_import_blend_runner.h2
-rw-r--r--modules/gltf/editor/editor_scene_importer_blend.cpp155
-rw-r--r--modules/gltf/editor/editor_scene_importer_blend.h2
-rw-r--r--modules/gltf/register_types.cpp46
8 files changed, 190 insertions, 156 deletions
diff --git a/modules/etcpak/image_compress_etcpak.cpp b/modules/etcpak/image_compress_etcpak.cpp
index e9ce92dd80..9c04f5b40e 100644
--- a/modules/etcpak/image_compress_etcpak.cpp
+++ b/modules/etcpak/image_compress_etcpak.cpp
@@ -44,9 +44,9 @@ EtcpakType _determine_etc_type(Image::UsedChannels p_channels) {
case Image::USED_CHANNELS_LA:
return EtcpakType::ETCPAK_TYPE_ETC2_ALPHA;
case Image::USED_CHANNELS_R:
- return EtcpakType::ETCPAK_TYPE_ETC2;
+ return EtcpakType::ETCPAK_TYPE_ETC2_R;
case Image::USED_CHANNELS_RG:
- return EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG;
+ return EtcpakType::ETCPAK_TYPE_ETC2_RG;
case Image::USED_CHANNELS_RGB:
return EtcpakType::ETCPAK_TYPE_ETC2;
case Image::USED_CHANNELS_RGBA:
@@ -114,6 +114,12 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img) {
} else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2) {
target_format = Image::FORMAT_ETC2_RGB8;
r_img->convert_rgba8_to_bgra8(); // It's badly documented but ETCPAK seems to be expected BGRA8 for ETC.
+ } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_R) {
+ target_format = Image::FORMAT_ETC2_R11;
+ r_img->convert_rgba8_to_bgra8(); // It's badly documented but ETCPAK seems to be expected BGRA8 for ETC.
+ } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RG) {
+ target_format = Image::FORMAT_ETC2_RG11;
+ r_img->convert_rgba8_to_bgra8(); // It's badly documented but ETCPAK seems to be expected BGRA8 for ETC.
} else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG) {
target_format = Image::FORMAT_ETC2_RA_AS_RG;
r_img->convert_rg_to_ra_rgba8();
@@ -224,22 +230,49 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img) {
// Override the src_mip_read pointer to our temporary Vector.
src_mip_read = padded_src.ptr();
}
- if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC1) {
- CompressEtc1RgbDither(src_mip_read, dest_mip_write, blocks, mip_w);
- } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2) {
- CompressEtc2Rgb(src_mip_read, dest_mip_write, blocks, mip_w, true);
- } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_ALPHA || p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG) {
- CompressEtc2Rgba(src_mip_read, dest_mip_write, blocks, mip_w, true);
- } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_DXT1) {
- CompressDxt1Dither(src_mip_read, dest_mip_write, blocks, mip_w);
- } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_DXT5 || p_compresstype == EtcpakType::ETCPAK_TYPE_DXT5_RA_AS_RG) {
- CompressDxt5(src_mip_read, dest_mip_write, blocks, mip_w);
- } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_RGTC_RG) {
- CompressRgtcRG(src_mip_read, dest_mip_write, blocks, mip_w);
- } else if (p_compresstype == EtcpakType::ETCPAK_TYPE_RGTC_R) {
- CompressRgtcR(src_mip_read, dest_mip_write, blocks, mip_w);
- } else {
- ERR_FAIL_MSG("etcpak: Invalid or unsupported compression format.");
+
+ switch (p_compresstype) {
+ case EtcpakType::ETCPAK_TYPE_ETC1:
+ CompressEtc1RgbDither(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_ETC2:
+ CompressEtc2Rgb(src_mip_read, dest_mip_write, blocks, mip_w, true);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_ETC2_ALPHA:
+ case EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG:
+ CompressEtc2Rgba(src_mip_read, dest_mip_write, blocks, mip_w, true);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_ETC2_R:
+ CompressEtc2R8(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_ETC2_RG:
+ CompressEtc2RG8(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_DXT1:
+ CompressDxt1Dither(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_DXT5:
+ case EtcpakType::ETCPAK_TYPE_DXT5_RA_AS_RG:
+ CompressDxt5(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_RGTC_R:
+ CompressRgtcR(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ case EtcpakType::ETCPAK_TYPE_RGTC_RG:
+ CompressRgtcRG(src_mip_read, dest_mip_write, blocks, mip_w);
+ break;
+
+ default:
+ ERR_FAIL_MSG("etcpak: Invalid or unsupported compression format.");
+ break;
}
}
diff --git a/modules/etcpak/image_compress_etcpak.h b/modules/etcpak/image_compress_etcpak.h
index ff8bb635b4..9d5343740b 100644
--- a/modules/etcpak/image_compress_etcpak.h
+++ b/modules/etcpak/image_compress_etcpak.h
@@ -38,6 +38,8 @@ enum class EtcpakType {
ETCPAK_TYPE_ETC2,
ETCPAK_TYPE_ETC2_ALPHA,
ETCPAK_TYPE_ETC2_RA_AS_RG,
+ ETCPAK_TYPE_ETC2_R,
+ ETCPAK_TYPE_ETC2_RG,
ETCPAK_TYPE_DXT1,
ETCPAK_TYPE_DXT5,
ETCPAK_TYPE_DXT5_RA_AS_RG,
diff --git a/modules/gltf/doc_classes/EditorSceneFormatImporterBlend.xml b/modules/gltf/doc_classes/EditorSceneFormatImporterBlend.xml
index 24f6dbd887..e3433e6e29 100644
--- a/modules/gltf/doc_classes/EditorSceneFormatImporterBlend.xml
+++ b/modules/gltf/doc_classes/EditorSceneFormatImporterBlend.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Imports Blender scenes in the [code].blend[/code] file format through the glTF 2.0 3D import pipeline. This importer requires Blender to be installed by the user, so that it can be used to export the scene as glTF 2.0.
- The location of the Blender binary is set via the [code]filesystem/import/blender/blender3_path[/code] editor setting.
+ The location of the Blender binary is set via the [code]filesystem/import/blender/blender_path[/code] editor setting.
This importer is only used if [member ProjectSettings.filesystem/import/blender/enabled] is enabled, otherwise [code].blend[/code] files present in the project folder are not imported.
Blend import requires Blender 3.0.
Internally, the EditorSceneFormatImporterBlend uses the Blender glTF "Use Original" mode to reference external textures.
diff --git a/modules/gltf/editor/editor_import_blend_runner.cpp b/modules/gltf/editor/editor_import_blend_runner.cpp
index 659a60e6a1..330310d92a 100644
--- a/modules/gltf/editor/editor_import_blend_runner.cpp
+++ b/modules/gltf/editor/editor_import_blend_runner.cpp
@@ -153,13 +153,7 @@ String dict_to_xmlrpc(const Dictionary &p_dict) {
}
Error EditorImportBlendRunner::start_blender(const String &p_python_script, bool p_blocking) {
- String blender_path = EDITOR_GET("filesystem/import/blender/blender3_path");
-
-#ifdef WINDOWS_ENABLED
- blender_path = blender_path.path_join("blender.exe");
-#else
- blender_path = blender_path.path_join("blender");
-#endif
+ String blender_path = EDITOR_GET("filesystem/import/blender/blender_path");
List<String> args;
args.push_back("--background");
@@ -198,6 +192,40 @@ Error EditorImportBlendRunner::do_import(const Dictionary &p_options) {
}
}
+HTTPClient::Status EditorImportBlendRunner::connect_blender_rpc(const Ref<HTTPClient> &p_client, int p_timeout_usecs) {
+ p_client->connect_to_host("127.0.0.1", rpc_port);
+ HTTPClient::Status status = p_client->get_status();
+
+ int attempts = 1;
+ int wait_usecs = 1000;
+
+ bool done = false;
+ while (!done) {
+ OS::get_singleton()->delay_usec(wait_usecs);
+ status = p_client->get_status();
+ switch (status) {
+ case HTTPClient::STATUS_RESOLVING:
+ case HTTPClient::STATUS_CONNECTING: {
+ p_client->poll();
+ break;
+ }
+ case HTTPClient::STATUS_CONNECTED: {
+ done = true;
+ break;
+ }
+ default: {
+ if (attempts * wait_usecs < p_timeout_usecs) {
+ p_client->connect_to_host("127.0.0.1", rpc_port);
+ } else {
+ return status;
+ }
+ }
+ }
+ }
+
+ return status;
+}
+
Error EditorImportBlendRunner::do_import_rpc(const Dictionary &p_options) {
kill_timer->stop();
@@ -217,25 +245,9 @@ Error EditorImportBlendRunner::do_import_rpc(const Dictionary &p_options) {
// Connect to RPC server.
Ref<HTTPClient> client = HTTPClient::create();
- client->connect_to_host("127.0.0.1", rpc_port);
-
- bool done = false;
- while (!done) {
- HTTPClient::Status status = client->get_status();
- switch (status) {
- case HTTPClient::STATUS_RESOLVING:
- case HTTPClient::STATUS_CONNECTING: {
- client->poll();
- break;
- }
- case HTTPClient::STATUS_CONNECTED: {
- done = true;
- break;
- }
- default: {
- ERR_FAIL_V_MSG(ERR_CONNECTION_ERROR, vformat("Unexpected status during RPC connection: %d", status));
- }
- }
+ HTTPClient::Status status = connect_blender_rpc(client, 1000000);
+ if (status != HTTPClient::STATUS_CONNECTED) {
+ ERR_FAIL_V_MSG(ERR_CONNECTION_ERROR, vformat("Unexpected status during RPC connection: %d", status));
}
// Send XML request.
@@ -246,9 +258,9 @@ Error EditorImportBlendRunner::do_import_rpc(const Dictionary &p_options) {
}
// Wait for response.
- done = false;
+ bool done = false;
while (!done) {
- HTTPClient::Status status = client->get_status();
+ status = client->get_status();
switch (status) {
case HTTPClient::STATUS_REQUESTING: {
client->poll();
diff --git a/modules/gltf/editor/editor_import_blend_runner.h b/modules/gltf/editor/editor_import_blend_runner.h
index b2b82394e1..626f3c9eba 100644
--- a/modules/gltf/editor/editor_import_blend_runner.h
+++ b/modules/gltf/editor/editor_import_blend_runner.h
@@ -33,6 +33,7 @@
#ifdef TOOLS_ENABLED
+#include "core/io/http_client.h"
#include "core/os/os.h"
#include "scene/main/node.h"
#include "scene/main/timer.h"
@@ -60,6 +61,7 @@ public:
bool is_running() { return blender_pid != 0 && OS::get_singleton()->is_process_running(blender_pid); }
bool is_using_rpc() { return rpc_port != 0; }
Error do_import(const Dictionary &p_options);
+ HTTPClient::Status connect_blender_rpc(const Ref<HTTPClient> &p_client, int p_timeout_usecs);
EditorImportBlendRunner();
};
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp
index 4636782063..a91856c4a1 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -55,20 +55,7 @@
#endif
static bool _get_blender_version(const String &p_path, int &r_major, int &r_minor, String *r_err = nullptr) {
- String path = p_path;
-#ifdef WINDOWS_ENABLED
- path = path.path_join("blender.exe");
-#else
- path = path.path_join("blender");
-#endif
-
-#if defined(MACOS_ENABLED)
- if (!FileAccess::exists(path)) {
- path = p_path.path_join("Blender");
- }
-#endif
-
- if (!FileAccess::exists(path)) {
+ if (!FileAccess::exists(p_path)) {
if (r_err) {
*r_err = TTR("Path does not contain a Blender installation.");
}
@@ -77,7 +64,7 @@ static bool _get_blender_version(const String &p_path, int &r_major, int &r_mino
List<String> args;
args.push_back("--version");
String pipe;
- Error err = OS::get_singleton()->execute(path, args, &pipe);
+ Error err = OS::get_singleton()->execute(p_path, args, &pipe);
if (err != OK) {
if (r_err) {
*r_err = TTR("Can't execute Blender binary.");
@@ -87,7 +74,7 @@ static bool _get_blender_version(const String &p_path, int &r_major, int &r_mino
int bl = pipe.find("Blender ");
if (bl == -1) {
if (r_err) {
- *r_err = vformat(TTR("Unexpected --version output from Blender binary at: %s."), path);
+ *r_err = vformat(TTR("Unexpected --version output from Blender binary at: %s."), p_path);
}
return false;
}
@@ -126,7 +113,7 @@ void EditorSceneFormatImporterBlend::get_extensions(List<String> *r_extensions)
Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_t p_flags,
const HashMap<StringName, Variant> &p_options,
List<String> *r_missing_deps, Error *r_err) {
- String blender_path = EDITOR_GET("filesystem/import/blender/blender3_path");
+ String blender_path = EDITOR_GET("filesystem/import/blender/blender_path");
if (blender_major_version == -1 || blender_minor_version == -1) {
_get_blender_version(blender_path, blender_major_version, blender_minor_version, nullptr);
@@ -369,7 +356,7 @@ static bool _test_blender_path(const String &p_path, String *r_err = nullptr) {
bool EditorFileSystemImportFormatSupportQueryBlend::is_active() const {
bool blend_enabled = GLOBAL_GET("filesystem/import/blender/enabled");
- if (blend_enabled && !_test_blender_path(EDITOR_GET("filesystem/import/blender/blender3_path").operator String())) {
+ if (blend_enabled && !_test_blender_path(EDITOR_GET("filesystem/import/blender/blender_path").operator String())) {
// Intending to import Blender, but blend not configured.
return true;
}
@@ -409,11 +396,59 @@ void EditorFileSystemImportFormatSupportQueryBlend::_validate_path(String p_path
}
}
-bool EditorFileSystemImportFormatSupportQueryBlend::_autodetect_path(String p_path) {
- if (_test_blender_path(p_path)) {
- auto_detected_path = p_path;
- return true;
+bool EditorFileSystemImportFormatSupportQueryBlend::_autodetect_path() {
+ // Autodetect
+ auto_detected_path = "";
+
+#if defined(MACOS_ENABLED)
+ Vector<String> find_paths = {
+ "/opt/homebrew/bin/blender",
+ "/opt/local/bin/blender",
+ "/usr/local/bin/blender",
+ "/usr/local/opt/blender",
+ "/Applications/Blender.app/Contents/MacOS/Blender",
+ };
+ {
+ List<String> mdfind_args;
+ mdfind_args.push_back("kMDItemCFBundleIdentifier=org.blenderfoundation.blender");
+
+ String output;
+ Error err = OS::get_singleton()->execute("mdfind", mdfind_args, &output);
+ if (err == OK) {
+ for (const String &find_path : output.split("\n")) {
+ find_paths.push_back(find_path.path_join("Contents/MacOS/Blender"));
+ }
+ }
+ }
+#elif defined(WINDOWS_ENABLED)
+ Vector<String> find_paths = {
+ "C:\\Program Files\\Blender Foundation\\blender.exe",
+ "C:\\Program Files (x86)\\Blender Foundation\\blender.exe",
+ };
+ {
+ char blender_opener_path[MAX_PATH];
+ DWORD path_len = MAX_PATH;
+ HRESULT res = AssocQueryString(0, ASSOCSTR_EXECUTABLE, ".blend", "open", blender_opener_path, &path_len);
+ if (res == S_OK) {
+ find_paths.push_back(String(blender_opener_path).get_base_dir().path_join("blender.exe"));
+ }
}
+
+#elif defined(UNIX_ENABLED)
+ Vector<String> find_paths = {
+ "/usr/bin/blender",
+ "/usr/local/bin/blender",
+ "/opt/blender/bin/blender",
+ };
+#endif
+
+ for (const String &find_path : find_paths) {
+ if (_test_blender_path(find_path)) {
+ auto_detected_path = find_path;
+ return true;
+ }
+ }
+
return false;
}
@@ -427,7 +462,7 @@ void EditorFileSystemImportFormatSupportQueryBlend::_select_install(String p_pat
}
void EditorFileSystemImportFormatSupportQueryBlend::_browse_install() {
if (blender_path->get_text() != String()) {
- browse_dialog->set_current_dir(blender_path->get_text());
+ browse_dialog->set_current_file(blender_path->get_text());
}
browse_dialog->popup_centered_ratio();
@@ -479,76 +514,10 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
EditorNode::get_singleton()->get_gui_base()->add_child(browse_dialog);
}
- String path = EDITOR_GET("filesystem/import/blender/blender3_path");
+ String path = EDITOR_GET("filesystem/import/blender/blender_path");
- if (path == "") {
- // Autodetect
- auto_detected_path = "";
-
-#if defined(MACOS_ENABLED)
-
- {
- Vector<String> mdfind_paths;
- {
- List<String> mdfind_args;
- mdfind_args.push_back("kMDItemCFBundleIdentifier=org.blenderfoundation.blender");
-
- String output;
- Error err = OS::get_singleton()->execute("mdfind", mdfind_args, &output);
- if (err == OK) {
- mdfind_paths = output.split("\n");
- }
- }
-
- bool found = false;
- for (const String &found_path : mdfind_paths) {
- found = _autodetect_path(found_path.path_join("Contents/MacOS"));
- if (found) {
- break;
- }
- }
- if (!found) {
- found = _autodetect_path("/opt/homebrew/bin");
- }
- if (!found) {
- found = _autodetect_path("/opt/local/bin");
- }
- if (!found) {
- found = _autodetect_path("/usr/local/bin");
- }
- if (!found) {
- found = _autodetect_path("/usr/local/opt");
- }
- if (!found) {
- found = _autodetect_path("/Applications/Blender.app/Contents/MacOS");
- }
- }
-#elif defined(WINDOWS_ENABLED)
- {
- char blender_opener_path[MAX_PATH];
- DWORD path_len = MAX_PATH;
- HRESULT res = AssocQueryString(0, ASSOCSTR_EXECUTABLE, ".blend", "open", blender_opener_path, &path_len);
- if (res == S_OK && _autodetect_path(String(blender_opener_path).get_base_dir())) {
- // Good.
- } else if (_autodetect_path("C:\\Program Files\\Blender Foundation")) {
- // Good.
- } else {
- _autodetect_path("C:\\Program Files (x86)\\Blender Foundation");
- }
- }
-
-#elif defined(UNIX_ENABLED)
- if (_autodetect_path("/usr/bin")) {
- // Good.
- } else if (_autodetect_path("/usr/local/bin")) {
- // Good
- } else {
- _autodetect_path("/opt/blender/bin");
- }
-#endif
- if (auto_detected_path != "") {
- path = auto_detected_path;
- }
+ if (path.is_empty() && _autodetect_path()) {
+ path = auto_detected_path;
}
blender_path->set_text(path);
@@ -569,7 +538,7 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
if (confirmed) {
// Can only confirm a valid path.
- EditorSettings::get_singleton()->set("filesystem/import/blender/blender3_path", blender_path->get_text());
+ EditorSettings::get_singleton()->set("filesystem/import/blender/blender_path", blender_path->get_text());
EditorSettings::get_singleton()->save();
} else {
// Disable Blender import
diff --git a/modules/gltf/editor/editor_scene_importer_blend.h b/modules/gltf/editor/editor_scene_importer_blend.h
index c1f4280170..ed1b19eaf3 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.h
+++ b/modules/gltf/editor/editor_scene_importer_blend.h
@@ -95,7 +95,7 @@ class EditorFileSystemImportFormatSupportQueryBlend : public EditorFileSystemImp
String auto_detected_path;
void _validate_path(String p_path);
- bool _autodetect_path(String p_path);
+ bool _autodetect_path();
void _path_confirmed();
diff --git a/modules/gltf/register_types.cpp b/modules/gltf/register_types.cpp
index 94c9d66f78..216309abf1 100644
--- a/modules/gltf/register_types.cpp
+++ b/modules/gltf/register_types.cpp
@@ -55,23 +55,39 @@ static void _editor_init() {
// Blend to glTF importer.
+ String blender_path = EDITOR_GET("filesystem/import/blender/blender_path");
+ if (blender_path.is_empty() && EditorSettings::get_singleton()->has_setting("filesystem/import/blender/blender3_path")) {
+ blender_path = EditorSettings::get_singleton()->get("filesystem/import/blender/blender3_path");
+
+ if (!blender_path.is_empty()) {
+#if defined(MACOS_ENABLED)
+ if (blender_path.contains(".app")) {
+ blender_path += "/Contents/MacOS/Blender";
+ } else {
+ blender_path += "/blender";
+ }
+#elif defined(WINDOWS_ENABLED)
+ blender_path += "\\blender.exe";
+#elif defined(UNIX_ENABLED)
+ blender_path += "/blender";
+#endif
+
+ EditorSettings::get_singleton()->set("filesystem/import/blender/blender_path", blender_path);
+ }
+
+ EditorSettings::get_singleton()->erase("filesystem/import/blender/blender3_path");
+ EditorSettings::get_singleton()->save();
+ }
+
bool blend_enabled = GLOBAL_GET("filesystem/import/blender/enabled");
- String blender3_path = EDITOR_GET("filesystem/import/blender/blender3_path");
if (blend_enabled) {
- Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- if (blender3_path.is_empty()) {
- WARN_PRINT(TTR("Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported."));
- } else if (!da->dir_exists(blender3_path)) {
- WARN_PRINT(TTR("Blend file import is enabled, but the Blender path doesn't point to an accessible directory. Blend files will not be imported."));
- } else {
- Ref<EditorSceneFormatImporterBlend> importer;
- importer.instantiate();
- ResourceImporterScene::add_scene_importer(importer);
-
- Ref<EditorFileSystemImportFormatSupportQueryBlend> blend_import_query;
- blend_import_query.instantiate();
- EditorFileSystem::get_singleton()->add_import_format_support_query(blend_import_query);
- }
+ Ref<EditorSceneFormatImporterBlend> importer;
+ importer.instantiate();
+ ResourceImporterScene::add_scene_importer(importer);
+
+ Ref<EditorFileSystemImportFormatSupportQueryBlend> blend_import_query;
+ blend_import_query.instantiate();
+ EditorFileSystem::get_singleton()->add_import_format_support_query(blend_import_query);
}
memnew(EditorImportBlendRunner);
EditorNode::get_singleton()->add_child(EditorImportBlendRunner::get_singleton());