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

Function set_context

src/python/python_runtime.cpp:193–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 vis::input::InputBindings* get_keymap_bindings() { return g_keymap_bindings.load(); }
192
193 void set_context(const PyContext& ctx) {
194 g_frame_context = ctx;
195
196 // Derived state from signal bridge atomics
197 g_frame_context.cached_has_selection = g_has_selection.load(std::memory_order_relaxed);
198 g_frame_context.cached_is_training = g_is_training.load(std::memory_order_relaxed);
199
200 // Override scene_generation from atomic state
201 g_frame_context.scene_generation = g_app_scene_context.generation();
202
203 // UI state from callbacks (fallback to stored values if no callback)
204 if (g_get_pivot_mode_cb) {
205 g_frame_context.pivot_mode = g_get_pivot_mode_cb();
206 }
207 if (g_get_transform_space_cb) {
208 g_frame_context.transform_space = g_get_transform_space_cb();
209 }
210 g_frame_context.selection_submode = g_selection_submode.load();
211 }
212
213 const PyContext& context() { return g_frame_context; }
214

Callers

nothing calls this directly

Calls 2

loadMethod · 0.45
generationMethod · 0.45

Tested by

no test coverage detected