MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / Import

Method Import

modules/tools/gltf_tool/src/mesh_asset.cpp:16–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#include "SkrProfile/profile.h"
15
16void* skd::asset::SGltfMeshImporter::Import(skr_io_ram_service_t* ioService, SCookContext* context)
17{
18 skr::filesystem::path relPath = assetPath.u8_str();
19 auto ext = relPath.extension();
20 if (ext != ".gltf")
21 {
22 return nullptr;
23 }
24 const auto assetRecord = context->GetAssetRecord();
25 auto path = context->AddFileDependency(relPath).u8string();
26 auto vfs = assetRecord->project->asset_vfs;
27 return ImportGLTFWithData(path.c_str(), ioService, vfs);
28}
29
30void skd::asset::SGltfMeshImporter::Destroy(void* resource)
31{

Callers

nothing calls this directly

Calls 5

ImportGLTFWithDataFunction · 0.85
AddFileDependencyMethod · 0.80
u8_strMethod · 0.45
GetAssetRecordMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected