summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-08-26 11:43:45 -0700
committerRider Linden <rider@lindenlab.com>2019-08-26 11:43:45 -0700
commit1f656735d339fc4d83da86efbb400af1361c27db (patch)
treeda05e8dbe4bbcbaf1c248df9799534e546123897
parent98d926afd7fba39cac373a89705851ad8bb2258e (diff)
SL-11705, SL-11706: New flags in llsettings base for tracking by simulator.
-rw-r--r--indra/llinventory/llsettingsbase.cpp7
-rw-r--r--indra/llinventory/llsettingsbase.h1
-rw-r--r--indra/newview/llenvironment.cpp12
-rw-r--r--indra/newview/llenvironment.h16
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp66
-rw-r--r--indra/newview/llfloatereditextdaycycle.h1
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp17
-rw-r--r--indra/newview/llfloatermyenvironment.cpp11
-rw-r--r--indra/newview/llinventorybridge.cpp9
-rw-r--r--indra/newview/llpanelenvironment.cpp12
-rw-r--r--indra/newview/llsettingsvo.cpp7
11 files changed, 126 insertions, 33 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index e8fdd017e3..af3e84fd0f 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -59,6 +59,7 @@ const std::string LLSettingsBase::SETTING_FLAGS("flags");
const U32 LLSettingsBase::FLAG_NOCOPY(0x01 << 0);
const U32 LLSettingsBase::FLAG_NOMOD(0x01 << 1);
const U32 LLSettingsBase::FLAG_NOTRANS(0x01 << 2);
+const U32 LLSettingsBase::FLAG_NOSAVE(0x01 << 3);
const U32 LLSettingsBase::Validator::VALIDATION_PARTIAL(0x01 << 0);
@@ -354,7 +355,11 @@ LLSD LLSettingsBase::getSettings() const
LLSD LLSettingsBase::cloneSettings() const
{
- return combineSDMaps(getSettings(), LLSD());
+ U32 flags = getFlags();
+ LLSD settings (combineSDMaps(getSettings(), LLSD()));
+ if (flags)
+ settings[SETTING_FLAGS] = LLSD::Integer(flags);
+ return settings;
}
size_t LLSettingsBase::getHash() const
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index afb5014409..8b969d81a6 100644
--- a/indra/llinventory/llsettingsbase.h
+++ b/indra/llinventory/llsettingsbase.h
@@ -75,6 +75,7 @@ public:
static const U32 FLAG_NOCOPY;
static const U32 FLAG_NOMOD;
static const U32 FLAG_NOTRANS;
+ static const U32 FLAG_NOSAVE;
class DefaultParam
{
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index daff4b7186..782077b9a2 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -81,6 +81,7 @@ namespace
const std::string KEY_PARCELID("parcel_id");
const std::string KEY_REGIONID("region_id");
const std::string KEY_TRACKALTS("track_altitudes");
+ const std::string KEY_FLAGS("flags");
const std::string MESSAGE_PUSHENVIRONMENT("PushExpEnvironment");
@@ -1696,7 +1697,7 @@ void LLEnvironment::updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_lengt
updateParcel(INVALID_PARCEL_ID, pday, day_length, day_offset, altitudes, cb);
}
-void LLEnvironment::updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
+void LLEnvironment::updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
{
if (!isExtendedEnvironmentEnabled())
{
@@ -1705,7 +1706,7 @@ void LLEnvironment::updateRegion(const LLUUID &asset_id, std::string display_nam
return;
}
- updateParcel(INVALID_PARCEL_ID, asset_id, display_name, track_num, day_length, day_offset, altitudes, cb);
+ updateParcel(INVALID_PARCEL_ID, asset_id, display_name, track_num, day_length, day_offset, flags, altitudes, cb);
}
void LLEnvironment::updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
@@ -1758,9 +1759,9 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)
[this, parcel_id, cb]() { coroRequestEnvironment(parcel_id, cb); });
}
-void LLEnvironment::updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
+void LLEnvironment::updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
{
- UpdateInfo::ptr_t updates(std::make_shared<UpdateInfo>(asset_id, display_name, day_length, day_offset, altitudes));
+ UpdateInfo::ptr_t updates(std::make_shared<UpdateInfo>(asset_id, display_name, day_length, day_offset, altitudes, flags));
std::string coroname =
LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment",
[this, parcel_id, track_num, updates, cb]() { coroUpdateEnvironment(parcel_id, track_num, updates, cb); });
@@ -1797,12 +1798,14 @@ void LLEnvironment::onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::p
void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
{
LLSettingsDay::ptr_t pday = createDayCycleFromEnvironment((parcel_id == INVALID_PARCEL_ID) ? ENV_REGION : ENV_PARCEL, psky);
+ pday->setFlag(psky->getFlags());
updateParcel(parcel_id, pday, day_length, day_offset, altitudes, cb);
}
void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
{
LLSettingsDay::ptr_t pday = createDayCycleFromEnvironment((parcel_id == INVALID_PARCEL_ID) ? ENV_REGION : ENV_PARCEL, pwater);
+ pday->setFlag(pwater->getFlags());
updateParcel(parcel_id, pday, day_length, day_offset, altitudes, cb);
}
@@ -1911,6 +1914,7 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
body[KEY_ENVIRONMENT][KEY_DAYNAME] = updates->mDayName;
}
+ body[KEY_ENVIRONMENT][KEY_FLAGS] = LLSD::Integer(updates->mFlags);
//_WARNS("ENVIRONMENT") << "Body = " << body << LL_ENDL;
if ((parcel_id != INVALID_PARCEL_ID) || (track_no != NO_TRACK))
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 0e23693c86..3ae1d37a8c 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -208,13 +208,13 @@ public:
connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); }
void requestRegion(environment_apply_fn cb = environment_apply_fn());
- void updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
+ void updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void resetRegion(environment_apply_fn cb = environment_apply_fn());
void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn());
- void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
+ void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn());
@@ -399,19 +399,24 @@ private:
mDayLength(day_length),
mDayOffset(day_offset),
mAltitudes(altitudes),
- mDayName()
+ mDayName(),
+ mFlags(0)
{
if (mDayp)
+ {
mDayName = mDayp->getName();
+ mFlags = mDayp->getFlags();
+ }
}
- UpdateInfo(LLUUID settings_asset, std::string name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes) :
+ UpdateInfo(LLUUID settings_asset, std::string name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes, U32 flags) :
mDayp(),
mSettingsAsset(settings_asset),
mDayLength(day_length),
mDayOffset(day_offset),
mAltitudes(altitudes),
- mDayName(name)
+ mDayName(name),
+ mFlags(flags)
{}
LLSettingsDay::ptr_t mDayp;
@@ -420,6 +425,7 @@ private:
S32 mDayOffset;
altitudes_vect_t mAltitudes;
std::string mDayName;
+ U32 mFlags;
};
void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply);
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 0fb7fee8cb..cb2f5dbb1d 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -179,6 +179,7 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
mScratchWater(),
mIsPlaying(false),
mIsDirty(false),
+ mCanSave(false),
mCanCopy(false),
mCanMod(false),
mCanTrans(false),
@@ -305,6 +306,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
}
else
{
+ mCanSave = true;
mCanCopy = true;
mCanMod = true;
mCanTrans = true;
@@ -475,8 +477,8 @@ void LLFloaterEditExtDayCycle::refresh()
mFlyoutControl->setMenuItemVisible(ACTION_APPLY_REGION, show_apply);
mFlyoutControl->setMenuItemEnabled(ACTION_COMMIT, show_commit && !mCommitSignal.empty());
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && !mInventoryId.isNull());
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail && mCanCopy);
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && !mInventoryId.isNull() && mCanSave);
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail && mCanCopy && mCanSave);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_LOCAL, true);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_PARCEL, canApplyParcel() && show_apply);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_REGION, canApplyRegion() && show_apply);
@@ -504,6 +506,11 @@ void LLFloaterEditExtDayCycle::setEditDayCycle(const LLSettingsDay::ptr_t &pday)
mEditDay->setSkyAtKeyframe(LLSettingsVOSky::buildDefaultSky(), .5f, LLSettingsDay::TRACK_GROUND_LEVEL);
}
+ mCanSave = !pday->getFlag(LLSettingsBase::FLAG_NOSAVE);
+ mCanCopy = !pday->getFlag(LLSettingsBase::FLAG_NOCOPY) && mCanSave;
+ mCanMod = !pday->getFlag(LLSettingsBase::FLAG_NOMOD) && mCanSave;
+ mCanTrans = !pday->getFlag(LLSettingsBase::FLAG_NOTRANS) && mCanSave;
+
updateEditEnvironment();
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT);
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
@@ -1427,6 +1434,7 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
{
mInventoryItem = nullptr;
mInventoryId.setNull();
+ mCanSave = true;
mCanCopy = true;
mCanMod = true;
mCanTrans = true;
@@ -1460,6 +1468,7 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID &inventoryId)
return;
}
+ mCanSave = true;
mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID());
mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID());
mCanTrans = mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
@@ -1488,23 +1497,33 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt
return;
}
- if (mCanCopy)
- settings->clearFlag(LLSettingsBase::FLAG_NOCOPY);
+ if (settings->getFlag(LLSettingsBase::FLAG_NOSAVE))
+ {
+ mCanSave = false;
+ mCanCopy = false;
+ mCanMod = false;
+ mCanTrans = false;
+ }
else
- settings->setFlag(LLSettingsBase::FLAG_NOCOPY);
+ {
+ if (mCanCopy)
+ settings->clearFlag(LLSettingsBase::FLAG_NOCOPY);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOCOPY);
- if (mCanMod)
- settings->clearFlag(LLSettingsBase::FLAG_NOMOD);
- else
- settings->setFlag(LLSettingsBase::FLAG_NOMOD);
+ if (mCanMod)
+ settings->clearFlag(LLSettingsBase::FLAG_NOMOD);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOMOD);
- if (mCanTrans)
- settings->clearFlag(LLSettingsBase::FLAG_NOTRANS);
- else
- settings->setFlag(LLSettingsBase::FLAG_NOTRANS);
+ if (mCanTrans)
+ settings->clearFlag(LLSettingsBase::FLAG_NOTRANS);
+ else
+ settings->setFlag(LLSettingsBase::FLAG_NOTRANS);
- if (mInventoryItem)
- settings->setName(mInventoryItem->getName());
+ if (mInventoryItem)
+ settings->setName(mInventoryItem->getName());
+ }
setEditDayCycle(std::dynamic_pointer_cast<LLSettingsDay>(settings));
}
@@ -1674,6 +1693,19 @@ void LLFloaterEditExtDayCycle::doApplyUpdateInventory(const LLSettingsDay::ptr_t
void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, const LLSettingsDay::ptr_t &day)
{
+ U32 flags(0);
+
+ if (mInventoryItem)
+ {
+ if (!mInventoryItem->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOMOD;
+ if (!mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOTRANS;
+ }
+
+ flags |= day->getFlags();
+ day->setFlag(flags);
+
if (where == ACTION_APPLY_LOCAL)
{
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, day);
@@ -1691,7 +1723,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons
if (mInventoryItem && !isDirty())
{
- LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else
{
@@ -1702,7 +1734,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons
{
if (mInventoryItem && !isDirty())
{
- LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else
{
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index c271f15840..83ce69cff3 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -240,6 +240,7 @@ private:
bool mCanCopy;
bool mCanMod;
bool mCanTrans;
+ bool mCanSave;
edit_commit_signal_t mCommitSignal;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 05da640258..dccfca62a4 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -560,6 +560,19 @@ void LLFloaterFixedEnvironment::doApplyUpdateInventory(const LLSettingsBase::ptr
void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, const LLSettingsBase::ptr_t &settings)
{
+ U32 flags(0);
+
+ if (mInventoryItem)
+ {
+ if (!mInventoryItem->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOMOD;
+ if (!mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOTRANS;
+ }
+
+ flags |= settings->getFlags();
+ settings->setFlag(flags);
+
if (where == ACTION_APPLY_LOCAL)
{
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, settings);
@@ -577,7 +590,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, con
if (mInventoryItem && !isDirty())
{
- LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else if (settings->getSettingsType() == "sky")
{
@@ -592,7 +605,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, con
{
if (mInventoryItem && !isDirty())
{
- LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else if (settings->getSettingsType() == "sky")
{
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp
index 1d2f14532d..21d106c8b1 100644
--- a/indra/newview/llfloatermyenvironment.cpp
+++ b/indra/newview/llfloatermyenvironment.cpp
@@ -277,9 +277,16 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context)
LLUUID asset_id = itemp->getAssetUUID();
std::string name = itemp->getName();
+ U32 flags(0);
+
+ if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOMOD;
+ if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOTRANS;
+
if (context == PARAMETER_REGION)
{
- LLEnvironment::instance().updateRegion(asset_id, name, LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateRegion(asset_id, name, LLEnvironment::NO_TRACK, -1, -1, flags);
LLEnvironment::instance().setSharedEnvironment();
}
else if (context == PARAMETER_PARCEL)
@@ -290,7 +297,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context)
LL_WARNS("ENVIRONMENT") << "Unable to determine parcel." << LL_ENDL;
return;
}
- LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, LLEnvironment::NO_TRACK, -1, -1, flags);
LLEnvironment::instance().setSharedEnvironment();
}
else if (context == PARAMETER_LOCAL)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index ee9dfbc376..97260fba4c 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -6948,6 +6948,13 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
LLUUID asset_id = item->getAssetUUID();
std::string name = item->getName();
+ U32 flags(0);
+
+ if (!item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOMOD;
+ if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOTRANS;
+
LLParcel *parcel = LLViewerParcelMgr::instance().getAgentOrSelectedParcel();
if (!parcel)
{
@@ -6957,7 +6964,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
S32 parcel_id = parcel->getLocalID();
LL_DEBUGS("ENVIRONMENT") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL;
- LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1, flags);
LLEnvironment::instance().setSharedEnvironment();
}
else
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index d63ae4e434..c4fa4244b1 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -440,6 +440,7 @@ void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentI
// old settings will be invalid.
mEditorLastParcelId = nextenv->mParcelId;
mEditorLastRegionId = nextenv->mRegionId;
+
dayeditor->setEditDayCycle(nextenv->mDayCycle);
}
}
@@ -967,12 +968,23 @@ void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id, S32 track_num)
clearDirtyFlag(DIRTY_FLAG_DAYLENGTH);
clearDirtyFlag(DIRTY_FLAG_DAYOFFSET);
+ U32 flags(0);
+
+ if (itemp)
+ {
+ if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOMOD;
+ if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOTRANS;
+ }
+
LLEnvironment::instance().updateParcel(getParcelId(),
itemp->getAssetUUID(),
itemp->getName(),
track_num,
mCurrentEnvironment ? mCurrentEnvironment->mDayLength.value() : -1,
mCurrentEnvironment ? mCurrentEnvironment->mDayOffset.value() : -1,
+ flags,
LLEnvironment::altitudes_vect_t(),
[that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
}
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 5b336f0870..11bb732be8 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -532,6 +532,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildDefaultSky()
LLSettingsSky::ptr_t LLSettingsVOSky::buildClone() const
{
LLSD settings = cloneSettings();
+ U32 flags = getFlags();
LLSettingsSky::validation_list_t validations = LLSettingsSky::validationList();
LLSD results = LLSettingsBase::settingValidation(settings, validations);
@@ -542,6 +543,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildClone() const
}
LLSettingsSky::ptr_t skyp = std::make_shared<LLSettingsVOSky>(settings);
+ skyp->setFlags(flags);
return skyp;
}
@@ -866,6 +868,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildDefaultWater()
LLSettingsWater::ptr_t LLSettingsVOWater::buildClone() const
{
LLSD settings = cloneSettings();
+ U32 flags = getFlags();
LLSettingsWater::validation_list_t validations = LLSettingsWater::validationList();
LLSD results = LLSettingsWater::settingValidation(settings, validations);
if (!results["success"].asBoolean())
@@ -875,7 +878,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildClone() const
}
LLSettingsWater::ptr_t waterp = std::make_shared<LLSettingsVOWater>(settings);
-
+ waterp->setFlags(flags);
return waterp;
}
@@ -1273,6 +1276,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildDeepCloneAndUncompress() const
// no need for SETTING_TRACKS or SETTING_FRAMES, so take base LLSD
LLSD settings = llsd_clone(mSettings);
+ U32 flags = getFlags();
LLSettingsDay::ptr_t day_clone = std::make_shared<LLSettingsVODay>(settings);
for (S32 i = 0; i < LLSettingsDay::TRACK_MAX; ++i)
@@ -1289,6 +1293,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildDeepCloneAndUncompress() const
iter++;
}
}
+ day_clone->setFlags(flags);
return day_clone;
}