GE Lua Documentation

Press F to search!

getBoolVar

Definition


-- @/lua/ge/ge_utils.lua:324

TorqueScriptLua.getBoolVar = function( name )
  -- emulate the same conversion performed by C++ side function "Con::getBoolVariable"
  local stringValue = getConsoleVariable( name )
  local numberValue = tonumber(stringValue) or 0
  return string.lower(stringValue) == "true" or numberValue ~= 0
end

Callers

@/lua/ge/extensions/core/audio.lua
local function populateBankTables()
  local useHeadphones = TorqueScriptLua.getBoolVar('$pref::SFX::enableHeadphonesMode')
  --dump("useHeadphones = "..tostring(useHeadphones))
@/lua/ge/client/postFx/dof.lua
  setFocusParams(dofPostEffect, blurMin, blurMax, focusRangeMin, focusRangeMax, -blurCurveNear, blurCurveFar)
  setAutoFocus(dofPostEffect, TorqueScriptLua.getBoolVar("$DOFPostFx::EnableAutoFocus"))
  setDebugMode(dofPostEffect, TorqueScriptLua.getBoolVar("$DOFPostFx::EnableDebugMode"))
  setAutoFocus(dofPostEffect, TorqueScriptLua.getBoolVar("$DOFPostFx::EnableAutoFocus"))
  setDebugMode(dofPostEffect, TorqueScriptLua.getBoolVar("$DOFPostFx::EnableDebugMode"))
  setFocalDist(dofPostEffect, 0)

  if TorqueScriptLua.getBoolVar("$DOFPostFx::Enable") then
    dofPostEffect:enable()
@/lua/ge/client/postFx.lua

  local enablePostFX = TorqueScriptLua.getBoolVar("$PostFXManager::Settings::EnablePostFX")
  TorqueScriptLua.setVar("$PostFX::Enabled",  enablePostFX)
    if ssao then
      if TorqueScriptLua.getBoolVar("$SSAOPostFx::Enable") then
        ssao:enable()
    if lightRay then
      if TorqueScriptLua.getBoolVar("$LightRayPostFX::Enable") then
        lightRay:enable()
    if dof then
      if TorqueScriptLua.getBoolVar("$DOFPostFx::Enable") then
        dof:enable()
    local SSAO = {}
    SSAO.Enable           = TorqueScriptLua.getBoolVar("$SSAOPostFx::Enable")
    SSAO.blurDepthTol     = TorqueScriptLua.getVar('$SSAOPostFx::blurDepthTol')
local function settingsApplySSAO()
  TorqueScriptLua.setVar("$PostFXManager::Settings::SSAO::Enable",          TorqueScriptLua.getBoolVar("$SSAOPostFx::Enable"))
  TorqueScriptLua.setVar('$PostFXManager::Settings::SSAO::blurDepthTol',    TorqueScriptLua.getVar('$SSAOPostFx::blurDepthTol'))
  -- Apply settings which control if effects are on/off altogether.
  TorqueScriptLua.setVar("$PostFXManager::Settings::EnablePostFX", TorqueScriptLua.getBoolVar("$PostFX::Enabled"))
@/lua/ge/extensions/editor/rendererComponents.lua
local function initialiseSettings()
  DOFSettings['enable'].default = TorqueScriptLua.getBoolVar("$DOFPostFx::Enable")
  DOFSettings['enable'].value = DOFSettings['enable'].default

  DOFSettings['enableDebugMode'].default = TorqueScriptLua.getBoolVar("$DOFPostFx::EnableDebugMode")
  DOFSettings['enableDebugMode'].value = DOFSettings['enableDebugMode'].default

  lightraysSettings['enable'].default = TorqueScriptLua.getBoolVar("$LightRayPostFX::Enable")
  lightraysSettings['enable'].value = lightraysSettings['enable'].default
@/lua/ge/main.lua

  local loadingLevel = TorqueScriptLua.getBoolVar("$loadingLevel")
@/lua/ge/extensions/core/camera.lua
  if levelNearClip == nil then
    if not TorqueScriptLua.getBoolVar("$loadingLevel") then
      levelNearClip = scenetree.theLevelInfo and scenetree.theLevelInfo.nearClip
@/lua/ge/client/core.lua
  scatterSkySBData.vertexColorEnable = true
  if TorqueScriptLua.getBoolVar("$Scene::useReversedDepthBuffer") then
    scatterSkySBData:setField("zFunc", 0, "GFXCmpGreaterEqual")
    stateBlock.zWriteEnable = false
    if TorqueScriptLua.getBoolVar("$Scene::useReversedDepthBuffer") then
      stateBlock.zBias = 1
@/lua/ge/client/lighting/advanced/shaders.lua
  al_ConvexLightState.zWriteEnable = false;
  local useReversedDepthBuffer = TorqueScriptLua.getBoolVar("$Scene::useReversedDepthBuffer")
  if useReversedDepthBuffer then
@/lua/ge/client/lighting/basic/init.lua
  bl_ProjectedShadowSBData.zWriteEnable = false
  if TorqueScriptLua.getBoolVar("$Scene::useReversedDepthBuffer") then
      bl_ProjectedShadowSBData:setField("zBias", 0, 1)