Skip to content

Commit

Permalink
Remove automated fbx2gltf scanning.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Oct 8, 2023
1 parent 18a0190 commit ca164b3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
26 changes: 0 additions & 26 deletions modules/gltf/editor/editor_scene_importer_fbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,30 +119,4 @@ void EditorSceneFormatImporterFBX::get_import_options(const String &p_path,
List<ResourceImporter::ImportOption> *r_options) {
}

bool EditorFileSystemImportFormatSupportQueryFBX::is_active() const {
String fbx2gltf_path = EDITOR_GET("filesystem/import/fbx/fbx2gltf_path");
return !FileAccess::exists(fbx2gltf_path);
}

Vector<String> EditorFileSystemImportFormatSupportQueryFBX::get_file_extensions() const {
Vector<String> ret;
ret.push_back("fbx");
return ret;
}

bool EditorFileSystemImportFormatSupportQueryFBX::query() {
FBXImporterManager::get_singleton()->show_dialog(true);

while (true) {
OS::get_singleton()->delay_usec(1);
DisplayServer::get_singleton()->process_events();
Main::iteration();
if (!FBXImporterManager::get_singleton()->is_visible()) {
break;
}
}

return false;
}

#endif // TOOLS_ENABLED
9 changes: 0 additions & 9 deletions modules/gltf/editor/editor_scene_importer_fbx.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ class EditorSceneFormatImporterFBX : public EditorSceneFormatImporter {
const HashMap<StringName, Variant> &p_options) override;
};

class EditorFileSystemImportFormatSupportQueryFBX : public EditorFileSystemImportFormatSupportQuery {
GDCLASS(EditorFileSystemImportFormatSupportQueryFBX, EditorFileSystemImportFormatSupportQuery);

public:
virtual bool is_active() const override;
virtual Vector<String> get_file_extensions() const override;
virtual bool query() override;
};

#endif // TOOLS_ENABLED

#endif // EDITOR_SCENE_IMPORTER_FBX_H
4 changes: 0 additions & 4 deletions modules/gltf/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ static void _editor_init() {
Ref<EditorSceneFormatImporterFBX> importer;
importer.instantiate();
ResourceImporterScene::get_scene_singleton()->add_importer(importer);

Ref<EditorFileSystemImportFormatSupportQueryFBX> fbx_import_query;
fbx_import_query.instantiate();
EditorFileSystem::get_singleton()->add_import_format_support_query(fbx_import_query);
}
}
#endif // TOOLS_ENABLED
Expand Down

0 comments on commit ca164b3

Please sign in to comment.