| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
|---|---|
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #include "Importer/BsSpecificImporter.h" |
| 4 | #include "Importer/BsImportOptions.h" |
| 5 | #include "Resources/BsResources.h" |
| 6 | |
| 7 | namespace bs |
| 8 | { |
| 9 | Vector<SubResourceRaw> SpecificImporter::importAll(const Path& filePath, SPtr<const ImportOptions> importOptions) |
| 10 | { |
| 11 | SPtr<Resource> resource = import(filePath, importOptions); |
| 12 | if (resource == nullptr) |
| 13 | return Vector<SubResourceRaw>(); |
| 14 | |
| 15 | return { { u8"primary", resource } };; |
| 16 | } |
| 17 | |
| 18 | SPtr<ImportOptions> SpecificImporter::createImportOptions() const |
| 19 | { |
| 20 | return bs_shared_ptr_new<ImportOptions>(); |
| 21 | } |
| 22 | |
| 23 | SPtr<const ImportOptions> SpecificImporter::getDefaultImportOptions() const |
| 24 | { |
| 25 | if(mDefaultImportOptions == nullptr) |
| 26 | mDefaultImportOptions = createImportOptions(); |
| 27 | |
| 28 | return mDefaultImportOptions; |
| 29 | } |
| 30 | } |