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

Function get_scene_internal

src/python/lfs/module.cpp:556–567  ·  view source on GitHub ↗

Get Scene from application context, trainer, or operation context

Source from the content-addressed store, hash-verified

554
555 // Get Scene from application context, trainer, or operation context
556 lfs::core::Scene* get_scene_internal() {
557 // Priority 1: Application scene (persistent, works from background threads)
558 if (auto* app_scene = lfs::python::get_application_scene()) {
559 return app_scene;
560 }
561 // Priority 2: Current trainer (headless mode during hooks)
562 if (g_current_trainer) {
563 return g_current_trainer->getScene();
564 }
565 // Priority 3: Operation context (short-lived, for capability invocations)
566 return lfs::python::get_scene_for_python();
567 }
568
569} // namespace
570

Callers 1

NB_MODULEFunction · 0.85

Calls 3

get_application_sceneFunction · 0.85
get_scene_for_pythonFunction · 0.85
getSceneMethod · 0.80

Tested by

no test coverage detected