summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-14 17:04:47 -0500
committerDave Parks <davep@lindenlab.com>2022-09-14 17:04:47 -0500
commitafb7efbfcc39f93bb018de6e0b4e5f0839a68ef5 (patch)
tree476dd03a9af8a753ef9f89803e340d18cbc2a883
parenta0a87db3d76bc78e245e89254db190ba68b3709e (diff)
parent5d918f98eaacc0eec84edcf23a40d6f6c93807c3 (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
-rw-r--r--indra/newview/app_settings/settings_per_account.xml11
-rw-r--r--indra/newview/llfloaterpreference.cpp10
-rw-r--r--indra/newview/llfloaterpreference.h1
-rw-r--r--indra/newview/llinventorymodel.cpp5
-rw-r--r--indra/newview/llinventorypanel.cpp4
-rw-r--r--indra/newview/llmaterialeditor.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_uploads.xml25
8 files changed, 65 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 537744b44c..eb3528b9b7 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -370,6 +370,17 @@
<key>Value</key>
<string></string>
</map>
+ <key>PBRUploadFolder</key>
+ <map>
+ <key>Comment</key>
+ <string>All pbr uploads will be stored in this directory (UUID)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
<key>TextureUploadFolder</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index dd9a212c1c..68928e9c8f 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -399,6 +399,7 @@ BOOL LLFloaterPreference::postBuild()
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this));
gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this));
+ gSavedPerAccountSettings.getControl("PBRUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangePBRFolder, this));
gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this));
gSavedPerAccountSettings.getControl("SoundUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeSoundFolder, this));
gSavedPerAccountSettings.getControl("AnimationUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeAnimationFolder, this));
@@ -688,6 +689,7 @@ void LLFloaterPreference::onOpen(const LLSD& key)
onChangeMaturity();
onChangeModelFolder();
+ onChangePBRFolder();
onChangeTextureFolder();
onChangeSoundFolder();
onChangeAnimationFolder();
@@ -1773,6 +1775,14 @@ void LLFloaterPreference::onChangeModelFolder()
}
}
+void LLFloaterPreference::onChangePBRFolder()
+{
+ if (gInventory.isInventoryUsable())
+ {
+ getChild<LLTextBox>("upload_pbr")->setText(get_category_path(LLFolderType::FT_MATERIAL));
+ }
+}
+
void LLFloaterPreference::onChangeTextureFolder()
{
if (gInventory.isInventoryUsable())
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 542df18ddb..af17c46be0 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -173,6 +173,7 @@ public:
void applyResolution();
void onChangeMaturity();
void onChangeModelFolder();
+ void onChangePBRFolder();
void onChangeTextureFolder();
void onChangeSoundFolder();
void onChangeAnimationFolder();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index c101033a5d..cc1bd846e5 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -628,6 +628,11 @@ const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType::
cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder"));
break;
}
+ case LLFolderType::FT_MATERIAL:
+ {
+ cat_id = LLUUID(gSavedPerAccountSettings.getString("PBRUploadFolder"));
+ break;
+ }
default:
break;
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index cd24b3ea43..03ca7e7431 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1612,6 +1612,10 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
{
gSavedPerAccountSettings.setString("AnimationUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
}
+ else if (param == "pbr_material")
+ {
+ gSavedPerAccountSettings.setString("PBRUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+ }
}
void LLInventoryPanel::purgeSelectedItems()
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 6461aa71a6..477f834a22 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -762,7 +762,7 @@ bool LLMaterialEditor::saveIfNeeded()
LLAssetID new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
std::string res_desc = buildMaterialDescription();
U32 next_owner_perm = LLPermissions::DEFAULT.getMaskNextOwner();
- LLUUID parent = gInventory.findCategoryUUIDForType(LLFolderType::FT_MATERIAL);
+ LLUUID parent = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_MATERIAL);
const U8 subtype = NO_INV_SUBTYPE; // TODO maybe use AT_SETTINGS and LLSettingsType::ST_MATERIAL ?
create_inventory_item(gAgent.getID(), gAgent.getSessionID(), parent, tid, mMaterialName, res_desc,
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index c7c1e1d75a..46dd0ada5d 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -692,6 +692,14 @@
function="Inventory.FileUploadLocation"
parameter="model" />
</menu_item_call>
+ <menu_item_call
+ label="PBR material uploads"
+ layout="topleft"
+ name="PBR uploads">
+ <menu_item_call.on_click
+ function="Inventory.FileUploadLocation"
+ parameter="pbr_material" />
+ </menu_item_call>
</menu>
<menu_item_separator
layout="topleft" />
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
index 67eff2b762..08ff3d4d53 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
@@ -126,6 +126,31 @@
type="string"
length="1"
follows="left|top"
+ height="12"
+ layout="topleft"
+ left="37"
+ name="title_pbr"
+ top_pad="7"
+ width="100">
+ PBR Materials
+ </text>
+ <text
+ type="string"
+ use_ellipses="true"
+ follows="left|top"
+ height="27"
+ layout="topleft"
+ font.style="BOLD"
+ left="37"
+ name="upload_pbr"
+ top_pad="5"
+ width="370"
+ word_wrap="true"/>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
height="30"
layout="topleft"
font.style="ITALIC"