Added AO.
This commit is contained in:
@@ -74,6 +74,7 @@ set(viewer_SOURCE_FILES
|
||||
llagentlanguage.cpp
|
||||
llagentpilot.cpp
|
||||
llanimstatelabels.cpp
|
||||
llao.cpp
|
||||
llappviewer.cpp
|
||||
llassetuploadresponders.cpp
|
||||
llassetuploadqueue.cpp
|
||||
@@ -507,6 +508,7 @@ set(viewer_HEADER_FILES
|
||||
llagentlanguage.h
|
||||
llagentpilot.h
|
||||
llanimstatelabels.h
|
||||
llao.h
|
||||
llappearance.h
|
||||
llappviewer.h
|
||||
llassetuploadresponders.h
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
<llsd>
|
||||
<map>
|
||||
<key>AO.Settings</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>List for animation overrider</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>LLSD</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<string />
|
||||
</array>
|
||||
</map>
|
||||
<key>BusyModeResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
219
indra/newview/llao.cpp
Normal file
219
indra/newview/llao.cpp
Normal file
@@ -0,0 +1,219 @@
|
||||
// <edit>
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llao.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llfilepicker.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
std::map<LLUUID,LLUUID> LLAO::mOverrides;
|
||||
LLFloaterAO* LLFloaterAO::sInstance;
|
||||
|
||||
//static
|
||||
void LLAO::refresh()
|
||||
{
|
||||
mOverrides.clear();
|
||||
LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings");
|
||||
LLSD overrides = settings["overrides"];
|
||||
LLSD::map_iterator sd_it = overrides.beginMap();
|
||||
LLSD::map_iterator sd_end = overrides.endMap();
|
||||
for( ; sd_it != sd_end; sd_it++)
|
||||
{
|
||||
// don't allow override to be used as a trigger
|
||||
if(mOverrides.find(sd_it->second.asUUID()) == mOverrides.end())
|
||||
{
|
||||
// ignore if override is null key...
|
||||
if(sd_it->second.asUUID().notNull())
|
||||
{
|
||||
mOverrides[LLUUID(sd_it->first)] = sd_it->second.asUUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAO::show()
|
||||
{
|
||||
if(sInstance)
|
||||
sInstance->open();
|
||||
else
|
||||
(new LLFloaterAO())->open();
|
||||
}
|
||||
|
||||
LLFloaterAO::LLFloaterAO()
|
||||
: LLFloater()
|
||||
{
|
||||
sInstance = this;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ao.xml");
|
||||
}
|
||||
|
||||
LLFloaterAO::~LLFloaterAO()
|
||||
{
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
BOOL LLFloaterAO::postBuild(void)
|
||||
{
|
||||
childSetAction("btn_save", onClickSave, this);
|
||||
childSetAction("btn_load", onClickLoad, this);
|
||||
|
||||
childSetCommitCallback("line_walking", onCommitAnim, this);
|
||||
childSetCommitCallback("line_running", onCommitAnim, this);
|
||||
childSetCommitCallback("line_crouchwalk", onCommitAnim, this);
|
||||
childSetCommitCallback("line_flying", onCommitAnim, this);
|
||||
childSetCommitCallback("line_turn_left", onCommitAnim, this);
|
||||
childSetCommitCallback("line_turn_right", onCommitAnim, this);
|
||||
childSetCommitCallback("line_jumping", onCommitAnim, this);
|
||||
childSetCommitCallback("line_fly_up", onCommitAnim, this);
|
||||
childSetCommitCallback("line_crouching", onCommitAnim, this);
|
||||
childSetCommitCallback("line_fly_down", onCommitAnim, this);
|
||||
childSetCommitCallback("line_stand1", onCommitAnim, this);
|
||||
childSetCommitCallback("line_stand2", onCommitAnim, this);
|
||||
childSetCommitCallback("line_stand3", onCommitAnim, this);
|
||||
childSetCommitCallback("line_hover", onCommitAnim, this);
|
||||
childSetCommitCallback("line_sitting", onCommitAnim, this);
|
||||
childSetCommitCallback("line_prejump", onCommitAnim, this);
|
||||
childSetCommitCallback("line_falling", onCommitAnim, this);
|
||||
childSetCommitCallback("line_stride", onCommitAnim, this);
|
||||
childSetCommitCallback("line_soft_landing", onCommitAnim, this);
|
||||
childSetCommitCallback("line_medium_landing", onCommitAnim, this);
|
||||
childSetCommitCallback("line_hard_landing", onCommitAnim, this);
|
||||
childSetCommitCallback("line_flying_slow", onCommitAnim, this);
|
||||
childSetCommitCallback("line_sitting_on_ground", onCommitAnim, this);
|
||||
refresh();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
std::string LLFloaterAO::idstr(LLUUID id)
|
||||
{
|
||||
if(id.notNull()) return id.asString();
|
||||
else return "";
|
||||
}
|
||||
|
||||
void LLFloaterAO::refresh()
|
||||
{
|
||||
LLSD settings = gSavedPerAccountSettings.getLLSD("AO.Settings");
|
||||
LLSD overrides = settings["overrides"];
|
||||
childSetText("line_walking", idstr(overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"]));
|
||||
childSetText("line_running", idstr(overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"]));
|
||||
childSetText("line_crouchwalk", idstr(overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"]));
|
||||
childSetText("line_flying", idstr(overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"]));
|
||||
childSetText("line_turn_left", idstr(overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"]));
|
||||
childSetText("line_turn_right", idstr(overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"]));
|
||||
childSetText("line_jumping", idstr(overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"]));
|
||||
childSetText("line_fly_up", idstr(overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"]));
|
||||
childSetText("line_crouching", idstr(overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"]));
|
||||
childSetText("line_fly_down", idstr(overrides["20f063ea-8306-2562-0b07-5c853b37b31e"]));
|
||||
childSetText("line_stand1", idstr(overrides["2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"]));
|
||||
childSetText("line_stand2", idstr(overrides["15468e00-3400-bb66-cecc-646d7c14458e"]));
|
||||
childSetText("line_stand3", idstr(overrides["370f3a20-6ca6-9971-848c-9a01bc42ae3c"]));
|
||||
childSetText("line_hover", idstr(overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"]));
|
||||
childSetText("line_sitting", idstr(overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"]));
|
||||
childSetText("line_prejump", idstr(overrides["7a4e87fe-de39-6fcb-6223-024b00893244"]));
|
||||
childSetText("line_falling", idstr(overrides["666307d9-a860-572d-6fd4-c3ab8865c094"]));
|
||||
childSetText("line_stride", idstr(overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"]));
|
||||
childSetText("line_soft_landing", idstr(overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"]));
|
||||
childSetText("line_medium_landing", idstr(overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"]));
|
||||
childSetText("line_hard_landing", idstr(overrides["3da1d753-028a-5446-24f3-9c9b856d9422"]));
|
||||
childSetText("line_flying_slow", idstr(overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"]));
|
||||
childSetText("line_sitting_on_ground", idstr(overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"]));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterAO::onCommitAnim(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLFloaterAO* floater = (LLFloaterAO*)user_data;
|
||||
|
||||
LLSD overrides;
|
||||
LLUUID id;
|
||||
id = LLUUID(floater->childGetValue("line_walking").asString());
|
||||
if(id.notNull()) overrides["6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_running").asString());
|
||||
if(id.notNull()) overrides["05ddbff8-aaa9-92a1-2b74-8fe77a29b445"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_crouchwalk").asString());
|
||||
if(id.notNull()) overrides["47f5f6fb-22e5-ae44-f871-73aaaf4a6022"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_flying").asString());
|
||||
if(id.notNull()) overrides["aec4610c-757f-bc4e-c092-c6e9caf18daf"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_turn_left").asString());
|
||||
if(id.notNull()) overrides["56e0ba0d-4a9f-7f27-6117-32f2ebbf6135"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_turn_right").asString());
|
||||
if(id.notNull()) overrides["2d6daa51-3192-6794-8e2e-a15f8338ec30"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_jumping").asString());
|
||||
if(id.notNull()) overrides["2305bd75-1ca9-b03b-1faa-b176b8a8c49e"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_fly_up").asString());
|
||||
if(id.notNull()) overrides["62c5de58-cb33-5743-3d07-9e4cd4352864"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_crouching").asString());
|
||||
if(id.notNull()) overrides["201f3fdf-cb1f-dbec-201f-7333e328ae7c"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_fly_down").asString());
|
||||
if(id.notNull()) overrides["20f063ea-8306-2562-0b07-5c853b37b31e"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_stand1").asString());
|
||||
if(id.notNull()) overrides["2408fe9e-df1d-1d7d-f4ff-1384fa7b350f"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_stand2").asString());
|
||||
if(id.notNull()) overrides["15468e00-3400-bb66-cecc-646d7c14458e"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_stand3").asString());
|
||||
if(id.notNull()) overrides["370f3a20-6ca6-9971-848c-9a01bc42ae3c"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_hover").asString());
|
||||
if(id.notNull()) overrides["4ae8016b-31b9-03bb-c401-b1ea941db41d"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_sitting").asString());
|
||||
if(id.notNull()) overrides["1a5fe8ac-a804-8a5d-7cbd-56bd83184568"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_prejump").asString());
|
||||
if(id.notNull()) overrides["7a4e87fe-de39-6fcb-6223-024b00893244"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_falling").asString());
|
||||
if(id.notNull()) overrides["666307d9-a860-572d-6fd4-c3ab8865c094"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_stride").asString());
|
||||
if(id.notNull()) overrides["1cb562b0-ba21-2202-efb3-30f82cdf9595"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_soft_landing").asString());
|
||||
if(id.notNull()) overrides["7a17b059-12b2-41b1-570a-186368b6aa6f"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_medium_landing").asString());
|
||||
if(id.notNull()) overrides["f4f00d6e-b9fe-9292-f4cb-0ae06ea58d57"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_hard_landing").asString());
|
||||
if(id.notNull()) overrides["3da1d753-028a-5446-24f3-9c9b856d9422"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_flying_slow").asString());
|
||||
if(id.notNull()) overrides["2b5a38b2-5e00-3a97-a495-4c826bc443e6"] = id;
|
||||
id = LLUUID(floater->childGetValue("line_sitting_on_ground").asString());
|
||||
if(id.notNull()) overrides["1a2bd58e-87ff-0df8-0b4c-53e047b0bb6e"] = id;
|
||||
LLSD settings;
|
||||
settings["version"] = 1;
|
||||
settings["overrides"] = overrides;
|
||||
gSavedPerAccountSettings.setLLSD("AO.Settings", settings);
|
||||
LLAO::refresh();
|
||||
floater->refresh();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAO::onClickSave(void* user_data)
|
||||
{
|
||||
LLFilePicker& file_picker = LLFilePicker::instance();
|
||||
if(file_picker.getSaveFile( LLFilePicker::FFSAVE_AO, LLDir::getScrubbedFileName("untitled.ao")))
|
||||
{
|
||||
std::string file_name = file_picker.getFirstFile();
|
||||
llofstream export_file(file_name);
|
||||
LLSDSerialize::toPrettyXML(gSavedPerAccountSettings.getLLSD("AO.Settings"), export_file);
|
||||
export_file.close();
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAO::onClickLoad(void* user_data)
|
||||
{
|
||||
LLFloaterAO* floater = (LLFloaterAO*)user_data;
|
||||
|
||||
LLFilePicker& file_picker = LLFilePicker::instance();
|
||||
if(file_picker.getOpenFile(LLFilePicker::FFLOAD_AO))
|
||||
{
|
||||
std::string file_name = file_picker.getFirstFile();
|
||||
llifstream xml_file(file_name);
|
||||
if(!xml_file.is_open()) return;
|
||||
LLSD data;
|
||||
if(LLSDSerialize::fromXML(data, xml_file) >= 1)
|
||||
{
|
||||
gSavedPerAccountSettings.setLLSD("AO.Settings", data);
|
||||
LLAO::refresh();
|
||||
floater->refresh();
|
||||
}
|
||||
xml_file.close();
|
||||
}
|
||||
}
|
||||
|
||||
// </edit>
|
||||
32
indra/newview/llao.h
Normal file
32
indra/newview/llao.h
Normal file
@@ -0,0 +1,32 @@
|
||||
// <edit>
|
||||
#ifndef LL_LLAO_H
|
||||
#define LL_LLAO_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLAO
|
||||
{
|
||||
public:
|
||||
static std::map<LLUUID,LLUUID> mOverrides;
|
||||
|
||||
static void refresh();
|
||||
};
|
||||
|
||||
class LLFloaterAO : public LLFloater
|
||||
{
|
||||
public:
|
||||
static LLFloaterAO* sInstance;
|
||||
static void show();
|
||||
LLFloaterAO();
|
||||
BOOL postBuild(void);
|
||||
void refresh();
|
||||
static void onCommitAnim(LLUICtrl* ctrl, void* user_data);
|
||||
static void onClickSave(void* user_data);
|
||||
static void onClickLoad(void* user_data);
|
||||
private:
|
||||
virtual ~LLFloaterAO();
|
||||
std::string idstr(LLUUID id); // silly utility
|
||||
};
|
||||
|
||||
#endif
|
||||
// </edit>
|
||||
@@ -193,12 +193,12 @@
|
||||
#include "llsocks5.h"
|
||||
#include "jcfloaterareasearch.h"
|
||||
|
||||
// <edit>
|
||||
#include "llpanellogin.h"
|
||||
//#include "llfloateravatars.h"
|
||||
//#include "llactivation.h"
|
||||
//#include "llao.h"
|
||||
//#include "llcheats.h"
|
||||
// <edit>
|
||||
#include "llpanellogin.h"
|
||||
//#include "llfloateravatars.h"
|
||||
//#include "llactivation.h"
|
||||
#include "llao.h"
|
||||
//#include "llcheats.h"
|
||||
// </edit>
|
||||
|
||||
#if LL_WINDOWS
|
||||
@@ -1102,8 +1102,8 @@ bool idle_startup()
|
||||
// We have at least some login information on a SLURL
|
||||
firstname = gLoginHandler.getFirstName();
|
||||
lastname = gLoginHandler.getLastName();
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
web_login_key = gLoginHandler.getWebLoginKey();
|
||||
|
||||
@@ -1116,9 +1116,9 @@ bool idle_startup()
|
||||
LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
|
||||
firstname = cmd_line_login[0].asString();
|
||||
lastname = cmd_line_login[1].asString();
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
|
||||
LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
|
||||
char md5pass[33]; /* Flawfinder: ignore */
|
||||
@@ -1136,8 +1136,8 @@ bool idle_startup()
|
||||
{
|
||||
firstname = gSavedSettings.getString("FirstName");
|
||||
lastname = gSavedSettings.getString("LastName");
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
password = LLStartUp::loadPasswordFromDisk();
|
||||
gSavedSettings.setBOOL("RememberPassword", TRUE);
|
||||
@@ -1154,8 +1154,8 @@ bool idle_startup()
|
||||
// a valid grid is selected
|
||||
firstname = gSavedSettings.getString("FirstName");
|
||||
lastname = gSavedSettings.getString("LastName");
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
password = LLStartUp::loadPasswordFromDisk();
|
||||
show_connect_box = true;
|
||||
@@ -1248,8 +1248,8 @@ bool idle_startup()
|
||||
else
|
||||
{
|
||||
LLPanelLogin::setFields(firstname, lastname, password, login_history);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
LLPanelLogin::giveFocus();
|
||||
}
|
||||
@@ -1324,8 +1324,8 @@ bool idle_startup()
|
||||
{
|
||||
firstname = gLoginHandler.getFirstName();
|
||||
lastname = gLoginHandler.getLastName();
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
web_login_key = gLoginHandler.getWebLoginKey();
|
||||
}
|
||||
@@ -1345,8 +1345,8 @@ bool idle_startup()
|
||||
{
|
||||
gSavedSettings.setString("FirstName", firstname);
|
||||
gSavedSettings.setString("LastName", lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
if (!gSavedSettings.controlExists("RememberLogin")) gSavedSettings.declareBOOL("RememberLogin", false, "Remember login", false);
|
||||
gSavedSettings.setBOOL("RememberLogin", LLPanelLogin::getRememberLogin());
|
||||
@@ -1405,7 +1405,10 @@ bool idle_startup()
|
||||
|
||||
std::string user_windlight_days_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", ""));
|
||||
LLFile::mkdir(user_windlight_days_path_name.c_str());
|
||||
|
||||
|
||||
// <edit>
|
||||
LLAO::refresh();
|
||||
// </edit>
|
||||
|
||||
if (show_connect_box)
|
||||
{
|
||||
@@ -1468,9 +1471,9 @@ bool idle_startup()
|
||||
init_start_screen(agent_location_id);
|
||||
}
|
||||
|
||||
// Display the startup progress bar.
|
||||
// <edit>
|
||||
//gViewerWindow->setShowProgress(TRUE);
|
||||
// Display the startup progress bar.
|
||||
// <edit>
|
||||
//gViewerWindow->setShowProgress(TRUE);
|
||||
// </edit>
|
||||
gViewerWindow->setProgressCancelButtonVisible(TRUE, std::string("Quit")); // *TODO: Translate
|
||||
|
||||
@@ -1696,13 +1699,13 @@ bool idle_startup()
|
||||
hashed_mac.finalize();
|
||||
hashed_mac.hex_digest(hashed_mac_string);
|
||||
|
||||
// <edit>
|
||||
std::string my_mac = std::string(hashed_mac_string);
|
||||
if(gSavedSettings.getBOOL("SpecifyMAC"))
|
||||
my_mac = gSavedSettings.getString("SpecifiedMAC").c_str();
|
||||
std::string my_id0 = LLAppViewer::instance()->getSerialNumber();
|
||||
if(gSavedSettings.getBOOL("SpecifyID0"))
|
||||
my_id0 = gSavedSettings.getString("SpecifiedID0");
|
||||
// <edit>
|
||||
std::string my_mac = std::string(hashed_mac_string);
|
||||
if(gSavedSettings.getBOOL("SpecifyMAC"))
|
||||
my_mac = gSavedSettings.getString("SpecifiedMAC").c_str();
|
||||
std::string my_id0 = LLAppViewer::instance()->getSerialNumber();
|
||||
if(gSavedSettings.getBOOL("SpecifyID0"))
|
||||
my_id0 = gSavedSettings.getString("SpecifiedID0");
|
||||
// </edit>
|
||||
|
||||
LLViewerLogin* vl = LLViewerLogin::getInstance();
|
||||
@@ -1724,11 +1727,11 @@ bool idle_startup()
|
||||
gAcceptCriticalMessage,
|
||||
gLastExecEvent,
|
||||
requested_options,
|
||||
// <edit>
|
||||
// hashed_mac_string,
|
||||
// LLAppViewer::instance()->getSerialNumber());
|
||||
my_mac,
|
||||
my_id0);
|
||||
// <edit>
|
||||
// hashed_mac_string,
|
||||
// LLAppViewer::instance()->getSerialNumber());
|
||||
my_mac,
|
||||
my_id0);
|
||||
// </edit>
|
||||
|
||||
// reset globals
|
||||
@@ -2195,8 +2198,8 @@ bool idle_startup()
|
||||
if(!text.empty()) lastname.assign(text);
|
||||
gSavedSettings.setString("FirstName", firstname);
|
||||
gSavedSettings.setString("LastName", lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// <edit>
|
||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
||||
// </edit>
|
||||
|
||||
if (gSavedSettings.getBOOL("RememberPassword"))
|
||||
@@ -2924,20 +2927,20 @@ bool idle_startup()
|
||||
{
|
||||
LL_WARNS("AppInit") << "Problem loading inventory-skel-targets" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// <edit> testing adding a local inventory folder...
|
||||
LLViewerInventoryCategory* test_cat = new LLViewerInventoryCategory(gAgent.getID());
|
||||
test_cat->rename(std::string("Pretend Inventory"));
|
||||
LLUUID test_cat_id;
|
||||
test_cat_id.generate();
|
||||
test_cat->setUUID(test_cat_id);
|
||||
gLocalInventoryRoot = test_cat_id;
|
||||
test_cat->setParent(LLUUID::null);
|
||||
test_cat->setPreferredType(LLAssetType::AT_NONE);
|
||||
|
||||
gInventory.addCategory(test_cat);
|
||||
// </edit>
|
||||
}
|
||||
|
||||
// <edit> testing adding a local inventory folder...
|
||||
LLViewerInventoryCategory* test_cat = new LLViewerInventoryCategory(gAgent.getID());
|
||||
test_cat->rename(std::string("Pretend Inventory"));
|
||||
LLUUID test_cat_id;
|
||||
test_cat_id.generate();
|
||||
test_cat->setUUID(test_cat_id);
|
||||
gLocalInventoryRoot = test_cat_id;
|
||||
test_cat->setParent(LLUUID::null);
|
||||
test_cat->setPreferredType(LLAssetType::AT_NONE);
|
||||
|
||||
gInventory.addCategory(test_cat);
|
||||
// </edit>
|
||||
|
||||
options.clear();
|
||||
if(LLUserAuth::getInstance()->getOptions("buddy-list", options))
|
||||
@@ -3873,9 +3876,9 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response)
|
||||
// *TODO change userserver to be grid on both viewer and sim, since
|
||||
// userserver no longer exists.
|
||||
query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel();
|
||||
// <edit>
|
||||
//query_map["channel"] = gSavedSettings.getString("VersionChannelName");
|
||||
query_map["channel"] = gSavedSettings.getString("SpecifiedChannel");
|
||||
// <edit>
|
||||
//query_map["channel"] = gSavedSettings.getString("VersionChannelName");
|
||||
query_map["channel"] = gSavedSettings.getString("SpecifiedChannel");
|
||||
// </edit>
|
||||
// *TODO constantize this guy
|
||||
// *NOTE: This URL is also used in win_setup/lldownloader.cpp
|
||||
|
||||
@@ -233,6 +233,7 @@
|
||||
#include "hgfloatertexteditor.h"
|
||||
#include "llfloatermessagelog.h"
|
||||
#include "llfloatermessagebuilder.h"
|
||||
#include "llao.h"
|
||||
// </edit>
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
@@ -399,6 +400,7 @@ void handle_close_all_notifications(void*);
|
||||
void handle_reopen_with_hex_editor(void*);
|
||||
void handle_open_message_log(void*);
|
||||
void handle_open_message_builder(void*);
|
||||
void handle_edit_ao(void*);
|
||||
// </edit>
|
||||
|
||||
BOOL is_inventory_visible( void* user_data );
|
||||
@@ -1046,8 +1048,15 @@ void init_client_menu(LLMenuGL* menu)
|
||||
&handle_reopen_with_hex_editor, NULL));
|
||||
|
||||
sub->append(new LLMenuItemCallGL( "Message Log", &handle_open_message_log, NULL));
|
||||
sub->append(new LLMenuItemCallGL( "Message Builder", &handle_open_message_builder, NULL));
|
||||
|
||||
sub->append(new LLMenuItemCallGL( "Message Builder", &handle_open_message_builder, NULL));
|
||||
|
||||
sub->append(new LLMenuItemCheckGL( "Enable AO",
|
||||
&menu_toggle_control,
|
||||
NULL,
|
||||
&menu_check_control,
|
||||
(void*)"AO.Enabled"));
|
||||
sub->append(new LLMenuItemCallGL( "Edit AO...",
|
||||
&handle_edit_ao, NULL));
|
||||
sub->append(new LLMenuItemCheckGL( "Nimble",
|
||||
&menu_toggle_control,
|
||||
NULL,
|
||||
@@ -3069,6 +3078,11 @@ void handle_open_message_builder(void*)
|
||||
LLFloaterMessageBuilder::show("");
|
||||
}
|
||||
|
||||
void handle_edit_ao(void*)
|
||||
{
|
||||
LLFloaterAO::show();
|
||||
}
|
||||
|
||||
void handle_close_all_notifications(void*)
|
||||
{
|
||||
LLView::child_list_t child_list(*(gNotifyBoxView->getChildList()));
|
||||
@@ -6748,6 +6762,37 @@ void menu_toggle_control( void* user_data )
|
||||
// Doubleclick actions - there can be only one
|
||||
gSavedSettings.setBOOL( "DoubleClickAutoPilot", FALSE );
|
||||
}
|
||||
// <edit>
|
||||
else if(std::string(static_cast<char*>(user_data)) == "AO.Enabled")
|
||||
{
|
||||
LLVOAvatar* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
{
|
||||
for ( LLVOAvatar::AnimIterator anim_it =
|
||||
avatarp->mPlayingAnimations.begin();
|
||||
anim_it != avatarp->mPlayingAnimations.end();
|
||||
anim_it++)
|
||||
{
|
||||
if(LLAO::mOverrides.find(anim_it->first) != LLAO::mOverrides.end())
|
||||
{
|
||||
// this is an override anim
|
||||
if(checked)
|
||||
{
|
||||
// make override stop
|
||||
avatarp->stopMotion(anim_it->first);
|
||||
gAgent.sendAnimationRequest(anim_it->first, ANIM_REQUEST_STOP);
|
||||
}
|
||||
else
|
||||
{
|
||||
// make override start
|
||||
gSavedSettings.setBOOL("AO.Enabled", TRUE);
|
||||
avatarp->startMotion(anim_it->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
gSavedSettings.setBOOL(setting, !checked);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
// <edit>
|
||||
#include "llfloaterexploreanimations.h"
|
||||
//#include "llao.h"
|
||||
#include "llao.h"
|
||||
// </edit>
|
||||
|
||||
#if LL_MSVC
|
||||
@@ -5034,7 +5034,27 @@ void LLVOAvatar::resetAnimations()
|
||||
BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_AVATAR);
|
||||
|
||||
|
||||
// <edit>
|
||||
if(mIsSelf)
|
||||
{
|
||||
if(gSavedSettings.getBOOL("AO.Enabled"))
|
||||
{
|
||||
if(LLAO::mOverrides.find(id) != LLAO::mOverrides.end())
|
||||
{
|
||||
// avoid infinite loops!
|
||||
if( (id != LLAO::mOverrides[id])
|
||||
&& (LLAO::mOverrides.find(LLAO::mOverrides[id]) == LLAO::mOverrides.end()) )
|
||||
{
|
||||
//llinfos << "AO: Replacing " << id.asString() << " with " << LLAO::mOverrides[id].asString() << llendl;
|
||||
gAgent.sendAnimationRequest(LLAO::mOverrides[id], ANIM_REQUEST_START);
|
||||
startMotion(LLAO::mOverrides[id], time_offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
|
||||
// start special case female walk for female avatars
|
||||
if (getSex() == SEX_FEMALE)
|
||||
{
|
||||
@@ -5063,6 +5083,17 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
|
||||
{
|
||||
if (mIsSelf)
|
||||
{
|
||||
// <edit>
|
||||
if(gSavedSettings.getBOOL("AO.Enabled"))
|
||||
{
|
||||
if( (LLAO::mOverrides.find(id) != LLAO::mOverrides.end())
|
||||
&& (id != LLAO::mOverrides[id]) )
|
||||
{
|
||||
gAgent.sendAnimationRequest(LLAO::mOverrides[id], ANIM_REQUEST_STOP);
|
||||
stopMotion(LLAO::mOverrides[id], stop_immediate);
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
gAgent.onAnimStop(id);
|
||||
}
|
||||
|
||||
|
||||
122
indra/newview/skins/default/xui/en-us/floater_ao.xml
Executable file
122
indra/newview/skins/default/xui/en-us/floater_ao.xml
Executable file
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="false"
|
||||
width="410" height="650"
|
||||
name="AO Editor" title="AO Editor" rect_control="FloaterAORect">
|
||||
<button bottom="-50" halign="center" height="24" label="Load..." left="220" name="btn_load" width="80" />
|
||||
<button bottom="-50" halign="center" height="24" label="Save..." left_delta="90" name="btn_save" width="80" />
|
||||
<text follows="top|left" height="15" left="10" name="text_walking" bottom="-80">
|
||||
Walking:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_walking"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_running" bottom_delta="-25">
|
||||
Running:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_running"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_crouchwalk" bottom_delta="-25">
|
||||
Crouchwalk:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_crouchwalk"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_flying" bottom_delta="-25">
|
||||
Flying:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_flying"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_turn_left" bottom_delta="-25">
|
||||
Turn Left:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_turn_left"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_turn_right" bottom_delta="-25">
|
||||
Turn Right:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_turn_right"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_jumping" bottom_delta="-25">
|
||||
Jumping:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_jumping"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_fly_up" bottom_delta="-25">
|
||||
Fly Up:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_fly_up"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_crouching" bottom_delta="-25">
|
||||
Crouching:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_crouching"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_fly_down" bottom_delta="-25">
|
||||
Fly Down:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_fly_down"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_stand1" bottom_delta="-25">
|
||||
Stand1:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand1"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_stand2" bottom_delta="-25">
|
||||
Stand2:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand2"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_stand3" bottom_delta="-25">
|
||||
Stand3:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stand3"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_hover" bottom_delta="-25">
|
||||
Hover:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_hover"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_sitting" bottom_delta="-25">
|
||||
Sitting:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_sitting"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_prejump" bottom_delta="-25">
|
||||
PreJump:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_prejump"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_falling" bottom_delta="-25">
|
||||
Falling:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_falling"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_stride" bottom_delta="-25">
|
||||
Stride:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_stride"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_soft_landing" bottom_delta="-25">
|
||||
Soft Landing:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_soft_landing"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_medium_landing" bottom_delta="-25">
|
||||
Medium Landing:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_medium_landing"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_hard_landing" bottom_delta="-25">
|
||||
Hard Landing:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_hard_landing"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_flying_slow" bottom_delta="-25">
|
||||
Flying Slow:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_flying_slow"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
<text follows="top|left" height="15" left="10" name="text_sitting_on_ground" bottom_delta="-25">
|
||||
Sitting on Ground:
|
||||
</text>
|
||||
<line_editor follows="top|left|right" height="19" max_length="36" name="line_sitting_on_ground"
|
||||
width="300" left="100" bottom_delta="0" />
|
||||
</floater>
|
||||
Reference in New Issue
Block a user