- internal : deprecate RlvWLSnapshot in favour of the new user WindLight preferences
--HG-- branch : RLVameow-7.2.2
parent
659d503e9f
commit
276e151642
|
|
@ -56,7 +56,6 @@ struct RlvException;
|
|||
typedef boost::variant<std::string, LLUUID, S32, ERlvBehaviour> RlvExceptionOption;
|
||||
|
||||
class RlvGCTimer;
|
||||
class RlvWLSnapshot;
|
||||
|
||||
// ============================================================================
|
||||
// RlvSettings
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static bool rlvParseNotifyOption(const std::string& strOption, S32& nChannel, st
|
|||
//
|
||||
|
||||
// Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.1d
|
||||
RlvHandler::RlvHandler() : m_fCanCancelTp(true), m_posSitSource(), m_pGCTimer(NULL), m_pWLSnapshot(NULL)
|
||||
RlvHandler::RlvHandler() : m_fCanCancelTp(true), m_posSitSource(), m_pGCTimer(NULL)
|
||||
{
|
||||
gAgent.addListener(this, "new group");
|
||||
|
||||
|
|
@ -86,7 +86,6 @@ RlvHandler::~RlvHandler()
|
|||
gAgent.removeListener(this);
|
||||
|
||||
//delete m_pGCTimer; // <- deletes itself
|
||||
delete m_pWLSnapshot; // <- delete on NULL is harmless
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -1103,8 +1102,6 @@ void RlvHandler::clearState()
|
|||
// Clear dynamically allocated memory
|
||||
delete m_pGCTimer;
|
||||
m_pGCTimer = NULL;
|
||||
delete m_pWLSnapshot;
|
||||
m_pWLSnapshot = NULL;
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
@ -1146,8 +1143,15 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
|||
case RLV_BHVR_DETACHALLTHISEXCEPT: // @detachallthisexcept[:<option>]=n|y
|
||||
eRet = onAddRemFolderLockException(rlvCmd, fRefCount);
|
||||
break;
|
||||
case RLV_BHVR_SETENV: // @setenv=n|y
|
||||
eRet = onAddRemSetEnv(rlvCmd, fRefCount);
|
||||
case RLV_BHVR_SETENV: // @setenv=n|y - Checked: 2011-09-04 (RLVa-1.4.1a) | Modified: RLVa-1.4.1a
|
||||
{
|
||||
if (RlvSettings::getNoSetEnv())
|
||||
{
|
||||
eRet = RLV_RET_FAILED_DISABLED;
|
||||
break;
|
||||
}
|
||||
VERIFY_OPTION_REF(strOption.empty());
|
||||
}
|
||||
break;
|
||||
case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
|
||||
|
|
@ -1557,35 +1561,6 @@ ERlvCmdRet RlvHandler::onAddRemFolderLockException(const RlvCommand& rlvCmd, boo
|
|||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
|
||||
ERlvCmdRet RlvHandler::onAddRemSetEnv(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
{
|
||||
// Sanity check - there shouldn't be an option
|
||||
if (!rlvCmd.getOption().empty())
|
||||
return RLV_RET_FAILED_OPTION;
|
||||
if (RlvSettings::getNoSetEnv())
|
||||
return RLV_RET_FAILED_DISABLED;
|
||||
|
||||
if (RLV_TYPE_ADD == rlvCmd.getParamType())
|
||||
{
|
||||
// Save the current WindLight params so we can restore them on @setenv=y
|
||||
RLV_ASSERT(!m_pWLSnapshot);
|
||||
if (m_pWLSnapshot)
|
||||
delete m_pWLSnapshot;
|
||||
m_pWLSnapshot = RlvWLSnapshot::takeSnapshot();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Restore WindLight parameters to what they were before @setenv=n was issued
|
||||
RlvWLSnapshot::restoreSnapshot(m_pWLSnapshot);
|
||||
delete m_pWLSnapshot;
|
||||
m_pWLSnapshot = NULL;
|
||||
}
|
||||
fRefCount = true;
|
||||
|
||||
return RLV_RET_SUCCESS;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Command handlers (RLV_TYPE_FORCE)
|
||||
//
|
||||
|
|
|
|||
|
|
@ -163,7 +163,6 @@ protected:
|
|||
ERlvCmdRet onAddRemDetach(const RlvCommand& rlvCmd, bool& fRefCount);
|
||||
ERlvCmdRet onAddRemFolderLock(const RlvCommand& rlvCmd, bool& fRefCount);
|
||||
ERlvCmdRet onAddRemFolderLockException(const RlvCommand& rlvCmd, bool& fRefCount);
|
||||
ERlvCmdRet onAddRemSetEnv(const RlvCommand& rlvCmd, bool& fRefCount);
|
||||
// Command handlers (RLV_TYPE_FORCE)
|
||||
ERlvCmdRet processForceCommand(const RlvCommand& rlvCmd) const;
|
||||
ERlvCmdRet onForceRemAttach(const RlvCommand& rlvCmd) const;
|
||||
|
|
@ -197,7 +196,6 @@ protected:
|
|||
|
||||
rlv_command_list_t m_Retained;
|
||||
RlvGCTimer* m_pGCTimer;
|
||||
RlvWLSnapshot* m_pWLSnapshot;
|
||||
|
||||
std::stack<const RlvCommand*> m_CurCommandStack;// Convenience (see @tpto)
|
||||
std::stack<LLUUID> m_CurObjectStack; // Convenience (see @tpto)
|
||||
|
|
|
|||
|
|
@ -1056,39 +1056,6 @@ void RlvBehaviourNotifyHandler::onReattach(const LLViewerJointAttachment* pAttac
|
|||
sendNotification(llformat("reattached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName().c_str()));
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// RlvWLSnapshot
|
||||
//
|
||||
|
||||
// Checked: 2010-03-18 (RLVa-1.2.0e) | Added: RLVa-0.2.0h
|
||||
void RlvWLSnapshot::restoreSnapshot(const RlvWLSnapshot* pWLSnapshot)
|
||||
{
|
||||
// LLWLParamManager* pWLParams = LLWLParamManager::instance();
|
||||
// if ( (pWLSnapshot) && (pWLParams) )
|
||||
// {
|
||||
// pWLParams->mAnimator.mIsRunning = pWLSnapshot->fIsRunning;
|
||||
// pWLParams->mAnimator.mUseLindenTime = pWLSnapshot->fUseLindenTime;
|
||||
// pWLParams->mCurParams = pWLSnapshot->WLParams;
|
||||
// pWLParams->propagateParameters();
|
||||
// }
|
||||
}
|
||||
|
||||
// Checked: 2010-03-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
|
||||
RlvWLSnapshot* RlvWLSnapshot::takeSnapshot()
|
||||
{
|
||||
// RlvWLSnapshot* pWLSnapshot = NULL;
|
||||
// LLWLParamManager* pWLParams = LLWLParamManager::instance();
|
||||
// if (pWLParams)
|
||||
// {
|
||||
// pWLSnapshot = new RlvWLSnapshot();
|
||||
// pWLSnapshot->fIsRunning = pWLParams->mAnimator.mIsRunning;
|
||||
// pWLSnapshot->fUseLindenTime = pWLParams->mAnimator.mUseLindenTime;
|
||||
// pWLSnapshot->WLParams = pWLParams->mCurParams;
|
||||
// }
|
||||
// return pWLSnapshot;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// Various helper classes/timers/functors
|
||||
//
|
||||
|
|
|
|||
|
|
@ -368,23 +368,6 @@ private:
|
|||
RlvException();
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// RlvWLSnapshot
|
||||
//
|
||||
|
||||
class RlvWLSnapshot
|
||||
{
|
||||
public:
|
||||
static void restoreSnapshot(const RlvWLSnapshot* pWLSnapshot);
|
||||
static RlvWLSnapshot* takeSnapshot();
|
||||
private:
|
||||
RlvWLSnapshot() {}
|
||||
|
||||
bool fIsRunning;
|
||||
bool fUseLindenTime;
|
||||
LLWLParamSet WLParams;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Various helper classes/timers/functors
|
||||
//
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "llbottomtray.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcallfloater.h"
|
||||
#include "llenvmanager.h" // LLEnvManagerNew
|
||||
#include "llhudtext.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llimview.h" // LLIMMgr
|
||||
|
|
@ -204,6 +205,10 @@ void RlvUIEnabler::onToggleSetEnv()
|
|||
// Don't allow toggling "Basic Shaders" and/or "Atmopsheric Shaders" through the debug settings under @setenv=n
|
||||
gSavedSettings.getControl("VertexShaderEnable")->setHiddenFromSettingsEditor(!fEnable);
|
||||
gSavedSettings.getControl("WindLightUseAtmosShaders")->setHiddenFromSettingsEditor(!fEnable);
|
||||
|
||||
// Restore the user's WindLight preferences when releasing
|
||||
if (fEnable)
|
||||
LLEnvManagerNew::instance().usePrefs();
|
||||
}
|
||||
|
||||
// Checked: 2010-09-07 (RLVa-1.4.0a) | Modified: RLVa-1.2.1a
|
||||
|
|
|
|||
Loading…
Reference in New Issue