aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llcommon/imageids.cpp2
-rw-r--r--linden/indra/llcommon/imageids.h1
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/llprefsadvanced.cpp32
-rw-r--r--linden/indra/newview/llprefsadvanced.h1
-rw-r--r--linden/indra/newview/llviewermenu.cpp14
-rw-r--r--linden/indra/newview/llvoavatar.cpp25
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml7
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml9
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml7
10 files changed, 73 insertions, 36 deletions
diff --git a/linden/indra/llcommon/imageids.cpp b/linden/indra/llcommon/imageids.cpp
index 6b4fcd3..e5343fe 100644
--- a/linden/indra/llcommon/imageids.cpp
+++ b/linden/indra/llcommon/imageids.cpp
@@ -75,3 +75,5 @@ const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); /
75const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER 75const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER
76 76
77const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER 77const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
78
79const LLUUID DEFAULT_UNREZZED_AVATAR_PARTICLE ("c6e07fda-aea5-4149-acb6-6f09980e0db5"); // VIEWER only
diff --git a/linden/indra/llcommon/imageids.h b/linden/indra/llcommon/imageids.h
index dc726dc..516fda1 100644
--- a/linden/indra/llcommon/imageids.h
+++ b/linden/indra/llcommon/imageids.h
@@ -72,4 +72,5 @@ LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
72 72
73LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; 73LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
74 74
75LL_COMMON_API extern const LLUUID DEFAULT_UNREZZED_AVATAR_PARTICLE;
75#endif 76#endif
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index bdaf8cc..80eb65a 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -938,6 +938,17 @@
938 <key>Value</key> 938 <key>Value</key>
939 <integer>1</integer> 939 <integer>1</integer>
940 </map> 940 </map>
941 <key>PreviewAvatarAsCloud</key>
942 <map>
943 <key>Comment</key>
944 <string>Turns your avatar into the paricle clud if true</string>
945 <key>Persist</key>
946 <integer>0</integer>
947 <key>Type</key>
948 <string>Boolean</string>
949 <key>Value</key>
950 <integer>0</integer>
951 </map>
941 <key>PrivateLookAtTarget</key> 952 <key>PrivateLookAtTarget</key>
942 <map> 953 <map>
943 <key>Comment</key> 954 <key>Comment</key>
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index ad60694..f1b2428 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -119,7 +119,7 @@ BOOL LLPrefsAdvanced::postBuild()
119 getChild<LLButton>("ac_button")->setClickedCallback(onAutoCorrectButton,this); 119 getChild<LLButton>("ac_button")->setClickedCallback(onAutoCorrectButton,this);
120 initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); 120 initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck");
121 121
122 122 getChild<LLButton>("reset_cloud_this_account")->setClickedCallback(onResetThisCloudButton,this);
123 getChild<LLButton>("save_cloud_this_account")->setClickedCallback(onSaveThisCloudButton,this); 123 getChild<LLButton>("save_cloud_this_account")->setClickedCallback(onSaveThisCloudButton,this);
124 getChild<LLButton>("save_cloud_any_account")->setClickedCallback(onSaveAnyoneCloudButton,this); 124 getChild<LLButton>("save_cloud_any_account")->setClickedCallback(onSaveAnyoneCloudButton,this);
125 125
@@ -214,8 +214,11 @@ void LLPrefsAdvanced::apply()
214 214
215 LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox"); 215 LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox");
216 gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); 216 gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex());
217 217
218 onSaveThisCloudButton(NULL); 218 if (LLStartUp::isLoggedIn() && LLVOAvatar::sHasCloud)
219 {
220 onSaveThisCloudButton(NULL);
221 }
219} 222}
220 223
221void LLPrefsAdvanced::cancel() 224void LLPrefsAdvanced::cancel()
@@ -344,13 +347,15 @@ void LLPrefsAdvanced::draw()
344 347
345void LLPrefsAdvanced::setParticleControls(bool is_logged_in) 348void LLPrefsAdvanced::setParticleControls(bool is_logged_in)
346{ 349{
347 350 childSetEnabled("reset_cloud_this_account", is_logged_in );
348 childSetEnabled("save_cloud_this_account", is_logged_in); 351 childSetEnabled("save_cloud_this_account", is_logged_in);
349 childSetEnabled("save_cloud_any_account", is_logged_in); 352 childSetEnabled("save_cloud_any_account", is_logged_in);
350 childSetEnabled("part_start_color_swatch", is_logged_in); 353 childSetEnabled("part_start_color_swatch", is_logged_in);
351 childSetEnabled("part_end_color_swatch", is_logged_in); 354 childSetEnabled("part_end_color_swatch", is_logged_in);
352 childSetEnabled("part_texture_picker", is_logged_in ); 355 childSetEnabled("part_texture_picker", is_logged_in );
353 356
357 childSetEnabled("preview_cloud", is_logged_in);
358 childSetVisible("preview_cloud", is_logged_in);
354 childSetVisible("must_be_logged_in_textbox", !is_logged_in); 359 childSetVisible("must_be_logged_in_textbox", !is_logged_in);
355} 360}
356 361
@@ -419,6 +424,25 @@ void LLPrefsAdvanced::onClickCommandLine(void* data)
419 FloaterCommandLine::getInstance()->center(); 424 FloaterCommandLine::getInstance()->center();
420} 425}
421 426
427void LLPrefsAdvanced::onResetThisCloudButton(void * data)
428{
429 LLPrefsAdvanced* self = (LLPrefsAdvanced*)data;
430 if (!self)
431 {
432 return;
433 }
434
435 // keep draw() from overriding the cloud with the values from the UI
436 LLVOAvatar::sHasCloud = false;
437 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml");
438 LLVOAvatar::loadCloud(filename, LLVOAvatar::sCloud);
439
440 // tell draw() to override values from the UI with the data from the new cloud
441 self-> mWasLoggedIn = !(LLStartUp::isLoggedIn());
442
443 LLVOAvatar::sHasCloud = true;
444}
445
422void LLPrefsAdvanced::onSaveThisCloudButton(void * data) 446void LLPrefsAdvanced::onSaveThisCloudButton(void * data)
423{ 447{
424 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "cloud.xml"); 448 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "cloud.xml");
diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h
index 87ddc59..e4febcc 100644
--- a/linden/indra/newview/llprefsadvanced.h
+++ b/linden/indra/newview/llprefsadvanced.h
@@ -59,6 +59,7 @@ private:
59 static void onSpellEditCustom(void* data); 59 static void onSpellEditCustom(void* data);
60 static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); 60 static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
61 static void onAutoCorrectButton(void * data); 61 static void onAutoCorrectButton(void * data);
62 static void onResetThisCloudButton(void * data);
62 static void onSaveThisCloudButton(void * data); 63 static void onSaveThisCloudButton(void * data);
63 static void onSaveAnyoneCloudButton(void * data); 64 static void onSaveAnyoneCloudButton(void * data);
64 65
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index e270dbb..c8adf7b 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -10724,19 +10724,6 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t
10724 } 10724 }
10725}; 10725};
10726 10726
10727///////////////////////////////////
10728// Reload Avatar Cloud Particles //
10729///////////////////////////////////
10730
10731
10732class LLAdvancedReloadAvatarCloudParticle : public view_listener_t
10733{
10734 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
10735 {
10736 LLVOAvatar::initCloud();
10737 return true;
10738 }
10739};
10740 10727
10741/////////// 10728///////////
10742// Crash // 10729// Crash //
@@ -11526,7 +11513,6 @@ void initialize_menus()
11526 addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); 11513 addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments");
11527 addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); 11514 addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
11528 addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); 11515 addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
11529 addMenu(new LLAdvancedReloadAvatarCloudParticle(), "Advanced.ReloadAvatarCloudParticle");
11530 11516
11531 // Advanced > Crash 11517 // Advanced > Crash
11532 addMenu(new LLAdvancedCrash(), "Advanced.Crash"); 11518 addMenu(new LLAdvancedCrash(), "Advanced.Crash");
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index d8b0994..8ddc936 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -1521,10 +1521,12 @@ void LLVOAvatar::loadCloud(const std::string& filename, LLPartSysData& particle
1521 LLSDSerialize::fromXMLDocument(cloud, in_file); 1521 LLSDSerialize::fromXMLDocument(cloud, in_file);
1522 1522
1523 particles.fromLLSD(cloud); 1523 particles.fromLLSD(cloud);
1524 if(particles.mPartImageID.isNull()) 1524 const LLUUID default_id = DEFAULT_UNREZZED_AVATAR_PARTICLE;
1525 if(particles.mPartImageID.isNull() || default_id == particles.mPartImageID)
1525 { 1526 {
1526 LLViewerImage* cloud_image = gImageList.getImageFromFile("cloud-particle.j2c"); 1527 LLViewerImage* cloud_image =
1527 particles.mPartImageID = cloud_image->getID(); 1528 gImageList.getImageFromFile("cloud-particle.j2c", MIPMAP_YES, IMMEDIATE_YES, 0, 0, default_id);
1529 particles.mPartImageID = default_id;
1528 } 1530 }
1529} 1531}
1530 1532
@@ -7431,6 +7433,7 @@ BOOL LLVOAvatar::isVisible()
7431// returns true if the value has changed. 7433// returns true if the value has changed.
7432BOOL LLVOAvatar::updateIsFullyLoaded() 7434BOOL LLVOAvatar::updateIsFullyLoaded()
7433{ 7435{
7436
7434 // a "heuristic" to determine if we have enough avatar data to render 7437 // a "heuristic" to determine if we have enough avatar data to render
7435 // (to avoid rendering a "Ruth" - DEV-3168) 7438 // (to avoid rendering a "Ruth" - DEV-3168)
7436 7439
@@ -7510,11 +7513,19 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
7510 7513
7511BOOL LLVOAvatar::isFullyLoaded() 7514BOOL LLVOAvatar::isFullyLoaded()
7512{ 7515{
7516 static BOOL* sPreviewAvatarCloud = rebind_llcontrol<BOOL>("PreviewAvatarAsCloud", &gSavedSettings, true);
7513 static BOOL* sRenderUnloadedAvatar = rebind_llcontrol<BOOL>("RenderUnloadedAvatar", &gSavedSettings, true); 7517 static BOOL* sRenderUnloadedAvatar = rebind_llcontrol<BOOL>("RenderUnloadedAvatar", &gSavedSettings, true);
7514 if (*sRenderUnloadedAvatar) 7518
7515 return TRUE; 7519 if(*sPreviewAvatarCloud && mIsSelf)
7516 else 7520 {
7517 return mFullyLoaded; 7521 return FALSE;
7522 }
7523 else if (*sRenderUnloadedAvatar)
7524 {
7525 return TRUE;
7526 }
7527
7528 return mFullyLoaded;
7518} 7529}
7519 7530
7520 7531
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index b31122a..d5b07c8 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -1992,13 +1992,6 @@
1992 <on_click function="Advanced.DumpAttachments" 1992 <on_click function="Advanced.DumpAttachments"
1993 userdata="" /> 1993 userdata="" />
1994 </menu_item_call> 1994 </menu_item_call>
1995 <menu_item_call
1996 label="Reload Avatar Cloud Particle"
1997 name="Reload Avatar Cloud Particle">
1998 <on_click
1999 function="Advanced.ReloadAvatarCloudParticle"
2000 userdata="" />
2001 </menu_item_call>
2002 </menu> 1995 </menu>
2003 1996
2004 <!-- CRASH --> 1997 <!-- CRASH -->
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml b/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml
index e5064dd..c1e1da9 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml
@@ -9,7 +9,7 @@ left="1" mouse_opaque="true" name="ParticleSettings" width="418">
9 Start Color: 9 Start Color:
10 </text> 10 </text>
11 <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44" 11 <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44"
12 can_apply_immediately="false" color="1 1 1 1" 12 can_apply_immediately="true" color="1 1 1 1"
13 enabled="true" follows="left|top" height="55" label="" left_delta="53" 13 enabled="true" follows="left|top" height="55" label="" left_delta="53"
14 mouse_opaque="true" name="part_start_color_swatch" 14 mouse_opaque="true" name="part_start_color_swatch"
15 tool_tip="Click to open Color Picker" width="45" /> 15 tool_tip="Click to open Color Picker" width="45" />
@@ -20,7 +20,7 @@ left="1" mouse_opaque="true" name="ParticleSettings" width="418">
20 End Color: 20 End Color:
21 </text> 21 </text>
22 <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44" 22 <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44"
23 can_apply_immediately="false" color="1 1 1 1" 23 can_apply_immediately="true" color="1 1 1 1"
24 enabled="true" follows="left|top" height="55" label="" left_delta="53" 24 enabled="true" follows="left|top" height="55" label="" left_delta="53"
25 mouse_opaque="true" name="part_end_color_swatch" 25 mouse_opaque="true" name="part_end_color_swatch"
26 tool_tip="Click to open Color Picker" width="45" /> 26 tool_tip="Click to open Color Picker" width="45" />
@@ -32,10 +32,13 @@ left="1" mouse_opaque="true" name="ParticleSettings" width="418">
32 </text> 32 </text>
33 33
34 <texture_picker border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44" 34 <texture_picker border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44"
35 can_apply_immediately="false" color="1 1 1 1" 35 can_apply_immediately="true" color="1 1 1 1"
36 enabled="true" follows="left|top" height="55" label="" left_delta="53" 36 enabled="true" follows="left|top" height="55" label="" left_delta="53"
37 mouse_opaque="true" name="part_texture_picker" 37 mouse_opaque="true" name="part_texture_picker"
38 tool_tip="Click to open Texture Chooser" width="45" /> 38 tool_tip="Click to open Texture Chooser" width="45" />
39 <button name="reset_cloud_this_account" label="reset for this account" halign="center"
40 tool_tip="reset the Avatar particle cloud to default for this account" left="12"
41 bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/>
39 <button name="save_cloud_this_account" label="save for this account" halign="center" 42 <button name="save_cloud_this_account" label="save for this account" halign="center"
40 tool_tip="save the Avatar particle cloud for this account" left="12" 43 tool_tip="save the Avatar particle cloud for this account" left="12"
41 bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> 44 bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/>
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
index 2d2b810..3b66fb8 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
@@ -194,7 +194,12 @@ To use spellcheck, right-click a misspelled word
194 mouse_opaque="true" name="must_be_logged_in_textbox" v_pad="0" width="394"> 194 mouse_opaque="true" name="must_be_logged_in_textbox" v_pad="0" width="394">
195 You must be logged in to change this 195 You must be logged in to change this
196 </text> 196 </text>
197 <check_box bottom_delta="-4" control_name="PreviewAvatarAsCloud" enabled="true"
198 follows="left|top" font="SansSerifSmall" height="16"
199 label="Preview avatar as cloud" left="10"
200 mouse_opaque="true" name="preview_cloud"
201 radio_style="false" tool_tip="Preview avatar as cloud when already rezzed"
202 width="80" />
197 </panel> 203 </panel>
198
199 </tab_container> 204 </tab_container>
200</panel> 205</panel>