summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-01-17 20:06:56 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-01-24 17:40:01 +0200
commit869712e273caa0a655f7b6a1f189a8bc6399f51d (patch)
tree678daba479ef02d39e3bb0848f48661bd2857b4f /indra/newview
parent79f5231db23dfa22d8981940864d1f3a450e3e02 (diff)
SL-20669 Move constants out of settings.xml
UIImgInvisibleUUID doesn't exist Default normal for material is 'null'
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml55
-rw-r--r--indra/newview/llfloaterenvironmentadjust.cpp2
-rw-r--r--indra/newview/llmaterialeditor.cpp4
-rw-r--r--indra/newview/llpaneleditwater.cpp2
-rw-r--r--indra/newview/llpanelface.cpp10
-rw-r--r--indra/newview/lltexturectrl.cpp11
6 files changed, 14 insertions, 70 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 77ca52a7f7..3d43a20c21 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3244,17 +3244,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>DefaultBlankNormalTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Blank' in texture picker for normal maps. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>5b53359e-59dd-d8a2-04c3-9e65134da47a</string>
- </map>
<key>DefaultFemaleAvatar</key>
<map>
<key>Comment</key>
@@ -3288,39 +3277,6 @@
<key>Value</key>
<string>Male Shape &amp; Outfit</string>
</map>
- <key>DefaultObjectNormalTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Default' in texture picker for normal map. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>85f28839-7a1c-b4e3-d71d-967792970a7b</string>
- </map>
- <key>DefaultObjectSpecularTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Default' in texture picker for specular map. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>87e0e8f7-8729-1ea8-cfc9-8915773009db</string>
- </map>
- <key>DefaultObjectTexture</key>
- <map>
- <key>Comment</key>
- <string>Texture used as 'Default' in texture picker. (UUID texture reference)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>89556747-24cb-43ed-920b-47caed15465f</string>
- </map>
<key>DefaultUploadCost</key>
<map>
<key>Comment</key>
@@ -13620,17 +13576,6 @@
<key>Value</key>
<string>F3E07BC8-A973-476D-8C7F-F3B7293975D1</string>
</map>
- <key>UIImgWhiteUUID</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>5748decc-f629-461c-9a36-a35a221fe21f</string>
- </map>
<key>UILineEditorCursorThickness</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index c64ee5a69c..c98afefa65 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -116,7 +116,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
- getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture")));
+ getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onWaterMapChanged(); });
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); });
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 34f2f77d25..b7828db3a9 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -449,9 +449,7 @@ BOOL LLMaterialEditor::postBuild()
mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_EMISIVE_TEX_DIRTY));
mNormalTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_NORMAL_TEX_DIRTY));
- // should match normal textures from mBumpyTextureCtrl
- mNormalTextureCtrl->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("DefaultObjectNormalTexture")));
- mNormalTextureCtrl->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture")));
+ mNormalTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
if (mIsOverride)
{
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index a09964e17d..cf536dd87e 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -89,7 +89,7 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); });
mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
- mTxtNormalMap->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
+ mTxtNormalMap->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 269ae23eb8..7979261bae 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -353,7 +353,7 @@ BOOL LLPanelFace::postBuild()
mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
if(mShinyTextureCtrl)
{
- mShinyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectSpecularTexture" )));
+ mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
@@ -370,8 +370,8 @@ BOOL LLPanelFace::postBuild()
mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
if(mBumpyTextureCtrl)
{
- mBumpyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectNormalTexture" )));
- mBumpyTextureCtrl->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
+ mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
+ mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
@@ -4413,7 +4413,7 @@ void LLPanelFace::onCopyTexture()
LLUUID id = mat_data["NormMap"].asUUID();
if (id.notNull() && !get_can_copy_texture(id))
{
- mat_data["NormMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
+ mat_data["NormMap"] = DEFAULT_OBJECT_TEXTURE;
mat_data["NormMapNoCopy"] = true;
}
@@ -4423,7 +4423,7 @@ void LLPanelFace::onCopyTexture()
LLUUID id = mat_data["SpecMap"].asUUID();
if (id.notNull() && !get_can_copy_texture(id))
{
- mat_data["SpecMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
+ mat_data["SpecMap"] = DEFAULT_OBJECT_TEXTURE;
mat_data["SpecMapNoCopy"] = true;
}
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 233b864fba..62d3fa28bf 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -82,9 +82,11 @@
//static
bool get_is_predefined_texture(LLUUID asset_id)
{
- if (asset_id == LLUUID(gSavedSettings.getString("DefaultObjectTexture"))
- || asset_id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID"))
- || asset_id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"))
+ if (asset_id == DEFAULT_OBJECT_TEXTURE
+ || asset_id == DEFAULT_OBJECT_SPECULAR
+ || asset_id == DEFAULT_OBJECT_NORMAL
+ || asset_id == BLANK_OBJECT_NORMAL
+ || asset_id == IMG_WHITE
|| asset_id == LLUUID(SCULPT_DEFAULT_TEXTURE))
{
return true;
@@ -1646,8 +1648,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
// Default of defaults is white image for diff tex
//
- LLUUID whiteImage( gSavedSettings.getString( "UIImgWhiteUUID" ) );
- setBlankImageAssetID( whiteImage );
+ setBlankImageAssetID(IMG_WHITE);
setAllowNoTexture(p.allow_no_texture);
setCanApplyImmediately(p.can_apply_immediately);