API ReferenceGE Extensionseditor
Editor Gizmo Helper
Tracks the visibility state of the editor's 3D axis gizmo (translate/rotate/scale manipulator). Ensures the gizmo selection is cleared when the gizmo stops being drawn.
Tracks the visibility state of the editor's 3D axis gizmo (translate/rotate/scale manipulator). Ensures the gizmo selection is cleared when the gizmo stops being drawn.
Module Overview
| Aspect | Detail |
|---|---|
| File | extensions/editor/gizmoHelper.lua |
| Returns | M table |
| Role | Gizmo draw-state tracking for the world editor |
Public Functions
| Function | Signature | Description |
|---|---|---|
M.onEditorGui | () | Called each editor frame. Clears gizmo selection element when gizmo stops being drawn |
M.gizmoDrawCalled | () | Signals that the gizmo was drawn this frame. Called by gizmo rendering code |
M.isGizmoVisible | () → boolean | Returns true if the gizmo was drawn last frame |
Usage Example
-- Other editor tools check gizmo visibility
if editor_gizmoHelper.isGizmoVisible() then
-- Gizmo is active, don't process mouse clicks on scene
end
-- Gizmo rendering code calls this each frame it draws
editor_gizmoHelper.gizmoDrawCalled()Internal State
| Variable | Type | Description |
|---|---|---|
gizmoDrawn | boolean | Whether gizmo was drawn this frame |
gizmoDrawnLastFrame | boolean | Whether gizmo was drawn last frame |
When gizmoDrawn is false but gizmoDrawnLastFrame is true, calls worldEditorCppApi.setAxisGizmoSelectedElement(-1) to deselect.
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide