All 27 PyTypeObject declarations in namespace mcrfpydef headers changed
from `static` to `inline` (C++17), ensuring a single global instance
across translation units. This fixes the root cause of stale-type-pointer
segfaults where only the McRFPy_API.cpp copy was PyType_Ready'd.
Replaced ~20 PyTypeCache call sites and 2 PyRAII::PyTypeRef lookups with
direct &mcrfpydef::Type references. Deleted PyTypeCache.h/.cpp,
PyObjectUtils.h, and PyRAII.h (all were workarounds for the static bug).
228/228 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New Features:
- Scene Explorer window (F4) displays hierarchical tree of all scenes
- Shows UIDrawable hierarchy with type, name, and visibility status
- Click scene name to switch active scene
- Double-click drawables to toggle visibility
- Displays Python repr() for cached objects, enabling custom class debugging
- Entity display within Grid nodes
Bug Fixes:
- Fix PythonObjectCache re-registration: when retrieving objects from
collections, newly created Python wrappers are now re-registered in
the cache. Previously, inline-created objects (e.g.,
scene.children.append(Frame(...))) would lose their cache entry when
the temporary Python object was GC'd, causing repeated wrapper
allocation on each access.
- Fix console focus stealing: removed aggressive focus reclaim that
caused title bar flashing when clicking in Scene Explorer
Infrastructure:
- Add GameEngine::getSceneNames() to expose scene list for explorer
- Scene Explorer uses same enabled flag as console (ImGuiConsole::isEnabled())
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>