summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 6461aa71a6..bdc66a85fc 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -204,14 +204,14 @@ void LLMaterialEditor::setAlbedoUploadId(const LLUUID& id)
LLColor4 LLMaterialEditor::getAlbedoColor()
{
- LLColor4 ret = LLColor4(childGetValue("albedo color"));
+ LLColor4 ret = linearColor4(LLColor4(childGetValue("albedo color")));
ret.mV[3] = getTransparency();
return ret;
}
void LLMaterialEditor::setAlbedoColor(const LLColor4& color)
{
- childSetValue("albedo color", color.getValue());
+ childSetValue("albedo color", srgbColor4(color).getValue());
setTransparency(color.mV[3]);
}
@@ -761,8 +761,8 @@ bool LLMaterialEditor::saveIfNeeded()
tid.generate(); // timestamp-based randomization + uniquification
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);
+ U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Uploads");
+ 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,