SL-9746 [EEP] Local Texture options should work with EEP
parent
c1d1935fcc
commit
6bb496625f
|
|
@ -34,6 +34,7 @@
|
|||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llloadingindicator.h"
|
||||
#include "lllocalbitmaps.h"
|
||||
#include "llmultisliderctrl.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
|
@ -346,7 +347,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
|
|||
getChild<LLButton>(track_tabs[idx + 1], true)->setLabel(formatted_label.getString());
|
||||
}
|
||||
|
||||
for (int i = 2; i < LLSettingsDay::TRACK_MAX; i++) //skies #2 through #4
|
||||
for (U32 i = 2; i < LLSettingsDay::TRACK_MAX; i++) //skies #2 through #4
|
||||
{
|
||||
getChild<LLButton>(track_tabs[i])->setEnabled(extended_env);
|
||||
}
|
||||
|
|
@ -513,6 +514,81 @@ void LLFloaterEditExtDayCycle::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
|||
return;
|
||||
}
|
||||
|
||||
// brute-force local texture scan
|
||||
for (U32 i = 0; i <= LLSettingsDay::TRACK_MAX; i++)
|
||||
{
|
||||
LLSettingsDay::CycleTrack_t &day_track = dayclone->getCycleTrack(i);
|
||||
|
||||
LLSettingsDay::CycleTrack_t::iterator iter = day_track.begin();
|
||||
LLSettingsDay::CycleTrack_t::iterator end = day_track.end();
|
||||
S32 frame_num = 0;
|
||||
|
||||
while (iter != end)
|
||||
{
|
||||
frame_num++;
|
||||
std::string desc;
|
||||
bool is_local = false; // because getString can be empty
|
||||
if (i == LLSettingsDay::TRACK_WATER)
|
||||
{
|
||||
LLSettingsWater::ptr_t water = std::static_pointer_cast<LLSettingsWater>(iter->second);
|
||||
if (water)
|
||||
{
|
||||
// LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr
|
||||
if (LLLocalBitmapMgr::isLocal(water->getNormalMapID()))
|
||||
{
|
||||
desc = LLTrans::getString("EnvironmentNormalMap");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(water->getTransparentTextureID()))
|
||||
{
|
||||
desc = LLTrans::getString("EnvironmentTransparent");
|
||||
is_local = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
|
||||
if (sky)
|
||||
{
|
||||
if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId()))
|
||||
{
|
||||
desc = LLTrans::getString("EnvironmentSun");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(sky->getMoonTextureId()))
|
||||
{
|
||||
desc = LLTrans::getString("EnvironmentMoon");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(sky->getCloudNoiseTextureId()))
|
||||
{
|
||||
desc = LLTrans::getString("EnvironmentCloudNoise");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(sky->getBloomTextureId()))
|
||||
{
|
||||
desc = LLTrans::getString("EnvironmentBloom");
|
||||
is_local = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_local)
|
||||
{
|
||||
LLSD args;
|
||||
LLButton* button = getChild<LLButton>(track_tabs[i], true);
|
||||
args["TRACK"] = button->getCurrentLabel();
|
||||
args["FRAME"] = iter->first * 100; // %
|
||||
args["FIELD"] = desc;
|
||||
args["FRAMENO"] = frame_num;
|
||||
LLNotificationsUtil::add("WLLocalTextureDayBlock", args);
|
||||
return;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctrl_action == ACTION_SAVE)
|
||||
{
|
||||
doApplyUpdateInventory(dayclone);
|
||||
|
|
@ -817,7 +893,7 @@ void LLFloaterEditExtDayCycle::selectTrack(U32 track_index, bool force )
|
|||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < LLSettingsDay::TRACK_MAX; i++) // use max value
|
||||
for (U32 i = 0; i < LLSettingsDay::TRACK_MAX; i++) // use max value
|
||||
{
|
||||
getChild<LLButton>(track_tabs[i], true)->setToggleState(i == mCurrentTrack);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "llsliderctrl.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llfilepicker.h"
|
||||
#include "lllocalbitmaps.h"
|
||||
#include "llsettingspicker.h"
|
||||
#include "llviewermenufile.h" // LLFilePickerReplyThread
|
||||
#include "llviewerparcelmgr.h"
|
||||
|
|
@ -51,6 +52,7 @@
|
|||
#include "llenvironment.h"
|
||||
#include "llagent.h"
|
||||
#include "llparcel.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
#include "llsettingsvo.h"
|
||||
#include "llinventorymodel.h"
|
||||
|
|
@ -340,6 +342,62 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
|||
{
|
||||
std::string ctrl_action = ctrl->getName();
|
||||
|
||||
std::string local_desc;
|
||||
bool is_local = false; // because getString can be empty
|
||||
if (mSettings->getSettingsType() == "water")
|
||||
{
|
||||
LLSettingsWater::ptr_t water = std::static_pointer_cast<LLSettingsWater>(mSettings);
|
||||
if (water)
|
||||
{
|
||||
// LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr
|
||||
if (LLLocalBitmapMgr::isLocal(water->getNormalMapID()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentNormalMap");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(water->getTransparentTextureID()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentTransparent");
|
||||
is_local = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mSettings->getSettingsType() == "sky")
|
||||
{
|
||||
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(mSettings);
|
||||
if (sky)
|
||||
{
|
||||
if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentSun");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(sky->getMoonTextureId()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentMoon");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(sky->getCloudNoiseTextureId()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentCloudNoise");
|
||||
is_local = true;
|
||||
}
|
||||
else if (LLLocalBitmapMgr::isLocal(sky->getBloomTextureId()))
|
||||
{
|
||||
local_desc = LLTrans::getString("EnvironmentBloom");
|
||||
is_local = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_local)
|
||||
{
|
||||
LLSD args;
|
||||
args["FIELD"] = local_desc;
|
||||
LLNotificationsUtil::add("WLLocalTextureFixedBlock", args);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctrl_action == ACTION_SAVE)
|
||||
{
|
||||
doApplyUpdateInventory();
|
||||
|
|
|
|||
|
|
@ -976,6 +976,19 @@ LLUUID LLLocalBitmapMgr::getWorldID(LLUUID tracking_id)
|
|||
return world_id;
|
||||
}
|
||||
|
||||
bool LLLocalBitmapMgr::isLocal(const LLUUID world_id)
|
||||
{
|
||||
for (local_list_iter iter = sBitmapList.begin(); iter != sBitmapList.end(); iter++)
|
||||
{
|
||||
LLLocalBitmap* unit = *iter;
|
||||
if (unit->getWorldID() == world_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string LLLocalBitmapMgr::getFilename(LLUUID tracking_id)
|
||||
{
|
||||
std::string filename = "";
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ class LLLocalBitmapMgr
|
|||
static bool checkTextureDimensions(std::string filename);
|
||||
|
||||
static LLUUID getWorldID(LLUUID tracking_id);
|
||||
static bool isLocal(const LLUUID world_id);
|
||||
static std::string getFilename(LLUUID tracking_id);
|
||||
|
||||
static void feedScrollList(LLScrollListCtrl* ctrl);
|
||||
|
|
|
|||
|
|
@ -258,7 +258,6 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild()
|
|||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); });
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowLocalTexture(FALSE);
|
||||
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); });
|
||||
|
|
@ -348,7 +347,8 @@ void LLPanelSettingsSkyCloudTab::onCloudScrollChanged()
|
|||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudMapChanged()
|
||||
{
|
||||
mSkySettings->setCloudNoiseTextureId(getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->getValue().asUUID());
|
||||
LLTextureCtrl* ctrl = getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP);
|
||||
mSkySettings->setCloudNoiseTextureId(ctrl->getValue().asUUID());
|
||||
setIsDirty();
|
||||
}
|
||||
|
||||
|
|
@ -391,13 +391,11 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild()
|
|||
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE);
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowLocalTexture(FALSE);
|
||||
getChild<LLUICtrl>(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); });
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(TRUE);
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowLocalTexture(FALSE);
|
||||
getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonScaleChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonBrightnessChanged(); });
|
||||
|
||||
|
|
|
|||
|
|
@ -6071,6 +6071,22 @@ This day cycle file references a missing sky file: [SKY].
|
|||
Sorry, the settings couldn't be applied to the region. Reason: [FAIL_REASON]
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="WLLocalTextureDayBlock"
|
||||
type="alertmodal">
|
||||
A Local texture is in use on track [TRACK], frame #[FRAMENO] ([FRAME]%) in field [FIELD].
|
||||
Settings may not be saved using local textures.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="WLLocalTextureFixedBlock"
|
||||
type="alertmodal">
|
||||
A local texture is in use in field [FIELD].
|
||||
Settings may not be saved using local textures.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
functor="GenericAcknowledge"
|
||||
icon="alertmodal.tga"
|
||||
|
|
|
|||
|
|
@ -2782,6 +2782,13 @@ If you continue to receive this message, please contact Second Life support for
|
|||
<string name="RegionSettings">Region Settings</string>
|
||||
<string name="NoEnvironmentSettings">This Region does not support environmental settings.</string>
|
||||
|
||||
<string name="EnvironmentSun">Sun</string>
|
||||
<string name="EnvironmentMoon">Moon</string>
|
||||
<string name="EnvironmentBloom">Bloom</string>
|
||||
<string name="EnvironmentCloudNoise">Cloud Noise</string>
|
||||
<string name="EnvironmentNormalMap">Normal Map</string>
|
||||
<string name="EnvironmentTransparent">Transparent</string>
|
||||
|
||||
<!-- panel classified -->
|
||||
<string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string>
|
||||
<string name="ClassifiedUpdateAfterPublish">(will update after publish)</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue