API ReferenceGE ExtensionseditorvehicleEditorstaticEditor
Vehicle Editor - Part Property View
Generic property inspector window for editing individual JBeam table entries (nodes, beams, etc.) selected via the Part Tree view.
Generic property inspector window for editing individual JBeam table entries (nodes, beams, etc.) selected via the Part Tree view.
Module Exports
| Export | Type | Description |
|---|---|---|
M.menuEntry | string | "Part Properties" - menu label |
M.open | function | Shows the property view window |
M.onEditorGui | hook | Renders the generic inspector UI |
M.onEditorInitialized | hook | Registers window and initializes inspector |
Key Internals
| Variable | Type | Purpose |
|---|---|---|
genericInspector1 | module | Generic inspector instance for rendering fields |
lastEditTarget | table/nil | Currently edited table reference |
fields | table | List of field descriptors for the inspector |
How It Works
- When
vEditor.propertyTableEditTargetchanges (set by Part Tree), rebuilds thefieldslist - For each key-value pair in the target table:
- Skips
__astNodeIdx,__schemaProcessed, and table values - Determines type:
'float'for numbers,'bool'for booleans,'string'otherwise - Creates a field descriptor with
groupName,name,type,value,defaultValue
- Skips
- Renders via
genericInspector1:inspectorGui(fields) - Edits are written back to the original table via the setter callback
Lua Code Example
-- Open the property view
extensions.editor_vehicleEditor_staticEditor_vePartPropertyView.open()
-- The property view is typically opened from the Part Tree:
-- vEditor.propertyTableEditTarget = node -- set by clicking edit icon in Part Tree
-- Field extraction from target table:
-- for k, v in pairs(vEditor.propertyTableEditTarget) do
-- if k ~= '__astNodeIdx' and type(v) ~= 'table' then
-- local t = { groupName = '', name = tostring(k), type = 'string', value = tostring(v) }
-- if type(v) == 'number' then t.type = 'float'
-- elseif type(v) == 'boolean' then t.type = 'bool' end
-- t.defaultValue = t.value
-- table.insert(fields, t)
-- end
-- end
-- Setter callback writes edits back to the source table:
-- local genericInspectorSetter = function(fieldName, newValue, arrayIndex, fieldInfo)
-- lastEditTarget[fieldName] = newValue
-- end
-- Uses the generic inspector API:
-- local genericInspector = require("editor/api/genericInspector")()
-- genericInspector:initialize(setter)
-- genericInspector:inspectorGui(fields)See Also
- Vehicle Editor - JBeam Beautifier - Related reference
- Vehicle Editor - JBeam Modifier Leaking Visualizer - Related reference
- Vehicle Editor - JBeam Spellchecker - Related reference
- World Editor Guide - Guide
Vehicle Editor - Part List
Sortable, searchable table listing all available (or active-only) JBeam parts for the current vehicle, with file modification timestamps and part selection.
Vehicle Editor - Part Text View
Syntax-highlighted, scrollable text view of JBeam source files using AST rendering, with inline editing of string, number, and boolean values.