GE Lua Documentation

Press F to search!

onEditorInspectorFieldChanged

Definition


-- @/lua/ge/extensions/editor/veMain.lua:336

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  for i = 1, #selectedIds do
    local object = scenetree.findObjectById(selectedIds[i])
    if object and object:getClassName() == "BeamNGVehicle" then
      if fieldName == "color" or fieldName == "colorPalette0" or fieldName == "colorPalette1" then
        local color = core_vehicle_colors.colorStringToColorTable(fieldValue)
        color[4] = color[4]*2
        local paint = createVehiclePaint({x=color[1], y=color[2], z=color[3], w=color[4]}, {color[5], color[6], color[7], color[8]})
        core_vehicle_partmgmt.setConfigPaints(paint, false)
      end
    end
  end
end

Callers

@/lua/ge/extensions/editor/forestEditor.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  if tableSize(selectedIds) == 1 then
@/lua/ge/extensions/editor/particleEditor.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  local selectedID = selectedIds[1]
@/lua/ge/extensions/editor/meshEditor.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  if (fieldName == "segmentLength" or fieldName == "subdivideLength") then
@/lua/ge/extensions/editor/waterObjectHelper.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  for i = 1, #selectedIds do
@/lua/ge/extensions/editor/objectTool.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  local selectedId = selectedIds[1]
@/lua/ge/extensions/editor/dataBlockEditor.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  local selectedID = selectedIds[1]
@/lua/ge/extensions/editor/sceneTree.lua

local function onEditorInspectorFieldChanged(selectedIds)
  refreshNodeNames(selectedIds)
@/lua/ge/extensions/editor/decalEditor.lua

local function onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)
  for i = 1, #selectedIds do