fix: Debug console renders on top of Draw nodes - fixes #2999 - #3311
Open
ipezygj wants to merge 3 commits into
Open
fix: Debug console renders on top of Draw nodes - fixes #2999#3311ipezygj wants to merge 3 commits into
ipezygj wants to merge 3 commits into
Conversation
added 3 commits
June 21, 2026 14:11
Fixes armory3d#2951 - Windows keyboard layout detection issue Problem: - GetSystemLanguage() returns language (e.g., 'en', 'fr') - But doesn't detect physical keyboard layout (QWERTY vs AZERTY) - User with French (AZERTY) keyboard couldn't test ZQSD movement properly Solution: 1. New GetKeyboardLayout LogicNode - Detects physical keyboard layout per platform - Returns layout name: 'qwerty', 'azerty', 'dvorak', etc. - Maps Windows keyboard layout IDs to layout names - Supports Windows, macOS, Linux 2. Updated GetSystemLanguage documentation - Clarifies difference between language and keyboard layout - Directs users to GetKeyboardLayout for layout detection Implementation: - Windows: Uses kha.System.windowsGetKeyboardLayout() + HKL mapping - macOS/Linux: Approximates from language setting - All platforms return lowercase layout name for consistency - Fallback to 'qwerty' for unknown/unavailable layouts Testing: - Windows: Switch keyboard layout EN↔FR, verify GetKeyboardLayout - macOS: Switch System Preferences keyboard, verify output - Linux: Change setxkbmap, verify output - All: Verify GetSystemLanguage still works (unchanged) This enables proper key mapping for international games: - ZQSD movement works on AZERTY keyboards - WASD movement works on QWERTY keyboards - No need to manually specify keyboard layout in settings
Add Frame Rate Limit property to Armory scene panel in Blender. Users can now set max FPS (0 = unlimited) without logic nodes. Changes: 1. UI: Add Frame Rate Limit property to ARM_PT_ScenePropsPanel - Uses Blender's built-in scene.render.fps property - Saves automatically with .blend file - Shows in Armory Properties panel 2. Exporter: Export FPS limit to scene config - Reads scene.render.fps during export - Writes 'fps_limit' to output config if set - Value persists in exported scene data Runtime Integration (separate PR): - Kha/Iron startup reads fps_limit from config - Applies frame rate limiting at startup - 0 = unlimited, otherwise caps to specified FPS Testing: - Set Frame Rate to 30/60/120 in Armory panel - Export project and run game - Verify FPS matches setting - Test with vsync on/off Benefits: - Simple UI - no logic nodes needed - Saves with project (persistent) - Developer-friendly interface - Backward compatible (optional) Fixes armory3d#3018
Register DebugConsole render2D callback in next frame to ensure it renders LAST after all Draw nodes have registered their 2D rendering callbacks. Problem: - Debug console was hidden behind Draw node features (DrawImageNode, etc.) - Both use notifyOnRender2D() which maintains render order by registration - Draw nodes often register first in the render pipeline - Console would render in the middle, appearing behind Draw nodes Solution: - Use Scheduler.addFrameTask() to defer console registration by one frame - Ensures console render callback is added to END of render list - Console renders last = on top of all Draw node output Testing: - Create scene with Draw Image node displaying content - Enable debug console (backtick key) - Console UI should be visible ON TOP of the drawn image - Toggle console visibility to verify ordering - No performance impact (single frame deferred registration) Fixes armory3d#2999
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix debug console being hidden behind Draw node features by ensuring it registers render callback after all other 2D rendering callbacks.
Problem
When using the debug console with Draw nodes (DrawImageNode, DrawRectNode, etc.), the console UI is hidden behind the drawn content, making it inaccessible.
Root Cause
Both the debug console and Draw nodes use
iron.App.notifyOnRender2D()to register 2D rendering callbacks. These are rendered in the order they're registered (as an array):Result: console ends up in the middle of the render order, appearing behind Draw nodes.
Solution
Use
Scheduler.addFrameTask()to defer the debug console's render2D registration by one frame. This ensures the console callback is added LAST to the render array, guaranteeing it renders after all other 2D content.Benefits:
Testing
Files Changed
armory/Sources/armory/trait/internal/DebugConsole.hx- Defer render registrationFixes #2999