diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 43f38b5b85..ceb0faaa04 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -17074,6 +17074,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value tp2 + FSCmdLineCopyCam + + Comment + Copies the current camera location to a vector of the form <x, y, z> to the clipboard. + Persist + 1 + Type + String + Value + cpcampos + FSCmdLineBandWidth diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 7f9524c57a..651fd5ad26 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -448,6 +448,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type, bool from_gesture) static LLCachedControl sFSCmdLineClearChat(gSavedSettings, "FSCmdLineClearChat"); static LLCachedControl sFSCmdLineMedia(gSavedSettings, "FSCmdLineMedia"); static LLCachedControl sFSCmdLineMusic(gSavedSettings, "FSCmdLineMusic"); + static LLCachedControl sFSCmdLineCopyCam(gSavedSettings, "FSCmdLineCopyCam"); // FIRE-6340, FIRE-6567 - Setting Bandwidth issues static LLCachedControl sFSCmdLineBandwidth(gSavedSettings, "FSCmdLineBandWidth"); @@ -1157,6 +1158,26 @@ bool cmd_line_chat(std::string revised_text, EChatType type, bool from_gesture) { invrepair(); } + else if (command == std::string(sFSCmdLineCopyCam)) + { + LLViewerRegion* agentRegionp = gAgent.getRegion(); + if (agentRegionp) + { + LLVector3 cameraPosition = gAgentCamera.getCameraPositionAgent(); + std::string cameraPositionString = llformat("<%.3f, %.3f, %.3f>", + cameraPosition.mV[VX], cameraPosition.mV[VY], cameraPosition.mV[VZ]); + LLUI::sWindow->copyTextToClipboard(utf8str_to_wstring(cameraPositionString)); + + LLStringUtil::format_map_t args; + args["[POS]"] = cameraPositionString; + reportToNearbyChat(LLTrans::getString("FSCameraPositionCopied", args)); + } + else + { + reportToNearbyChat("Could not get a valid region pointer."); + } + return false; + } } } return true; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml index 44fedf03d1..43c89e92bd 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml @@ -918,6 +918,24 @@ tool_tip="" control_name="FSCmdLineBandWidth" width="200"/> + + + Copy camera position to clipboard + + Due to the changes in code, it is no longer necessary to use this gesture. Progressive Draw Distance stepping has been enabled. Draw Distance set to [DISTANCE]m. + Camera position [POS] copied to clipboard. with Havok support