Merge and disable new sky render.
commit
4d4a7dfb9f
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#pragma optimize("", off)
|
||||
|
||||
//=========================================================================
|
||||
namespace
|
||||
{
|
||||
|
|
@ -58,14 +60,16 @@ const F64Seconds LLSettingsBlender::DEFAULT_THRESHOLD(0.01);
|
|||
LLSettingsBase::LLSettingsBase():
|
||||
mSettings(LLSD::emptyMap()),
|
||||
mDirty(true),
|
||||
mAssetID()
|
||||
mAssetID(),
|
||||
mBlendedFactor(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
LLSettingsBase::LLSettingsBase(const LLSD setting) :
|
||||
mSettings(setting),
|
||||
mDirty(true),
|
||||
mAssetID()
|
||||
mAssetID(),
|
||||
mBlendedFactor(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -228,9 +232,12 @@ LLSD LLSettingsBase::interpolateSDMap(const LLSD &settings, const LLSD &other, F
|
|||
|
||||
break;
|
||||
|
||||
case LLSD::TypeUUID:
|
||||
newSettings[key_name] = value.asUUID();
|
||||
break;
|
||||
|
||||
// case LLSD::TypeBoolean:
|
||||
// case LLSD::TypeString:
|
||||
// case LLSD::TypeUUID:
|
||||
// case LLSD::TypeURI:
|
||||
// case LLSD::TypeBinary:
|
||||
// case LLSD::TypeDate:
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ public:
|
|||
inline void replaceSettings(LLSD settings)
|
||||
{
|
||||
mSettings = settings;
|
||||
mBlendedFactor = 0.0;
|
||||
setDirtyFlag(true);
|
||||
}
|
||||
|
||||
|
|
@ -146,6 +147,11 @@ public:
|
|||
setValue(name, value.getValue());
|
||||
}
|
||||
|
||||
inline F64 getBlendFactor() const
|
||||
{
|
||||
return mBlendedFactor;
|
||||
}
|
||||
|
||||
// Note this method is marked const but may modify the settings object.
|
||||
// (note the internal const cast). This is so that it may be called without
|
||||
// special consideration from getters.
|
||||
|
|
@ -237,11 +243,19 @@ protected:
|
|||
|
||||
LLSD cloneSettings() const;
|
||||
|
||||
inline void setBlendFactor(F64 blendfactor)
|
||||
{
|
||||
mBlendedFactor = blendfactor;
|
||||
}
|
||||
|
||||
void markDirty() { mDirty = true; }
|
||||
|
||||
private:
|
||||
bool mDirty;
|
||||
|
||||
LLSD combineSDMaps(const LLSD &first, const LLSD &other) const;
|
||||
|
||||
F64 mBlendedFactor;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ void LLSettingsDay::updateSettings()
|
|||
//=========================================================================
|
||||
LLSettingsDay::KeyframeList_t LLSettingsDay::getTrackKeyframes(S32 trackno)
|
||||
{
|
||||
if ((trackno < 1) || (trackno >= TRACK_MAX))
|
||||
if ((trackno < 0) || (trackno >= TRACK_MAX))
|
||||
{
|
||||
LL_WARNS("DAYCYCLE") << "Attempt get track (#" << trackno << ") out of range!" << LL_ENDL;
|
||||
return KeyframeList_t();
|
||||
|
|
@ -508,6 +508,17 @@ void LLSettingsDay::setWaterAtKeyframe(const LLSettingsWaterPtr_t &water, F32 ke
|
|||
setDirtyFlag(true);
|
||||
}
|
||||
|
||||
const LLSettingsWaterPtr_t LLSettingsDay::getWaterAtKeyframe(F32 keyframe)
|
||||
{
|
||||
// todo: better way to identify keyframes?
|
||||
CycleTrack_t::iterator iter = mDayTracks[TRACK_WATER].find(keyframe);
|
||||
if (iter != mDayTracks[TRACK_WATER].end())
|
||||
{
|
||||
return std::dynamic_pointer_cast<LLSettingsWater>(iter->second);
|
||||
}
|
||||
|
||||
return LLSettingsWaterPtr_t(NULL);
|
||||
}
|
||||
|
||||
void LLSettingsDay::setSkyAtKeyframe(const LLSettingsSkyPtr_t &sky, F32 keyframe, S32 track)
|
||||
{
|
||||
|
|
@ -521,6 +532,42 @@ void LLSettingsDay::setSkyAtKeyframe(const LLSettingsSkyPtr_t &sky, F32 keyframe
|
|||
setDirtyFlag(true);
|
||||
}
|
||||
|
||||
const LLSettingsSkyPtr_t LLSettingsDay::getSkyAtKeyframe(F32 keyframe, S32 track)
|
||||
{
|
||||
if ((track < 1) || (track >= TRACK_MAX))
|
||||
{
|
||||
LL_WARNS("DAYCYCLE") << "Attempt to set sky track (#" << track << ") out of range!" << LL_ENDL;
|
||||
return LLSettingsSkyPtr_t(NULL);
|
||||
}
|
||||
|
||||
// todo: better way to identify keyframes?
|
||||
CycleTrack_t::iterator iter = mDayTracks[track].find(keyframe);
|
||||
if (iter != mDayTracks[track].end())
|
||||
{
|
||||
return std::dynamic_pointer_cast<LLSettingsSky>(iter->second);
|
||||
}
|
||||
|
||||
return LLSettingsSkyPtr_t(NULL);
|
||||
}
|
||||
|
||||
const LLSettingsBase::ptr_t LLSettingsDay::getSettingsAtKeyframe(F32 keyframe, S32 track)
|
||||
{
|
||||
if ((track < 0) || (track >= TRACK_MAX))
|
||||
{
|
||||
LL_WARNS("DAYCYCLE") << "Attempt to set sky track (#" << track << ") out of range!" << LL_ENDL;
|
||||
return LLSettingsBase::ptr_t(NULL);
|
||||
}
|
||||
|
||||
// todo: better way to identify keyframes?
|
||||
CycleTrack_t::iterator iter = mDayTracks[track].find(keyframe);
|
||||
if (iter != mDayTracks[track].end())
|
||||
{
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
return LLSettingsSkyPtr_t(NULL);
|
||||
}
|
||||
|
||||
LLSettingsDay::TrackBound_t LLSettingsDay::getBoundingEntries(LLSettingsDay::CycleTrack_t &track, F32 keyframe)
|
||||
{
|
||||
return TrackBound_t(get_wrapping_atbefore(track, keyframe), get_wrapping_atafter(track, keyframe));
|
||||
|
|
|
|||
|
|
@ -88,7 +88,10 @@ public:
|
|||
KeyframeList_t getTrackKeyframes(S32 track);
|
||||
|
||||
void setWaterAtKeyframe(const LLSettingsWaterPtr_t &water, F32 keyframe);
|
||||
const LLSettingsWaterPtr_t getWaterAtKeyframe(F32 keyframe);
|
||||
void setSkyAtKeyframe(const LLSettingsSkyPtr_t &sky, F32 keyframe, S32 track);
|
||||
const LLSettingsSkyPtr_t getSkyAtKeyframe(F32 keyframe, S32 track);
|
||||
const LLSettingsBase::ptr_t getSettingsAtKeyframe(F32 keyframe, S32 track);
|
||||
//---------------------------------------------------------------------
|
||||
void startDayCycle();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
#include "llfasttimer.h"
|
||||
#include "v3colorutil.h"
|
||||
|
||||
#pragma optimize("", off)
|
||||
|
||||
//=========================================================================
|
||||
namespace
|
||||
{
|
||||
|
|
@ -106,6 +108,10 @@ const std::string LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR("exp_s
|
|||
const std::string LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM("linear_term");
|
||||
const std::string LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM("constant_term");
|
||||
|
||||
const LLUUID LLSettingsSky::DEFAULT_SUN_ID("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver
|
||||
const LLUUID LLSettingsSky::DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver
|
||||
const LLUUID LLSettingsSky::DEFAULT_CLOUD_ID("1dc1368f-e8fe-f02d-a08d-9d9f11c1af6b");
|
||||
|
||||
const std::string LLSettingsSky::SETTING_LEGACY_HAZE("legacy_haze");
|
||||
|
||||
namespace
|
||||
|
|
@ -352,12 +358,18 @@ bool validateMieLayers(LLSD &value)
|
|||
|
||||
//=========================================================================
|
||||
LLSettingsSky::LLSettingsSky(const LLSD &data) :
|
||||
LLSettingsBase(data)
|
||||
LLSettingsBase(data),
|
||||
mNextSunTextureId(),
|
||||
mNextMoonTextureId(),
|
||||
mNextCloudTextureId()
|
||||
{
|
||||
}
|
||||
|
||||
LLSettingsSky::LLSettingsSky():
|
||||
LLSettingsBase()
|
||||
LLSettingsBase(),
|
||||
mNextSunTextureId(),
|
||||
mNextMoonTextureId(),
|
||||
mNextCloudTextureId()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -367,6 +379,10 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
|
|||
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf);
|
||||
|
||||
replaceSettings(blenddata);
|
||||
setBlendFactor(blendf);
|
||||
mNextSunTextureId = other->getSunTextureId();
|
||||
mNextMoonTextureId = other->getMoonTextureId();
|
||||
mNextCloudTextureId = other->getCloudNoiseTextureId();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -396,6 +412,21 @@ LLSettingsSky::azimalt_t LLSettingsSky::getSunRotationAzAl() const
|
|||
return res;
|
||||
}
|
||||
|
||||
LLSettingsSky::stringset_t LLSettingsSky::getSkipInterpolateKeys() const
|
||||
{
|
||||
static stringset_t skipSet;
|
||||
|
||||
if (skipSet.empty())
|
||||
{
|
||||
skipSet.insert(SETTING_RAYLEIGH_CONFIG);
|
||||
skipSet.insert(SETTING_MIE_CONFIG);
|
||||
skipSet.insert(SETTING_ABSORPTION_CONFIG);
|
||||
skipSet.insert(SETTING_MIE_ANISOTROPY_FACTOR);
|
||||
}
|
||||
|
||||
return skipSet;
|
||||
}
|
||||
|
||||
LLSettingsSky::stringset_t LLSettingsSky::getSlerpKeys() const
|
||||
{
|
||||
static stringset_t slepSet;
|
||||
|
|
@ -596,17 +627,17 @@ LLSD LLSettingsSky::defaults()
|
|||
dfltsetting[SETTING_SUN_ROTATION] = sunquat.getValue();
|
||||
|
||||
dfltsetting[SETTING_BLOOM_TEXTUREID] = IMG_BLOOM1;
|
||||
dfltsetting[SETTING_CLOUD_TEXTUREID] = LLUUID::null;
|
||||
dfltsetting[SETTING_MOON_TEXTUREID] = IMG_MOON; // gMoonTextureID; // These two are returned by the login... wow!
|
||||
dfltsetting[SETTING_SUN_TEXTUREID] = IMG_SUN; // gSunTextureID;
|
||||
dfltsetting[SETTING_CLOUD_TEXTUREID] = DEFAULT_CLOUD_ID;
|
||||
dfltsetting[SETTING_MOON_TEXTUREID] = DEFAULT_MOON_ID; // gMoonTextureID; // These two are returned by the login... wow!
|
||||
dfltsetting[SETTING_SUN_TEXTUREID] = DEFAULT_SUN_ID; // gSunTextureID;
|
||||
|
||||
dfltsetting[SETTING_TYPE] = "sky";
|
||||
|
||||
// defaults are for earth...
|
||||
dfltsetting[SETTING_PLANET_RADIUS] = 6360.0f;
|
||||
dfltsetting[SETTING_SKY_BOTTOM_RADIUS] = 6360.0f;
|
||||
dfltsetting[SETTING_SKY_TOP_RADIUS] = 6420.0f;
|
||||
dfltsetting[SETTING_SUN_ARC_RADIANS] = 0.00935f / 2.0f;
|
||||
dfltsetting[SETTING_PLANET_RADIUS] = 6360.0f;
|
||||
dfltsetting[SETTING_SKY_BOTTOM_RADIUS] = 6360.0f;
|
||||
dfltsetting[SETTING_SKY_TOP_RADIUS] = 6420.0f;
|
||||
dfltsetting[SETTING_SUN_ARC_RADIANS] = 0.00935f / 2.0f;
|
||||
dfltsetting[SETTING_MIE_ANISOTROPY_FACTOR] = 0.8f;
|
||||
|
||||
dfltsetting[SETTING_RAYLEIGH_CONFIG] = rayleighConfigDefault();
|
||||
|
|
@ -871,6 +902,41 @@ F32 LLSettingsSky::getDistanceMultiplier() const
|
|||
return 0.8f;
|
||||
}
|
||||
|
||||
void LLSettingsSky::setBlueDensity(const LLColor3 &val)
|
||||
{
|
||||
mSettings[SETTING_LEGACY_HAZE][SETTING_BLUE_DENSITY] = val.getValue();
|
||||
markDirty();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setBlueHorizon(const LLColor3 &val)
|
||||
{
|
||||
mSettings[SETTING_LEGACY_HAZE][SETTING_BLUE_HORIZON] = val.getValue();
|
||||
markDirty();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setDensityMultiplier(F32 val)
|
||||
{
|
||||
mSettings[SETTING_LEGACY_HAZE][SETTING_DENSITY_MULTIPLIER] = val;
|
||||
markDirty();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setDistanceMultiplier(F32 val)
|
||||
{
|
||||
mSettings[SETTING_LEGACY_HAZE][SETTING_DISTANCE_MULTIPLIER] = val;
|
||||
markDirty();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setHazeDensity(F32 val)
|
||||
{
|
||||
mSettings[SETTING_LEGACY_HAZE][SETTING_HAZE_DENSITY] = val;
|
||||
markDirty();
|
||||
}
|
||||
void LLSettingsSky::setHazeHorizon(F32 val)
|
||||
{
|
||||
mSettings[SETTING_LEGACY_HAZE][SETTING_HAZE_HORIZON] = val;
|
||||
markDirty();
|
||||
}
|
||||
|
||||
// Sunlight attenuation effect (hue and brightness) due to atmosphere
|
||||
// this is used later for sunlight modulation at various altitudes
|
||||
LLColor3 LLSettingsSky::getLightAttenuation(F32 distance) const
|
||||
|
|
@ -912,37 +978,37 @@ void LLSettingsSky::calculateLightSettings()
|
|||
// Initialize temp variables
|
||||
LLColor3 sunlight = getSunlightColor();
|
||||
LLColor3 ambient = getAmbientColor();
|
||||
F32 cloud_shadow = getCloudShadow();
|
||||
LLVector3 lightnorm = getLightDirection();
|
||||
F32 cloud_shadow = getCloudShadow();
|
||||
LLVector3 lightnorm = getLightDirection();
|
||||
|
||||
// Sunlight attenuation effect (hue and brightness) due to atmosphere
|
||||
// this is used later for sunlight modulation at various altitudes
|
||||
// Sunlight attenuation effect (hue and brightness) due to atmosphere
|
||||
// this is used later for sunlight modulation at various altitudes
|
||||
F32 max_y = getMaxY();
|
||||
LLColor3 light_atten = getLightAttenuation(max_y);
|
||||
LLColor3 light_transmittance = getLightTransmittance();
|
||||
|
||||
// Compute sunlight from P & lightnorm (for long rays like sky)
|
||||
/// USE only lightnorm.
|
||||
// temp2[1] = llmax(0.f, llmax(0.f, Pn[1]) * 1.0f + lightnorm[1] );
|
||||
// Compute sunlight from P & lightnorm (for long rays like sky)
|
||||
/// USE only lightnorm.
|
||||
// temp2[1] = llmax(0.f, llmax(0.f, Pn[1]) * 1.0f + lightnorm[1] );
|
||||
|
||||
// and vary_sunlight will work properly with moon light
|
||||
F32 lighty = lightnorm[1];
|
||||
if (lighty < NIGHTTIME_ELEVATION_COS)
|
||||
{
|
||||
lighty = -lighty;
|
||||
}
|
||||
// and vary_sunlight will work properly with moon light
|
||||
F32 lighty = lightnorm[1];
|
||||
if (lighty < NIGHTTIME_ELEVATION_COS)
|
||||
{
|
||||
lighty = -lighty;
|
||||
}
|
||||
|
||||
lighty = llmax(0.f, lighty);
|
||||
if(lighty > 0.f)
|
||||
{
|
||||
{
|
||||
lighty = 1.f / lighty;
|
||||
}
|
||||
}
|
||||
componentMultBy(sunlight, componentExp((light_atten * -1.f) * lighty));
|
||||
|
||||
//increase ambient when there are more clouds
|
||||
LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow * 0.5f;
|
||||
//increase ambient when there are more clouds
|
||||
LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow * 0.5f;
|
||||
|
||||
//brightness of surface both sunlight and ambient
|
||||
//brightness of surface both sunlight and ambient
|
||||
mSunDiffuse = gammaCorrect(componentMult(sunlight, light_transmittance));
|
||||
mSunAmbient = gammaCorrect(componentMult(tmpAmbient, light_transmittance) * 0.5);
|
||||
|
||||
|
|
@ -954,6 +1020,7 @@ void LLSettingsSky::calculateLightSettings()
|
|||
mFadeColor.setAlpha(0);
|
||||
}
|
||||
|
||||
|
||||
//=========================================================================
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,10 @@ public:
|
|||
static const std::string SETTING_DENSITY_PROFILE_CONSTANT_TERM;
|
||||
|
||||
|
||||
static const LLUUID DEFAULT_SUN_ID;
|
||||
static const LLUUID DEFAULT_MOON_ID;
|
||||
static const LLUUID DEFAULT_CLOUD_ID;
|
||||
|
||||
static const std::string SETTING_LEGACY_HAZE;
|
||||
|
||||
typedef std::shared_ptr<LLSettingsSky> ptr_t;
|
||||
|
|
@ -95,7 +99,6 @@ public:
|
|||
virtual std::string getSettingType() const override { return std::string("sky"); }
|
||||
virtual LLSettingsType::type_e getSettingTypeValue() const override { return LLSettingsType::ST_SKY; }
|
||||
|
||||
|
||||
// Settings status
|
||||
virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) override;
|
||||
|
||||
|
|
@ -172,6 +175,11 @@ public:
|
|||
return mSettings[SETTING_CLOUD_TEXTUREID].asUUID();
|
||||
}
|
||||
|
||||
void setCloudNoiseTextureId(const LLUUID &id)
|
||||
{
|
||||
setValue(SETTING_CLOUD_TEXTUREID, id);
|
||||
}
|
||||
|
||||
LLColor3 getCloudPosDensity1() const
|
||||
{
|
||||
return LLColor3(mSettings[SETTING_CLOUD_POS_DENSITY1]);
|
||||
|
|
@ -283,6 +291,11 @@ public:
|
|||
return mSettings[SETTING_MAX_Y].asReal();
|
||||
}
|
||||
|
||||
void setMaxY(F32 val)
|
||||
{
|
||||
setValue(SETTING_MAX_Y, val);
|
||||
}
|
||||
|
||||
LLQuaternion getMoonRotation() const
|
||||
{
|
||||
return LLQuaternion(mSettings[SETTING_MOON_ROTATION]);
|
||||
|
|
@ -307,6 +320,11 @@ public:
|
|||
return mSettings[SETTING_MOON_TEXTUREID].asUUID();
|
||||
}
|
||||
|
||||
void setMoonTextureId(LLUUID id)
|
||||
{
|
||||
setValue(SETTING_MOON_TEXTUREID, id);
|
||||
}
|
||||
|
||||
F32 getStarBrightness() const
|
||||
{
|
||||
return mSettings[SETTING_STAR_BRIGHTNESS].asReal();
|
||||
|
|
@ -351,6 +369,11 @@ public:
|
|||
return mSettings[SETTING_SUN_TEXTUREID].asUUID();
|
||||
}
|
||||
|
||||
void setSunTextureId(LLUUID id)
|
||||
{
|
||||
setValue(SETTING_SUN_TEXTUREID, id);
|
||||
}
|
||||
|
||||
// Internal/calculated settings
|
||||
LLVector3 getLightDirection() const
|
||||
{
|
||||
|
|
@ -412,6 +435,27 @@ public:
|
|||
return mTotalAmbient;
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
// transient properties used in animations.
|
||||
LLUUID getNextSunTextureId() const
|
||||
{
|
||||
return mNextSunTextureId;
|
||||
}
|
||||
|
||||
LLUUID getNextMoonTextureId() const
|
||||
{
|
||||
return mNextMoonTextureId;
|
||||
}
|
||||
|
||||
LLUUID getNextCloudNoiseTextureId() const
|
||||
{
|
||||
return mNextCloudTextureId;
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
virtual void loadTextures() { };
|
||||
|
||||
//=====================================================================
|
||||
virtual validation_list_t getValidationList() const override;
|
||||
static validation_list_t validationList();
|
||||
|
||||
|
|
@ -430,6 +474,13 @@ public:
|
|||
F32 getDensityMultiplier() const;
|
||||
F32 getDistanceMultiplier() const;
|
||||
|
||||
void setBlueDensity(const LLColor3 &val);
|
||||
void setBlueHorizon(const LLColor3 &val);
|
||||
void setDensityMultiplier(F32 val);
|
||||
void setDistanceMultiplier(F32 val);
|
||||
void setHazeDensity(F32 val);
|
||||
void setHazeHorizon(F32 val);
|
||||
|
||||
protected:
|
||||
static const std::string SETTING_LEGACY_EAST_ANGLE;
|
||||
static const std::string SETTING_LEGACY_ENABLE_CLOUD_SCROLL;
|
||||
|
|
@ -438,6 +489,7 @@ protected:
|
|||
LLSettingsSky();
|
||||
|
||||
virtual stringset_t getSlerpKeys() const override;
|
||||
virtual stringset_t getSkipInterpolateKeys() const override;
|
||||
|
||||
virtual void updateSettings() override;
|
||||
|
||||
|
|
@ -468,6 +520,10 @@ private:
|
|||
|
||||
LLColor4 mTotalAmbient;
|
||||
|
||||
LLUUID mNextSunTextureId;
|
||||
LLUUID mNextMoonTextureId;
|
||||
LLUUID mNextCloudTextureId;
|
||||
|
||||
typedef std::map<std::string, S32> mapNameToUniformId_t;
|
||||
|
||||
static mapNameToUniformId_t sNameToUniformMapping;
|
||||
|
|
|
|||
|
|
@ -72,12 +72,14 @@ const LLUUID LLSettingsWater::DEFAULT_WATER_NORMAL_ID(DEFAULT_WATER_NORMAL);
|
|||
|
||||
//=========================================================================
|
||||
LLSettingsWater::LLSettingsWater(const LLSD &data) :
|
||||
LLSettingsBase(data)
|
||||
LLSettingsBase(data),
|
||||
mNextNormalMapID()
|
||||
{
|
||||
}
|
||||
|
||||
LLSettingsWater::LLSettingsWater() :
|
||||
LLSettingsBase()
|
||||
LLSettingsBase(),
|
||||
mNextNormalMapID()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -167,6 +169,8 @@ void LLSettingsWater::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
|
|||
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf);
|
||||
|
||||
replaceSettings(blenddata);
|
||||
setBlendFactor(blendf);
|
||||
mNextNormalMapID = other->getNormalMapID();
|
||||
}
|
||||
|
||||
LLSettingsWater::validation_list_t LLSettingsWater::getValidationList() const
|
||||
|
|
|
|||
|
|
@ -199,6 +199,13 @@ public:
|
|||
return mWaterFogKS;
|
||||
}
|
||||
|
||||
//-------------------------------------------
|
||||
LLUUID getNextNormalMapID() const
|
||||
{
|
||||
return mNextNormalMapID;
|
||||
}
|
||||
|
||||
|
||||
virtual validation_list_t getValidationList() const override;
|
||||
static validation_list_t validationList();
|
||||
|
||||
|
|
@ -224,7 +231,7 @@ protected:
|
|||
F32 mWaterFogKS;
|
||||
|
||||
private:
|
||||
|
||||
LLUUID mNextNormalMapID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ set(viewer_SOURCE_FILES
|
|||
lldrawpoolwlsky.cpp
|
||||
lldynamictexture.cpp
|
||||
llemote.cpp
|
||||
llenvadapters.cpp
|
||||
llenvironment.cpp
|
||||
llestateinfomodel.cpp
|
||||
lleventnotifier.cpp
|
||||
|
|
@ -226,14 +225,13 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterdestinations.cpp
|
||||
llfloatereditdaycycle.cpp
|
||||
llfloatereditextdaycycle.cpp
|
||||
llfloatereditsky.cpp
|
||||
llfloatereditwater.cpp
|
||||
llfloaterenvironmentsettings.cpp
|
||||
llfloaterevent.cpp
|
||||
llfloaterexperiencepicker.cpp
|
||||
llfloaterexperienceprofile.cpp
|
||||
llfloaterexperiences.cpp
|
||||
llfloaterfacebook.cpp
|
||||
llfloaterfixedenvironment.cpp
|
||||
llfloaterflickr.cpp
|
||||
llfloaterfonttest.cpp
|
||||
llfloatergesture.cpp
|
||||
|
|
@ -319,6 +317,7 @@ set(viewer_SOURCE_FILES
|
|||
llfolderviewmodelinventory.cpp
|
||||
llfollowcam.cpp
|
||||
llfriendcard.cpp
|
||||
llflyoutcombobtn.cpp
|
||||
llgesturelistener.cpp
|
||||
llgesturemgr.cpp
|
||||
llgiveinventory.cpp
|
||||
|
|
@ -421,6 +420,8 @@ set(viewer_SOURCE_FILES
|
|||
llpanelblockedlist.cpp
|
||||
llpanelclassified.cpp
|
||||
llpanelcontents.cpp
|
||||
llpaneleditsky.cpp
|
||||
llpaneleditwater.cpp
|
||||
llpaneleditwearable.cpp
|
||||
llpanelenvironment.cpp
|
||||
llpanelexperiencelisteditor.cpp
|
||||
|
|
@ -798,7 +799,6 @@ set(viewer_HEADER_FILES
|
|||
lldrawpoolwlsky.h
|
||||
lldynamictexture.h
|
||||
llemote.h
|
||||
llenvadapters.h
|
||||
llenvironment.h
|
||||
llestateinfomodel.h
|
||||
lleventnotifier.h
|
||||
|
|
@ -842,14 +842,13 @@ set(viewer_HEADER_FILES
|
|||
llfloaterdeleteprefpreset.h
|
||||
llfloaterdestinations.h
|
||||
llfloatereditextdaycycle.h
|
||||
llfloatereditsky.h
|
||||
llfloatereditwater.h
|
||||
llfloaterenvironmentsettings.h
|
||||
llfloaterevent.h
|
||||
llfloaterexperiencepicker.h
|
||||
llfloaterexperienceprofile.h
|
||||
llfloaterexperiences.h
|
||||
llfloaterfacebook.h
|
||||
llfloaterfixedenvironment.h
|
||||
llfloaterflickr.h
|
||||
llfloaterfonttest.h
|
||||
llfloatergesture.h
|
||||
|
|
@ -938,6 +937,7 @@ set(viewer_HEADER_FILES
|
|||
llfolderviewmodelinventory.h
|
||||
llfollowcam.h
|
||||
llfriendcard.h
|
||||
llflyoutcombobtn.h
|
||||
llgesturelistener.h
|
||||
llgesturemgr.h
|
||||
llgiveinventory.h
|
||||
|
|
@ -1029,6 +1029,8 @@ set(viewer_HEADER_FILES
|
|||
llpanelblockedlist.h
|
||||
llpanelclassified.h
|
||||
llpanelcontents.h
|
||||
llpaneleditsky.h
|
||||
llpaneleditwater.h
|
||||
llpaneleditwearable.h
|
||||
llpanelenvironment.h
|
||||
llpanelexperiencelisteditor.h
|
||||
|
|
|
|||
|
|
@ -10143,7 +10143,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderUseTriStrips</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -373,9 +373,11 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
|
|||
|
||||
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
|
||||
|
||||
renderSkyHazeDeferred(origin, camHeightLocal);
|
||||
//renderSkyHazeDeferred(origin, camHeightLocal);
|
||||
|
||||
if (gPipeline.canUseWindLightShaders())
|
||||
renderSkyHaze(origin, camHeightLocal);
|
||||
|
||||
if (!gPipeline.useAdvancedAtmospherics() && gPipeline.canUseWindLightShaders())
|
||||
{
|
||||
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
|
||||
gGL.pushMatrix();
|
||||
|
|
|
|||
|
|
@ -187,6 +187,17 @@ void LLEnvironment::getAtmosphericModelSettings(AtmosphericModelSettings& settin
|
|||
}
|
||||
}
|
||||
|
||||
bool LLEnvironment::isExtendedEnvironmentEnabled() const
|
||||
{
|
||||
return !gAgent.getRegionCapability("ExtEnvironment").empty();
|
||||
}
|
||||
|
||||
bool LLEnvironment::isInventoryEnabled() const
|
||||
{
|
||||
return (!gAgent.getRegionCapability("UpdateSettingsAgentInventory").empty() &&
|
||||
!gAgent.getRegionCapability("UpdateSettingsTaskInventory").empty());
|
||||
}
|
||||
|
||||
LLEnvironment::connection_t LLEnvironment::setSkyListChange(const LLEnvironment::change_signal_t::slot_type& cb)
|
||||
{
|
||||
return mSkyListChange.connect(cb);
|
||||
|
|
@ -253,10 +264,10 @@ bool LLEnvironment::getIsDayTime() const
|
|||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void LLEnvironment::setSelectedEnvironment(LLEnvironment::EnvSelection_t env, F64Seconds transition)
|
||||
void LLEnvironment::setSelectedEnvironment(LLEnvironment::EnvSelection_t env, F64Seconds transition, bool forced)
|
||||
{
|
||||
mSelectedEnvironment = env;
|
||||
updateEnvironment(transition);
|
||||
updateEnvironment(transition, forced);
|
||||
}
|
||||
|
||||
bool LLEnvironment::hasEnvironment(LLEnvironment::EnvSelection_t env)
|
||||
|
|
@ -317,6 +328,41 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
|
|||
/*TODO: readjust environment*/
|
||||
}
|
||||
|
||||
void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
DayInstance::ptr_t environment = getEnvironmentInstance(env);
|
||||
|
||||
if (settings->getSettingType() == "daycycle")
|
||||
{
|
||||
S64Seconds daylength(LLSettingsDay::DEFAULT_DAYLENGTH);
|
||||
S64Seconds dayoffset(LLSettingsDay::DEFAULT_DAYOFFSET);
|
||||
if (environment)
|
||||
{
|
||||
daylength = environment->getDayLength();
|
||||
dayoffset = environment->getDayOffset();
|
||||
}
|
||||
setEnvironment(env, std::static_pointer_cast<LLSettingsDay>(settings), daylength, dayoffset);
|
||||
}
|
||||
else if (settings->getSettingType() == "sky")
|
||||
{
|
||||
fixedEnvironment_t fixedenv(std::static_pointer_cast<LLSettingsSky>(settings), LLSettingsWater::ptr_t());
|
||||
if (environment)
|
||||
{
|
||||
fixedenv.second = environment->getWater();
|
||||
}
|
||||
setEnvironment(env, fixedenv);
|
||||
}
|
||||
else if (settings->getSettingType() == "water")
|
||||
{
|
||||
fixedEnvironment_t fixedenv(LLSettingsSky::ptr_t(), std::static_pointer_cast<LLSettingsWater>(settings));
|
||||
if (environment)
|
||||
{
|
||||
fixedenv.first = environment->getSky();
|
||||
}
|
||||
setEnvironment(env, fixedenv);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env)
|
||||
{
|
||||
|
|
@ -380,6 +426,33 @@ S64Seconds LLEnvironment::getEnvironmentDayOffset(EnvSelection_t env)
|
|||
|
||||
LLEnvironment::fixedEnvironment_t LLEnvironment::getEnvironmentFixed(LLEnvironment::EnvSelection_t env)
|
||||
{
|
||||
if (env == ENV_CURRENT)
|
||||
{
|
||||
fixedEnvironment_t fixed;
|
||||
for (S32 idx = mSelectedEnvironment; idx < ENV_END; ++idx)
|
||||
{
|
||||
if (fixed.first && fixed.second)
|
||||
break;
|
||||
|
||||
if (idx == ENV_EDIT)
|
||||
continue; // skip the edit environment.
|
||||
|
||||
DayInstance::ptr_t environment = getEnvironmentInstance(static_cast<EnvSelection_t>(idx));
|
||||
if (environment)
|
||||
{
|
||||
if (!fixed.first)
|
||||
fixed.first = environment->getSky();
|
||||
if (!fixed.second)
|
||||
fixed.second = environment->getWater();
|
||||
}
|
||||
}
|
||||
|
||||
if (!fixed.first || !fixed.second)
|
||||
LL_WARNS("ENVIRONMENT") << "Can not construct complete fixed environment. Missing Sky and/or Water." << LL_ENDL;
|
||||
|
||||
return fixed;
|
||||
}
|
||||
|
||||
if ((env < ENV_EDIT) || (env > ENV_DEFAULT))
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Attempt to retrieve invalid environment selection." << LL_ENDL;
|
||||
|
|
@ -406,11 +479,11 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::getSelectedEnvironmentInstance(
|
|||
}
|
||||
|
||||
|
||||
void LLEnvironment::updateEnvironment(F64Seconds transition)
|
||||
void LLEnvironment::updateEnvironment(F64Seconds transition, bool forced)
|
||||
{
|
||||
DayInstance::ptr_t pinstance = getSelectedEnvironmentInstance();
|
||||
|
||||
if (mCurrentEnvironment != pinstance)
|
||||
if ((mCurrentEnvironment != pinstance) || forced)
|
||||
{
|
||||
DayInstance::ptr_t trans = std::make_shared<DayTransition>(
|
||||
mCurrentEnvironment->getSky(), mCurrentEnvironment->getWater(), pinstance, transition);
|
||||
|
|
@ -795,7 +868,7 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
|
|||
//=========================================================================
|
||||
void LLEnvironment::requestRegion()
|
||||
{
|
||||
if (gAgent.getRegionCapability("ExtEnvironment").empty())
|
||||
if (!isExtendedEnvironmentEnabled())
|
||||
{
|
||||
LLEnvironmentRequest::initiate();
|
||||
return;
|
||||
|
|
@ -806,7 +879,7 @@ void LLEnvironment::requestRegion()
|
|||
|
||||
void LLEnvironment::updateRegion(LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset)
|
||||
{
|
||||
if (gAgent.getRegionCapability("ExtEnvironment").empty())
|
||||
if (!isExtendedEnvironmentEnabled())
|
||||
{
|
||||
LLEnvironmentApply::initiateRequest( LLSettingsVODay::convertToLegacy(pday) );
|
||||
return;
|
||||
|
|
@ -1106,6 +1179,30 @@ std::string LLEnvironment::getUserDir(const std::string &subdir)
|
|||
return gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "windlight\\"+subdir, "");
|
||||
}
|
||||
|
||||
LLSettingsWater::ptr_t LLEnvironment::createWaterFromLegacyPreset(const std::string filename)
|
||||
{
|
||||
LLSD data = legacyLoadPreset(filename);
|
||||
if (!data)
|
||||
return LLSettingsWater::ptr_t();
|
||||
|
||||
std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
|
||||
LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPreset(name, data);
|
||||
|
||||
return water;
|
||||
}
|
||||
|
||||
LLSettingsSky::ptr_t LLEnvironment::createSkyFromLegacyPreset(const std::string filename)
|
||||
{
|
||||
LLSD data = legacyLoadPreset(filename);
|
||||
if (!data)
|
||||
return LLSettingsSky::ptr_t();
|
||||
|
||||
std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
|
||||
LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPreset(name, data);
|
||||
|
||||
return sky;
|
||||
}
|
||||
|
||||
LLSD LLEnvironment::legacyLoadPreset(const std::string& path)
|
||||
{
|
||||
llifstream xml_file;
|
||||
|
|
@ -1377,7 +1474,6 @@ void LLEnvironment::DayInstance::setDay(const LLSettingsDay::ptr_t &pday, S64Sec
|
|||
}
|
||||
|
||||
|
||||
|
||||
void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
|
||||
{
|
||||
if (mType == TYPE_CYCLED)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@ public:
|
|||
ENV_PARCEL,
|
||||
ENV_REGION,
|
||||
ENV_DEFAULT,
|
||||
ENV_END
|
||||
ENV_END,
|
||||
ENV_CURRENT = -1
|
||||
};
|
||||
|
||||
typedef boost::signals2::connection connection_t;
|
||||
|
|
@ -134,6 +135,8 @@ public:
|
|||
const UserPrefs & getPreferences() const { return mUserPrefs; }
|
||||
|
||||
bool canEdit() const;
|
||||
bool isExtendedEnvironmentEnabled() const;
|
||||
bool isInventoryEnabled() const;
|
||||
|
||||
LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); }
|
||||
LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); }
|
||||
|
|
@ -145,12 +148,13 @@ public:
|
|||
void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting);
|
||||
void updateShaderUniforms(LLGLSLShader *shader);
|
||||
|
||||
void setSelectedEnvironment(EnvSelection_t env, F64Seconds transition = TRANSITION_DEFAULT);
|
||||
void setSelectedEnvironment(EnvSelection_t env, F64Seconds transition = TRANSITION_DEFAULT, bool forced = false);
|
||||
EnvSelection_t getSelectedEnvironment() const { return mSelectedEnvironment; }
|
||||
|
||||
bool hasEnvironment(EnvSelection_t env);
|
||||
void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset);
|
||||
void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed);
|
||||
void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed);
|
||||
void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); }
|
||||
void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); }
|
||||
void clearEnvironment(EnvSelection_t env);
|
||||
|
|
@ -161,7 +165,7 @@ public:
|
|||
LLSettingsSky::ptr_t getEnvironmentFixedSky(EnvSelection_t env) { return getEnvironmentFixed(env).first; };
|
||||
LLSettingsWater::ptr_t getEnvironmentFixedWater(EnvSelection_t env) { return getEnvironmentFixed(env).second; };
|
||||
|
||||
void updateEnvironment(F64Seconds transition = TRANSITION_DEFAULT);
|
||||
void updateEnvironment(F64Seconds transition = TRANSITION_DEFAULT, bool forced = false);
|
||||
|
||||
void addSky(const LLSettingsSky::ptr_t &sky);
|
||||
void addWater(const LLSettingsWater::ptr_t &sky);
|
||||
|
|
@ -189,6 +193,9 @@ public:
|
|||
inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentEnvironment->getSky()->getClampedLightDirection(), 0.0f); }
|
||||
inline LLVector4 getRotatedLight() const { return mRotatedLight; }
|
||||
|
||||
static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename);
|
||||
static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename);
|
||||
|
||||
//-------------------------------------------
|
||||
connection_t setSkyListChange(const change_signal_t::slot_type& cb);
|
||||
connection_t setWaterListChange(const change_signal_t::slot_type& cb);
|
||||
|
|
@ -358,7 +365,7 @@ private:
|
|||
void onTransitionDone(const LLSettingsBlender::ptr_t, bool isSky);
|
||||
//=========================================================================
|
||||
void legacyLoadAllPresets();
|
||||
LLSD legacyLoadPreset(const std::string& path);
|
||||
static LLSD legacyLoadPreset(const std::string& path);
|
||||
static std::string getSysDir(const std::string &subdir);
|
||||
static std::string getUserDir(const std::string &subdir);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,16 +45,26 @@
|
|||
#include "llagent.h"
|
||||
#include "llregioninfomodel.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llpaneleditwater.h"
|
||||
#include "llpaneleditsky.h"
|
||||
|
||||
#include "llenvironment.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
static const std::string track_tabs[] = {
|
||||
"water_track",
|
||||
"sky4_track",
|
||||
"sky3_track",
|
||||
"sky2_track",
|
||||
"sky1_track",
|
||||
};
|
||||
|
||||
|
||||
LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key):
|
||||
LLFloater(key),
|
||||
mDayPresetsCombo(NULL),
|
||||
mSaveButton(NULL),
|
||||
mCancelButton(NULL)
|
||||
mCancelButton(NULL),
|
||||
mCurrentTrack(1)
|
||||
// mDayCyclesCombo(NULL)
|
||||
// , mTimeSlider(NULL)
|
||||
// , mKeysSlider(NULL)
|
||||
|
|
@ -62,32 +72,37 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key):
|
|||
// , mMakeDefaultCheckBox(NULL)
|
||||
// ,
|
||||
{
|
||||
mCommitCallbackRegistrar.add("DayCycle.Track", boost::bind(&LLFloaterEditExtDayCycle::onTrackSelectionCallback, this, _2));
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFloaterEditExtDayCycle::postBuild()
|
||||
{
|
||||
getChild<LLButton>("add_frame")->setCommitCallback(boost::bind(&LLFloaterEditExtDayCycle::onAddTrack, this));
|
||||
getChild<LLButton>("delete_frame")->setCommitCallback(boost::bind(&LLFloaterEditExtDayCycle::onRemoveTrack, this));
|
||||
getChild<LLLineEditor>("day_cycle_name")->setKeystrokeCallback(boost::bind(&LLFloaterEditExtDayCycle::onCommitName, this, _1, _2), NULL);
|
||||
|
||||
// mDayCyclesCombo = getChild<LLComboBox>("day_cycle_preset_combo");
|
||||
|
||||
// mTimeSlider = getChild<LLMultiSliderCtrl>("WLTimeSlider");
|
||||
// mKeysSlider = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
|
||||
mDayPresetsCombo = getChild<LLComboBox>("day_cycle_preset_combo");
|
||||
// mTimeCtrl = getChild<LLTimeCtrl>("time");
|
||||
mSaveButton = getChild<LLButton>("save_btn");
|
||||
mCancelButton = getChild<LLButton>("cancel_btn");
|
||||
mUploadButton = getChild<LLButton>("upload_btn");
|
||||
mSaveButton = getChild<LLButton>("save_btn", true);
|
||||
mCancelButton = getChild<LLButton>("cancel_btn", true);
|
||||
mUploadButton = getChild<LLButton>("upload_btn", true);
|
||||
mKeysSlider = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
|
||||
mSkyTabContainer = getChild<LLView>("frame_settings_sky", true);
|
||||
mWaterTabContainer = getChild<LLView>("frame_settings_water", true);
|
||||
// mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
|
||||
|
||||
//initCallbacks();
|
||||
|
||||
mDayPresetsCombo->setCommitCallback(boost::bind(&LLFloaterEditExtDayCycle::onDayPresetChanged, this));
|
||||
mSaveButton->setCommitCallback(boost::bind(&LLFloaterEditExtDayCycle::onBtnSave, this));
|
||||
mCancelButton->setCommitCallback(boost::bind(&LLFloaterEditExtDayCycle::onBtnCancel, this));
|
||||
mUploadButton->setCommitCallback(boost::bind(&LLFloaterEditExtDayCycle::onUpload, this));
|
||||
|
||||
//initCallbacks();
|
||||
|
||||
// // add the time slider
|
||||
// mTimeSlider->addSlider();
|
||||
getChild<LLButton>("sky4_track", true)->setToggleState(true);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -97,7 +112,52 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
|
|||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT);
|
||||
LLEnvironment::instance().updateEnvironment();
|
||||
|
||||
refreshSkyPresetsList();
|
||||
|
||||
{
|
||||
// TODO/TEMP
|
||||
LLSettingsDay::ptr_t pday = LLEnvironment::instance().getEnvironmentDay(LLEnvironment::ENV_REGION);
|
||||
mEditDay = pday->buildClone(); // pday should be passed as parameter
|
||||
}
|
||||
|
||||
LLLineEditor* name_field = getChild<LLLineEditor>("day_cycle_name");
|
||||
name_field->setText(mEditDay->getName());
|
||||
|
||||
selectTrack(mCurrentTrack);
|
||||
|
||||
/* TODO
|
||||
if (mEditDay->hasSetting("cycle length")) // todo: figure out name
|
||||
{
|
||||
// extract setting
|
||||
S32 extracted_time =
|
||||
std::string time = LLTrans::getString("time_label", LLSD("TIME",(extracted_time * 0..100%) + offset));
|
||||
std::string descr = LLTrans::getString("0_label", LLSD("DSC",time));
|
||||
getChild<LLView>("p0")->setLabel(descr);
|
||||
...
|
||||
|
||||
getChild<LLView>("p1")->setLabel(descr);
|
||||
time =
|
||||
descr =
|
||||
getChild<LLView>("p2")->setLabel(descr);
|
||||
time =
|
||||
descr =
|
||||
getChild<LLView>("p3")->setLabel(descr);
|
||||
time =
|
||||
descr =
|
||||
getChild<LLView>("p4")->setLabel(descr);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string descr = LLTrans::getString("0_label", LLSD());
|
||||
getChild<LLView>("p0")->setLabel(descr);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*list_name_id_t getSkyList() const;
|
||||
list_name_id_t getWaterList() const;
|
||||
|
||||
getChild<LLButton>("sky4_track", true)->setToggleState(true);*/
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::onClose(bool app_quitting)
|
||||
|
|
@ -183,22 +243,6 @@ void LLFloaterEditExtDayCycle::onVisibilityChange(BOOL new_visibility)
|
|||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void LLFloaterEditExtDayCycle::onDayPresetChanged()
|
||||
{
|
||||
std::string dayname = mDayPresetsCombo->getSelectedValue().asString();
|
||||
|
||||
LLSettingsDay::ptr_t pday = LLEnvironment::instance().findDayCycleByName(dayname);
|
||||
|
||||
if (pday)
|
||||
{
|
||||
pday = pday->buildClone();
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, pday, LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
|
||||
mEditDay = pday;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::onBtnSave()
|
||||
{
|
||||
if (!mCommitSignal.empty())
|
||||
|
|
@ -211,26 +255,134 @@ void LLFloaterEditExtDayCycle::onBtnCancel()
|
|||
closeFloater();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void LLFloaterEditExtDayCycle::refreshSkyPresetsList()
|
||||
void LLFloaterEditExtDayCycle::onAddTrack()
|
||||
{
|
||||
mDayPresetsCombo->removeall();
|
||||
|
||||
LLEnvironment::list_name_id_t cyclelist = LLEnvironment::instance().getDayCycleList();
|
||||
|
||||
mDayPresetsCombo->removeall();
|
||||
|
||||
|
||||
for (LLEnvironment::list_name_id_t::iterator it = cyclelist.begin(); it != cyclelist.end(); ++it)
|
||||
F32 frame = 0; // temp?
|
||||
mKeysSlider->addSlider(frame);
|
||||
if (mCurrentTrack == 0)
|
||||
{
|
||||
mDayPresetsCombo->add((*it).first);
|
||||
mEditDay->setWaterAtKeyframe(LLSettingsVOWater::buildDefaultWater(), frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
mEditDay->setSkyAtKeyframe(LLSettingsVOSky::buildDefaultSky(), frame, mCurrentTrack);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::onRemoveTrack()
|
||||
{
|
||||
//mKeysSlider->deleteCurSlider();
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::onCommitName(class LLLineEditor* caller, void* user_data)
|
||||
{
|
||||
mEditDay->setName(caller->getText());
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::onTrackSelectionCallback(const LLSD& user_data)
|
||||
{
|
||||
U32 track_index = user_data.asInteger(); // 1-5
|
||||
selectTrack(track_index);
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::selectTrack(U32 track_index)
|
||||
{
|
||||
mCurrentTrack = track_index;
|
||||
LLButton* button = getChild<LLButton>(track_tabs[track_index], true);
|
||||
if (button->getToggleState())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// set defaults on combo boxes
|
||||
mDayPresetsCombo->selectFirstItem();
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
getChild<LLButton>(track_tabs[i], true)->setToggleState(false);
|
||||
}
|
||||
|
||||
button->setToggleState(true);
|
||||
|
||||
updateTabs();
|
||||
updateSlider();
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::updateTabs()
|
||||
{
|
||||
bool show_water = mCurrentTrack == 0;
|
||||
mSkyTabContainer->setVisible(!show_water);
|
||||
mWaterTabContainer->setVisible(show_water);
|
||||
|
||||
if (show_water)
|
||||
{
|
||||
updateWaterTabs();
|
||||
}
|
||||
else
|
||||
{
|
||||
updateSkyTabs();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::updateWaterTabs()
|
||||
{
|
||||
const LLSettingsWaterPtr_t p_water = mEditDay->getWaterAtKeyframe(mKeysSlider->getCurSliderValue());
|
||||
|
||||
// Compiler warnings from getChild about LLPanelSettingsWaterMainTab not being complete/missing params constructor...
|
||||
// Todo: fix class to work with getChild()
|
||||
LLPanelSettingsWaterMainTab* panel = mWaterTabContainer->findChild<LLPanelSettingsWaterMainTab>("water_panel", true);
|
||||
if (panel)
|
||||
{
|
||||
panel->setWater(p_water); // todo: Null disables
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::updateSkyTabs()
|
||||
{
|
||||
const LLSettingsSkyPtr_t p_sky = mEditDay->getSkyAtKeyframe(mKeysSlider->getCurSliderValue(), mCurrentTrack);
|
||||
|
||||
// Compiler warnings from getChild about tabs...
|
||||
// Todo: fix class
|
||||
LLPanelSettingsSky* panel;
|
||||
panel = mSkyTabContainer->findChild<LLPanelSettingsSky>("atmosphere_panel", true);
|
||||
if (panel)
|
||||
{
|
||||
panel->setSky(p_sky); // todo: Null disables
|
||||
}
|
||||
panel = mSkyTabContainer->findChild<LLPanelSettingsSky>("clouds_panel", true);
|
||||
if (panel)
|
||||
{
|
||||
panel->setSky(p_sky);
|
||||
}
|
||||
panel = mSkyTabContainer->findChild<LLPanelSettingsSky>("moon_panel", true);
|
||||
if (panel)
|
||||
{
|
||||
panel->setSky(p_sky);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::updateSlider()
|
||||
{
|
||||
mKeysSlider->clear();
|
||||
|
||||
LLSettingsDay::KeyframeList_t keyframes = mEditDay->getTrackKeyframes(mCurrentTrack);
|
||||
LLSettingsDay::KeyframeList_t::iterator iter = keyframes.begin();
|
||||
LLSettingsDay::KeyframeList_t::iterator end = keyframes.end();
|
||||
|
||||
while (iter != end)
|
||||
{
|
||||
mKeysSlider->addSlider(*iter);
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
|
||||
/*void LLFloaterEditExtDayCycle::updateTrack()
|
||||
{
|
||||
LLMultiSliderCtrl* slider = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
|
||||
//mEditDay->getTrackKeyframes
|
||||
|
||||
// todo make tracks named to allow movement
|
||||
}*/
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
LLFloaterEditExtDayCycle::connection_t LLFloaterEditExtDayCycle::setEditCommitSignal(LLFloaterEditExtDayCycle::edit_commit_signal_t::slot_type cb)
|
||||
{
|
||||
return mCommitSignal.connect(cb);
|
||||
|
|
@ -503,28 +655,26 @@ LLFloaterEditExtDayCycle::connection_t LLFloaterEditExtDayCycle::setEditCommitSi
|
|||
// #endif
|
||||
// }
|
||||
//
|
||||
// #if 0
|
||||
// void LLFloaterEditExtDayCycle::addSliderKey(F32 time, LLWLParamKey keyframe)
|
||||
// {
|
||||
// // make a slider
|
||||
// const std::string& sldr_name = mKeysSlider->addSlider(time);
|
||||
// if (sldr_name.empty())
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // set the key
|
||||
// SliderKey newKey(keyframe, mKeysSlider->getCurSliderValue());
|
||||
//
|
||||
// llassert_always(sldr_name != LLStringUtil::null);
|
||||
//
|
||||
// // add to map
|
||||
// mSliderToKey.insert(std::pair<std::string, SliderKey>(sldr_name, newKey));
|
||||
//
|
||||
// llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
|
||||
// }
|
||||
// #endif
|
||||
//
|
||||
void LLFloaterEditExtDayCycle::addSliderKey(F32 time, const std::shared_ptr<LLSettingsBase> keyframe)
|
||||
{
|
||||
// make a slider
|
||||
const std::string& sldr_name = mKeysSlider->addSlider(time);
|
||||
if (sldr_name.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// set the key
|
||||
SliderKey newKey(keyframe, mKeysSlider->getCurSliderValue());
|
||||
|
||||
llassert_always(sldr_name != LLStringUtil::null);
|
||||
|
||||
// add to map
|
||||
mSliderToKey.insert(std::pair<std::string, SliderKey>(sldr_name, newKey));
|
||||
|
||||
llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
|
||||
}
|
||||
|
||||
// #if 0
|
||||
// LLWLParamKey LLFloaterEditExtDayCycle::getSelectedDayCycle()
|
||||
// {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,18 @@ class LLLineEditor;
|
|||
class LLMultiSliderCtrl;
|
||||
class LLTimeCtrl;
|
||||
|
||||
typedef std::shared_ptr<LLSettingsBase> LLSettingsBasePtr_t;
|
||||
|
||||
class SliderKey
|
||||
{
|
||||
public:
|
||||
SliderKey(LLSettingsBasePtr_t kf, F32 t) : keyframe(kf), time(t) {}
|
||||
|
||||
LLSettingsBasePtr_t keyframe;
|
||||
F32 time;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Floater for creating or editing a day cycle.
|
||||
*/
|
||||
|
|
@ -75,18 +87,26 @@ private:
|
|||
// void applyTrack();
|
||||
//
|
||||
// /// refresh the sky presets combobox
|
||||
void refreshSkyPresetsList();
|
||||
|
||||
void onDayPresetChanged(); /// sky preset selected
|
||||
void onBtnSave();
|
||||
void onBtnCancel();
|
||||
void onAddTrack();
|
||||
void onRemoveTrack();
|
||||
void onCommitName(class LLLineEditor* caller, void* user_data);
|
||||
void onTrackSelectionCallback(const LLSD& user_data);
|
||||
|
||||
void onBtnSave();
|
||||
void onBtnCancel();
|
||||
void selectTrack(U32 track_index);
|
||||
void updateTabs();
|
||||
void updateSkyTabs();
|
||||
void updateWaterTabs();
|
||||
void updateSlider(); //track->slider
|
||||
//void updateTrack(); // slider->track, todo: better name
|
||||
|
||||
// /// refresh the day cycle combobox
|
||||
// void refreshDayCyclesList();
|
||||
//
|
||||
// /// add a slider to the track
|
||||
// // void addSliderKey(F32 time, LLWLParamKey keyframe);
|
||||
void addSliderKey(F32 time, const LLSettingsBasePtr_t key);
|
||||
//
|
||||
// void initCallbacks();
|
||||
// // LLWLParamKey getSelectedDayCycle();
|
||||
|
|
@ -123,8 +143,8 @@ private:
|
|||
|
||||
LLSettingsDay::ptr_t mSavedDay;
|
||||
LLSettingsDay::ptr_t mEditDay;
|
||||
U32 mCurrentTrack;
|
||||
|
||||
LLComboBox* mDayPresetsCombo;
|
||||
LLButton* mSaveButton;
|
||||
LLButton* mCancelButton;
|
||||
LLButton* mUploadButton;
|
||||
|
|
@ -133,12 +153,14 @@ private:
|
|||
|
||||
// LLComboBox* mDayCyclesCombo;
|
||||
// LLMultiSliderCtrl* mTimeSlider;
|
||||
// LLMultiSliderCtrl* mKeysSlider;
|
||||
LLMultiSliderCtrl* mKeysSlider;
|
||||
LLView* mSkyTabContainer;
|
||||
LLView* mWaterTabContainer;
|
||||
// LLTimeCtrl* mTimeCtrl;
|
||||
// LLCheckBoxCtrl* mMakeDefaultCheckBox;
|
||||
|
||||
// map of sliders to parameters
|
||||
// std::map<std::string, SliderKey> mSliderToKey;
|
||||
std::map<std::string, SliderKey> mSliderToKey;
|
||||
};
|
||||
|
||||
#endif // LL_LLFloaterEditExtDayCycle_H
|
||||
|
|
|
|||
|
|
@ -1,125 +0,0 @@
|
|||
/**
|
||||
* @file llfloatereditsky.h
|
||||
* @brief Floater to create or edit a sky preset
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATEREDITSKY_H
|
||||
#define LL_LLFLOATEREDITSKY_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llsettingssky.h"
|
||||
|
||||
class LLButton;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLComboBox;
|
||||
class LLLineEditor;
|
||||
class WLColorControl;
|
||||
class LLSkySettingsAdapter;
|
||||
|
||||
typedef boost::shared_ptr<LLSkySettingsAdapter> LLSkySettingsAdapterPtr;
|
||||
|
||||
|
||||
/**
|
||||
* Floater for creating or editing a sky preset.
|
||||
*/
|
||||
class LLFloaterEditSky : public LLFloater
|
||||
{
|
||||
LOG_CLASS(LLFloaterEditSky);
|
||||
|
||||
public:
|
||||
LLFloaterEditSky(const LLSD &key);
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
private:
|
||||
void initCallbacks(void);
|
||||
|
||||
//-- WL stuff begins ------------------------------------------------------
|
||||
|
||||
void syncControls(); /// sync up sliders with parameters
|
||||
|
||||
void setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k);
|
||||
|
||||
// general purpose callbacks for dealing with color controllers
|
||||
void onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl);
|
||||
void onColorControlRMoved(LLUICtrl* ctrl, void* userdata);
|
||||
void onColorControlGMoved(LLUICtrl* ctrl, void* userdata);
|
||||
void onColorControlBMoved(LLUICtrl* ctrl, void* userdata);
|
||||
void onFloatControlMoved(LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
void adjustIntensity(WLColorControl *ctrl, F32 color, F32 scale);
|
||||
|
||||
// lighting callbacks for glow
|
||||
void onGlowRMoved(LLUICtrl* ctrl, void* userdata);
|
||||
void onGlowBMoved(LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
// lighting callbacks for sun
|
||||
void onSunMoved(LLUICtrl* ctrl, void* userdata);
|
||||
void onTimeChanged();
|
||||
|
||||
void onSunRotationChanged();
|
||||
void onMoonRotationChanged();
|
||||
|
||||
// for handling when the star slider is moved to adjust the alpha
|
||||
void onStarAlphaMoved(LLUICtrl* ctrl);
|
||||
|
||||
// handle cloud scrolling
|
||||
void onCloudScrollXMoved(LLUICtrl* ctrl);
|
||||
void onCloudScrollYMoved(LLUICtrl* ctrl);
|
||||
|
||||
//-- WL stuff ends --------------------------------------------------------
|
||||
|
||||
void reset(); /// reset the floater to its initial state
|
||||
bool isNewPreset() const;
|
||||
void refreshSkyPresetsList();
|
||||
void enableEditing(bool enable);
|
||||
void saveRegionSky();
|
||||
std::string getSelectedPresetName() const;
|
||||
|
||||
void onSkyPresetNameEdited();
|
||||
void onSkyPresetSelected();
|
||||
bool onSaveAnswer(const LLSD& notification, const LLSD& response);
|
||||
void onSaveConfirmed();
|
||||
|
||||
void onBtnSave();
|
||||
void onBtnCancel();
|
||||
|
||||
void onSkyPresetListChange();
|
||||
void onRegionSettingsChange();
|
||||
void onRegionInfoUpdate();
|
||||
|
||||
LLSettingsSky::ptr_t mEditSettings;
|
||||
|
||||
LLLineEditor* mSkyPresetNameEditor;
|
||||
LLComboBox* mSkyPresetCombo;
|
||||
LLCheckBoxCtrl* mMakeDefaultCheckBox;
|
||||
LLButton* mSaveButton;
|
||||
LLSkySettingsAdapterPtr mSkyAdapter;
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATEREDITSKY_H
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
/**
|
||||
* @file llfloatereditwater.h
|
||||
* @brief Floater to create or edit a water preset
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATEREDITWATER_H
|
||||
#define LL_LLFLOATEREDITWATER_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llsettingswater.h"
|
||||
|
||||
class LLButton;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLComboBox;
|
||||
class LLLineEditor;
|
||||
|
||||
class WLVect2Control;
|
||||
class WLVect3Control;
|
||||
class WLColorControl;
|
||||
class WLFloatControl;
|
||||
class WLXFloatControl;
|
||||
|
||||
class LLWatterSettingsAdapter;
|
||||
|
||||
typedef boost::shared_ptr<LLWatterSettingsAdapter> LLWaterSettingsAdapterPtr;
|
||||
|
||||
class LLFloaterEditWater : public LLFloater
|
||||
{
|
||||
LOG_CLASS(LLFloaterEditWater);
|
||||
|
||||
public:
|
||||
LLFloaterEditWater(const LLSD &key);
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
private:
|
||||
void initCallbacks(void);
|
||||
|
||||
//-- WL stuff begins ------------------------------------------------------
|
||||
|
||||
void syncControls(); /// sync up sliders with parameters
|
||||
|
||||
void onVector3ControlXMoved(LLUICtrl* ctrl, WLVect3Control* vector_ctrl);
|
||||
void onVector3ControlYMoved(LLUICtrl* ctrl, WLVect3Control* vector_ctrl);
|
||||
void onVector3ControlZMoved(LLUICtrl* ctrl, WLVect3Control* vector_ctrl);
|
||||
|
||||
void onVector2ControlXMoved(LLUICtrl* ctrl, WLVect2Control* vector_ctrl);
|
||||
void onVector2ControlYMoved(LLUICtrl* ctrl, WLVect2Control* vector_ctrl);
|
||||
|
||||
void onFloatControlMoved(LLUICtrl* ctrl, WLFloatControl* floatControl);
|
||||
|
||||
void onExpFloatControlMoved(LLUICtrl* ctrl, WLXFloatControl* expFloatControl);
|
||||
|
||||
void onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl);
|
||||
|
||||
void onNormalMapPicked(LLUICtrl* ctrl); /// handle if they choose a new normal map
|
||||
|
||||
//-- WL stuff ends --------------------------------------------------------
|
||||
|
||||
void reset();
|
||||
bool isNewPreset() const;
|
||||
void refreshWaterPresetsList();
|
||||
void enableEditing(bool enable);
|
||||
void saveRegionWater();
|
||||
|
||||
std::string getSelectedPresetName() const;
|
||||
// std::string getCurrentPresetName() const;
|
||||
// LLEnvKey::EScope getCurrentScope() const;
|
||||
// void getSelectedPreset(std::string& name, LLEnvKey::EScope& scope) const;
|
||||
|
||||
void onWaterPresetNameEdited();
|
||||
void onWaterPresetSelected();
|
||||
bool onSaveAnswer(const LLSD& notification, const LLSD& response);
|
||||
void onSaveConfirmed();
|
||||
|
||||
void onBtnSave();
|
||||
void onBtnCancel();
|
||||
|
||||
void onWaterPresetListChange();
|
||||
void onRegionSettingsChange();
|
||||
void onRegionInfoUpdate();
|
||||
|
||||
LLLineEditor* mWaterPresetNameEditor;
|
||||
LLComboBox* mWaterPresetCombo;
|
||||
LLCheckBoxCtrl* mMakeDefaultCheckBox;
|
||||
LLButton* mSaveButton;
|
||||
|
||||
LLWaterSettingsAdapterPtr mWaterAdapter;
|
||||
LLSettingsWater::ptr_t mEditSettings;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATEREDITWATER_H
|
||||
|
|
@ -0,0 +1,489 @@
|
|||
/**
|
||||
* @file llfloaterfixedenvironment.cpp
|
||||
* @brief Floaters to create and edit fixed settings for sky and water.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterfixedenvironment.h"
|
||||
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
// libs
|
||||
#include "llbutton.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llfilepicker.h"
|
||||
|
||||
#include "llviewerparcelmgr.h"
|
||||
|
||||
// newview
|
||||
#include "llpaneleditwater.h"
|
||||
#include "llpaneleditsky.h"
|
||||
|
||||
#include "llsettingssky.h"
|
||||
#include "llsettingswater.h"
|
||||
|
||||
#include "llenvironment.h"
|
||||
#include "llagent.h"
|
||||
#include "llparcel.h"
|
||||
|
||||
#include "llsettingsvo.h"
|
||||
#include "llinventorymodel.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string FIELD_SETTINGS_NAME("settings_name");
|
||||
|
||||
const std::string CONTROL_TAB_AREA("tab_settings");
|
||||
|
||||
const std::string BUTTON_NAME_IMPORT("btn_import");
|
||||
const std::string BUTTON_NAME_COMMIT("btn_commit");
|
||||
const std::string BUTTON_NAME_CANCEL("btn_cancel");
|
||||
const std::string BUTTON_NAME_FLYOUT("btn_flyout");
|
||||
|
||||
const std::string ACTION_SAVE("save_settings");
|
||||
const std::string ACTION_SAVEAS("save_as_new_settings");
|
||||
const std::string ACTION_APPLY_LOCAL("apply_local");
|
||||
const std::string ACTION_APPLY_PARCEL("apply_parcel");
|
||||
const std::string ACTION_APPLY_REGION("apply_region");
|
||||
|
||||
const std::string XML_FLYOUTMENU_FILE("menu_save_settings.xml");
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
const std::string LLFloaterFixedEnvironment::KEY_INVENTORY_ID("inventory_id");
|
||||
|
||||
|
||||
//=========================================================================
|
||||
LLFloaterFixedEnvironment::LLFloaterFixedEnvironment(const LLSD &key) :
|
||||
LLFloater(key),
|
||||
mFlyoutControl(nullptr),
|
||||
mInventoryId(),
|
||||
mInventoryItem(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
LLFloaterFixedEnvironment::~LLFloaterFixedEnvironment()
|
||||
{
|
||||
delete mFlyoutControl;
|
||||
}
|
||||
|
||||
BOOL LLFloaterFixedEnvironment::postBuild()
|
||||
{
|
||||
mTab = getChild<LLTabContainer>(CONTROL_TAB_AREA);
|
||||
mTxtName = getChild<LLLineEditor>(FIELD_SETTINGS_NAME);
|
||||
|
||||
mTxtName->setCommitOnFocusLost(TRUE);
|
||||
mTxtName->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNameChanged(mTxtName->getValue().asString()); });
|
||||
|
||||
getChild<LLButton>(BUTTON_NAME_IMPORT)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonImport(); });
|
||||
getChild<LLButton>(BUTTON_NAME_CANCEL)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonCancel(); });
|
||||
|
||||
mFlyoutControl = new LLFlyoutComboBtn(this, BUTTON_NAME_COMMIT, BUTTON_NAME_FLYOUT, XML_FLYOUTMENU_FILE);
|
||||
mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); });
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onOpen(const LLSD& key)
|
||||
{
|
||||
LLUUID invid;
|
||||
|
||||
if (key.has(KEY_INVENTORY_ID))
|
||||
{
|
||||
invid = key[KEY_INVENTORY_ID].asUUID();
|
||||
}
|
||||
|
||||
loadInventoryItem(invid);
|
||||
LL_INFOS("SETTINGS") << "Setting edit inventory item to " << mInventoryId << "." << LL_ENDL;
|
||||
|
||||
updateEditEnvironment();
|
||||
syncronizeTabs();
|
||||
refresh();
|
||||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_FAST);
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onClose(bool app_quitting)
|
||||
{
|
||||
mSettings.reset();
|
||||
syncronizeTabs();
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onFocusReceived()
|
||||
{
|
||||
updateEditEnvironment();
|
||||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_FAST);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onFocusLost()
|
||||
{
|
||||
// *TODO*: If the window receiving focus is from a select color or select image control...
|
||||
// We have technically not changed out of what we are doing so don't change back to displaying
|
||||
// the local environment. (unfortunately the focus manager has
|
||||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::refresh()
|
||||
{
|
||||
if (!mSettings)
|
||||
{
|
||||
// disable everything.
|
||||
return;
|
||||
}
|
||||
|
||||
bool is_inventory_avail = canUseInventory();
|
||||
|
||||
mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail);
|
||||
mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail);
|
||||
|
||||
mTxtName->setValue(mSettings->getName());
|
||||
|
||||
S32 count = mTab->getTabCount();
|
||||
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(mTab->getPanelByIndex(idx));
|
||||
if (panel)
|
||||
panel->refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::syncronizeTabs()
|
||||
{
|
||||
S32 count = mTab->getTabCount();
|
||||
|
||||
for (S32 idx = 0; idx < count; ++idx)
|
||||
{
|
||||
LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(mTab->getPanelByIndex(idx));
|
||||
if (panel)
|
||||
panel->setSettings(mSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId)
|
||||
{
|
||||
if (inventoryId.isNull())
|
||||
{
|
||||
mInventoryItem = nullptr;
|
||||
mInventoryId.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
mInventoryId = inventoryId;
|
||||
LL_INFOS("SETTINGS") << "Setting edit inventory item to " << mInventoryId << "." << LL_ENDL;
|
||||
mInventoryItem = gInventory.getItem(mInventoryId);
|
||||
|
||||
if (!mInventoryItem)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Could not find inventory item with Id = " << mInventoryId << LL_ENDL;
|
||||
mInventoryId.setNull();
|
||||
mInventoryItem = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
|
||||
[this](LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status, LLExtStat) { onAssetLoaded(asset_id, settins, status); });
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status)
|
||||
{
|
||||
mSettings = settins;
|
||||
updateEditEnvironment();
|
||||
syncronizeTabs();
|
||||
refresh();
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onNameChanged(const std::string &name)
|
||||
{
|
||||
mSettings->setName(name);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onButtonImport()
|
||||
{
|
||||
doImportFromDisk();
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
|
||||
{
|
||||
std::string ctrl_action = ctrl->getName();
|
||||
|
||||
if (ctrl_action == ACTION_SAVE)
|
||||
{
|
||||
doApplyUpdateInventory();
|
||||
}
|
||||
else if (ctrl_action == ACTION_SAVEAS)
|
||||
{
|
||||
doApplyCreateNewInventory();
|
||||
}
|
||||
else if ((ctrl_action == ACTION_APPLY_LOCAL) ||
|
||||
(ctrl_action == ACTION_APPLY_PARCEL) ||
|
||||
(ctrl_action == ACTION_APPLY_REGION))
|
||||
{
|
||||
doApplyEnvironment(ctrl_action);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Unknown settings action '" << ctrl_action << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onButtonCancel()
|
||||
{
|
||||
// *TODO*: If changed issue a warning?
|
||||
this->closeFloater();
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::doApplyCreateNewInventory()
|
||||
{
|
||||
// This method knows what sort of settings object to create.
|
||||
LLSettingsVOBase::createInventoryItem(mSettings, [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::doApplyUpdateInventory()
|
||||
{
|
||||
if (mInventoryId.isNull())
|
||||
LLSettingsVOBase::createInventoryItem(mSettings, [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
|
||||
else
|
||||
LLSettingsVOBase::updateInventoryItem(mSettings, mInventoryId, [this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryUpdated(asset_id, inventory_id, results); });
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
|
||||
{
|
||||
LLEnvironment::EnvSelection_t env(LLEnvironment::ENV_DEFAULT);
|
||||
bool updateSimulator( where != ACTION_APPLY_LOCAL );
|
||||
|
||||
if (where == ACTION_APPLY_LOCAL)
|
||||
env = LLEnvironment::ENV_LOCAL;
|
||||
else if (where == ACTION_APPLY_PARCEL)
|
||||
env = LLEnvironment::ENV_PARCEL;
|
||||
else if (where == ACTION_APPLY_REGION)
|
||||
env = LLEnvironment::ENV_REGION;
|
||||
else
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Unknown apply '" << where << "'" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
LLEnvironment::instance().setEnvironment(env, mSettings);
|
||||
if (updateSimulator)
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Attempting apply" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results)
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been created with asset " << asset_id << " results are:" << results << LL_ENDL;
|
||||
|
||||
setFocus(TRUE); // Call back the focus...
|
||||
loadInventoryItem(inventory_id);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::onInventoryUpdated(LLUUID asset_id, LLUUID inventory_id, LLSD results)
|
||||
{
|
||||
LL_WARNS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been updated with asset " << asset_id << " results are:" << results << LL_ENDL;
|
||||
|
||||
if (inventory_id != mInventoryId)
|
||||
{
|
||||
loadInventoryItem(inventory_id);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
bool LLFloaterFixedEnvironment::canUseInventory() const
|
||||
{
|
||||
return LLEnvironment::instance().isInventoryEnabled();
|
||||
}
|
||||
|
||||
bool LLFloaterFixedEnvironment::canApplyRegion() const
|
||||
{
|
||||
return gAgent.canManageEstate();
|
||||
}
|
||||
|
||||
bool LLFloaterFixedEnvironment::canApplyParcel() const
|
||||
{
|
||||
LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection());
|
||||
LLParcel *parcel(nullptr);
|
||||
|
||||
if (handle)
|
||||
parcel = handle->getParcel();
|
||||
if (!parcel)
|
||||
parcel = LLViewerParcelMgr::instance().getAgentParcel();
|
||||
|
||||
if (!parcel)
|
||||
return false;
|
||||
|
||||
return parcel->allowModifyBy(gAgent.getID(), gAgent.getGroupID()) &&
|
||||
LLEnvironment::instance().isExtendedEnvironmentEnabled();
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
LLFloaterFixedEnvironmentWater::LLFloaterFixedEnvironmentWater(const LLSD &key):
|
||||
LLFloaterFixedEnvironment(key)
|
||||
{}
|
||||
|
||||
BOOL LLFloaterFixedEnvironmentWater::postBuild()
|
||||
{
|
||||
if (!LLFloaterFixedEnvironment::postBuild())
|
||||
return FALSE;
|
||||
|
||||
LLPanelSettingsWater * panel;
|
||||
panel = new LLPanelSettingsWaterMainTab;
|
||||
panel->buildFromFile("panel_settings_water.xml");
|
||||
panel->setWater(std::static_pointer_cast<LLSettingsWater>(mSettings));
|
||||
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentWater::updateEditEnvironment(void)
|
||||
{
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT,
|
||||
std::static_pointer_cast<LLSettingsWater>(mSettings));
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentWater::onOpen(const LLSD& key)
|
||||
{
|
||||
if (!mSettings)
|
||||
{
|
||||
// Initialize the settings, take a snapshot of the current water.
|
||||
mSettings = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_CURRENT)->buildClone();
|
||||
mSettings->setName("Snapshot water (new)");
|
||||
|
||||
// TODO: Should we grab sky and keep it around for reference?
|
||||
}
|
||||
|
||||
LLFloaterFixedEnvironment::onOpen(key);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentWater::onClose(bool app_quitting)
|
||||
{
|
||||
LLFloaterFixedEnvironment::onClose(app_quitting);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentWater::doImportFromDisk()
|
||||
{ // Load a a legacy Windlight XML from disk.
|
||||
|
||||
LLFilePicker& picker = LLFilePicker::instance();
|
||||
if (picker.getOpenFile(LLFilePicker::FFLOAD_XML))
|
||||
{
|
||||
std::string filename = picker.getFirstFile();
|
||||
|
||||
LL_WARNS("LAPRAS") << "Selected file: " << filename << LL_ENDL;
|
||||
LLSettingsWater::ptr_t legacywater = LLEnvironment::createWaterFromLegacyPreset(filename);
|
||||
|
||||
if (!legacywater)
|
||||
{ // *TODO* Put up error dialog here. Could not create water from filename
|
||||
return;
|
||||
}
|
||||
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacywater);
|
||||
this->setEditSettings(legacywater);
|
||||
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST, true);
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
LLFloaterFixedEnvironmentSky::LLFloaterFixedEnvironmentSky(const LLSD &key) :
|
||||
LLFloaterFixedEnvironment(key)
|
||||
{}
|
||||
|
||||
BOOL LLFloaterFixedEnvironmentSky::postBuild()
|
||||
{
|
||||
if (!LLFloaterFixedEnvironment::postBuild())
|
||||
return FALSE;
|
||||
|
||||
LLPanelSettingsSky * panel;
|
||||
panel = new LLPanelSettingsSkyAtmosTab;
|
||||
panel->buildFromFile("panel_settings_sky_atmos.xml");
|
||||
panel->setSky(std::static_pointer_cast<LLSettingsSky>(mSettings));
|
||||
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
|
||||
|
||||
panel = new LLPanelSettingsSkyCloudTab;
|
||||
panel->buildFromFile("panel_settings_sky_clouds.xml");
|
||||
panel->setSky(std::static_pointer_cast<LLSettingsSky>(mSettings));
|
||||
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false));
|
||||
|
||||
panel = new LLPanelSettingsSkySunMoonTab;
|
||||
panel->buildFromFile("panel_settings_sky_sunmoon.xml");
|
||||
panel->setSky(std::static_pointer_cast<LLSettingsSky>(mSettings));
|
||||
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentSky::updateEditEnvironment(void)
|
||||
{
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT,
|
||||
std::static_pointer_cast<LLSettingsSky>(mSettings));
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentSky::onOpen(const LLSD& key)
|
||||
{
|
||||
if (!mSettings)
|
||||
{
|
||||
// Initialize the settings, take a snapshot of the current water.
|
||||
mSettings = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_CURRENT)->buildClone();
|
||||
mSettings->setName("Snapshot sky (new)");
|
||||
|
||||
// TODO: Should we grab water and keep it around for reference?
|
||||
}
|
||||
|
||||
LLFloaterFixedEnvironment::onOpen(key);
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentSky::onClose(bool app_quitting)
|
||||
{
|
||||
LLFloaterFixedEnvironment::onClose(app_quitting);
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironmentSky::doImportFromDisk()
|
||||
{ // Load a a legacy Windlight XML from disk.
|
||||
|
||||
LLFilePicker& picker = LLFilePicker::instance();
|
||||
if (picker.getOpenFile(LLFilePicker::FFLOAD_XML))
|
||||
{
|
||||
std::string filename = picker.getFirstFile();
|
||||
|
||||
LL_WARNS("LAPRAS") << "Selected file: " << filename << LL_ENDL;
|
||||
LLSettingsSky::ptr_t legacysky = LLEnvironment::createSkyFromLegacyPreset(filename);
|
||||
|
||||
if (!legacysky)
|
||||
{ // *TODO* Put up error dialog here. Could not create water from filename
|
||||
return;
|
||||
}
|
||||
|
||||
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacysky);
|
||||
this->setEditSettings(legacysky);
|
||||
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST, true);
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
/**
|
||||
* @file llfloaterfixedenvironment.h
|
||||
* @brief Floaters to create and edit fixed settings for sky and water.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_FLOATERFIXEDENVIRONMENT_H
|
||||
#define LL_FLOATERFIXEDENVIRONMENT_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llsettingsbase.h"
|
||||
#include "llflyoutcombobtn.h"
|
||||
#include "llinventory.h"
|
||||
|
||||
class LLTabContainer;
|
||||
class LLButton;
|
||||
class LLLineEditor;
|
||||
|
||||
/**
|
||||
* Floater container for creating and editing fixed environment settings.
|
||||
*/
|
||||
class LLFloaterFixedEnvironment : public LLFloater
|
||||
{
|
||||
LOG_CLASS(LLFloaterFixedEnvironment);
|
||||
|
||||
public:
|
||||
static const std::string KEY_INVENTORY_ID;
|
||||
|
||||
LLFloaterFixedEnvironment(const LLSD &key);
|
||||
~LLFloaterFixedEnvironment();
|
||||
|
||||
virtual BOOL postBuild() override;
|
||||
virtual void onOpen(const LLSD& key) override;
|
||||
virtual void onClose(bool app_quitting) override;
|
||||
|
||||
virtual void onFocusReceived() override;
|
||||
virtual void onFocusLost() override;
|
||||
|
||||
void setEditSettings(const LLSettingsBase::ptr_t &settings) { mSettings = settings; syncronizeTabs(); refresh(); }
|
||||
LLSettingsBase::ptr_t getEditSettings() const { return mSettings; }
|
||||
|
||||
protected:
|
||||
virtual void updateEditEnvironment() = 0;
|
||||
virtual void refresh() override;
|
||||
virtual void syncronizeTabs();
|
||||
|
||||
void loadInventoryItem(const LLUUID &inventoryId);
|
||||
|
||||
LLTabContainer * mTab;
|
||||
LLLineEditor * mTxtName;
|
||||
|
||||
LLSettingsBase::ptr_t mSettings;
|
||||
|
||||
virtual void doImportFromDisk() = 0;
|
||||
virtual void doApplyCreateNewInventory();
|
||||
virtual void doApplyUpdateInventory();
|
||||
virtual void doApplyEnvironment(const std::string &where);
|
||||
|
||||
bool canUseInventory() const;
|
||||
bool canApplyRegion() const;
|
||||
bool canApplyParcel() const;
|
||||
|
||||
LLFlyoutComboBtn * mFlyoutControl;
|
||||
|
||||
LLUUID mInventoryId;
|
||||
LLInventoryItem * mInventoryItem;
|
||||
|
||||
void onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results);
|
||||
void onInventoryUpdated(LLUUID asset_id, LLUUID inventory_id, LLSD results);
|
||||
|
||||
private:
|
||||
void onNameChanged(const std::string &name);
|
||||
|
||||
void onButtonImport();
|
||||
void onButtonApply(LLUICtrl *ctrl, const LLSD &data);
|
||||
void onButtonCancel();
|
||||
|
||||
void onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status);
|
||||
};
|
||||
|
||||
class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment
|
||||
{
|
||||
LOG_CLASS(LLFloaterFixedEnvironmentWater);
|
||||
|
||||
public:
|
||||
LLFloaterFixedEnvironmentWater(const LLSD &key);
|
||||
|
||||
BOOL postBuild() override;
|
||||
|
||||
virtual void onOpen(const LLSD& key) override;
|
||||
virtual void onClose(bool app_quitting) override;
|
||||
|
||||
protected:
|
||||
virtual void updateEditEnvironment() override;
|
||||
|
||||
virtual void doImportFromDisk() override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class LLFloaterFixedEnvironmentSky : public LLFloaterFixedEnvironment
|
||||
{
|
||||
LOG_CLASS(LLFloaterFixedEnvironmentSky);
|
||||
|
||||
public:
|
||||
LLFloaterFixedEnvironmentSky(const LLSD &key);
|
||||
|
||||
BOOL postBuild() override;
|
||||
|
||||
virtual void onOpen(const LLSD& key) override;
|
||||
virtual void onClose(bool app_quitting) override;
|
||||
|
||||
protected:
|
||||
virtual void updateEditEnvironment() override;
|
||||
|
||||
virtual void doImportFromDisk() override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class LLSettingsEditPanel : public LLPanel
|
||||
{
|
||||
public:
|
||||
virtual void setSettings(LLSettingsBase::ptr_t &) = 0;
|
||||
|
||||
// virtual void refresh() override;
|
||||
|
||||
protected:
|
||||
LLSettingsEditPanel() :
|
||||
LLPanel()
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_FLOATERFIXEDENVIRONMENT_H
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
* @file llsaveoutfitcombobtn.cpp
|
||||
* @brief Represents outfit save/save as combo button.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llflyoutcombobtn.h"
|
||||
#include "llviewermenu.h"
|
||||
|
||||
LLFlyoutComboBtn::LLFlyoutComboBtn(LLPanel* parent, const std::string &action_button, const std::string &flyout_button, const std::string &menu_file) :
|
||||
mParent(parent),
|
||||
mActionButton(action_button),
|
||||
mFlyoutButton(flyout_button)
|
||||
{
|
||||
// register action mapping before creating menu
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar;
|
||||
save_registar.add("FlyoutCombo.Button.Action", [this](LLUICtrl *ctrl, const LLSD &data) { onFlyoutItemSelected(ctrl, data); });
|
||||
|
||||
mParent->childSetAction(flyout_button, [this](LLUICtrl *ctrl, const LLSD &data) { onFlyoutButton(ctrl, data); });
|
||||
mParent->childSetAction(action_button, [this](LLUICtrl *ctrl, const LLSD &data) { onFlyoutAction(ctrl, data); });
|
||||
|
||||
mFlyoutMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu> (menu_file, gMenuHolder,
|
||||
LLViewerMenuHolderGL::child_registry_t::instance());
|
||||
|
||||
// select the first item in the list.
|
||||
setSelectedItem(0);
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::setAction(LLUICtrl::commit_callback_t cb)
|
||||
{
|
||||
mActionSignal.connect(cb);
|
||||
}
|
||||
|
||||
|
||||
U32 LLFlyoutComboBtn::getItemCount()
|
||||
{
|
||||
return mFlyoutMenu->getItemCount();
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::setSelectedItem(S32 itemno)
|
||||
{
|
||||
LLMenuItemGL *pitem = mFlyoutMenu->getItem(itemno);
|
||||
setSelectedItem(pitem);
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::setSelectedItem(const std::string &item)
|
||||
{
|
||||
LLMenuItemGL *pitem = mFlyoutMenu->getChild<LLMenuItemGL>(item, false);
|
||||
setSelectedItem(pitem);
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::setSelectedItem(LLMenuItemGL *pitem)
|
||||
{
|
||||
if (!pitem)
|
||||
{
|
||||
LL_WARNS("INTERFACE") << "NULL item selected" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
mSelectedName = pitem->getName();
|
||||
|
||||
LLButton *action_button = mParent->getChild<LLButton>(mActionButton);
|
||||
action_button->setEnabled(pitem->getEnabled());
|
||||
action_button->setLabel(pitem->getLabel());
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::setMenuItemEnabled(const std::string& item, bool enabled)
|
||||
{
|
||||
mFlyoutMenu->setItemEnabled(item, enabled);
|
||||
if (item == mSelectedName)
|
||||
{
|
||||
mParent->getChildView(mActionButton)->setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::setShownBtnEnabled(bool enabled)
|
||||
{
|
||||
mParent->getChildView(mActionButton)->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::onFlyoutButton(LLUICtrl *ctrl, const LLSD &data)
|
||||
{
|
||||
S32 x, y;
|
||||
LLUI::getMousePositionLocal(mParent, &x, &y);
|
||||
|
||||
mFlyoutMenu->updateParent(LLMenuGL::sMenuContainer);
|
||||
LLMenuGL::showPopup(mParent, mFlyoutMenu, x, y);
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::onFlyoutItemSelected(LLUICtrl *ctrl, const LLSD &data)
|
||||
{
|
||||
LLMenuItemGL *pmenuitem = static_cast<LLMenuItemGL*>(ctrl);
|
||||
setSelectedItem(pmenuitem);
|
||||
|
||||
onFlyoutAction(pmenuitem, data);
|
||||
}
|
||||
|
||||
void LLFlyoutComboBtn::onFlyoutAction(LLUICtrl *ctrl, const LLSD &data)
|
||||
{
|
||||
LLMenuItemGL *pmenuitem = mFlyoutMenu->getChild<LLMenuItemGL>(mSelectedName);
|
||||
|
||||
if (!mActionSignal.empty())
|
||||
mActionSignal(pmenuitem, data);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/**
|
||||
* @file llsaveoutfitcombobtn.h
|
||||
* @brief Represents outfit save/save as combo button.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLSAVECOMBOBTN_H
|
||||
#define LL_LLSAVECOMBOBTN_H
|
||||
|
||||
/*TODO: Make this button generic */
|
||||
|
||||
class LLButton;
|
||||
|
||||
#include "lltoggleablemenu.h"
|
||||
|
||||
/**
|
||||
* Represents outfit Save/Save As combo button.
|
||||
*/
|
||||
class LLFlyoutComboBtn
|
||||
{
|
||||
LOG_CLASS(LLFlyoutComboBtn);
|
||||
public:
|
||||
LLFlyoutComboBtn(LLPanel* parent, const std::string &action_button, const std::string &flyout_button, const std::string &menu_file);
|
||||
|
||||
void setMenuItemEnabled(const std::string &item, bool enabled);
|
||||
void setShownBtnEnabled(bool enabled);
|
||||
|
||||
U32 getItemCount();
|
||||
void setSelectedItem(S32 itemno);
|
||||
void setSelectedItem(const std::string &item);
|
||||
|
||||
void setAction(LLUICtrl::commit_callback_t cb);
|
||||
|
||||
protected:
|
||||
void onFlyoutButton(LLUICtrl *, const LLSD &);
|
||||
void onFlyoutItemSelected(LLUICtrl *, const LLSD &);
|
||||
void onFlyoutAction(LLUICtrl *, const LLSD &);
|
||||
|
||||
void setSelectedItem(LLMenuItemGL *pitem);
|
||||
|
||||
private:
|
||||
LLPanel * mParent;
|
||||
LLToggleableMenu * mFlyoutMenu;
|
||||
std::string mActionButton;
|
||||
std::string mFlyoutButton;
|
||||
|
||||
std::string mSelectedName;
|
||||
|
||||
LLUICtrl::commit_signal_t mActionSignal;
|
||||
};
|
||||
#endif // LL_LLSAVEOUTFITCOMBOBTN_H
|
||||
|
|
@ -82,6 +82,8 @@
|
|||
#include "lllandmarkactions.h"
|
||||
#include "llpanellandmarks.h"
|
||||
|
||||
#include "llenvironment.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
|
||||
|
|
@ -4029,10 +4031,18 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
|
|||
items.push_back(std::string("New Gesture"));
|
||||
items.push_back(std::string("New Clothes"));
|
||||
items.push_back(std::string("New Body Parts"));
|
||||
items.push_back(std::string("New Settings"));
|
||||
items.push_back(std::string("upload_def"));
|
||||
|
||||
if (!LLEnvironment::instance().isInventoryEnabled())
|
||||
{
|
||||
disabled_items.push_back("New Settings");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
getClipboardEntries(false, items, disabled_items, flags);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -6900,7 +6910,11 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
|
|||
|
||||
void LLSettingsBridge::openItem()
|
||||
{
|
||||
LLItemBridge::openItem();
|
||||
LLViewerInventoryItem* item = getItem();
|
||||
if (item)
|
||||
{
|
||||
LLInvFVBridgeAction::doAction(item->getType(), mUUID, getInventoryModel());
|
||||
}
|
||||
}
|
||||
|
||||
void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
|
|
@ -7261,6 +7275,40 @@ void LLWearableBridgeAction::wearOnAvatar()
|
|||
}
|
||||
}
|
||||
|
||||
class LLSettingsBridgeAction
|
||||
: public LLInvFVBridgeAction
|
||||
{
|
||||
friend class LLInvFVBridgeAction;
|
||||
public:
|
||||
virtual void doIt()
|
||||
{
|
||||
LLViewerInventoryItem* item = getItem();
|
||||
if (item)
|
||||
{
|
||||
LLSettingsType::type_e type = item->getSettingsType();
|
||||
switch (type)
|
||||
{
|
||||
case LLSettingsType::ST_SKY:
|
||||
LLFloaterReg::showInstance("env_fixed_environmentent_sky", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES);
|
||||
break;
|
||||
case LLSettingsType::ST_WATER:
|
||||
LLFloaterReg::showInstance("env_fixed_environmentent_water", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES);
|
||||
break;
|
||||
case LLSettingsType::ST_DAYCYCLE:
|
||||
//LLFloaterReg::showInstance("env_fixed_environmentent_day", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
LLInvFVBridgeAction::doIt();
|
||||
}
|
||||
virtual ~LLSettingsBridgeAction(){}
|
||||
protected:
|
||||
LLSettingsBridgeAction(const LLUUID& id, LLInventoryModel* model) : LLInvFVBridgeAction(id, model) {}
|
||||
};
|
||||
|
||||
|
||||
LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type,
|
||||
const LLUUID& uuid,
|
||||
LLInventoryModel* model)
|
||||
|
|
@ -7299,6 +7347,9 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_
|
|||
case LLAssetType::AT_BODYPART:
|
||||
action = new LLWearableBridgeAction(uuid,model);
|
||||
break;
|
||||
case LLAssetType::AT_SETTINGS:
|
||||
action = new LLSettingsBridgeAction(uuid, model);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,388 @@
|
|||
/**
|
||||
* @file llpaneleditsky.cpp
|
||||
* @brief Floaters to create and edit fixed settings for sky and water.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llpaneleditsky.h"
|
||||
|
||||
#include "llslider.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llcolorswatch.h"
|
||||
#include "lljoystickbutton.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
// Atmosphere Tab
|
||||
const std::string FIELD_SKY_AMBIENT_LIGHT("ambient_light");
|
||||
const std::string FIELD_SKY_BLUE_HORIZON("blue_horizon");
|
||||
const std::string FIELD_SKY_BLUE_DENSITY("blue_density");
|
||||
const std::string FIELD_SKY_HAZE_HORIZON("haze_horizon");
|
||||
const std::string FIELD_SKY_HAZE_DENSITY("haze_density");
|
||||
const std::string FIELD_SKY_SCENE_GAMMA("scene_gamma");
|
||||
const std::string FIELD_SKY_DENSITY_MULTIP("density_multip");
|
||||
const std::string FIELD_SKY_DISTANCE_MULTIP("distance_multip");
|
||||
const std::string FIELD_SKY_MAX_ALT("max_alt");
|
||||
|
||||
const std::string FIELD_SKY_CLOUD_COLOR("cloud_color");
|
||||
const std::string FIELD_SKY_CLOUD_COVERAGE("cloud_coverage");
|
||||
const std::string FIELD_SKY_CLOUD_SCALE("cloud_scale");
|
||||
const std::string FIELD_SKY_CLOUD_SCROLL_X("cloud_scroll_x");
|
||||
const std::string FIELD_SKY_CLOUD_SCROLL_Y("cloud_scroll_y");
|
||||
const std::string FIELD_SKY_CLOUD_MAP("cloud_map");
|
||||
const std::string FIELD_SKY_CLOUD_DENSITY_X("cloud_density_x");
|
||||
const std::string FIELD_SKY_CLOUD_DENSITY_Y("cloud_density_y");
|
||||
const std::string FIELD_SKY_CLOUD_DENSITY_D("cloud_density_d");
|
||||
const std::string FIELD_SKY_CLOUD_DETAIL_X("cloud_detail_x");
|
||||
const std::string FIELD_SKY_CLOUD_DETAIL_Y("cloud_detail_y");
|
||||
const std::string FIELD_SKY_CLOUD_DETAIL_D("cloud_detail_d");
|
||||
|
||||
const std::string FIELD_SKY_SUN_MOON_COLOR("sun_moon_color");
|
||||
const std::string FIELD_SKY_GLOW_FOCUS("glow_focus");
|
||||
const std::string FIELD_SKY_GLOW_SIZE("glow_size");
|
||||
const std::string FIELD_SKY_STAR_BRIGHTNESS("star_brightness");
|
||||
const std::string FIELD_SKY_SUN_ROTATION("sun_rotation");
|
||||
const std::string FIELD_SKY_SUN_IMAGE("sun_image");
|
||||
const std::string FIELD_SKY_MOON_ROTATION("moon_rotation");
|
||||
const std::string FIELD_SKY_MOON_IMAGE("moon_image");
|
||||
|
||||
const F32 SLIDER_SCALE_SUN_AMBIENT(3.0f);
|
||||
const F32 SLIDER_SCALE_BLUE_HORIZON_DENSITY(2.0f);
|
||||
const F32 SLIDER_SCALE_GLOW_R(20.0f);
|
||||
const F32 SLIDER_SCALE_GLOW_B(-5.0f);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
LLPanelSettingsSky::LLPanelSettingsSky() :
|
||||
LLSettingsEditPanel(),
|
||||
mSkySettings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
LLPanelSettingsSkyAtmosTab::LLPanelSettingsSkyAtmosTab() :
|
||||
LLPanelSettingsSky()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BOOL LLPanelSettingsSkyAtmosTab::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_BLUE_DENSITY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueDensityChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onHazeHorizonChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onHazeDensityChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSceneGammaChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onDensityMultipChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onDistanceMultipChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMaxAltChanged(); });
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::refresh()
|
||||
{
|
||||
if (!mSkySettings)
|
||||
{
|
||||
setAllChildrenEnabled(FALSE);
|
||||
setEnabled(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
setEnabled(TRUE);
|
||||
setAllChildrenEnabled(TRUE);
|
||||
|
||||
getChild<LLColorSwatchCtrl>(FIELD_SKY_AMBIENT_LIGHT)->set(mSkySettings->getAmbientColor() / SLIDER_SCALE_SUN_AMBIENT);
|
||||
getChild<LLColorSwatchCtrl>(FIELD_SKY_BLUE_HORIZON)->set(mSkySettings->getBlueHorizon() / SLIDER_SCALE_BLUE_HORIZON_DENSITY);
|
||||
getChild<LLColorSwatchCtrl>(FIELD_SKY_BLUE_DENSITY)->set(mSkySettings->getBlueDensity() / SLIDER_SCALE_BLUE_HORIZON_DENSITY);
|
||||
|
||||
getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->setValue(mSkySettings->getHazeHorizon());
|
||||
getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->setValue(mSkySettings->getHazeDensity());
|
||||
getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setValue(mSkySettings->getGamma());
|
||||
getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->setValue(mSkySettings->getDensityMultiplier());
|
||||
getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->setValue(mSkySettings->getDistanceMultiplier());
|
||||
getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->setValue(mSkySettings->getMaxY());
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void LLPanelSettingsSkyAtmosTab::onAmbientLightChanged()
|
||||
{
|
||||
mSkySettings->setAmbientColor(LLColor3(getChild<LLColorSwatchCtrl>(FIELD_SKY_AMBIENT_LIGHT)->get() * SLIDER_SCALE_SUN_AMBIENT));
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onBlueHorizonChanged()
|
||||
{
|
||||
mSkySettings->setBlueHorizon(LLColor3(getChild<LLColorSwatchCtrl>(FIELD_SKY_BLUE_HORIZON)->get() * SLIDER_SCALE_BLUE_HORIZON_DENSITY));
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onBlueDensityChanged()
|
||||
{
|
||||
mSkySettings->setBlueDensity(LLColor3(getChild<LLColorSwatchCtrl>(FIELD_SKY_BLUE_DENSITY)->get() * SLIDER_SCALE_BLUE_HORIZON_DENSITY));
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onHazeHorizonChanged()
|
||||
{
|
||||
mSkySettings->setHazeHorizon(getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onHazeDensityChanged()
|
||||
{
|
||||
mSkySettings->setHazeDensity(getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onSceneGammaChanged()
|
||||
{
|
||||
mSkySettings->setGamma(getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onDensityMultipChanged()
|
||||
{
|
||||
mSkySettings->setDensityMultiplier(getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onDistanceMultipChanged()
|
||||
{
|
||||
mSkySettings->setDistanceMultiplier(getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::onMaxAltChanged()
|
||||
{
|
||||
mSkySettings->setMaxY(getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->getValue().asReal());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
LLPanelSettingsSkyCloudTab::LLPanelSettingsSkyCloudTab() :
|
||||
LLPanelSettingsSky()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BOOL LLPanelSettingsSkyCloudTab::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudColorChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudCoverageChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScaleChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); });
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); });
|
||||
// getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::DEFAULT_CLOUD_TEXTURE_ID);
|
||||
|
||||
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(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDetailChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDetailChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDetailChanged(); });
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::refresh()
|
||||
{
|
||||
if (!mSkySettings)
|
||||
{
|
||||
setAllChildrenEnabled(FALSE);
|
||||
setEnabled(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
setEnabled(TRUE);
|
||||
setAllChildrenEnabled(TRUE);
|
||||
|
||||
getChild<LLColorSwatchCtrl>(FIELD_SKY_CLOUD_COLOR)->set(mSkySettings->getCloudColor());
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setValue(mSkySettings->getCloudShadow());
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setValue(mSkySettings->getCloudScale());
|
||||
|
||||
LLVector2 cloudScroll(mSkySettings->getCloudScrollRate());
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_X)->setValue(cloudScroll[0]);
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_Y)->setValue(cloudScroll[1]);
|
||||
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setValue(mSkySettings->getCloudNoiseTextureId());
|
||||
|
||||
LLVector3 cloudDensity(mSkySettings->getCloudPosDensity1().getValue());
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setValue(cloudDensity[0]);
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setValue(cloudDensity[1]);
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->setValue(cloudDensity[2]);
|
||||
|
||||
LLVector3 cloudDetail(mSkySettings->getCloudPosDensity1().getValue());
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->setValue(cloudDetail[0]);
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->setValue(cloudDetail[1]);
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->setValue(cloudDetail[2]);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void LLPanelSettingsSkyCloudTab::onCloudColorChanged()
|
||||
{
|
||||
mSkySettings->setCloudColor(LLColor3(getChild<LLColorSwatchCtrl>(FIELD_SKY_CLOUD_COLOR)->get()));
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudCoverageChanged()
|
||||
{
|
||||
mSkySettings->setCloudShadow(getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudScaleChanged()
|
||||
{
|
||||
mSkySettings->setCloudScale(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudScrollChanged()
|
||||
{
|
||||
LLVector2 scroll(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_X)->getValue().asReal(),
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_Y)->getValue().asReal());
|
||||
|
||||
mSkySettings->setCloudScrollRate(scroll);
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudMapChanged()
|
||||
{
|
||||
mSkySettings->setCloudNoiseTextureId(getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->getValue().asUUID());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudDensityChanged()
|
||||
{
|
||||
LLColor3 density(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(),
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(),
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal());
|
||||
|
||||
mSkySettings->setCloudPosDensity1(density);
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkyCloudTab::onCloudDetailChanged()
|
||||
{
|
||||
LLColor3 detail(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->getValue().asReal(),
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->getValue().asReal(),
|
||||
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->getValue().asReal());
|
||||
|
||||
mSkySettings->setCloudPosDensity2(detail);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
LLPanelSettingsSkySunMoonTab::LLPanelSettingsSkySunMoonTab() :
|
||||
LLPanelSettingsSky()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BOOL LLPanelSettingsSkySunMoonTab::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>(FIELD_SKY_SUN_MOON_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoonColorChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onStarBrightnessChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_SUN_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunRotationChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_SKY_SUN_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunImageChanged(); });
|
||||
// getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky:: );
|
||||
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:: );
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::refresh()
|
||||
{
|
||||
if (!mSkySettings)
|
||||
{
|
||||
setAllChildrenEnabled(FALSE);
|
||||
setEnabled(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
setEnabled(TRUE);
|
||||
setAllChildrenEnabled(TRUE);
|
||||
|
||||
getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT);
|
||||
|
||||
LLColor3 glow(mSkySettings->getGlow());
|
||||
|
||||
glow.mV[0] = 2 - (glow.mV[0] / SLIDER_SCALE_GLOW_R);
|
||||
glow.mV[2] /= SLIDER_SCALE_GLOW_B;
|
||||
|
||||
getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[0]);
|
||||
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setValue(glow.mV[2]);
|
||||
|
||||
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setValue(mSkySettings->getStarBrightness());
|
||||
getChild<LLJoystickQuaternion>(FIELD_SKY_SUN_ROTATION)->setRotation(mSkySettings->getSunRotation());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setValue(mSkySettings->getSunTextureId());
|
||||
getChild<LLJoystickQuaternion>(FIELD_SKY_MOON_ROTATION)->setRotation(mSkySettings->getMoonRotation());
|
||||
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setValue(mSkySettings->getMoonTextureId());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void LLPanelSettingsSkySunMoonTab::onSunMoonColorChanged()
|
||||
{
|
||||
LLColor3 color(getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->get());
|
||||
|
||||
color *= SLIDER_SCALE_SUN_AMBIENT;
|
||||
|
||||
mSkySettings->setSunlightColor(color);
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::onGlowChanged()
|
||||
{
|
||||
LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal(), 0.0f,
|
||||
getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal());
|
||||
|
||||
glow.mV[0] = (2 - glow.mV[0]) * SLIDER_SCALE_GLOW_R;
|
||||
glow.mV[2] *= SLIDER_SCALE_GLOW_B;
|
||||
|
||||
mSkySettings->setGlow(glow);
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::onStarBrightnessChanged()
|
||||
{
|
||||
mSkySettings->setStarBrightness(getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::onSunRotationChanged()
|
||||
{
|
||||
mSkySettings->setSunRotation(getChild<LLJoystickQuaternion>(FIELD_SKY_SUN_ROTATION)->getRotation());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::onSunImageChanged()
|
||||
{
|
||||
mSkySettings->setSunTextureId(getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->getValue().asUUID());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::onMoonRotationChanged()
|
||||
{
|
||||
mSkySettings->setMoonRotation(getChild<LLJoystickQuaternion>(FIELD_SKY_MOON_ROTATION)->getRotation());
|
||||
}
|
||||
|
||||
void LLPanelSettingsSkySunMoonTab::onMoonImageChanged()
|
||||
{
|
||||
mSkySettings->setMoonTextureId(getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->getValue().asUUID());
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
/**
|
||||
* @file llpaneleditsky.h
|
||||
* @brief Panels for sky settings
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLPANEL_EDIT_SKY_H
|
||||
#define LLPANEL_EDIT_SKY_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llsettingssky.h"
|
||||
|
||||
#include "llfloaterfixedenvironment.h"
|
||||
|
||||
//=========================================================================
|
||||
class LLSlider;
|
||||
class LLColorSwatchCtrl;
|
||||
class LLTextureCtrl;
|
||||
|
||||
//=========================================================================
|
||||
class LLPanelSettingsSky : public LLSettingsEditPanel
|
||||
{
|
||||
LOG_CLASS(LLPanelSettingsSky);
|
||||
|
||||
public:
|
||||
LLPanelSettingsSky();
|
||||
|
||||
virtual void setSettings(LLSettingsBase::ptr_t &settings) override { setSky(std::static_pointer_cast<LLSettingsSky>(settings)); }
|
||||
|
||||
LLSettingsSky::ptr_t getSky() const { return mSkySettings; }
|
||||
void setSky(const LLSettingsSky::ptr_t &sky) { mSkySettings = sky; refresh(); }
|
||||
|
||||
protected:
|
||||
LLSettingsSky::ptr_t mSkySettings;
|
||||
};
|
||||
|
||||
class LLPanelSettingsSkyAtmosTab : public LLPanelSettingsSky
|
||||
{
|
||||
LOG_CLASS(LLPanelSettingsSkyAtmosTab);
|
||||
|
||||
public:
|
||||
LLPanelSettingsSkyAtmosTab();
|
||||
|
||||
virtual BOOL postBuild() override;
|
||||
|
||||
protected:
|
||||
virtual void refresh() override;
|
||||
|
||||
private:
|
||||
void onAmbientLightChanged();
|
||||
void onBlueHorizonChanged();
|
||||
void onBlueDensityChanged();
|
||||
void onHazeHorizonChanged();
|
||||
void onHazeDensityChanged();
|
||||
void onSceneGammaChanged();
|
||||
void onDensityMultipChanged();
|
||||
void onDistanceMultipChanged();
|
||||
void onMaxAltChanged();
|
||||
};
|
||||
|
||||
class LLPanelSettingsSkyCloudTab : public LLPanelSettingsSky
|
||||
{
|
||||
LOG_CLASS(LLPanelSettingsSkyCloudTab);
|
||||
|
||||
public:
|
||||
LLPanelSettingsSkyCloudTab();
|
||||
|
||||
virtual BOOL postBuild() override;
|
||||
|
||||
protected:
|
||||
virtual void refresh() override;
|
||||
|
||||
private:
|
||||
void onCloudColorChanged();
|
||||
void onCloudCoverageChanged();
|
||||
void onCloudScaleChanged();
|
||||
void onCloudScrollChanged();
|
||||
void onCloudMapChanged();
|
||||
void onCloudDensityChanged();
|
||||
void onCloudDetailChanged();
|
||||
};
|
||||
|
||||
class LLPanelSettingsSkySunMoonTab : public LLPanelSettingsSky
|
||||
{
|
||||
LOG_CLASS(LLPanelSettingsSkySunMoonTab);
|
||||
|
||||
public:
|
||||
LLPanelSettingsSkySunMoonTab();
|
||||
|
||||
virtual BOOL postBuild() override;
|
||||
|
||||
protected:
|
||||
virtual void refresh() override;
|
||||
|
||||
private:
|
||||
void onSunMoonColorChanged();
|
||||
void onGlowChanged();
|
||||
void onStarBrightnessChanged();
|
||||
void onSunRotationChanged();
|
||||
void onSunImageChanged();
|
||||
void onMoonRotationChanged();
|
||||
void onMoonImageChanged();
|
||||
};
|
||||
#endif // LLPANEL_EDIT_SKY_H
|
||||
|
|
@ -0,0 +1,213 @@
|
|||
/**
|
||||
* @file llpaneleditwater.cpp
|
||||
* @brief Floaters to create and edit fixed settings for sky and water.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llpaneleditwater.h"
|
||||
|
||||
#include "llslider.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llcolorswatch.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string FIELD_WATER_FOG_COLOR("water_fog_color");
|
||||
const std::string FIELD_WATER_FOG_DENSITY("water_fog_density");
|
||||
const std::string FIELD_WATER_UNDERWATER_MOD("water_underwater_mod");
|
||||
const std::string FIELD_WATER_NORMAL_MAP("water_normal_map");
|
||||
|
||||
const std::string FIELD_WATER_WAVE1_X("water_wave1_x");
|
||||
const std::string FIELD_WATER_WAVE1_Y("water_wave1_y");
|
||||
|
||||
const std::string FIELD_WATER_WAVE2_X("water_wave2_x");
|
||||
const std::string FIELD_WATER_WAVE2_Y("water_wave2_y");
|
||||
|
||||
const std::string FIELD_WATER_NORMAL_SCALE_X("water_normal_scale_x");
|
||||
const std::string FIELD_WATER_NORMAL_SCALE_Y("water_normal_scale_y");
|
||||
const std::string FIELD_WATER_NORMAL_SCALE_Z("water_normal_scale_z");
|
||||
|
||||
const std::string FIELD_WATER_FRESNEL_SCALE("water_fresnel_scale");
|
||||
const std::string FIELD_WATER_FRESNEL_OFFSET("water_fresnel_offset");
|
||||
|
||||
const std::string FIELD_WATER_SCALE_ABOVE("water_scale_above");
|
||||
const std::string FIELD_WATER_SCALE_BELOW("water_scale_below");
|
||||
const std::string FIELD_WATER_BLUR_MULTIP("water_blur_multip");
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
LLPanelSettingsWater::LLPanelSettingsWater() :
|
||||
LLSettingsEditPanel(),
|
||||
mWaterSettings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
LLPanelSettingsWaterMainTab::LLPanelSettingsWaterMainTab():
|
||||
LLPanelSettingsWater(),
|
||||
mClrFogColor(nullptr),
|
||||
mTxtNormalMap(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BOOL LLPanelSettingsWaterMainTab::postBuild()
|
||||
{
|
||||
mClrFogColor = getChild<LLColorSwatchCtrl>(FIELD_WATER_FOG_COLOR);
|
||||
mTxtNormalMap = getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP);
|
||||
|
||||
mClrFogColor->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogColorChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogDensityChanged(); });
|
||||
// getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogDensityChanged(getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->getValue().asReal()); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); });
|
||||
|
||||
mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::DEFAULT_WATER_NORMAL_ID);
|
||||
mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
|
||||
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE1_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLargeWaveChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE1_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLargeWaveChanged(); });
|
||||
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE2_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE2_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
|
||||
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalScaleChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalScaleChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalScaleChanged(); });
|
||||
|
||||
getChild<LLUICtrl>(FIELD_WATER_FRESNEL_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFresnelScaleChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_FRESNEL_OFFSET)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFresnelOffsetChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_SCALE_ABOVE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onScaleAboveChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_SCALE_BELOW)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onScaleBelowChanged(); });
|
||||
getChild<LLUICtrl>(FIELD_WATER_BLUR_MULTIP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlurMultipChanged(); });
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
void LLPanelSettingsWaterMainTab::refresh()
|
||||
{
|
||||
if (!mWaterSettings)
|
||||
{
|
||||
setAllChildrenEnabled(FALSE);
|
||||
setEnabled(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
setEnabled(TRUE);
|
||||
setAllChildrenEnabled(TRUE);
|
||||
mClrFogColor->set(mWaterSettings->getWaterFogColor());
|
||||
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();
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE1_X)->setValue(vect2[0]);
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE1_Y)->setValue(vect2[1]);
|
||||
vect2 = mWaterSettings->getWave2Dir();
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE2_X)->setValue(vect2[0]);
|
||||
getChild<LLUICtrl>(FIELD_WATER_WAVE2_Y)->setValue(vect2[1]);
|
||||
LLVector3 vect3 = mWaterSettings->getNormalScale();
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->setValue(vect3[0]);
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->setValue(vect3[1]);
|
||||
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->setValue(vect3[2]);
|
||||
getChild<LLUICtrl>(FIELD_WATER_FRESNEL_SCALE)->setValue(mWaterSettings->getFresnelOffset());
|
||||
getChild<LLUICtrl>(FIELD_WATER_FRESNEL_OFFSET)->setValue(mWaterSettings->getFresnelOffset());
|
||||
getChild<LLUICtrl>(FIELD_WATER_SCALE_ABOVE)->setValue(mWaterSettings->getScaleAbove());
|
||||
getChild<LLUICtrl>(FIELD_WATER_SCALE_BELOW)->setValue(mWaterSettings->getScaleBelow());
|
||||
getChild<LLUICtrl>(FIELD_WATER_BLUR_MULTIP)->setValue(mWaterSettings->getBlurMultiplier());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onFogColorChanged()
|
||||
{
|
||||
mWaterSettings->setWaterFogColor(LLColor3(mClrFogColor->get()));
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onFogDensityChanged()
|
||||
{
|
||||
mWaterSettings->setWaterFogDensity(getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onFogUnderWaterChanged()
|
||||
{
|
||||
mWaterSettings->setFogMod(getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onNormalMapChanged()
|
||||
{
|
||||
mWaterSettings->setNormalMapID(mTxtNormalMap->getImageAssetID());
|
||||
}
|
||||
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onLargeWaveChanged()
|
||||
{
|
||||
LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE1_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_WAVE1_Y)->getValue().asReal());
|
||||
LL_WARNS("LAPRAS") << "Changing Large Wave from " << mWaterSettings->getWave1Dir() << " -> " << vect << LL_ENDL;
|
||||
mWaterSettings->setWave1Dir(vect);
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onSmallWaveChanged()
|
||||
{
|
||||
LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE2_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_WAVE2_Y)->getValue().asReal());
|
||||
LL_WARNS("LAPRAS") << "Changing Small Wave from " << mWaterSettings->getWave2Dir() << " -> " << vect << LL_ENDL;
|
||||
mWaterSettings->setWave2Dir(vect);
|
||||
}
|
||||
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onNormalScaleChanged()
|
||||
{
|
||||
LLVector3 vect(getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->getValue().asReal());
|
||||
LL_WARNS("LAPRAS") << "Changing normal scale from " << mWaterSettings->getNormalScale() << " -> " << vect << LL_ENDL;
|
||||
mWaterSettings->setNormalScale(vect);
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onFresnelScaleChanged()
|
||||
{
|
||||
mWaterSettings->setFresnelScale(getChild<LLUICtrl>(FIELD_WATER_FRESNEL_SCALE)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onFresnelOffsetChanged()
|
||||
{
|
||||
mWaterSettings->setFresnelOffset(getChild<LLUICtrl>(FIELD_WATER_FRESNEL_OFFSET)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onScaleAboveChanged()
|
||||
{
|
||||
mWaterSettings->setScaleAbove(getChild<LLUICtrl>(FIELD_WATER_SCALE_ABOVE)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onScaleBelowChanged()
|
||||
{
|
||||
mWaterSettings->setScaleBelow(getChild<LLUICtrl>(FIELD_WATER_SCALE_BELOW)->getValue().asReal());
|
||||
}
|
||||
|
||||
void LLPanelSettingsWaterMainTab::onBlurMultipChanged()
|
||||
{
|
||||
mWaterSettings->setBlurMultiplier(getChild<LLUICtrl>(FIELD_WATER_BLUR_MULTIP)->getValue().asReal());
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
/**
|
||||
* @file llpaneleditwater.h
|
||||
* @brief Panels for water settings
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLPANEL_EDIT_WATER_H
|
||||
#define LLPANEL_EDIT_WATER_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llsettingswater.h"
|
||||
|
||||
#include "llfloaterfixedenvironment.h"
|
||||
|
||||
//=========================================================================
|
||||
class LLSlider;
|
||||
class LLColorSwatchCtrl;
|
||||
class LLTextureCtrl;
|
||||
|
||||
//=========================================================================
|
||||
class LLPanelSettingsWater : public LLSettingsEditPanel
|
||||
{
|
||||
LOG_CLASS(LLPanelSettingsWater);
|
||||
|
||||
public:
|
||||
LLPanelSettingsWater();
|
||||
|
||||
virtual void setSettings(LLSettingsBase::ptr_t &settings) override { setWater(std::static_pointer_cast<LLSettingsWater>(settings)); }
|
||||
|
||||
LLSettingsWater::ptr_t getWater() const { return mWaterSettings; }
|
||||
void setWater(const LLSettingsWater::ptr_t &water) { mWaterSettings = water; refresh(); }
|
||||
|
||||
protected:
|
||||
LLSettingsWater::ptr_t mWaterSettings;
|
||||
};
|
||||
|
||||
// *RIDER* In this case this split is unecessary since there is only a single
|
||||
// tab page for water settings at this point. However more may be added in the
|
||||
// future and I want to reinforce the pattern used for sky/atmosphere tabs.
|
||||
class LLPanelSettingsWaterMainTab : public LLPanelSettingsWater
|
||||
{
|
||||
LOG_CLASS(LLPanelSettingsWaterMainTab);
|
||||
|
||||
public:
|
||||
LLPanelSettingsWaterMainTab();
|
||||
|
||||
virtual BOOL postBuild() override;
|
||||
|
||||
protected:
|
||||
virtual void refresh() override;
|
||||
|
||||
private:
|
||||
|
||||
LLColorSwatchCtrl * mClrFogColor;
|
||||
// LLSlider * mSldFogDensity;
|
||||
// LLSlider * mSldUnderWaterMod;
|
||||
LLTextureCtrl * mTxtNormalMap;
|
||||
|
||||
// // Temp until XY control
|
||||
// LLSlider * mSldWave1X;
|
||||
// LLSlider * mSldWave1Y;
|
||||
//
|
||||
// // Temp until XY control
|
||||
// LLSlider * mSldWave2X;
|
||||
// LLSlider * mSldWave2Y;
|
||||
//
|
||||
// LLSlider * mSldNormalScaleX;
|
||||
// LLSlider * mSldNormalScaleY;
|
||||
// LLSlider * mSldNormalScaleZ;
|
||||
// LLSlider * mSldFresnelScale;
|
||||
// LLSlider * mSldFresnelOffset;
|
||||
// LLSlider * mSldScaleAbove;
|
||||
// LLSlider * mSldScaleBelow;
|
||||
// LLSlider * mSldBlurMultip;
|
||||
|
||||
void onFogColorChanged();
|
||||
void onFogDensityChanged();
|
||||
void onFogUnderWaterChanged();
|
||||
void onNormalMapChanged();
|
||||
|
||||
void onLargeWaveChanged();
|
||||
void onSmallWaveChanged();
|
||||
|
||||
void onNormalScaleChanged();
|
||||
void onFresnelScaleChanged();
|
||||
void onFresnelOffsetChanged();
|
||||
void onScaleAboveChanged();
|
||||
void onScaleBelowChanged();
|
||||
void onBlurMultipChanged();
|
||||
};
|
||||
|
||||
|
||||
#endif // LLPANEL_EDIT_WATER_H
|
||||
|
|
@ -55,6 +55,8 @@
|
|||
#include "llpermissions.h"
|
||||
|
||||
#include "llinventorymodel.h"
|
||||
#include "llassetstorage.h"
|
||||
#include "llvfile.h"
|
||||
|
||||
#undef VERIFY_LEGACY_CONVERSION
|
||||
|
||||
|
|
@ -101,70 +103,7 @@ private:
|
|||
|
||||
|
||||
//=========================================================================
|
||||
#if 0
|
||||
void LLSettingsVOBase::storeAsAsset(const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
LLTransactionID tid;
|
||||
tid.generate();
|
||||
|
||||
LLAssetID aid(tid.makeAssetID(gAgent.getSecureSessionID()));
|
||||
|
||||
const std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, aid.asString()) + ".setting";
|
||||
|
||||
if (!exportFile(settings, filename))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Unable to save settings file named '" << filename << "'." << LL_ENDL;
|
||||
|
||||
LLSD args;
|
||||
args["NAME"] = aid.asString() + "setting";
|
||||
LLNotificationsUtil::add("CannotSaveWearableOutOfSpace", args);
|
||||
return;
|
||||
}
|
||||
|
||||
SettingsSaveData::ptr_t psave = std::make_shared<SettingsSaveData>();
|
||||
psave->mType = settings->getSettingType();
|
||||
psave->mSettings = settings;
|
||||
psave->mTempFile = filename;
|
||||
psave->mTransId = tid;
|
||||
|
||||
gAssetStorage->storeAssetData(filename, tid, LLAssetType::AT_SETTINGS,
|
||||
[psave](const LLUUID &assetId, void *, S32 status, LLExtStat extstat) {
|
||||
onSaveNewAssetComplete(assetId, psave, status, extstat);
|
||||
},
|
||||
nullptr);
|
||||
|
||||
}
|
||||
|
||||
void testingOnGotAsset(LLVFS *vfs, const LLUUID &asset_id, LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Got back stored setting with id '" << asset_id << "' status is " << status << ":" << ext_status << LL_ENDL;
|
||||
}
|
||||
|
||||
|
||||
void LLSettingsVOBase::onSaveNewAssetComplete(const LLUUID& new_asset_id, const LLSettingsVOBase::SettingsSaveData::ptr_t &savedata,
|
||||
S32 status, LLExtStat ext_status)
|
||||
{
|
||||
if (!status)
|
||||
{
|
||||
// Success
|
||||
LL_INFOS("SETTINGS") << "Saved setting of type '" << savedata->mType << "' as " << new_asset_id << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Unable to save '" << savedata->mType << "' to central asset store." << LL_ENDL;
|
||||
LLSD args;
|
||||
args["NAME"] = savedata->mType;
|
||||
LLNotificationsUtil::add("CannotSaveToAssetStore", args);
|
||||
}
|
||||
|
||||
gAssetStorage->getAssetData(new_asset_id, LLAssetType::AT_SETTINGS, &testingOnGotAsset, nullptr);
|
||||
|
||||
std::remove(savedata->mTempFile.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void LLSettingsVOBase::createInventoryItem(const LLSettingsBase::ptr_t &settings)
|
||||
void LLSettingsVOBase::createInventoryItem(const LLSettingsBase::ptr_t &settings, inventory_result_fn callback)
|
||||
{
|
||||
LLTransactionID tid;
|
||||
LLUUID parentFolder; //= gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
|
||||
|
|
@ -172,8 +111,8 @@ void LLSettingsVOBase::createInventoryItem(const LLSettingsBase::ptr_t &settings
|
|||
|
||||
tid.generate();
|
||||
|
||||
LLPointer<LLInventoryCallback> cb = new LLSettingsInventoryCB([settings](const LLUUID &inventoryId) {
|
||||
LLSettingsVOBase::onInventoryItemCreated(inventoryId, settings);
|
||||
LLPointer<LLInventoryCallback> cb = new LLSettingsInventoryCB([settings, callback](const LLUUID &inventoryId) {
|
||||
LLSettingsVOBase::onInventoryItemCreated(inventoryId, settings, callback);
|
||||
});
|
||||
|
||||
create_inventory_settings(gAgent.getID(), gAgent.getSessionID(),
|
||||
|
|
@ -182,14 +121,13 @@ void LLSettingsVOBase::createInventoryItem(const LLSettingsBase::ptr_t &settings
|
|||
settings->getSettingTypeValue(), nextOwnerPerm, cb);
|
||||
}
|
||||
|
||||
void LLSettingsVOBase::onInventoryItemCreated(const LLUUID &inventoryId, LLSettingsBase::ptr_t settings)
|
||||
void LLSettingsVOBase::onInventoryItemCreated(const LLUUID &inventoryId, LLSettingsBase::ptr_t settings, inventory_result_fn callback)
|
||||
{
|
||||
// We need to update some inventory stuff here.... maybe.
|
||||
uploadSettingsAsset(settings, inventoryId);
|
||||
updateInventoryItem(settings, inventoryId, callback);
|
||||
}
|
||||
|
||||
|
||||
void LLSettingsVOBase::uploadSettingsAsset(const LLSettingsBase::ptr_t &settings, LLUUID inv_item_id)
|
||||
void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings, LLUUID inv_item_id, inventory_result_fn callback)
|
||||
{
|
||||
const LLViewerRegion* region = gAgent.getRegion();
|
||||
if (!region)
|
||||
|
|
@ -200,7 +138,7 @@ void LLSettingsVOBase::uploadSettingsAsset(const LLSettingsBase::ptr_t &settings
|
|||
|
||||
std::string agent_url(region->getCapability("UpdateSettingsAgentInventory"));
|
||||
|
||||
if (agent_url.empty())
|
||||
if (!LLEnvironment::instance().isInventoryEnabled())
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Region does not support settings inventory objects." << LL_ENDL;
|
||||
return;
|
||||
|
|
@ -211,14 +149,14 @@ void LLSettingsVOBase::uploadSettingsAsset(const LLSettingsBase::ptr_t &settings
|
|||
LLSDSerialize::serialize(settingdata, buffer, LLSDSerialize::LLSD_NOTATION);
|
||||
|
||||
LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLBufferedAssetUploadInfo>(inv_item_id, LLAssetType::AT_SETTINGS, buffer.str(),
|
||||
[settings](LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response) {
|
||||
LLSettingsVOBase::onAgentAssetUploadComplete(itemId, newAssetId, newItemId, response, settings);
|
||||
[settings, callback](LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response) {
|
||||
LLSettingsVOBase::onAgentAssetUploadComplete(itemId, newAssetId, newItemId, response, settings, callback);
|
||||
});
|
||||
|
||||
LLViewerAssetUpload::EnqueueInventoryUpload(agent_url, uploadInfo);
|
||||
}
|
||||
|
||||
void LLSettingsVOBase::uploadSettingsAsset(const LLSettingsBase::ptr_t &settings, LLUUID object_id, LLUUID inv_item_id)
|
||||
void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings, LLUUID object_id, LLUUID inv_item_id, inventory_result_fn callback)
|
||||
{
|
||||
const LLViewerRegion* region = gAgent.getRegion();
|
||||
if (!region)
|
||||
|
|
@ -229,7 +167,7 @@ void LLSettingsVOBase::uploadSettingsAsset(const LLSettingsBase::ptr_t &settings
|
|||
|
||||
std::string agent_url(region->getCapability("UpdateSettingsAgentInventory"));
|
||||
|
||||
if (agent_url.empty())
|
||||
if (!LLEnvironment::instance().isInventoryEnabled())
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Region does not support settings inventory objects." << LL_ENDL;
|
||||
return;
|
||||
|
|
@ -243,23 +181,71 @@ void LLSettingsVOBase::uploadSettingsAsset(const LLSettingsBase::ptr_t &settings
|
|||
LLSDSerialize::serialize(settingdata, buffer, LLSDSerialize::LLSD_NOTATION);
|
||||
|
||||
LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLBufferedAssetUploadInfo>(object_id, inv_item_id, LLAssetType::AT_SETTINGS, buffer.str(),
|
||||
[settings](LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response) {
|
||||
LLSettingsVOBase::onTaskAssetUploadComplete(itemId, taskId, newAssetId, response, settings);
|
||||
[settings, callback](LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response) {
|
||||
LLSettingsVOBase::onTaskAssetUploadComplete(itemId, taskId, newAssetId, response, settings, callback);
|
||||
});
|
||||
|
||||
LLViewerAssetUpload::EnqueueInventoryUpload(agent_url, uploadInfo);
|
||||
}
|
||||
|
||||
void LLSettingsVOBase::onAgentAssetUploadComplete(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response, LLSettingsBase::ptr_t psettings)
|
||||
void LLSettingsVOBase::onAgentAssetUploadComplete(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response, LLSettingsBase::ptr_t psettings, inventory_result_fn callback)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Upload to inventory complete!" << LL_ENDL;
|
||||
LL_WARNS("SETTINGS") << "itemId:" << itemId << " newAssetId:" << newAssetId << " newItemId:" << newItemId << " response:" << response << LL_ENDL;
|
||||
if (callback)
|
||||
callback( newAssetId, itemId, LLUUID::null, response );
|
||||
}
|
||||
|
||||
void LLSettingsVOBase::onTaskAssetUploadComplete(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, LLSettingsBase::ptr_t psettings)
|
||||
void LLSettingsVOBase::onTaskAssetUploadComplete(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, LLSettingsBase::ptr_t psettings, inventory_result_fn callback)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Upload to task complete!" << LL_ENDL;
|
||||
if (callback)
|
||||
callback(newAssetId, itemId, taskId, response);
|
||||
}
|
||||
|
||||
|
||||
void LLSettingsVOBase::getSettingsAsset(const LLUUID &assetId, LLSettingsVOBase::asset_download_fn callback)
|
||||
{
|
||||
gAssetStorage->getAssetData(assetId, LLAssetType::AT_SETTINGS,
|
||||
[callback](LLVFS *vfs, const LLUUID &asset_id, LLAssetType::EType, void *, S32 status, LLExtStat ext_status)
|
||||
{ onAssetDownloadComplete(vfs, asset_id, status, ext_status, callback); },
|
||||
nullptr, true);
|
||||
|
||||
}
|
||||
|
||||
void LLSettingsVOBase::onAssetDownloadComplete(LLVFS *vfs, const LLUUID &asset_id, S32 status, LLExtStat ext_status, LLSettingsVOBase::asset_download_fn callback)
|
||||
{
|
||||
LLSettingsBase::ptr_t settings;
|
||||
if (!status)
|
||||
{
|
||||
LLVFile file(vfs, asset_id, LLAssetType::AT_SETTINGS, LLVFile::READ);
|
||||
S32 size = file.getSize();
|
||||
|
||||
std::string buffer(size + 1, '\0');
|
||||
file.read((U8 *)buffer.data(), size);
|
||||
|
||||
std::stringstream llsdstream(buffer);
|
||||
LLSD llsdsettings;
|
||||
|
||||
if (LLSDSerialize::deserialize(llsdsettings, llsdstream, -1))
|
||||
{
|
||||
settings = createFromLLSD(llsdsettings);
|
||||
}
|
||||
|
||||
if (!settings)
|
||||
{
|
||||
status = 1;
|
||||
LL_WARNS("SETTINGS") << "Unable to creat settings object." << LL_ENDL;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Error retrieving asset asset_id. Status code=" << status << " ext_status=" << ext_status << LL_ENDL;
|
||||
}
|
||||
callback(asset_id, settings, status, ext_status);
|
||||
}
|
||||
|
||||
|
||||
bool LLSettingsVOBase::exportFile(const LLSettingsBase::ptr_t &settings, const std::string &filename, LLSDSerialize::ELLSD_Serialize format)
|
||||
{
|
||||
try
|
||||
|
|
@ -311,7 +297,18 @@ LLSettingsBase::ptr_t LLSettingsVOBase::importFile(const std::string &filename)
|
|||
return LLSettingsBase::ptr_t();
|
||||
}
|
||||
|
||||
std::string settingtype = settings[SETTING_NAME].asString();
|
||||
return createFromLLSD(settings);
|
||||
}
|
||||
|
||||
LLSettingsBase::ptr_t LLSettingsVOBase::createFromLLSD(const LLSD &settings)
|
||||
{
|
||||
if (!settings.has(SETTING_TYPE))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No settings type in LLSD" << LL_ENDL;
|
||||
return LLSettingsBase::ptr_t();
|
||||
}
|
||||
|
||||
std::string settingtype = settings[SETTING_TYPE].asString();
|
||||
|
||||
LLSettingsBase::ptr_t psetting;
|
||||
|
||||
|
|
@ -328,10 +325,10 @@ LLSettingsBase::ptr_t LLSettingsVOBase::importFile(const std::string &filename)
|
|||
return LLSettingsVODay::buildDay(settings);
|
||||
}
|
||||
|
||||
LL_WARNS("SETTINGS") << "Unable to determine settings type for '" << filename << "'." << LL_ENDL;
|
||||
LL_WARNS("SETTINGS") << "Unable to determine settings type for '" << settingtype << "'." << LL_ENDL;
|
||||
return LLSettingsBase::ptr_t();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
LLSettingsVOSky::LLSettingsVOSky(const LLSD &data, bool isAdvanced)
|
||||
|
|
|
|||
|
|
@ -36,23 +36,27 @@
|
|||
#include "llsdserialize.h"
|
||||
|
||||
#include "llextendedstatus.h"
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLVFS;
|
||||
|
||||
//=========================================================================
|
||||
class LLSettingsVOBase : public LLSettingsBase
|
||||
{
|
||||
public:
|
||||
#if 0
|
||||
static void storeAsAsset(const LLSettingsBase::ptr_t &settings);
|
||||
#endif
|
||||
typedef std::function<void(LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status, LLExtStat extstat)> asset_download_fn;
|
||||
typedef std::function<void(LLUUID asset_id, LLUUID inventory_id, LLUUID object_id, LLSD results)> inventory_result_fn;
|
||||
|
||||
static void createInventoryItem(const LLSettingsBase::ptr_t &settings);
|
||||
static void createInventoryItem(const LLSettingsBase::ptr_t &settings, inventory_result_fn callback = inventory_result_fn());
|
||||
|
||||
static void uploadSettingsAsset(const LLSettingsBase::ptr_t &settings, LLUUID inv_item_id);
|
||||
static void uploadSettingsAsset(const LLSettingsBase::ptr_t &settings, LLUUID object_id, LLUUID inv_item_id);
|
||||
static void updateInventoryItem(const LLSettingsBase::ptr_t &settings, LLUUID inv_item_id, inventory_result_fn callback = inventory_result_fn());
|
||||
static void updateInventoryItem(const LLSettingsBase::ptr_t &settings, LLUUID object_id, LLUUID inv_item_id, inventory_result_fn callback = inventory_result_fn());
|
||||
|
||||
static void getSettingsAsset(const LLUUID &assetId, asset_download_fn callback);
|
||||
|
||||
static bool exportFile(const LLSettingsBase::ptr_t &settings, const std::string &filename, LLSDSerialize::ELLSD_Serialize format = LLSDSerialize::LLSD_NOTATION);
|
||||
static LLSettingsBase::ptr_t importFile(const std::string &filename);
|
||||
static LLSettingsBase::ptr_t createFromLLSD(const LLSD &settings);
|
||||
|
||||
private:
|
||||
struct SettingsSaveData
|
||||
|
|
@ -66,13 +70,12 @@ private:
|
|||
|
||||
LLSettingsVOBase() {}
|
||||
|
||||
static void onInventoryItemCreated(const LLUUID &inventoryId, LLSettingsBase::ptr_t settings);
|
||||
static void onInventoryItemCreated(const LLUUID &inventoryId, LLSettingsBase::ptr_t settings, inventory_result_fn callback);
|
||||
|
||||
#if 0
|
||||
static void onSaveNewAssetComplete(const LLUUID& new_asset_id, const SettingsSaveData::ptr_t &savedata, S32 status, LLExtStat ext_status);
|
||||
#endif
|
||||
static void onAgentAssetUploadComplete(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response, LLSettingsBase::ptr_t psettings);
|
||||
static void onTaskAssetUploadComplete(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, LLSettingsBase::ptr_t psettings);
|
||||
static void onAgentAssetUploadComplete(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response, LLSettingsBase::ptr_t psettings, inventory_result_fn callback);
|
||||
static void onTaskAssetUploadComplete(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, LLSettingsBase::ptr_t psettings, inventory_result_fn callback);
|
||||
|
||||
static void onAssetDownloadComplete(LLVFS *vfs, const LLUUID &asset_id, S32 status, LLExtStat ext_status, asset_download_fn callback);
|
||||
};
|
||||
|
||||
//=========================================================================
|
||||
|
|
|
|||
|
|
@ -59,14 +59,13 @@
|
|||
#include "llfloaterdestinations.h"
|
||||
#include "llfloatereditdaycycle.h"
|
||||
#include "llfloatereditextdaycycle.h"
|
||||
#include "llfloatereditsky.h"
|
||||
#include "llfloatereditwater.h"
|
||||
#include "llfloaterenvironmentsettings.h"
|
||||
#include "llfloaterexperienceprofile.h"
|
||||
#include "llfloaterexperiences.h"
|
||||
#include "llfloaterexperiencepicker.h"
|
||||
#include "llfloaterevent.h"
|
||||
#include "llfloaterfacebook.h"
|
||||
#include "llfloaterfixedenvironment.h"
|
||||
#include "llfloaterflickr.h"
|
||||
#include "llfloaterfonttest.h"
|
||||
#include "llfloatergesture.h"
|
||||
|
|
@ -222,10 +221,12 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
|
||||
LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>);
|
||||
LLFloaterReg::add("env_settings", "floater_environment_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvironmentSettings>);
|
||||
LLFloaterReg::add("env_edit_sky", "floater_edit_sky_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditSky>);
|
||||
LLFloaterReg::add("env_edit_water", "floater_edit_water_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditWater>);
|
||||
LLFloaterReg::add("env_edit_day_cycle", "floater_edit_day_cycle.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditDayCycle>);
|
||||
|
||||
LLFloaterReg::add("env_fixed_environmentent_water", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironmentWater>);
|
||||
LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironmentSky>);
|
||||
//LLFloaterReg::add("env_fixed_environmentent", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironment>);
|
||||
|
||||
LLFloaterReg::add("env_edit_extdaycycle", "floater_edit_ext_day_cycle.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditExtDayCycle>);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@
|
|||
#include "llfloaterperms.h"
|
||||
#include "llclipboard.h"
|
||||
#include "llhttpretrypolicy.h"
|
||||
#include "llsettingsvo.h"
|
||||
|
||||
// do-nothing ops for use in callbacks.
|
||||
void no_op_inventory_func(const LLUUID&) {}
|
||||
|
|
@ -1820,6 +1821,40 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge,
|
|||
LLInventoryType::IT_GESTURE,
|
||||
PERM_ALL); // overridden in create_new_item
|
||||
}
|
||||
else if (("sky" == type_name) || ("water" == type_name) || ("daycycle" == type_name))
|
||||
{
|
||||
LL_WARNS("LAPRAS") << "Creating settings object of type: '" << type_name << "'" << LL_ENDL;
|
||||
|
||||
LLSettingsBase::ptr_t settings;
|
||||
std::string name;
|
||||
|
||||
if ("sky" == type_name)
|
||||
{
|
||||
settings = LLSettingsVOSky::buildDefaultSky();
|
||||
name = LLTrans::getString("New Sky");
|
||||
}
|
||||
else if ("water" == type_name)
|
||||
{
|
||||
settings = LLSettingsVOWater::buildDefaultWater();
|
||||
name = LLTrans::getString("New Water");
|
||||
}
|
||||
else if ("daycycle" == type_name)
|
||||
{
|
||||
settings = LLSettingsVODay::buildDefaultDayCycle();
|
||||
name = LLTrans::getString("New Daycycle");
|
||||
}
|
||||
else
|
||||
LL_ERRS(LOG_INV) << "Unknown settings type: '" << type_name << "'" << LL_ENDL;
|
||||
|
||||
if (!settings)
|
||||
{
|
||||
LL_WARNS(LOG_INV) << "Unable to create a default setting object of type '" << type_name << "'" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
settings->setName(name);
|
||||
LLSettingsVOBase::createInventoryItem(settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
|
||||
|
|
@ -2000,6 +2035,19 @@ LLWearableType::EType LLViewerInventoryItem::getWearableType() const
|
|||
return LLWearableType::inventoryFlagsToWearableType(getFlags());
|
||||
}
|
||||
|
||||
bool LLViewerInventoryItem::isSettingsType() const
|
||||
{
|
||||
return (getInventoryType() == LLInventoryType::IT_SETTINGS);
|
||||
}
|
||||
|
||||
LLSettingsType::type_e LLViewerInventoryItem::getSettingsType() const
|
||||
{
|
||||
if (!isSettingsType())
|
||||
{
|
||||
return LLSettingsType::ST_NONE;
|
||||
}
|
||||
return LLSettingsType::fromInventoryFlags(getFlags());
|
||||
}
|
||||
|
||||
time_t LLViewerInventoryItem::getCreationDate() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ public:
|
|||
virtual LLInventoryType::EType getInventoryType() const;
|
||||
virtual bool isWearableType() const;
|
||||
virtual LLWearableType::EType getWearableType() const;
|
||||
virtual bool isSettingsType() const;
|
||||
virtual LLSettingsType::type_e getSettingsType() const;
|
||||
|
||||
virtual U32 getFlags() const;
|
||||
virtual time_t getCreationDate() const;
|
||||
virtual U32 getCRC32() const; // really more of a checksum.
|
||||
|
|
|
|||
|
|
@ -8474,22 +8474,23 @@ class LLWorldEnvPreset : public view_listener_t
|
|||
{
|
||||
std::string item = userdata.asString();
|
||||
|
||||
// *LAPRAS* These go away! Keep for the moment.
|
||||
if (item == "new_water")
|
||||
{
|
||||
LLFloaterReg::showInstance("env_edit_water", "new");
|
||||
LLFloaterReg::showInstance("env_fixed_environmentent_water", "new");
|
||||
}
|
||||
else if (item == "edit_water")
|
||||
{
|
||||
LLFloaterReg::showInstance("env_edit_water", "edit");
|
||||
}
|
||||
LLFloaterReg::showInstance("env_fixed_environmentent_water", "edit");
|
||||
}
|
||||
else if (item == "new_sky")
|
||||
{
|
||||
LLFloaterReg::showInstance("env_edit_sky", "new");
|
||||
}
|
||||
LLFloaterReg::showInstance("env_fixed_environmentent_sky", "new");
|
||||
}
|
||||
else if (item == "edit_sky")
|
||||
{
|
||||
LLFloaterReg::showInstance("env_edit_sky", "edit");
|
||||
}
|
||||
LLFloaterReg::showInstance("env_fixed_environmentent_sky", "edit");
|
||||
}
|
||||
else if (item == "new_day_cycle")
|
||||
{
|
||||
LLFloaterReg::showInstance("env_edit_day_cycle", "new");
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "lltrans.h"
|
||||
#include "llweb.h"
|
||||
|
||||
#pragma optimize("", off)
|
||||
|
||||
/// key used to store the grid, and the name attribute in the grid data
|
||||
const std::string GRID_VALUE = "keyname";
|
||||
|
|
@ -88,6 +89,13 @@ LLGridManager::LLGridManager()
|
|||
// an attacker. Don't want someone snagging a password.
|
||||
std::string grid_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,
|
||||
"grids.xml");
|
||||
|
||||
// fall back to app_settings/grids.xml if it's provided
|
||||
if (!LLFile::isfile(grid_file))
|
||||
{
|
||||
grid_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,
|
||||
"grids.xml");
|
||||
}
|
||||
LL_DEBUGS("GridManager")<<LL_ENDL;
|
||||
|
||||
initialize(grid_file);
|
||||
|
|
@ -133,6 +141,12 @@ void LLGridManager::initialize(const std::string& grid_file)
|
|||
"https://my.aditi.lindenlab.com/",
|
||||
"Aditi");
|
||||
|
||||
llofstream out_llsd_xml;
|
||||
std::string default_grid_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml");
|
||||
out_llsd_xml.open(default_grid_file.c_str());
|
||||
LLSDSerialize::toPrettyXML(mGridList, out_llsd_xml);
|
||||
out_llsd_xml.close();
|
||||
|
||||
LLSD other_grids;
|
||||
llifstream llsd_xml;
|
||||
if (!grid_file.empty())
|
||||
|
|
@ -484,12 +498,19 @@ void LLGridManager::getLoginURIs(const std::string& grid, std::vector<std::strin
|
|||
std::string grid_name = getGrid(grid);
|
||||
if (!grid_name.empty())
|
||||
{
|
||||
for (LLSD::array_iterator llsd_uri = mGridList[grid_name][GRID_LOGIN_URI_VALUE].beginArray();
|
||||
llsd_uri != mGridList[grid_name][GRID_LOGIN_URI_VALUE].endArray();
|
||||
llsd_uri++)
|
||||
{
|
||||
uris.push_back(llsd_uri->asString());
|
||||
}
|
||||
if (mGridList[grid_name][GRID_LOGIN_URI_VALUE].isArray())
|
||||
{
|
||||
for (LLSD::array_iterator llsd_uri = mGridList[grid_name][GRID_LOGIN_URI_VALUE].beginArray();
|
||||
llsd_uri != mGridList[grid_name][GRID_LOGIN_URI_VALUE].endArray();
|
||||
llsd_uri++)
|
||||
{
|
||||
uris.push_back(llsd_uri->asString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uris.push_back(mGridList[grid_name][GRID_LOGIN_URI_VALUE].asString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@
|
|||
#include "llsettingssky.h"
|
||||
#include "llenvironment.h"
|
||||
|
||||
#pragma optimize("", off)
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
|
|
@ -96,17 +98,17 @@ F32 clip_side_to_horizon(const LLVector3& V0, const LLVector3& V1, const F32 cos
|
|||
if (z1 * cos_max_angle < 0)
|
||||
{
|
||||
return t2;
|
||||
}
|
||||
}
|
||||
else if (z2 * cos_max_angle < 0)
|
||||
{
|
||||
{
|
||||
return t1;
|
||||
}
|
||||
}
|
||||
else if ((t1 < 0) || (t1 > 1))
|
||||
{
|
||||
{
|
||||
return t2;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return t1;
|
||||
}
|
||||
}
|
||||
|
|
@ -129,9 +131,9 @@ BOOL clip_quad_to_horizon(F32& t_left, F32& t_right, LLVector3 v_clipped[4],
|
|||
//if (!left_clip && !right_clip)
|
||||
{
|
||||
for (S32 vtx = 0; vtx < 4; ++vtx)
|
||||
{
|
||||
{
|
||||
v_clipped[vtx] = v_corner[vtx];
|
||||
}
|
||||
}
|
||||
}
|
||||
/* else
|
||||
{
|
||||
|
|
@ -322,7 +324,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
|
|||
mHeavenlyBodyUpdated = FALSE ;
|
||||
|
||||
mDrawRefl = 0;
|
||||
mInterpVal = 0.f;
|
||||
mInterpVal = 0.f;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -555,85 +557,85 @@ BOOL LLVOSky::updateSky()
|
|||
|
||||
if (mForceUpdate || total_no_tiles == frame)
|
||||
{
|
||||
LLSkyTex::stepCurrent();
|
||||
LLSkyTex::stepCurrent();
|
||||
|
||||
const static F32 LIGHT_DIRECTION_THRESHOLD = (F32) cos(DEG_TO_RAD * 1.f);
|
||||
const static F32 COLOR_CHANGE_THRESHOLD = 0.01f;
|
||||
const static F32 LIGHT_DIRECTION_THRESHOLD = (F32) cos(DEG_TO_RAD * 1.f);
|
||||
const static F32 COLOR_CHANGE_THRESHOLD = 0.01f;
|
||||
|
||||
LLVector3 direction = mSun.getDirection();
|
||||
direction.normalize();
|
||||
const F32 dot_lighting = direction * mLastLightingDirection;
|
||||
LLVector3 direction = mSun.getDirection();
|
||||
direction.normalize();
|
||||
const F32 dot_lighting = direction * mLastLightingDirection;
|
||||
|
||||
LLColor3 delta_color;
|
||||
delta_color.setVec(mLastTotalAmbient.mV[0] - total_ambient.mV[0],
|
||||
mLastTotalAmbient.mV[1] - total_ambient.mV[1],
|
||||
mLastTotalAmbient.mV[2] - total_ambient.mV[2]);
|
||||
LLColor3 delta_color;
|
||||
delta_color.setVec(mLastTotalAmbient.mV[0] - total_ambient.mV[0],
|
||||
mLastTotalAmbient.mV[1] - total_ambient.mV[1],
|
||||
mLastTotalAmbient.mV[2] - total_ambient.mV[2]);
|
||||
|
||||
if ( mForceUpdate
|
||||
|| (((dot_lighting < LIGHT_DIRECTION_THRESHOLD)
|
||||
|| (delta_color.length() > COLOR_CHANGE_THRESHOLD)
|
||||
|| !mInitialized)
|
||||
&& !direction.isExactlyZero()))
|
||||
{
|
||||
mLastLightingDirection = direction;
|
||||
if ( mForceUpdate
|
||||
|| (((dot_lighting < LIGHT_DIRECTION_THRESHOLD)
|
||||
|| (delta_color.length() > COLOR_CHANGE_THRESHOLD)
|
||||
|| !mInitialized)
|
||||
&& !direction.isExactlyZero()))
|
||||
{
|
||||
mLastLightingDirection = direction;
|
||||
mLastTotalAmbient = total_ambient;
|
||||
mInitialized = TRUE;
|
||||
mInitialized = TRUE;
|
||||
|
||||
if (mCubeMap)
|
||||
{
|
||||
if (mCubeMap)
|
||||
{
|
||||
if (mForceUpdate)
|
||||
{
|
||||
updateFog(LLViewerCamera::getInstance()->getFar());
|
||||
{
|
||||
updateFog(LLViewerCamera::getInstance()->getFar());
|
||||
|
||||
for (int side = 0; side < 6; side++)
|
||||
{
|
||||
for (int tile = 0; tile < NUM_TILES; tile++)
|
||||
{
|
||||
createSkyTexture(side, tile);
|
||||
}
|
||||
}
|
||||
for (int side = 0; side < 6; side++)
|
||||
{
|
||||
for (int tile = 0; tile < NUM_TILES; tile++)
|
||||
{
|
||||
createSkyTexture(side, tile);
|
||||
}
|
||||
}
|
||||
|
||||
for (int side = 0; side < 6; side++)
|
||||
{
|
||||
LLImageRaw* raw1 = mSkyTex[side].getImageRaw(TRUE);
|
||||
LLImageRaw* raw2 = mSkyTex[side].getImageRaw(FALSE);
|
||||
raw2->copy(raw1);
|
||||
mSkyTex[side].createGLImage(mSkyTex[side].getWhich(FALSE));
|
||||
for (int side = 0; side < 6; side++)
|
||||
{
|
||||
LLImageRaw* raw1 = mSkyTex[side].getImageRaw(TRUE);
|
||||
LLImageRaw* raw2 = mSkyTex[side].getImageRaw(FALSE);
|
||||
raw2->copy(raw1);
|
||||
mSkyTex[side].createGLImage(mSkyTex[side].getWhich(FALSE));
|
||||
|
||||
raw1 = mShinyTex[side].getImageRaw(TRUE);
|
||||
raw2 = mShinyTex[side].getImageRaw(FALSE);
|
||||
raw2->copy(raw1);
|
||||
mShinyTex[side].createGLImage(mShinyTex[side].getWhich(FALSE));
|
||||
}
|
||||
next_frame = 0;
|
||||
raw1 = mShinyTex[side].getImageRaw(TRUE);
|
||||
raw2 = mShinyTex[side].getImageRaw(FALSE);
|
||||
raw2->copy(raw1);
|
||||
mShinyTex[side].createGLImage(mShinyTex[side].getWhich(FALSE));
|
||||
}
|
||||
next_frame = 0;
|
||||
|
||||
// update the sky texture
|
||||
for (S32 i = 0; i < 6; ++i)
|
||||
{
|
||||
mSkyTex[i].create(1.0f);
|
||||
mShinyTex[i].create(1.0f);
|
||||
}
|
||||
// update the sky texture
|
||||
for (S32 i = 0; i < 6; ++i)
|
||||
{
|
||||
mSkyTex[i].create(1.0f);
|
||||
mShinyTex[i].create(1.0f);
|
||||
}
|
||||
|
||||
// update the environment map
|
||||
if (mCubeMap)
|
||||
{
|
||||
std::vector<LLPointer<LLImageRaw> > images;
|
||||
images.reserve(6);
|
||||
for (S32 side = 0; side < 6; side++)
|
||||
{
|
||||
images.push_back(mShinyTex[side].getImageRaw(TRUE));
|
||||
}
|
||||
mCubeMap->init(images);
|
||||
// update the environment map
|
||||
if (mCubeMap)
|
||||
{
|
||||
std::vector<LLPointer<LLImageRaw> > images;
|
||||
images.reserve(6);
|
||||
for (S32 side = 0; side < 6; side++)
|
||||
{
|
||||
images.push_back(mShinyTex[side].getImageRaw(TRUE));
|
||||
}
|
||||
mCubeMap->init(images);
|
||||
gGL.getTexUnit(0)->disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
|
||||
mForceUpdate = FALSE;
|
||||
}
|
||||
}
|
||||
gPipeline.markRebuild(gSky.mVOGroundp->mDrawable, LLDrawable::REBUILD_ALL, TRUE);
|
||||
mForceUpdate = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (mDrawable.notNull() && mDrawable->getFace(0) && !mDrawable->getFace(0)->getVertexBuffer())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
height="500"
|
||||
height="602"
|
||||
layout="topleft"
|
||||
name="env_edit_extdaycycle"
|
||||
help_topic="day_presets"
|
||||
|
|
@ -13,43 +12,53 @@
|
|||
<string name="title_edit">Edit Day Cycle</string>
|
||||
<string name="hint_new">Name your day cycle, adjust the controls to create it, and click "Save".</string>
|
||||
<string name="hint_edit">To edit your day cycle, adjust the controls below and click "Save".</string>
|
||||
<string name="combo_label">-Select a preset-</string>
|
||||
|
||||
<!-- Todo: These 5 strings might be subjected to a change to get dynamic labels-->
|
||||
<string name="0_label">0%[DSC]</string>
|
||||
<string name="1_label">25%[DSC]</string>
|
||||
<string name="2_label">50%[DSC]</string>
|
||||
<string name="3_label">75%[DSC]</string>
|
||||
<string name="4_label">100%[DSC]</string>
|
||||
<string name="time_label"> ([TIME] hr)</string>
|
||||
|
||||
<layout_stack name="test_stack"
|
||||
width="705"
|
||||
height="500"
|
||||
height="602"
|
||||
follows="all"
|
||||
animate="false"
|
||||
top="0"
|
||||
orientation="vertical">
|
||||
<layout_panel name="temp"
|
||||
border="false"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
height="45"
|
||||
min_height="45"
|
||||
height="29"
|
||||
min_height="29"
|
||||
background_visible="false">
|
||||
<!-- This layout_panel is for loading legacy presets -->
|
||||
<text
|
||||
follows="top|left|right"
|
||||
follows="top|left"
|
||||
font="SansSerif"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
name="label"
|
||||
top_delta="70"
|
||||
width="120">
|
||||
Preset Name:
|
||||
left="15"
|
||||
top="5"
|
||||
width="105">
|
||||
Day Cycle Name:
|
||||
</text>
|
||||
<combo_box
|
||||
allow_text_entry="true"
|
||||
<line_editor
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
max_chars="100"
|
||||
name="day_cycle_preset_combo"
|
||||
top_delta="-5"
|
||||
width="200" />
|
||||
name="day_cycle_name"
|
||||
top="5"
|
||||
width="200"
|
||||
height="21" />
|
||||
</layout_panel>
|
||||
<layout_panel name="timeline"
|
||||
border="true"
|
||||
<layout_panel name="timeline_track_selection"
|
||||
border="false"
|
||||
bevel_style="in"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
|
|
@ -58,74 +67,415 @@
|
|||
min_height="0"
|
||||
visible="true"
|
||||
background_visible="true">
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerif"
|
||||
<panel name="timeline_layers"
|
||||
border="false"
|
||||
follows="left|top"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
bg_alpha_color="yellow"
|
||||
height="150"
|
||||
width="110"
|
||||
top_pad="0"
|
||||
min_height="0"
|
||||
visible="true"
|
||||
background_visible="true">
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Sky 4"
|
||||
layout="topleft"
|
||||
top_pad="5"
|
||||
left="10"
|
||||
name="sky4_track"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="DayCycle.Track"
|
||||
parameter="1" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Sky 3"
|
||||
layout="topleft"
|
||||
top_pad="0"
|
||||
left="10"
|
||||
name="sky3_track"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="DayCycle.Track"
|
||||
parameter="2" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Sky 2"
|
||||
layout="topleft"
|
||||
top_pad="0"
|
||||
left="10"
|
||||
name="sky2_track"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="DayCycle.Track"
|
||||
parameter="3" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Sky 1"
|
||||
layout="topleft"
|
||||
top_pad="0"
|
||||
left="10"
|
||||
name="sky1_track"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="DayCycle.Track"
|
||||
parameter="4" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
label="Water"
|
||||
layout="topleft"
|
||||
top_pad="0"
|
||||
left="10"
|
||||
name="water_track"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="DayCycle.Track"
|
||||
parameter="0" />
|
||||
</button>
|
||||
</panel>
|
||||
<panel name="timeline"
|
||||
border="true"
|
||||
follows="left|top"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
height="150"
|
||||
min_height="0"
|
||||
width="595"
|
||||
min_width="595"
|
||||
left_pad="0"
|
||||
visible="true">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="p0"
|
||||
top_pad="5"
|
||||
value="0%"
|
||||
width="50" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left_pad="69"
|
||||
name="p1"
|
||||
top_delta="0"
|
||||
value="25%"
|
||||
width="50" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left_pad="69"
|
||||
name="p2"
|
||||
top_delta="0"
|
||||
value="50%"
|
||||
width="50" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left_pad="69"
|
||||
name="p3"
|
||||
top_delta="0"
|
||||
value="75%"
|
||||
width="50" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left_pad="69"
|
||||
name="p4"
|
||||
top_delta="0"
|
||||
value="100%"
|
||||
width="50" />
|
||||
<multi_slider
|
||||
can_edit_text="true"
|
||||
decimal_digits="0"
|
||||
draw_track="false"
|
||||
follows="bottom"
|
||||
height="10"
|
||||
increment="0.0833333"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
name="label"
|
||||
top_offset="20"
|
||||
left_offset="10"
|
||||
width="120">
|
||||
Time Line Goes here
|
||||
</text>
|
||||
left="10"
|
||||
max_sliders="20"
|
||||
max_val="24"
|
||||
name="WLTimeSlider"
|
||||
show_text="false"
|
||||
top_pad="0"
|
||||
use_triangle="true"
|
||||
width="525"
|
||||
min_width="525"/>
|
||||
|
||||
<multi_slider
|
||||
can_edit_text="true"
|
||||
decimal_digits="0"
|
||||
follows="bottom"
|
||||
height="10"
|
||||
increment="0.0833333"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
max_sliders="20"
|
||||
max_val="24"
|
||||
name="WLDayCycleKeys"
|
||||
show_text="false"
|
||||
top_pad="15"
|
||||
width="525"
|
||||
min_width="525" />
|
||||
|
||||
<line_editor
|
||||
border_style="line"
|
||||
border_thickness="1"
|
||||
follows="left|bottom"
|
||||
font="SansSerif"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left_pad="0"
|
||||
max_length_bytes="300"
|
||||
name="timeline_field"
|
||||
select_on_focus="true"
|
||||
value="%"
|
||||
tool_tip="The full path to an editor (executable) to edit floater XML files (quotes not necessary)"
|
||||
top_delta="-5"
|
||||
width="35" />
|
||||
|
||||
<layout_stack
|
||||
name="progress_control"
|
||||
follows="top|left"
|
||||
height="25"
|
||||
width="83"
|
||||
layout="topleft"
|
||||
animate="false"
|
||||
left="225"
|
||||
top_pad="40"
|
||||
orientation="horizontal">
|
||||
|
||||
<layout_panel
|
||||
name="skip_back"
|
||||
mouse_opaque="false"
|
||||
auto_resize="false"
|
||||
layout="topleft"
|
||||
top="0"
|
||||
height="25"
|
||||
min_width="25"
|
||||
width="25">
|
||||
<button
|
||||
name="skip_back_btn"
|
||||
follows="top"
|
||||
image_overlay="SkipBackward_Off"
|
||||
image_disabled="PushButton_Disabled"
|
||||
image_disabled_selected="PushButton_Disabled"
|
||||
image_selected="PushButton_Selected"
|
||||
image_unselected="PushButton_Off"
|
||||
hover_glow_amount="0.15"
|
||||
auto_resize="false"
|
||||
width="25"
|
||||
height="25"
|
||||
layout="topleft"
|
||||
tool_tip="Step back"
|
||||
top="0"
|
||||
left="0"/>
|
||||
</layout_panel>
|
||||
|
||||
<layout_panel
|
||||
name="play"
|
||||
mouse_opaque="false"
|
||||
auto_resize="false"
|
||||
layout="topleft"
|
||||
top="0"
|
||||
height="25"
|
||||
min_width="25"
|
||||
width="25">
|
||||
<button
|
||||
name="play_btn"
|
||||
follows="top"
|
||||
image_overlay="Play_Off"
|
||||
image_disabled="PushButton_Disabled"
|
||||
image_disabled_selected="PushButton_Disabled"
|
||||
image_selected="PushButton_Selected"
|
||||
image_unselected="PushButton_Off"
|
||||
hover_glow_amount="0.15"
|
||||
auto_resize="false"
|
||||
layout="topleft"
|
||||
height="25"
|
||||
width="25"
|
||||
left="0"
|
||||
top="0" />
|
||||
</layout_panel>
|
||||
|
||||
<layout_panel
|
||||
name="pause"
|
||||
mouse_opaque="false"
|
||||
auto_resize="false"
|
||||
layout="topleft"
|
||||
top="0"
|
||||
height="25"
|
||||
min_width="25"
|
||||
width="25"
|
||||
visible="false">
|
||||
<button
|
||||
name="pause_btn"
|
||||
follows="top"
|
||||
image_overlay="Pause_Off"
|
||||
image_disabled="PushButton_Disabled"
|
||||
image_disabled_selected="PushButton_Disabled"
|
||||
image_selected="PushButton_Selected"
|
||||
image_unselected="PushButton_Off"
|
||||
hover_glow_amount="0.15"
|
||||
auto_resize="false"
|
||||
layout="topleft"
|
||||
height="25"
|
||||
width="25"
|
||||
left="0"
|
||||
top="0"/>
|
||||
</layout_panel>
|
||||
|
||||
<layout_panel
|
||||
name="skip_forward"
|
||||
mouse_opaque="false"
|
||||
auto_resize="false"
|
||||
layout="topleft"
|
||||
top="0"
|
||||
height="25"
|
||||
min_width="25"
|
||||
width="25">
|
||||
<button
|
||||
name="skip_forward_btn"
|
||||
follows="top"
|
||||
image_overlay="SkipForward_Off"
|
||||
image_disabled="PushButton_Disabled"
|
||||
image_disabled_selected="PushButton_Disabled"
|
||||
image_selected="PushButton_Selected"
|
||||
image_unselected="PushButton_Off"
|
||||
hover_glow_amount="0.15"
|
||||
width="25"
|
||||
height="25"
|
||||
layout="topleft"
|
||||
tool_tip="Step forward"
|
||||
top="0" />
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
width="90"
|
||||
label="Add Frame"
|
||||
left_pad="175"
|
||||
top_delta="-12"
|
||||
name="add_frame" />
|
||||
<button
|
||||
follows="left|top"
|
||||
height="23"
|
||||
width="90"
|
||||
label="Delete Frame"
|
||||
top_pad="0"
|
||||
left_delta="0"
|
||||
name="delete_frame" />
|
||||
</panel>
|
||||
</layout_panel>
|
||||
<layout_panel name="flex"
|
||||
auto_resize="true"
|
||||
<layout_panel name="frame_settings_water"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
bg_alpha_color="blue"
|
||||
height="11"
|
||||
height="386"
|
||||
width="700"
|
||||
min_height="0"
|
||||
visible="true"
|
||||
background_visible="true">
|
||||
visible="false">
|
||||
<tab_container
|
||||
follows="all"
|
||||
halign="left"
|
||||
height="386"
|
||||
layout="topleft"
|
||||
left_offset="0"
|
||||
name="landtab"
|
||||
left="0"
|
||||
name="water_tabs"
|
||||
tab_position="top"
|
||||
tab_width="140"
|
||||
tab_padding_right="3"
|
||||
top_offset="6"
|
||||
width="633">
|
||||
<panel
|
||||
border="true"
|
||||
follows="all"
|
||||
label="DUMMY"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
help_topic="land_general_tab"
|
||||
name="land_general_panel"
|
||||
top="0">
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerif"
|
||||
height="10"
|
||||
layout="center"
|
||||
name="label"
|
||||
top_offset="20"
|
||||
left_offset="10"
|
||||
width="300">
|
||||
Space For editing selected frame
|
||||
</text>
|
||||
|
||||
</panel>
|
||||
top_pad="0"
|
||||
width="700">
|
||||
<panel
|
||||
border="true"
|
||||
filename="panel_settings_water.xml"
|
||||
label="Water_panel"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="5"
|
||||
name="water_panel"/>
|
||||
</tab_container>
|
||||
</layout_panel>
|
||||
<layout_panel name="frame_settings_sky"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
height="386"
|
||||
width="700"
|
||||
min_height="0"
|
||||
visible="true">
|
||||
<tab_container
|
||||
follows="all"
|
||||
halign="left"
|
||||
height="386"
|
||||
visible="true"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="sky_tabs"
|
||||
tab_position="top"
|
||||
tab_width="140"
|
||||
tab_padding_right="3"
|
||||
top_pad="0"
|
||||
width="700">
|
||||
<panel
|
||||
border="true"
|
||||
filename="panel_settings_sky_atmos.xml"
|
||||
label="Atmosphere & Lighting"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="5"
|
||||
name="atmosphere_panel" />
|
||||
<panel
|
||||
border="true"
|
||||
filename="panel_settings_sky_clouds.xml"
|
||||
label="Clouds"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="5"
|
||||
name="clouds_panel" />
|
||||
<panel
|
||||
border="true"
|
||||
filename="panel_settings_sky_sunmoon.xml"
|
||||
label="Sun & Moon"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="5"
|
||||
name="moon_panel" />
|
||||
</tab_container>
|
||||
</layout_panel>
|
||||
<layout_panel name="buttons"
|
||||
auto_resize="false"
|
||||
user_resize="true"
|
||||
height="43"
|
||||
height="26"
|
||||
min_height="0"
|
||||
background_visible="false">
|
||||
visible="true"
|
||||
width="700">
|
||||
<button
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Save"
|
||||
left_offset="160"
|
||||
top_offset="60"
|
||||
left="5"
|
||||
top_pad="0"
|
||||
name="save_btn"
|
||||
width="100" />
|
||||
<button
|
||||
|
|
@ -138,7 +488,7 @@
|
|||
width="100" />
|
||||
|
||||
<button
|
||||
follows="top|right"
|
||||
follows="top|left"
|
||||
height="23"
|
||||
label="Upload"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -1,980 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
height="375"
|
||||
layout="topleft"
|
||||
name="Edit Sky Preset"
|
||||
help_topic="sky_preset"
|
||||
save_rect="true"
|
||||
title="Edit Sky Preset"
|
||||
width="840">
|
||||
|
||||
<string name="title_new">Create a New Sky Preset</string>
|
||||
<string name="title_edit">Edit Sky Preset</string>
|
||||
<string name="hint_new">Name your preset, adjust the controls to create it, and click "Save".</string>
|
||||
<string name="hint_edit">To edit your sky preset, adjust the controls and click "Save".</string>
|
||||
<string name="combo_label">-Select a preset-</string>
|
||||
|
||||
<text
|
||||
follows="top|left|right"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="hint"
|
||||
top="25"
|
||||
width="700">
|
||||
To edit your preset, adjust the controls then click "Save"
|
||||
</text>
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerif"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="label"
|
||||
top_pad="25"
|
||||
width="120">
|
||||
Preset Name:
|
||||
</text>
|
||||
<combo_box
|
||||
allow_text_entry="true"
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
max_chars="100"
|
||||
name="sky_preset_combo"
|
||||
top_delta="-5"
|
||||
width="200"/>
|
||||
<line_editor
|
||||
height="20"
|
||||
left_delta="0"
|
||||
name="sky_preset_name"
|
||||
top_delta="0"
|
||||
width="200" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
height="40"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
name="note"
|
||||
top_delta="0"
|
||||
width="405"
|
||||
wrap="true">
|
||||
Note: if you change the name of your preset, you will be creating a new preset and the existing preset will not be changed.
|
||||
</text>
|
||||
<!--======== Controls panel ========-->
|
||||
<view_border
|
||||
bevel_style="none"
|
||||
follows="top|left"
|
||||
height="203"
|
||||
layout="topleft"
|
||||
left="25"
|
||||
name="panel_water_preset"
|
||||
top="122"
|
||||
visible="true"
|
||||
width="790"/>
|
||||
<tab_container
|
||||
follows="left|top"
|
||||
height="225"
|
||||
halign="center"
|
||||
layout="topleft"
|
||||
left="22"
|
||||
name="WindLight Tabs"
|
||||
tab_position="top"
|
||||
top="101"
|
||||
width="794">
|
||||
<panel
|
||||
border="true"
|
||||
bevel_style="none"
|
||||
follows="left|top|right|bottom"
|
||||
height="196"
|
||||
label="ATMOSPHERE"
|
||||
layout="topleft"
|
||||
left="1"
|
||||
help_topic="sky_preset_atmosphere"
|
||||
mouse_opaque="false"
|
||||
name="Atmosphere"
|
||||
top="60"
|
||||
width="698">
|
||||
|
||||
<!--======== Tab Panel I. I conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="40"
|
||||
name="BHText"
|
||||
top="25"
|
||||
width="200">
|
||||
Blue Horizon
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLBlueHorizon"
|
||||
top_pad="6"
|
||||
width="60" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="20"
|
||||
name="BDensText"
|
||||
width="200">
|
||||
Haze Horizon
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLHazeHorizon"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.25"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="6"
|
||||
name="WLHazeHorizon"
|
||||
width="200" />
|
||||
|
||||
<!--======== Tab Panel I. II conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="55"
|
||||
name="BDensText2"
|
||||
top="25"
|
||||
width="200">
|
||||
Blue Density
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLBlueDensity"
|
||||
top_pad="6"
|
||||
width="60" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="HDText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Haze Density
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLHazeDensity"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
max_val="4"
|
||||
name="WLHazeDensity"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
|
||||
<!--======== Tab Panel I. III conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="55"
|
||||
name="DensMultText"
|
||||
top="25"
|
||||
width="200">
|
||||
Density Multiplier
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLDensityMult"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.1"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="0.9"
|
||||
name="WLDensityMult"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="WLDistanceMultText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Distance Multiplier
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLDistancMult"
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
initial_value="1.0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="100"
|
||||
name="WLDistanceMult"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="MaxAltText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Max Altitude
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLMaxAltitude"
|
||||
decimal_digits="0"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="1"
|
||||
initial_value="500"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="4000"
|
||||
name="WLMaxAltitude"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
</panel>
|
||||
<panel
|
||||
border="true"
|
||||
bevel_style="none"
|
||||
follows="left|top|right|bottom"
|
||||
height="196"
|
||||
label="LIGHTING"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
help_topic="sky_preset_lighting"
|
||||
name="Lighting"
|
||||
top_delta="4"
|
||||
width="698">
|
||||
|
||||
<!--======== Tab Panel II. I conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="20"
|
||||
name="SLCText"
|
||||
top="25"
|
||||
width="150">
|
||||
Sun/Moon Color
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
name="WLSunlight"
|
||||
top_pad="6"
|
||||
width="60" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-10"
|
||||
name="WLAmbientText"
|
||||
top_pad="20"
|
||||
width="150">
|
||||
Ambient
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
name="WLAmbient"
|
||||
top_pad="6"
|
||||
width="60" />
|
||||
|
||||
<!--======== Tab Panel II. II conlumn of controls ========-->
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="100"
|
||||
name="SunGlowText"
|
||||
top="25"
|
||||
width="200">
|
||||
Sun Glow
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLGlowB"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.1"
|
||||
label="Focus "
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
max_val="0.5"
|
||||
name="WLGlowB"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLGlowR"
|
||||
decimal_digits="2"
|
||||
follows="top|left"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.25"
|
||||
label="Size "
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
max_val="1.99"
|
||||
min_val="1"
|
||||
name="WLGlowR"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-10"
|
||||
name="WLStarText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Star Brightness
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLStarAlpha"
|
||||
decimal_digits="2"
|
||||
follows="top|left"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
max_val="2"
|
||||
name="WLStarAlpha"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-10"
|
||||
name="SceneGammaText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Scene Gamma
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLGamma"
|
||||
decimal_digits="2"
|
||||
follows="top|left"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="2.0"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
max_val="10"
|
||||
name="WLGamma"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
|
||||
<!--======== Tab Panel II. III conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="60"
|
||||
name="TODText"
|
||||
top="25"
|
||||
width="200">
|
||||
Sun/Moon Position
|
||||
</text>
|
||||
|
||||
<joystick_quat
|
||||
follows="left|top"
|
||||
height="78"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLSunRotation"
|
||||
quadrant="left"
|
||||
sound_flags="3"
|
||||
visible="true"
|
||||
tool_tip="Move sun in sky"
|
||||
top="44"
|
||||
width="78" /> />
|
||||
|
||||
<joystick_quat
|
||||
follows="left|top"
|
||||
height="78"
|
||||
layout="topleft"
|
||||
left_delta="96"
|
||||
name="WLMoonRotation"
|
||||
quadrant="left"
|
||||
sound_flags="3"
|
||||
visible="true"
|
||||
tool_tip="Move moon in sky"
|
||||
top="44"
|
||||
width="78" /> />
|
||||
|
||||
<!-- multi_slider
|
||||
can_edit_text="true"
|
||||
control_name="WLSunPos"
|
||||
decimal_digits="0"
|
||||
follows="bottom"
|
||||
height="10"
|
||||
increment="0.0833333"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
max_sliders="1"
|
||||
max_val="24"
|
||||
name="WLSunPos"
|
||||
show_text="false"
|
||||
top_pad="0"
|
||||
width="300" />
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_delta="2"
|
||||
name="WL12amHash"
|
||||
top_pad="6"
|
||||
width="6">
|
||||
|
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="66"
|
||||
name="WL6amHash"
|
||||
top_delta="0"
|
||||
width="6">
|
||||
|
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="67"
|
||||
name="WL12pmHash2"
|
||||
top_delta="0"
|
||||
width="6">
|
||||
|
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="67"
|
||||
name="WL6pmHash"
|
||||
top_delta="0"
|
||||
width="6">
|
||||
|
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="67"
|
||||
name="WL12amHash2"
|
||||
top_delta="0"
|
||||
width="6">
|
||||
|
|
||||
</text>
|
||||
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-300"
|
||||
name="WL12am"
|
||||
top="74"
|
||||
width="55">
|
||||
12am
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="20"
|
||||
name="WL6am"
|
||||
top_delta="0"
|
||||
width="55">
|
||||
6am
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="15"
|
||||
name="WL12pmHash"
|
||||
top_delta="0"
|
||||
width="55">
|
||||
12pm
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="18"
|
||||
name="WL6pm"
|
||||
top_delta="0"
|
||||
width="55">
|
||||
6pm
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
border_visible="true"
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="15"
|
||||
name="WL12am2"
|
||||
top_delta="0"
|
||||
width="55">
|
||||
12am
|
||||
</text>
|
||||
|
||||
<time
|
||||
follows="left|top"
|
||||
height="16"
|
||||
label_width="0"
|
||||
layout="topleft"
|
||||
left_delta="-175"
|
||||
name="WLDayTime"
|
||||
top_pad="15"
|
||||
value="6:00 AM"
|
||||
width="75"/>
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-106"
|
||||
name="WLEastAngleText"
|
||||
top_pad="24"
|
||||
width="200">
|
||||
East Angle
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLEastAngle"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.0"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
name="WLEastAngle"
|
||||
top_pad="6"
|
||||
width="200" / -->
|
||||
|
||||
</panel>
|
||||
<panel
|
||||
border="true"
|
||||
bevel_style="none"
|
||||
follows="left|top|right|bottom"
|
||||
height="196"
|
||||
label="CLOUDS"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
mouse_opaque="false"
|
||||
help_topic="sky_preset_clouds"
|
||||
name="Clouds"
|
||||
top_delta="4"
|
||||
width="698">
|
||||
|
||||
<!--======== Tab Panel III. I conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="40"
|
||||
name="WLCloudColorText"
|
||||
top="25"
|
||||
width="200">
|
||||
Cloud Color
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLCloudColor"
|
||||
top_pad="6"
|
||||
width="60" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLCloudColorText2"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Cloud XY/Density
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLCloudX"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
label="X"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="6"
|
||||
name="WLCloudX"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLCloudY"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
label="Y"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="6"
|
||||
name="WLCloudY"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLCloudDensity"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="1.0"
|
||||
label="D"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLCloudDensity"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
|
||||
<!--======== Tab Panel III. II conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="55"
|
||||
name="WLCloudCoverageText"
|
||||
top="15"
|
||||
width="200">
|
||||
Cloud Coverage
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLCloudCoverage"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WLCloudCoverage"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="WLCloudScaleText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Cloud Scale
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLCloudScale"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="1.0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
min_val="0.01"
|
||||
name="WLCloudScale"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-13"
|
||||
name="WLCloudDetailText"
|
||||
top_pad="20"
|
||||
width="200">
|
||||
Cloud Detail (XY/Density)
|
||||
</text>
|
||||
<slider
|
||||
control_name="WLCloudDetailX"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
label="X"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_pad="6"
|
||||
name="WLCloudDetailX"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLCloudDetailY"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
label="Y"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLCloudDetailY"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLCloudDetailDensity"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="1.0"
|
||||
label="D"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="WLCloudDetailDensity"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
|
||||
<!--======== Tab Panel III. III conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="55"
|
||||
name="WLCloudScrollXText"
|
||||
top="15"
|
||||
width="150">
|
||||
Cloud Scroll X
|
||||
</text>
|
||||
<check_box
|
||||
control_name="WLCloudLockX"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
label="Lock"
|
||||
layout="topleft"
|
||||
left_delta="150"
|
||||
name="WLCloudLockX"
|
||||
top_delta="0"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLCloudScrollX"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
layout="topleft"
|
||||
left_delta="-135"
|
||||
max_val="10"
|
||||
min_val="-10"
|
||||
name="WLCloudScrollX"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="WLCloudScrollYText"
|
||||
top_pad="20"
|
||||
width="150">
|
||||
Cloud Scroll Y
|
||||
</text>
|
||||
<check_box
|
||||
control_name="WLCloudLockY"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
label="Lock"
|
||||
layout="topleft"
|
||||
left_delta="150"
|
||||
name="WLCloudLockY"
|
||||
width="200" />
|
||||
<slider
|
||||
control_name="WLCloudScrollY"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.5"
|
||||
layout="topleft"
|
||||
left_delta="-135"
|
||||
max_val="10"
|
||||
min_val="-10"
|
||||
name="WLCloudScrollY"
|
||||
top_pad="6"
|
||||
width="200" />
|
||||
</panel>
|
||||
</tab_container>
|
||||
<!--======== End of Controls panel ========-->
|
||||
|
||||
<check_box
|
||||
follows="top|left"
|
||||
height="10"
|
||||
label="Make this preset my new sky setting"
|
||||
layout="topleft"
|
||||
left="380"
|
||||
name="make_default_cb"
|
||||
top_pad="30"
|
||||
width="280"/>
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
label="Save"
|
||||
layout="topleft"
|
||||
left_pad="0"
|
||||
name="save"
|
||||
width="70"/>
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
label="Cancel"
|
||||
layout="topleft"
|
||||
left_pad="15"
|
||||
name="cancel"
|
||||
width="70"/>
|
||||
</floater>
|
||||
|
|
@ -1,448 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
height="375"
|
||||
layout="topleft"
|
||||
name="Edit Water Preset"
|
||||
help_topic="water_preset"
|
||||
save_rect="true"
|
||||
title="Edit Water Preset"
|
||||
width="725">
|
||||
|
||||
<string name="title_new">Create a New Water Preset</string>
|
||||
<string name="title_edit">Edit a Water Preset</string>
|
||||
<string name="hint_new">Name your preset, adjust the controls to create it, and click "Save".</string>
|
||||
<string name="hint_edit">To edit your water preset, adjust the controls and click "Save".</string>
|
||||
<string name="combo_label">-Select a preset-</string>
|
||||
|
||||
<text
|
||||
follows="top|left|right"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="hint"
|
||||
top="25"
|
||||
width="680">
|
||||
To edit your preset, adjust the controls then click "Save"
|
||||
</text>
|
||||
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerif"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="label"
|
||||
top_pad="25"
|
||||
width="120">
|
||||
Preset Name:
|
||||
</text>
|
||||
|
||||
<combo_box
|
||||
allow_text_entry="true"
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
max_chars="100"
|
||||
name="water_preset_combo"
|
||||
top_delta="-5"
|
||||
width="200"/>
|
||||
|
||||
<line_editor
|
||||
height="20"
|
||||
left_delta="0"
|
||||
name="water_preset_name"
|
||||
top_delta="0"
|
||||
width="200" />
|
||||
|
||||
<text
|
||||
follows="top|left|right"
|
||||
height="40"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
name="note"
|
||||
top_delta="0"
|
||||
width="340"
|
||||
wrap="true">
|
||||
Note: if you change the name of your preset, you will be creating a new preset and the existing preset will not be changed.
|
||||
</text>
|
||||
|
||||
<!--======== Controls panel ========-->
|
||||
<panel
|
||||
border="false"
|
||||
bevel_style="none"
|
||||
follows="top|left"
|
||||
height="230"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="panel_water_preset"
|
||||
top="100"
|
||||
width="700">
|
||||
|
||||
<!--======== I conlumn of controls ========-->
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="10"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="water_color_label"
|
||||
top="5"
|
||||
width="215">
|
||||
Water Fog Color
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WaterFogColor"
|
||||
top_pad="8"
|
||||
width="60" />
|
||||
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
top_pad="10"
|
||||
name="water_fog_density_label"
|
||||
width="215">
|
||||
Fog Density Exponent
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="10"
|
||||
name="WaterFogDensity"
|
||||
top_pad="10"
|
||||
width="200"/>
|
||||
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
top_pad="15"
|
||||
name="underwater_fog_modifier_label"
|
||||
width="215">
|
||||
Underwater Fog Modifier
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="10"
|
||||
name="WaterUnderWaterFogMod"
|
||||
top_pad="10"
|
||||
width="200"/>
|
||||
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="BHText"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Big Wave Direction
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterWave1DirX"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
label="X"
|
||||
layout="topleft"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="WaterWave1DirX"
|
||||
top_pad="10"
|
||||
width="216"/>
|
||||
<slider
|
||||
control_name="WaterWave1DirY"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
label="Y"
|
||||
layout="topleft"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="WaterWave1DirY"
|
||||
top_pad="5"
|
||||
width="216"/>
|
||||
|
||||
<!--======== II conlumn of controls ========-->
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_pad="20"
|
||||
name="BDensText"
|
||||
top="5"
|
||||
width="215">
|
||||
Reflection Wavelet Scale
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterNormalScaleX"
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="10"
|
||||
name="WaterNormalScaleX"
|
||||
top_pad="10"
|
||||
width="200"/>
|
||||
<slider
|
||||
control_name="WaterNormalScaleY"
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
max_val="10"
|
||||
name="WaterNormalScaleY"
|
||||
top_pad="6"
|
||||
width="200"/>
|
||||
<slider
|
||||
control_name="WaterNormalScaleZ"
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
max_val="10"
|
||||
name="WaterNormalScaleZ"
|
||||
top_pad="6"
|
||||
width="200"/>
|
||||
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="HDText"
|
||||
top_pad="16"
|
||||
width="215">
|
||||
Fresnel Scale
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterFresnelScale"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WaterFresnelScale"
|
||||
top_pad="10"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="FresnelOffsetText"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Fresnel Offset
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterFresnelOffset"
|
||||
decimal_digits="2"
|
||||
follows="left"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WaterFresnelOffset"
|
||||
top_pad="10"
|
||||
width="200"/>
|
||||
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="BHText2"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Little Wave Direction
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterWave2DirX"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
label="X"
|
||||
layout="topleft"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="WaterWave2DirX"
|
||||
top_pad="10"
|
||||
width="216" />
|
||||
<slider
|
||||
control_name="WaterWave2DirY"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
label="Y"
|
||||
layout="topleft"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="WaterWave2DirY"
|
||||
top_pad="6"
|
||||
width="216" />
|
||||
|
||||
<!--======== III conlumn of contorls ========-->
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_pad="20"
|
||||
name="DensMultText"
|
||||
top="5"
|
||||
width="215">
|
||||
Refract Scale Above
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterScaleAbove"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.1"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WaterScaleAbove"
|
||||
top_pad="5"
|
||||
width="200" />
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="WaterScaleBelowText"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Refract Scale Below
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterScaleBelow"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WaterScaleBelow"
|
||||
top_pad="5"
|
||||
width="200"/>
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="MaxAltText"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Blur Multiplier
|
||||
</text>
|
||||
<slider
|
||||
control_name="WaterBlurMult"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.001"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
max_val="0.16"
|
||||
name="WaterBlurMult"
|
||||
top_pad="5"
|
||||
width="200"/>
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-15"
|
||||
name="BHText3"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Normal Map
|
||||
</text>
|
||||
<texture_picker
|
||||
height="80"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
name="WaterNormalMap"
|
||||
top_pad="5"
|
||||
width="100" />
|
||||
</panel>
|
||||
<!--======== End of Controls panel ========-->
|
||||
|
||||
<view_border
|
||||
bevel_style="none"
|
||||
follows="top|left"
|
||||
height="0"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="horiz_separator"
|
||||
top_pad="5"
|
||||
width="700"/>
|
||||
<check_box
|
||||
follows="top|left"
|
||||
height="10"
|
||||
label="Make this preset my new water setting"
|
||||
layout="topleft"
|
||||
left="275"
|
||||
name="make_default_cb"
|
||||
top_pad="20"
|
||||
width="280"/>
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
label="Save"
|
||||
layout="topleft"
|
||||
left_pad="0"
|
||||
name="save"
|
||||
width="70"/>
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
label="Cancel"
|
||||
layout="topleft"
|
||||
left_pad="15"
|
||||
name="cancel"
|
||||
width="70"/>
|
||||
|
||||
</floater>
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
can_minimize="false"
|
||||
can_tear_off="false"
|
||||
can_resize="true"
|
||||
can_drag_on_left="false"
|
||||
can_close="true"
|
||||
can_dock="true"
|
||||
bevel_style="in"
|
||||
height="500"
|
||||
layout="topleft"
|
||||
name="Fixed Environment"
|
||||
save_rect="true"
|
||||
title="Fixed Environment"
|
||||
save_dock_state="true"
|
||||
save_visibility="true"
|
||||
single_instance="true"
|
||||
width="650">
|
||||
<layout_stack name="floater_stack"
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="vertical">
|
||||
<layout_panel name="info_panel"
|
||||
auto_resize="false"
|
||||
user_resize="false"
|
||||
min_height="60">
|
||||
<text
|
||||
follows="left|top"
|
||||
top_delta="30"
|
||||
left_delta="10"
|
||||
width="35"
|
||||
height="20"
|
||||
font="SansSerif">
|
||||
Name:
|
||||
</text>
|
||||
<line_editor
|
||||
follows="left|top"
|
||||
top_delta="-2"
|
||||
left_delta="45"
|
||||
width="250"
|
||||
name="settings_name"
|
||||
max_length_chars="32"
|
||||
height="20"/>
|
||||
<button
|
||||
height="23"
|
||||
label="Load"
|
||||
follows="left|top"
|
||||
left_delta="260"
|
||||
font="SansSerif"
|
||||
top_delta="-2"
|
||||
name="btn_load"
|
||||
tool_tip="Load a settings from inventory"
|
||||
width="96" />
|
||||
<button
|
||||
height="23"
|
||||
label="Import"
|
||||
follows="right|top"
|
||||
right="-10"
|
||||
font="SansSerif"
|
||||
top_delta="0"
|
||||
name="btn_import"
|
||||
tool_tip="Import legacy settings from disk."
|
||||
width="96" />
|
||||
</layout_panel>
|
||||
<layout_panel name="tab_area"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
height="11"
|
||||
min_height="0"
|
||||
visible="true">
|
||||
<tab_container
|
||||
follows="all"
|
||||
halign="left"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="tab_settings"
|
||||
tab_position="top"
|
||||
tab_width="120"
|
||||
tab_padding_right="3">
|
||||
<!-- Tabs inserted here in code -->
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
|
||||
<!-- -->
|
||||
</tab_container>
|
||||
</layout_panel>
|
||||
<layout_panel name="button_panel"
|
||||
follows="left|top|right|bottom"
|
||||
auto_resize="false"
|
||||
user_resize="false"
|
||||
height="40"
|
||||
visible="true">
|
||||
<layout_stack
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
mouse_opaque="false"
|
||||
name="button_bar_ls"
|
||||
left="0"
|
||||
orientation="horizontal"
|
||||
top="0"
|
||||
width="313">
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left="0"
|
||||
mouse_opaque="false"
|
||||
name="save_btn_lp"
|
||||
auto_resize="true"
|
||||
width="156">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Save"
|
||||
left="1"
|
||||
layout="topleft"
|
||||
name="btn_commit"
|
||||
top="0"
|
||||
width="155" />
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
name="btn_flyout"
|
||||
label=""
|
||||
layout="topleft"
|
||||
left_pad="-20"
|
||||
tab_stop="false"
|
||||
top="0"
|
||||
image_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_unselected="SegmentedBtn_Right_Off"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_overlay="Arrow_Small_Up"
|
||||
width="20"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="revert_btn_lp"
|
||||
auto_resize="true"
|
||||
width="147">
|
||||
<button
|
||||
follows="bottom|right"
|
||||
height="23"
|
||||
right="-1"
|
||||
label="Cancel"
|
||||
layout="topleft"
|
||||
name="btn_cancel"
|
||||
top="0"
|
||||
tool_tip="Revert to last saved version"
|
||||
width="147" />
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</floater>
|
||||
|
|
@ -321,6 +321,35 @@
|
|||
parameter="eyes" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu
|
||||
label="New Settings"
|
||||
layout="topleft"
|
||||
name="New Settings">
|
||||
<menu_item_call
|
||||
label="New Sky"
|
||||
layout="topleft"
|
||||
name="New Sky">
|
||||
<menu_item_call.on_click
|
||||
function="Inventory.DoCreate"
|
||||
parameter="sky"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="New Water"
|
||||
layout="topleft"
|
||||
name="New Water">
|
||||
<menu_item_call.on_click
|
||||
function="Inventory.DoCreate"
|
||||
parameter="water"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="New Day Cycle"
|
||||
layout="topleft"
|
||||
name="New Day Cycle">
|
||||
<menu_item_call.on_click
|
||||
function="Inventory.DoCreate"
|
||||
parameter="daycycle"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu
|
||||
label="Use as default for"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -245,4 +245,33 @@
|
|||
parameter="eyes" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu
|
||||
label="New Settings"
|
||||
layout="topleft"
|
||||
name="New Settings">
|
||||
<menu_item_call
|
||||
label="New Sky"
|
||||
layout="topleft"
|
||||
name="New Sky">
|
||||
<menu_item_call.on_click
|
||||
function="Inventory.DoCreate"
|
||||
parameter="sky"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="New Water"
|
||||
layout="topleft"
|
||||
name="New Water">
|
||||
<menu_item_call.on_click
|
||||
function="Inventory.DoCreate"
|
||||
parameter="water"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="New Day Cycle"
|
||||
layout="topleft"
|
||||
name="New Day Cycle">
|
||||
<menu_item_call.on_click
|
||||
function="Inventory.DoCreate"
|
||||
parameter="daycycle"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
</menu>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<toggleable_menu
|
||||
height="602"
|
||||
layout="topleft"
|
||||
mouse_opaque="false"
|
||||
name="save_settings_menu"
|
||||
width="120">
|
||||
<menu_item_call
|
||||
name="save_settings"
|
||||
label="Save">
|
||||
<menu_item_call.on_click
|
||||
function="FlyoutCombo.Button.Action"
|
||||
userdata="save"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
name="save_as_new_settings"
|
||||
label="Save As">
|
||||
<menu_item_call.on_click
|
||||
function="FlyoutCombo.Button.Action"
|
||||
userdata="saveas" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
name="apply_local"
|
||||
label="Apply Locally">
|
||||
<menu_item_call.on_click
|
||||
function="FlyoutCombo.Button.Action"
|
||||
userdata="local" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
name="apply_parcel"
|
||||
label="Apply Parcel">
|
||||
<menu_item_call.on_click
|
||||
function="FlyoutCombo.Button.Action"
|
||||
userdata="parcel" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
name="apply_region"
|
||||
label="Apply Region">
|
||||
<menu_item_call.on_click
|
||||
function="FlyoutCombo.Button.Action"
|
||||
userdata="region" />
|
||||
</menu_item_call>
|
||||
</toggleable_menu>
|
||||
|
|
@ -713,6 +713,8 @@
|
|||
</menu_item_call>
|
||||
|
||||
<menu_item_separator/>
|
||||
|
||||
<!-- *LAPRAS* These menus go away. Keep till no longer needed -->
|
||||
|
||||
<menu
|
||||
name="Water Presets"
|
||||
|
|
@ -732,7 +734,7 @@
|
|||
parameter="edit_water"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
|
||||
<menu
|
||||
name="Sky Presets"
|
||||
label="Sky Presets">
|
||||
|
|
@ -770,6 +772,7 @@
|
|||
parameter="edit_day_cycle"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<!-- *LAPRAS* -->
|
||||
</menu>
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,246 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
border="true"
|
||||
follows="all"
|
||||
label="Atmosphere & Lighting"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="panel_settings_sky_atmos"
|
||||
top="0">
|
||||
<layout_stack
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="vertical">
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="false"
|
||||
user_resize="false"
|
||||
visible="true"
|
||||
height="75">
|
||||
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
width="80">
|
||||
Ambient Color:
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="ambient_light"
|
||||
top_pad="5"
|
||||
width="60" />
|
||||
<text
|
||||
follows="left"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="90"
|
||||
top_delta="-15"
|
||||
width="80">
|
||||
Blue Horizon:
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="blue_horizon"
|
||||
top_pad="5"
|
||||
width="60" />
|
||||
<text
|
||||
follows="left"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="90"
|
||||
top_delta="-15"
|
||||
width="80">
|
||||
Blue Density:
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="blue_density"
|
||||
top_pad="5"
|
||||
width="60" />
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true">
|
||||
<layout_stack name="atmosphere1"
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="hoizontal">
|
||||
<layout_panel
|
||||
border="false"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
min_width="225">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
width="80">
|
||||
Haze Horizon:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="haze_horizon"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="25"
|
||||
width="80">
|
||||
Haze Density:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="haze_density"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="25"
|
||||
width="80">
|
||||
Scene Gamma:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
max_val="10"
|
||||
name="scene_gamma"
|
||||
top_delta="20"
|
||||
width="207"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
border="false"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
min_width="225">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
width="200">
|
||||
Density Multiplier:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="0.9"
|
||||
name="density_multip"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="25"
|
||||
width="200">
|
||||
Distance Multiplier:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="100"
|
||||
name="distance_multip"
|
||||
top_delta="20"
|
||||
width="214"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="25"
|
||||
width="200">
|
||||
Maximum Altitude:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="4000"
|
||||
name="max_alt"
|
||||
top_delta="20"
|
||||
width="214"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
|
|
@ -0,0 +1,265 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
border="true"
|
||||
follows="all"
|
||||
label="Clouds"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
help_topic="land_general_tab"
|
||||
name="panel_settings_sky_clouds"
|
||||
top="0">
|
||||
<layout_stack
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="hoizontal">
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
height="75">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
width="80">
|
||||
Cloud Color:
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="cloud_color"
|
||||
top_pad="5"
|
||||
width="60" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_delta="47"
|
||||
width="200">
|
||||
Cloud Coverage:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_coverage"
|
||||
top_delta="20"
|
||||
width="214"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="25"
|
||||
width="200">
|
||||
Cloud Scale:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_scale"
|
||||
top_delta="20"
|
||||
width="214"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="25"
|
||||
width="200">
|
||||
Cloud Scroll:
|
||||
</text>
|
||||
<panel
|
||||
follows="left|top"
|
||||
border="true"
|
||||
bg_alpha_color="red"
|
||||
background_visible="true"
|
||||
width="100"
|
||||
height="100"
|
||||
left_delta="5"
|
||||
top_delta="21">
|
||||
<text>
|
||||
placeholder
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
label="X:"
|
||||
left_delta="10"
|
||||
max_val="10"
|
||||
min_val="-10"
|
||||
name="cloud_scroll_x"
|
||||
top_pad="5"
|
||||
width="100"/>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
label="Y:"
|
||||
left_delta="0"
|
||||
max_val="10"
|
||||
min_val="-10"
|
||||
name="cloud_scroll_y"
|
||||
top_pad="5"
|
||||
orientation="vertical"
|
||||
height="70"/>
|
||||
</panel>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="115"
|
||||
top_delta="-20"
|
||||
width="200">
|
||||
Cloud Image:
|
||||
</text>
|
||||
<texture_picker
|
||||
height="100"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="cloud_map"
|
||||
top_pad="10"
|
||||
width="100"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
height="75">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
width="200">
|
||||
Cloud Density:
|
||||
</text>
|
||||
<slider
|
||||
label="X"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_density_x"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<slider
|
||||
label="Y"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_density_y"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<slider
|
||||
label="D"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_density_d"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="35"
|
||||
width="200">
|
||||
Cloud Detail:
|
||||
</text>
|
||||
<slider
|
||||
label="X"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_detail_x"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<slider
|
||||
label="Y"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_detail_y"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<slider
|
||||
label="D"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
min_val="0"
|
||||
max_val="1"
|
||||
name="cloud_detail_d"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
|
|
@ -0,0 +1,237 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
border="true"
|
||||
follows="all"
|
||||
label="Sun & Moon"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="panel_settings_sky_hbodies"
|
||||
top="0">
|
||||
<layout_stack
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="hoizontal">
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
height="75">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
width="80">
|
||||
Sun Color:
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="sun_moon_color"
|
||||
top_pad="5"
|
||||
width="60" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_delta="57"
|
||||
width="200">
|
||||
Glow Focus:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="0.5"
|
||||
name="glow_focus"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="20"
|
||||
width="200">
|
||||
Glow Size:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="1"
|
||||
max_val="1.99"
|
||||
name="glow_size"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_delta="30"
|
||||
width="200">
|
||||
Star Brightness:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
min_val="0"
|
||||
max_val="2"
|
||||
name="star_brightness"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
border="false"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
height="75">
|
||||
<layout_stack
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="vertical">
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
height="75">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
font="SansSerifBold"
|
||||
width="80">
|
||||
Sun
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
top_delta="30"
|
||||
width="100">
|
||||
Position:
|
||||
</text>
|
||||
<joystick_quat
|
||||
follows="left|top"
|
||||
height="78"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_delta="20"
|
||||
name="sun_rotation"
|
||||
quadrant="left"
|
||||
sound_flags="3"
|
||||
visible="true"
|
||||
tool_tip="Move sun in sky"
|
||||
width="78" /> <!-- Should be 126x126 -->
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="100"
|
||||
top_delta="-20"
|
||||
width="200">
|
||||
Image:
|
||||
</text>
|
||||
<texture_picker
|
||||
height="100"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="sun_image"
|
||||
top_pad="10"
|
||||
width="100"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
height="75">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="15"
|
||||
top_pad="15"
|
||||
font="SansSerifBold"
|
||||
width="80">
|
||||
Moon
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="10"
|
||||
top_delta="30"
|
||||
width="100">
|
||||
Position:
|
||||
</text>
|
||||
<joystick_quat
|
||||
follows="left|top"
|
||||
height="78"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
top_delta="20"
|
||||
name="moon_rotation"
|
||||
quadrant="left"
|
||||
sound_flags="3"
|
||||
visible="true"
|
||||
tool_tip="Move sun in sky"
|
||||
width="78" /> <!-- Should be 126x126 -->
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left_delta="100"
|
||||
top_delta="-20"
|
||||
width="200">
|
||||
Image:
|
||||
</text>
|
||||
<texture_picker
|
||||
height="100"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="moon_image"
|
||||
top_pad="10"
|
||||
width="100"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
|
|
@ -0,0 +1,408 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
border="true"
|
||||
follows="all"
|
||||
label="Water"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
help_topic="land_general_tab"
|
||||
name="panel_settings_water"
|
||||
top="0">
|
||||
<layout_stack name="water_stack1"
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="vertical">
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="false"
|
||||
user_resize="false"
|
||||
visible="true"
|
||||
height="105">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="20"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
top="5"
|
||||
width="215">
|
||||
Water Fog:
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
layout="left|top"
|
||||
left_delta="15"
|
||||
top_delta="0"
|
||||
width="60">
|
||||
Color:
|
||||
</text>
|
||||
<color_swatch
|
||||
can_apply_immediately="true"
|
||||
follows="left|top"
|
||||
height="37"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="water_fog_color"
|
||||
top_pad="5"
|
||||
width="60" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
top_delta="-15"
|
||||
left_delta="80"
|
||||
width="200">
|
||||
Density Exponent:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top|right"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="top"
|
||||
left_delta="15"
|
||||
max_val="10"
|
||||
name="water_fog_density"
|
||||
top_delta="5"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="10"
|
||||
top_delta="25"
|
||||
left_delta="-15"
|
||||
width="200">
|
||||
Underwater Modifier:</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top|right"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="top"
|
||||
left_delta="15"
|
||||
max_val="10"
|
||||
name="water_underwater_mod"
|
||||
top_delta="20"
|
||||
width="200"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true">
|
||||
<layout_stack name="water_stack2"
|
||||
left="5"
|
||||
top="5"
|
||||
right="-5"
|
||||
bottom="-5"
|
||||
follows="left|top|right|bottom"
|
||||
orientation="horizontal">
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
visible="true"
|
||||
min_width="375"
|
||||
width="50">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="20"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
top="5"
|
||||
width="215">
|
||||
Waves:
|
||||
</text>
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="15"
|
||||
top_delta="20"
|
||||
width="215">
|
||||
Normal Map
|
||||
</text>
|
||||
<texture_picker
|
||||
height="100"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="water_normal_map"
|
||||
top_pad="5"
|
||||
width="100"/>
|
||||
|
||||
<text
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
top_delta="-20"
|
||||
left_delta="120">
|
||||
Large Wave Speed
|
||||
</text>
|
||||
<panel
|
||||
follows="left|top"
|
||||
border="true"
|
||||
bg_alpha_color="red"
|
||||
background_visible="true"
|
||||
width="100"
|
||||
height="100"
|
||||
left_delta="0"
|
||||
top_delta="21">
|
||||
<text>
|
||||
placeholder
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
label="X:"
|
||||
left_delta="10"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="water_wave1_x"
|
||||
top_pad="5"
|
||||
width="100"/>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
label="Y:"
|
||||
left_delta="0"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="water_wave1_y"
|
||||
top_pad="5"
|
||||
orientation="vertical"
|
||||
height="70"/>
|
||||
</panel>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
top_delta="-20"
|
||||
left_delta="120">
|
||||
Small Wave Speed
|
||||
</text>
|
||||
<panel
|
||||
follows="left|top"
|
||||
border="true"
|
||||
bg_alpha_color="red"
|
||||
background_visible="true"
|
||||
width="100"
|
||||
height="100"
|
||||
left_delta="0"
|
||||
top_delta="21"
|
||||
>
|
||||
<text>
|
||||
placeholder
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
label="X:"
|
||||
left_delta="10"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="water_wave2_x"
|
||||
top_pad="5"
|
||||
width="100"/>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
label="Y:"
|
||||
left_delta="0"
|
||||
max_val="4"
|
||||
min_val="-4"
|
||||
name="water_wave2_y"
|
||||
top_pad="5"
|
||||
orientation="vertical"
|
||||
height="70"/>
|
||||
</panel>
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="15"
|
||||
top_pad="10"
|
||||
width="215">
|
||||
Reflection Wavelet Scale
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
label="X:"
|
||||
left_delta="10"
|
||||
max_val="10"
|
||||
name="water_normal_scale_x"
|
||||
top_pad="5"
|
||||
width="150"/>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
max_val="10"
|
||||
name="water_normal_scale_y"
|
||||
top_pad="6"
|
||||
label="Y:"
|
||||
width="150"/>
|
||||
<slider
|
||||
decimal_digits="1"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
max_val="10"
|
||||
name="water_normal_scale_z"
|
||||
top_pad="6"
|
||||
label="Z:"
|
||||
width="150"/>
|
||||
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="175"
|
||||
top_delta="-52"
|
||||
width="150">
|
||||
Fresnel Scale:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="water_fresnel_scale"
|
||||
top_pad="5"
|
||||
width="150"/>
|
||||
<text
|
||||
follows="left|top|right"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
name="FresnelOffsetText"
|
||||
top_pad="10"
|
||||
width="150">
|
||||
Fresnel Offset:
|
||||
</text>
|
||||
<slider
|
||||
decimal_digits="2"
|
||||
follows="left|top|right"
|
||||
increment="0.01"
|
||||
initial_value="0.7"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="water_fresnel_offset"
|
||||
top_pad="5"
|
||||
width="150"/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
border="true"
|
||||
bevel_style="in"
|
||||
auto_resize="true"
|
||||
user_resize="true"
|
||||
width="50"
|
||||
visible="true">
|
||||
<text
|
||||
follows="left|top"
|
||||
height="20"
|
||||
font="SansSerif"
|
||||
layout="topleft"
|
||||
left="5"
|
||||
top="5"
|
||||
width="215">
|
||||
Refraction And Blur:
|
||||
</text>
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
top_delta="25"
|
||||
left_delta="5"
|
||||
width="215">
|
||||
Refraction Scale (Above)
|
||||
</text>
|
||||
<slider
|
||||
control_name="water_scale_above"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
increment="0.01"
|
||||
initial_value="0.1"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="water_scale_above"
|
||||
top_pad="5"
|
||||
width="200" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_pad="15"
|
||||
width="215">
|
||||
Refraction Scale (Below)
|
||||
</text>
|
||||
<slider
|
||||
control_name="water_scale_below"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.01"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
name="water_scale_below"
|
||||
top_pad="5"
|
||||
width="200"/>
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left_delta="-5"
|
||||
top_pad="5"
|
||||
width="215">
|
||||
Blur Multiplier
|
||||
</text>
|
||||
<slider
|
||||
control_name="water_blur_multip"
|
||||
follows="left|top"
|
||||
height="10"
|
||||
increment="0.001"
|
||||
initial_value="0"
|
||||
layout="topleft"
|
||||
left_delta="5"
|
||||
max_val="0.16"
|
||||
name="water_blur_multip"
|
||||
top_pad="5"
|
||||
width="200"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
|
|
@ -3850,6 +3850,11 @@ Abuse Report</string>
|
|||
<string name="Female - Shrug">Female - Shrug</string>
|
||||
<string name="Female - Stick tougue out">Female - Stick tongue out</string>
|
||||
<string name="Female - Wow">Female - Wow</string>
|
||||
<!-- settings -->
|
||||
<string name="New Daycycle">New Daycycle</string>
|
||||
<string name="New Water">New Water</string>
|
||||
<string name="New Sky">New Sky</string>
|
||||
|
||||
|
||||
<string name="/bow">/bow</string>
|
||||
<string name="/clap">/clap</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue