MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / load_icon_texture

Function load_icon_texture

src/python/lfs/py_ui.cpp:383–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381 }
382
383 uint64_t load_icon_texture(const std::string& icon_name) {
384 {
385 std::lock_guard lock(g_icon_cache_mutex);
386 auto it = g_icon_cache.find(icon_name);
387 if (it != g_icon_cache.end()) {
388 return it->second;
389 }
390 }
391
392 try {
393 return load_icon_from_path(lfs::vis::getAssetPath("icon/" + icon_name), icon_name);
394 } catch (const std::exception& e) {
395 LOG_WARN("Failed to load icon {}: {}", icon_name, e.what());
396 return load_default_icon();
397 }
398 }
399
400 uint64_t load_scene_icon(const std::string& icon_name) {
401 const std::string cache_key = "scene/" + icon_name + ".png";

Callers 2

operator_Method · 0.85
register_uiFunction · 0.85

Calls 6

load_icon_from_pathFunction · 0.85
getAssetPathFunction · 0.85
load_default_iconFunction · 0.85
findMethod · 0.45
endMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected