Code: function OnLogin(location) SideBarButton(1, "\u{1f5be}", "AutomationMessage('photo_off')", "Disable photo settings") SideBarButton(2, "\u{1f5bc}", "AutomationMessage('photo_on')", "Enable photo settings") SideBarButton(3, "\u{2699}", "OpenFloater('preferences')", "Opens the Preferences floater") SideBarButton(4, "\u{1f505}", "AutomationMessage('dark_room')", "Dark room setting") SideBarHideOnRightClick() SideBarHide(false) end
function OnSideBarVisibilityChange(visible) if visible then StatusBarLuaIcon("") else StatusBarLuaIcon("SideBarHide(false)", "Shows the Lua buttons side bar") end end
function SetPhotoModeOn() print("Photo mode on"); SetDebugSetting("TextureLoadFullRes", true) SetDebugSetting("RenderVolumeLODFactor", 6.0) SetDebugSetting("RenderAvatarLODFactor", 3.0) SetDebugSetting("RenderRiggedMeshShadow", 3) SetDebugSetting("RenderDepthOfField", true) end
function SetPhotoModeOff() print("Photo mode off"); SetDebugSetting("TextureLoadFullRes", false) SetDebugSetting("RenderVolumeLODFactor", 3.0) SetDebugSetting("RenderAvatarLODFactor", 1.0) SetDebugSetting("RenderRiggedMeshShadow", 0) SetDebugSetting("RenderDepthOfField", false) end
function SetDarkRoom() print("Dark room on"); ApplySkySettings("A-12AM"); end function OnAutomationMessage(text) if text == "photo_on" then SetPhotoModeOn() elseif text == "photo_off" then SetPhotoModeOff() elseif text == "dark_room" then SetDarkRoom() end end
|