Merge viewer-eep
commit
99667af710
|
|
@ -95,7 +95,7 @@ LLAssetDictionary::LLAssetDictionary()
|
|||
addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false));
|
||||
addEntry(LLAssetType::AT_WIDGET, new AssetEntry("WIDGET", "widget", "widget", false, false, false));
|
||||
addEntry(LLAssetType::AT_PERSON, new AssetEntry("PERSON", "person", "person", false, false, false));
|
||||
addEntry(LLAssetType::AT_SETTINGS, new AssetEntry("SETTINGS", "settings", "settings blob", true, true, true));
|
||||
addEntry(LLAssetType::AT_SETTINGS, new AssetEntry("SETTINGS", "settings", "settings blob", true, true, false));
|
||||
addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE));
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -210,6 +210,12 @@ bool LLInventoryType::cannotRestrictPermissions(LLInventoryType::EType type)
|
|||
}
|
||||
}
|
||||
|
||||
// Should show permissions that apply only to objects rezed in world.
|
||||
bool LLInventoryType::showInWorldPermissions(LLInventoryType::EType type)
|
||||
{
|
||||
return (type != IT_SETTINGS);
|
||||
}
|
||||
|
||||
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -134,6 +134,8 @@ public:
|
|||
// true if this type cannot have restricted permissions.
|
||||
static bool cannotRestrictPermissions(EType type);
|
||||
|
||||
static bool showInWorldPermissions(EType type);
|
||||
|
||||
private:
|
||||
// don't instantiate or derive one of these objects
|
||||
LLInventoryType( void );
|
||||
|
|
|
|||
|
|
@ -2764,6 +2764,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>BulkChangeIncludeSettings</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Bulk permission changes affect environment settings</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>BulkChangeEveryoneCopy</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -19687,6 +19698,28 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SettingsNextOwnerModify</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Newly created Environment setting can be modified by next owner</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SettingsNextOwnerTransfer</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Newly created Environment setting can be resold or given away by next owner</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>DefaultUploadPermissionsConverted</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -502,7 +502,9 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
|
|||
environment->setDay(pday, daylength, dayoffset);
|
||||
environment->setSkyTrack(mCurrentTrack);
|
||||
environment->animate();
|
||||
/*TODO: readjust environment*/
|
||||
|
||||
if (!mSignalEnvChanged.empty())
|
||||
mSignalEnvChanged(env);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -519,6 +521,8 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
|
|||
environment->clear();
|
||||
environment->setSky((fixed.first) ? fixed.first : mEnvironments[ENV_DEFAULT]->getSky());
|
||||
environment->setWater((fixed.second) ? fixed.second : mEnvironments[ENV_DEFAULT]->getWater());
|
||||
if (!mSignalEnvChanged.empty())
|
||||
mSignalEnvChanged(env);
|
||||
|
||||
/*TODO: readjust environment*/
|
||||
}
|
||||
|
|
@ -605,6 +609,10 @@ void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env)
|
|||
}
|
||||
|
||||
mEnvironments[env].reset();
|
||||
|
||||
if (!mSignalEnvChanged.empty())
|
||||
mSignalEnvChanged(env);
|
||||
|
||||
/*TODO: readjust environment*/
|
||||
}
|
||||
|
||||
|
|
@ -968,10 +976,28 @@ void LLEnvironment::updateShaderUniforms(LLGLSLShader *shader)
|
|||
void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envinfo)
|
||||
{
|
||||
if (envinfo->mParcelId == INVALID_PARCEL_ID)
|
||||
{ // the returned info applies to an entire region.
|
||||
LL_WARNS("LAPRAS") << "Setting Region environment" << LL_ENDL;
|
||||
setEnvironment(ENV_REGION, envinfo->mDayCycle, envinfo->mDayLength, envinfo->mDayOffset);
|
||||
mTrackAltitudes = envinfo->mAltitudes;
|
||||
{
|
||||
// the returned info applies to an entire region.
|
||||
if (!envinfo->mDayCycle)
|
||||
{
|
||||
clearEnvironment(ENV_PARCEL);
|
||||
setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
|
||||
updateEnvironment();
|
||||
}
|
||||
else if (envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_WATER)
|
||||
|| envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_GROUND_LEVEL))
|
||||
{
|
||||
LL_WARNS("LAPRAS") << "Invalid day cycle for region" << LL_ENDL;
|
||||
clearEnvironment(ENV_PARCEL);
|
||||
setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
|
||||
updateEnvironment();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("LAPRAS") << "Setting Region environment" << LL_ENDL;
|
||||
setEnvironment(ENV_REGION, envinfo->mDayCycle, envinfo->mDayLength, envinfo->mDayOffset);
|
||||
mTrackAltitudes = envinfo->mAltitudes;
|
||||
}
|
||||
|
||||
LL_WARNS("LAPRAS") << "Altitudes set to {" << mTrackAltitudes[0] << ", "<< mTrackAltitudes[1] << ", " << mTrackAltitudes[2] << ", " << mTrackAltitudes[3] << LL_ENDL;
|
||||
}
|
||||
|
|
@ -990,6 +1016,12 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
|
|||
LL_WARNS("LAPRAS") << "Clearing environment on parcel #" << parcel_id << LL_ENDL;
|
||||
clearEnvironment(ENV_PARCEL);
|
||||
}
|
||||
else if (envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_WATER)
|
||||
|| envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_GROUND_LEVEL))
|
||||
{
|
||||
LL_WARNS("LAPRAS") << "Invalid day cycle for parcel #" << parcel_id << LL_ENDL;
|
||||
clearEnvironment(ENV_PARCEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEnvironment(ENV_PARCEL, envinfo->mDayCycle, envinfo->mDayLength, envinfo->mDayOffset);
|
||||
|
|
@ -1048,13 +1080,7 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)
|
|||
{
|
||||
cb = [this](S32 pid, EnvironmentInfo::ptr_t envinfo)
|
||||
{
|
||||
if (envinfo->mDayCycle) recordEnvironment(pid, envinfo);
|
||||
else
|
||||
{
|
||||
clearEnvironment(ENV_PARCEL);
|
||||
setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
|
||||
updateEnvironment();
|
||||
}
|
||||
recordEnvironment(pid, envinfo);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,15 +135,12 @@ public:
|
|||
};
|
||||
|
||||
typedef std::pair<LLSettingsSky::ptr_t, LLSettingsWater::ptr_t> fixedEnvironment_t;
|
||||
typedef std::function<void(S32, EnvironmentInfo::ptr_t)> environment_apply_fn;
|
||||
typedef boost::signals2::signal<void(EnvSelection_t)> env_changed_signal_t;
|
||||
typedef env_changed_signal_t::slot_type env_changed_fn;
|
||||
typedef std::array<F32, 4> altitude_list_t;
|
||||
|
||||
typedef std::function<void(S32, EnvironmentInfo::ptr_t)> environment_apply_fn;
|
||||
|
||||
typedef boost::signals2::signal<void(EnvSelection_t, const LLSettingsBase::ptr_t &)> environment_changed_signal_t;
|
||||
typedef environment_changed_signal_t::slot_type environment_changed_fn;
|
||||
|
||||
typedef std::array<F32, 4> altitude_list_t;
|
||||
|
||||
virtual ~LLEnvironment();
|
||||
virtual ~LLEnvironment();
|
||||
|
||||
void loadPreferences();
|
||||
void updatePreferences();
|
||||
|
|
@ -229,7 +226,7 @@ public:
|
|||
LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings);
|
||||
|
||||
//-------------------------------------------
|
||||
connection_t setEnvironmentChanged(environment_changed_fn cb);
|
||||
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, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn());
|
||||
|
|
@ -350,6 +347,8 @@ private:
|
|||
LLSettingsBlender::ptr_t mBlenderSky;
|
||||
LLSettingsBlender::ptr_t mBlenderWater;
|
||||
|
||||
env_changed_signal_t mSignalEnvChanged;
|
||||
|
||||
UserPrefs mUserPrefs;
|
||||
|
||||
S32 mCurrentTrack;
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ BOOL LLFloaterBulkPermission::postBuild()
|
|||
mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts");
|
||||
mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds");
|
||||
mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures");
|
||||
mBulkChangeIncludeSettings = gSavedSettings.getBOOL("BulkChangeIncludeSettings");
|
||||
mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup");
|
||||
mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy");
|
||||
mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify");
|
||||
|
|
@ -186,6 +187,7 @@ void LLFloaterBulkPermission::onCloseBtn()
|
|||
gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts);
|
||||
gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds);
|
||||
gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures);
|
||||
gSavedSettings.setBOOL("BulkChangeIncludeSettings", mBulkChangeIncludeSettings);
|
||||
gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup);
|
||||
gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy);
|
||||
gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify);
|
||||
|
|
@ -281,6 +283,7 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
|
|||
gSavedSettings.setBOOL("BulkChangeIncludeScripts" , check);
|
||||
gSavedSettings.setBOOL("BulkChangeIncludeSounds" , check);
|
||||
gSavedSettings.setBOOL("BulkChangeIncludeTextures" , check);
|
||||
gSavedSettings.setBOOL("BulkChangeIncludeSettings" , check);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -302,6 +305,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
|
|||
( asstype == LLAssetType::AT_OBJECT && gSavedSettings.getBOOL("BulkChangeIncludeObjects" )) ||
|
||||
( asstype == LLAssetType::AT_LSL_TEXT && gSavedSettings.getBOOL("BulkChangeIncludeScripts" )) ||
|
||||
( asstype == LLAssetType::AT_SOUND && gSavedSettings.getBOOL("BulkChangeIncludeSounds" )) ||
|
||||
( asstype == LLAssetType::AT_SETTINGS && gSavedSettings.getBOOL("BulkChangeIncludeSettings" )) ||
|
||||
( asstype == LLAssetType::AT_TEXTURE && gSavedSettings.getBOOL("BulkChangeIncludeTextures" )))
|
||||
{
|
||||
LLViewerObject* object = gObjectList.findObject(viewer_obj->getID());
|
||||
|
|
@ -333,7 +337,12 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
|
|||
//|| something else // for next owner perms
|
||||
)
|
||||
{
|
||||
perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("BulkChange"));
|
||||
U32 mask_next = LLFloaterPerms::getNextOwnerPerms("BulkChange");
|
||||
if (asstype == LLAssetType::AT_SETTINGS)
|
||||
{
|
||||
mask_next |= PERM_COPY;
|
||||
}
|
||||
perm.setMaskNext(mask_next);
|
||||
perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("BulkChange"));
|
||||
perm.setMaskGroup(LLFloaterPerms::getGroupPerms("BulkChange"));
|
||||
new_item->setPermissions(perm); // here's the beef
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ private:
|
|||
bool mBulkChangeIncludeScripts;
|
||||
bool mBulkChangeIncludeSounds;
|
||||
bool mBulkChangeIncludeTextures;
|
||||
bool mBulkChangeIncludeSettings;
|
||||
bool mBulkChangeShareWithGroup;
|
||||
bool mBulkChangeEveryoneCopy;
|
||||
bool mBulkChangeNextOwnerModify;
|
||||
|
|
|
|||
|
|
@ -437,6 +437,19 @@ void LLFloaterEditExtDayCycle::refresh()
|
|||
void LLFloaterEditExtDayCycle::setEditDayCycle(const LLSettingsDay::ptr_t &pday)
|
||||
{
|
||||
mEditDay = pday->buildDeepCloneAndUncompress();
|
||||
|
||||
if (mEditDay->isTrackEmpty(LLSettingsDay::TRACK_WATER))
|
||||
{
|
||||
LL_WARNS("ENVDAYEDIT") << "No water frames found, generating replacement" << LL_ENDL;
|
||||
mEditDay->setWaterAtKeyframe(LLSettingsVOWater::buildDefaultWater(), .5f);
|
||||
}
|
||||
|
||||
if (mEditDay->isTrackEmpty(LLSettingsDay::TRACK_GROUND_LEVEL))
|
||||
{
|
||||
LL_WARNS("ENVDAYEDIT") << "No sky frames found, generating replacement" << LL_ENDL;
|
||||
mEditDay->setSkyAtKeyframe(LLSettingsVOSky::buildDefaultSky(), .5f, LLSettingsDay::TRACK_GROUND_LEVEL);
|
||||
}
|
||||
|
||||
updateEditEnvironment();
|
||||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT);
|
||||
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
|
||||
|
|
@ -1260,11 +1273,25 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons
|
|||
return;
|
||||
}
|
||||
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1);
|
||||
if (mInventoryItem && !isDirty())
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1);
|
||||
}
|
||||
}
|
||||
else if (where == ACTION_APPLY_REGION)
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(day, -1, -1);
|
||||
if (mInventoryItem && !isDirty())
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(day, -1, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -430,17 +430,33 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
|
|||
return;
|
||||
}
|
||||
|
||||
if (mSettings->getSettingsType() == "sky")
|
||||
if (mInventoryItem && !isDirty())
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "sky")
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsSky>(mSettings), -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "water")
|
||||
{
|
||||
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsWater>(mSettings), -1, -1);
|
||||
}
|
||||
}
|
||||
else if (where == ACTION_APPLY_REGION)
|
||||
{
|
||||
if (mSettings->getSettingsType() == "sky")
|
||||
if (mInventoryItem && !isDirty())
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "sky")
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsSky>(mSettings), -1, -1);
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "water")
|
||||
{
|
||||
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsWater>(mSettings), -1, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3602,8 +3602,8 @@ void LLPanelLandEnvironment::refreshFromSource()
|
|||
setCrossRegion(true);
|
||||
mCurrentEnvironment.reset();
|
||||
mLastParcelId = INVALID_PARCEL_ID;
|
||||
setControlsEnabled(false);
|
||||
}
|
||||
setControlsEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] =
|
|||
"Scripts",
|
||||
"Notecards",
|
||||
"Gestures",
|
||||
"Wearables"
|
||||
"Wearables",
|
||||
"Settings"
|
||||
};
|
||||
|
||||
BOOL LLFloaterPermsDefault::postBuild()
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ enum Categories
|
|||
CAT_NOTECARDS,
|
||||
CAT_GESTURES,
|
||||
CAT_WEARABLES,
|
||||
CAT_SETTINGS,
|
||||
CAT_LAST
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -586,6 +586,25 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
edit_cost->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
// Hide any properties that are not relevant to settings
|
||||
if (is_settings)
|
||||
{
|
||||
getChild<LLUICtrl>("GroupLabel")->setEnabled(false);
|
||||
getChild<LLUICtrl>("GroupLabel")->setVisible(false);
|
||||
getChild<LLUICtrl>("CheckShareWithGroup")->setEnabled(false);
|
||||
getChild<LLUICtrl>("CheckShareWithGroup")->setVisible(false);
|
||||
getChild<LLUICtrl>("AnyoneLabel")->setEnabled(false);
|
||||
getChild<LLUICtrl>("AnyoneLabel")->setVisible(false);
|
||||
getChild<LLUICtrl>("CheckEveryoneCopy")->setEnabled(false);
|
||||
getChild<LLUICtrl>("CheckEveryoneCopy")->setVisible(false);
|
||||
getChild<LLUICtrl>("CheckPurchase")->setEnabled(false);
|
||||
getChild<LLUICtrl>("CheckPurchase")->setVisible(false);
|
||||
getChild<LLUICtrl>("ComboBoxSaleType")->setEnabled(false);
|
||||
getChild<LLUICtrl>("ComboBoxSaleType")->setVisible(false);
|
||||
getChild<LLUICtrl>("Edit Cost")->setEnabled(false);
|
||||
getChild<LLUICtrl>("Edit Cost")->setVisible(false);
|
||||
}
|
||||
|
||||
// Set values.
|
||||
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
|
||||
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
|
||||
|
|
|
|||
|
|
@ -3694,6 +3694,8 @@ void LLPanelRegionEnvironment::refreshFromSource()
|
|||
|
||||
LLEnvironment::instance().requestRegion(
|
||||
[that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
|
||||
|
||||
setControlsEnabled(false);
|
||||
}
|
||||
|
||||
void LLPanelRegionEnvironment::doApply()
|
||||
|
|
|
|||
|
|
@ -7742,6 +7742,16 @@ BOOL LLSettingsBridge::renameItem(const std::string& new_name)
|
|||
return LLItemBridge::renameItem(new_name);
|
||||
}
|
||||
|
||||
BOOL LLSettingsBridge::isItemRenameable() const
|
||||
{
|
||||
LLViewerInventoryItem* item = getItem();
|
||||
if (item)
|
||||
{
|
||||
return (item->getPermissions().allowModifyBy(gAgent.getID()));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool LLSettingsBridge::canUpdateParcel() const
|
||||
{
|
||||
return LLEnvironment::instance().canAgentUpdateParcelEnvironment();
|
||||
|
|
|
|||
|
|
@ -649,6 +649,7 @@ public:
|
|||
virtual BOOL isMultiPreviewAllowed() { return FALSE; }
|
||||
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
||||
virtual BOOL renameItem(const std::string& new_name);
|
||||
virtual BOOL isItemRenameable() const;
|
||||
virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; }
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -143,9 +143,9 @@ void LLPanelSettingsWaterMainTab::refresh()
|
|||
getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setValue(mWaterSettings->getWaterFogDensity());
|
||||
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setValue(mWaterSettings->getFogMod());
|
||||
mTxtNormalMap->setValue(mWaterSettings->getNormalMapID());
|
||||
LLVector2 vect2 = mWaterSettings->getWave1Dir();
|
||||
LLVector2 vect2 = mWaterSettings->getWave1Dir() * -1.0; // Flip so that north and east are +
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE1_XY)->setValue(vect2.getValue());
|
||||
vect2 = mWaterSettings->getWave2Dir();
|
||||
vect2 = mWaterSettings->getWave2Dir() * -1.0; // Flip so that north and east are +
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setValue(vect2.getValue());
|
||||
LLVector3 vect3 = mWaterSettings->getNormalScale();
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->setValue(vect3[0]);
|
||||
|
|
@ -188,6 +188,7 @@ void LLPanelSettingsWaterMainTab::onNormalMapChanged()
|
|||
void LLPanelSettingsWaterMainTab::onLargeWaveChanged()
|
||||
{
|
||||
LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE1_XY)->getValue());
|
||||
vect *= -1.0; // Flip so that north and east are -
|
||||
LL_WARNS("LAPRAS") << "Changing Large Wave from " << mWaterSettings->getWave1Dir() << " -> " << vect << LL_ENDL;
|
||||
mWaterSettings->setWave1Dir(vect);
|
||||
setIsDirty();
|
||||
|
|
@ -196,6 +197,7 @@ void LLPanelSettingsWaterMainTab::onLargeWaveChanged()
|
|||
void LLPanelSettingsWaterMainTab::onSmallWaveChanged()
|
||||
{
|
||||
LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->getValue());
|
||||
vect *= -1.0; // Flip so that north and east are -
|
||||
LL_WARNS("LAPRAS") << "Changing Small Wave from " << mWaterSettings->getWave2Dir() << " -> " << vect << LL_ENDL;
|
||||
mWaterSettings->setWave2Dir(vect);
|
||||
setIsDirty();
|
||||
|
|
|
|||
|
|
@ -125,6 +125,12 @@ LLPanelEnvironmentInfo::LLPanelEnvironmentInfo():
|
|||
{
|
||||
}
|
||||
|
||||
LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo()
|
||||
{
|
||||
if (mChangeMonitor.connected())
|
||||
mChangeMonitor.disconnect();
|
||||
}
|
||||
|
||||
BOOL LLPanelEnvironmentInfo::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>(RDG_ENVIRONMENT_SELECT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onSwitchDefaultSelection(); });
|
||||
|
|
@ -138,6 +144,8 @@ BOOL LLPanelEnvironmentInfo::postBuild()
|
|||
|
||||
getChild<LLMultiSliderCtrl>(SLD_ALTITUDES)->setCommitCallback([this](LLUICtrl *cntrl, const LLSD &value) { onAltSliderCallback(cntrl, value); });
|
||||
|
||||
mChangeMonitor = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env) { onEnvironmentChanged(env); });
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +159,9 @@ void LLPanelEnvironmentInfo::onOpen(const LLSD& key)
|
|||
void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility)
|
||||
{
|
||||
if (new_visibility)
|
||||
{
|
||||
gIdleCallbacks.addFunction(onIdlePlay, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterSettingsPicker *picker = getSettingsPicker(false);
|
||||
|
|
@ -164,6 +174,7 @@ void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility)
|
|||
LLFloaterEditExtDayCycle *dayeditor = getEditFloater();
|
||||
if (mCommitConnection.connected())
|
||||
mCommitConnection.disconnect();
|
||||
|
||||
if (dayeditor)
|
||||
{
|
||||
if (dayeditor->isDirty())
|
||||
|
|
@ -550,7 +561,7 @@ void LLPanelEnvironmentInfo::onBtnEdit()
|
|||
(LLFloaterEditExtDayCycle::KEY_CANMOD, LLSD::Boolean(true)));
|
||||
|
||||
dayeditor->openFloater(params);
|
||||
if (mCurrentEnvironment->mDayCycle)
|
||||
if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle)
|
||||
dayeditor->setEditDayCycle(mCurrentEnvironment->mDayCycle);
|
||||
else
|
||||
dayeditor->setEditDefaultDayCycle();
|
||||
|
|
@ -562,7 +573,7 @@ void LLPanelEnvironmentInfo::onBtnSelect()
|
|||
if (picker)
|
||||
{
|
||||
picker->setSettingsFilter(LLSettingsType::ST_NONE);
|
||||
picker->setSettingsAssetId((mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null);
|
||||
picker->setSettingsAssetId((mCurrentEnvironment && mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null);
|
||||
picker->openFloater();
|
||||
picker->setFocus(TRUE);
|
||||
}
|
||||
|
|
@ -674,6 +685,17 @@ void LLPanelEnvironmentInfo::onEditCommitted(LLSettingsDay::ptr_t newday)
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelEnvironmentInfo::onEnvironmentChanged(LLEnvironment::EnvSelection_t env)
|
||||
{
|
||||
if ((isRegion() && (env == LLEnvironment::ENV_REGION)) ||
|
||||
((env == LLEnvironment::ENV_PARCEL) && (getParcelId() == LLViewerParcelMgr::instance().getAgentParcelId())))
|
||||
{
|
||||
mCurrentEnvironment.reset();
|
||||
refreshFromSource();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelEnvironmentInfo::onPickerAssetDownloaded(LLSettingsBase::ptr_t settings)
|
||||
{
|
||||
LLSettingsVODay::buildFromOtherSetting(settings, [this](LLSettingsDay::ptr_t pday)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class LLPanelEnvironmentInfo : public LLPanel
|
|||
{
|
||||
public:
|
||||
LLPanelEnvironmentInfo();
|
||||
virtual ~LLPanelEnvironmentInfo();
|
||||
|
||||
virtual BOOL postBuild() override;
|
||||
virtual void onOpen(const LLSD& key) override;
|
||||
|
|
@ -137,6 +138,8 @@ protected:
|
|||
|
||||
LLEnvironment::EnvironmentInfo::ptr_t mCurrentEnvironment;
|
||||
|
||||
void onEnvironmentChanged(LLEnvironment::EnvSelection_t env);
|
||||
|
||||
class AltitudeData
|
||||
{
|
||||
public:
|
||||
|
|
@ -162,6 +165,7 @@ private:
|
|||
typedef boost::signals2::connection connection_t;
|
||||
|
||||
connection_t mCommitConnection;
|
||||
connection_t mChangeMonitor;
|
||||
LLHandle<LLFloater> mSettingsFloater;
|
||||
LLHandle<LLFloater> mEditFloater;
|
||||
S32 mDirtyFlag;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
#include "llagent.h"
|
||||
#include "llassettype.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "llviewerregion.h"
|
||||
|
|
@ -95,7 +96,8 @@ namespace
|
|||
void LLSettingsVOBase::createNewInventoryItem(LLSettingsType::type_e stype, const LLUUID &parent_id, inventory_result_fn callback)
|
||||
{
|
||||
LLTransactionID tid;
|
||||
U32 nextOwnerPerm = LLPermissions::DEFAULT.getMaskNextOwner();
|
||||
U32 nextOwnerPerm = LLFloaterPerms::getNextOwnerPerms("Settings");
|
||||
nextOwnerPerm |= PERM_COPY;
|
||||
|
||||
if (!LLEnvironment::instance().isInventoryEnabled())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
|
|||
LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
|
||||
|
||||
// Check for ability to change values.
|
||||
if (is_obj_modify && can_agent_sell
|
||||
if (is_obj_modify && can_agent_sell
|
||||
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
|
||||
{
|
||||
getChildView("CheckPurchase")->setEnabled(is_complete);
|
||||
|
|
@ -681,6 +681,25 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
|
|||
edit_cost->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
// Hide any properties that are not relevant to settings
|
||||
if (is_settings)
|
||||
{
|
||||
getChild<LLUICtrl>("GroupLabel")->setEnabled(false);
|
||||
getChild<LLUICtrl>("GroupLabel")->setVisible(false);
|
||||
getChild<LLUICtrl>("CheckShareWithGroup")->setEnabled(false);
|
||||
getChild<LLUICtrl>("CheckShareWithGroup")->setVisible(false);
|
||||
getChild<LLUICtrl>("AnyoneLabel")->setEnabled(false);
|
||||
getChild<LLUICtrl>("AnyoneLabel")->setVisible(false);
|
||||
getChild<LLUICtrl>("CheckEveryoneCopy")->setEnabled(false);
|
||||
getChild<LLUICtrl>("CheckEveryoneCopy")->setVisible(false);
|
||||
getChild<LLUICtrl>("CheckPurchase")->setEnabled(false);
|
||||
getChild<LLUICtrl>("CheckPurchase")->setVisible(false);
|
||||
getChild<LLUICtrl>("ComboBoxSaleType")->setEnabled(false);
|
||||
getChild<LLUICtrl>("ComboBoxSaleType")->setVisible(false);
|
||||
getChild<LLUICtrl>("Edit Cost")->setEnabled(false);
|
||||
getChild<LLUICtrl>("Edit Cost")->setVisible(false);
|
||||
}
|
||||
|
||||
// Set values.
|
||||
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
|
||||
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
|
||||
|
|
|
|||
|
|
@ -1368,6 +1368,13 @@ const std::string& LLViewerParcelMgr::getAgentParcelName() const
|
|||
}
|
||||
|
||||
|
||||
const S32 LLViewerParcelMgr::getAgentParcelId() const
|
||||
{
|
||||
if (mAgentParcel)
|
||||
return mAgentParcel->getLocalID();
|
||||
return INVALID_PARCEL_ID;
|
||||
}
|
||||
|
||||
void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region)
|
||||
{
|
||||
if(!parcel)
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ public:
|
|||
|
||||
// accessors for mAgentParcel
|
||||
const std::string& getAgentParcelName() const;
|
||||
const S32 getAgentParcelId() const;
|
||||
|
||||
// Create a landmark at the "appropriate" location for the
|
||||
// currently selected parcel.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
name="floaterbulkperms"
|
||||
help_topic="floaterbulkperms"
|
||||
title="Adjust Content Permissions"
|
||||
width="300">
|
||||
width="350">
|
||||
<floater.string
|
||||
name="nothing_to_modify_text">
|
||||
Selection contains no editable contents.
|
||||
|
|
@ -156,13 +156,26 @@
|
|||
name="icon_texture"
|
||||
tool_tip="Textures"
|
||||
left_pad="2" />
|
||||
|
||||
<check_box
|
||||
control_name="BulkChangeIncludeSettings"
|
||||
height="16"
|
||||
name="check_settings"
|
||||
left="175"
|
||||
top="25"
|
||||
width="16" />
|
||||
<icon
|
||||
height="16"
|
||||
image_name="Inv_Settings"
|
||||
mouse_opaque="true"
|
||||
name="icon_setting"
|
||||
tool_tip="Environment settings"
|
||||
left_pad="2" />
|
||||
<button
|
||||
height="23"
|
||||
layout="topleft"
|
||||
name="check_all"
|
||||
label="√ All"
|
||||
left="180"
|
||||
left="230"
|
||||
top="26"
|
||||
width="115">
|
||||
<button.commit_callback
|
||||
|
|
|
|||
|
|
@ -488,6 +488,67 @@
|
|||
left_pad="0"
|
||||
top_delta="0"
|
||||
width="100" />
|
||||
<text
|
||||
name="label_13"
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
tool_tip="Set default permissions for when Environment settings are created"
|
||||
width="100">
|
||||
Settings
|
||||
</text>
|
||||
<icon
|
||||
follows="left|top"
|
||||
height="16"
|
||||
image_name="Inv_Settings"
|
||||
layout="topleft"
|
||||
left_pad="2"
|
||||
width="18"/>
|
||||
<check_box
|
||||
height="16"
|
||||
layout="topleft"
|
||||
name="env_settings_c"
|
||||
left_pad="45"
|
||||
top_delta="0"
|
||||
value="true"
|
||||
enabled="false"
|
||||
width="100">
|
||||
</check_box>
|
||||
<check_box
|
||||
control_name="SettingsNextOwnerModify"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
name="env_settings_m"
|
||||
left_pad="0"
|
||||
top_delta="0"
|
||||
width="100" />
|
||||
<check_box
|
||||
control_name="SettingsNextOwnerTransfer"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
name="env_settings_t"
|
||||
left_pad="0"
|
||||
top_delta="0"
|
||||
width="100" />
|
||||
<check_box
|
||||
enabled="false"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
name="env_settings_s"
|
||||
left_pad="0"
|
||||
top_delta="0"
|
||||
width="120" />
|
||||
<check_box
|
||||
enabled="false"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
name="env_settings_e"
|
||||
left_pad="0"
|
||||
top_delta="0"
|
||||
width="100" />
|
||||
</panel>
|
||||
<button
|
||||
height="20"
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
<radio_group
|
||||
height="90"
|
||||
layout="topleft"
|
||||
top_pad="5"
|
||||
top_pad="8"
|
||||
left_delta="10"
|
||||
name="rdg_environment_select">
|
||||
<radio_item
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
height="12"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
top_pad="10"
|
||||
top_pad="14"
|
||||
width="200">
|
||||
Day Length (hours)
|
||||
</text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue