Merge branch 'DRTVWR-559' into DRTVWR-583
commit
040050af19
|
|
@ -1188,6 +1188,7 @@ PanteraPolnocy
|
|||
SL-18891
|
||||
SL-18904
|
||||
SL-18937
|
||||
SL-19681
|
||||
Parvati Silverweb
|
||||
Patric Mills
|
||||
VWR-2645
|
||||
|
|
@ -1413,6 +1414,7 @@ Sovereign Engineer
|
|||
SL-18525
|
||||
SL-18534
|
||||
SL-19690
|
||||
SL-19336
|
||||
SpacedOut Frye
|
||||
VWR-34
|
||||
VWR-45
|
||||
|
|
|
|||
|
|
@ -1391,6 +1391,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
// get number of joint motions
|
||||
//-------------------------------------------------------------------------
|
||||
U32 num_motions = 0;
|
||||
S32 rotation_dupplicates = 0;
|
||||
S32 position_dupplicates = 0;
|
||||
if (!dp.unpackU32(num_motions, "num_joints"))
|
||||
{
|
||||
LL_WARNS() << "can't read number of joints"
|
||||
|
|
@ -1621,6 +1623,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
rCurve->mKeys[time] = rot_key;
|
||||
}
|
||||
|
||||
if (joint_motion->mRotationCurve.mNumKeys > joint_motion->mRotationCurve.mKeys.size())
|
||||
{
|
||||
rotation_dupplicates++;
|
||||
LL_INFOS() << "Motion: " << asset_id << " had dupplicate rotation keys that were removed" << LL_ENDL;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// scan position curve header
|
||||
//---------------------------------------------------------------------
|
||||
|
|
@ -1723,9 +1731,24 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
}
|
||||
}
|
||||
|
||||
if (joint_motion->mPositionCurve.mNumKeys > joint_motion->mPositionCurve.mKeys.size())
|
||||
{
|
||||
position_dupplicates++;
|
||||
}
|
||||
|
||||
joint_motion->mUsage = joint_state->getUsage();
|
||||
}
|
||||
|
||||
if (rotation_dupplicates > 0)
|
||||
{
|
||||
LL_INFOS() << "Motion: " << asset_id << " had " << rotation_dupplicates << " dupplicate rotation keys that were removed" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (position_dupplicates > 0)
|
||||
{
|
||||
LL_INFOS() << "Motion: " << asset_id << " had " << position_dupplicates << " dupplicate position keys that were removed" << LL_ENDL;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// get number of constraints
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -2005,10 +2028,13 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
|
|||
JointMotion* joint_motionp = mJointMotionList->getJointMotion(i);
|
||||
success &= dp.packString(joint_motionp->mJointName, "joint_name");
|
||||
success &= dp.packS32(joint_motionp->mPriority, "joint_priority");
|
||||
success &= dp.packS32(joint_motionp->mRotationCurve.mNumKeys, "num_rot_keys");
|
||||
success &= dp.packS32(joint_motionp->mRotationCurve.mKeys.size(), "num_rot_keys");
|
||||
|
||||
LL_DEBUGS("BVH") << "Joint " << joint_motionp->mJointName << LL_ENDL;
|
||||
for (RotationCurve::key_map_t::value_type& rot_pair : joint_motionp->mRotationCurve.mKeys)
|
||||
LL_DEBUGS("BVH") << "Joint " << i
|
||||
<< " name: " << joint_motionp->mJointName
|
||||
<< " Rotation keys: " << joint_motionp->mRotationCurve.mKeys.size()
|
||||
<< " Position keys: " << joint_motionp->mPositionCurve.mKeys.size() << LL_ENDL;
|
||||
for (RotationCurve::key_map_t::value_type& rot_pair : joint_motionp->mRotationCurve.mKeys)
|
||||
{
|
||||
RotationKey& rot_key = rot_pair.second;
|
||||
U16 time_short = F32_to_U16(rot_key.mTime, 0.f, mJointMotionList->mDuration);
|
||||
|
|
@ -2028,7 +2054,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
|
|||
LL_DEBUGS("BVH") << " rot: t " << rot_key.mTime << " angles " << rot_angles.mV[VX] <<","<< rot_angles.mV[VY] <<","<< rot_angles.mV[VZ] << LL_ENDL;
|
||||
}
|
||||
|
||||
success &= dp.packS32(joint_motionp->mPositionCurve.mNumKeys, "num_pos_keys");
|
||||
success &= dp.packS32(joint_motionp->mPositionCurve.mKeys.size(), "num_pos_keys");
|
||||
for (PositionCurve::key_map_t::value_type& pos_pair : joint_motionp->mPositionCurve.mKeys)
|
||||
{
|
||||
PositionKey& pos_key = pos_pair.second;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ set(llcommon_SOURCE_FILES
|
|||
lldependencies.cpp
|
||||
lldictionary.cpp
|
||||
llerror.cpp
|
||||
llerrorthread.cpp
|
||||
llevent.cpp
|
||||
lleventapi.cpp
|
||||
lleventcoro.cpp
|
||||
|
|
@ -153,7 +152,6 @@ set(llcommon_HEADER_FILES
|
|||
llendianswizzle.h
|
||||
llerror.h
|
||||
llerrorcontrol.h
|
||||
llerrorthread.h
|
||||
llevent.h
|
||||
lleventapi.h
|
||||
lleventcoro.h
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
#include "llcommon.h"
|
||||
#include "llapr.h"
|
||||
#include "llerrorcontrol.h"
|
||||
#include "llerrorthread.h"
|
||||
#include "llframetimer.h"
|
||||
#include "lllivefile.h"
|
||||
#include "llmemory.h"
|
||||
|
|
@ -108,12 +107,7 @@ LLAppErrorHandler LLApp::sErrorHandler = NULL;
|
|||
BOOL LLApp::sErrorThreadRunning = FALSE;
|
||||
|
||||
|
||||
LLApp::LLApp() : mThreadErrorp(NULL)
|
||||
{
|
||||
commonCtor();
|
||||
}
|
||||
|
||||
void LLApp::commonCtor()
|
||||
LLApp::LLApp()
|
||||
{
|
||||
// Set our status to running
|
||||
setStatus(APP_STATUS_RUNNING);
|
||||
|
|
@ -143,12 +137,6 @@ void LLApp::commonCtor()
|
|||
mCrashReportPipeStr = L"\\\\.\\pipe\\LLCrashReporterPipe";
|
||||
}
|
||||
|
||||
LLApp::LLApp(LLErrorThread *error_thread) :
|
||||
mThreadErrorp(error_thread)
|
||||
{
|
||||
commonCtor();
|
||||
}
|
||||
|
||||
|
||||
LLApp::~LLApp()
|
||||
{
|
||||
|
|
@ -158,13 +146,6 @@ LLApp::~LLApp()
|
|||
mLiveFiles.clear();
|
||||
|
||||
setStopped();
|
||||
// HACK: wait for the error thread to clean itself
|
||||
ms_sleep(20);
|
||||
if (mThreadErrorp)
|
||||
{
|
||||
delete mThreadErrorp;
|
||||
mThreadErrorp = NULL;
|
||||
}
|
||||
|
||||
SUBSYSTEM_CLEANUP_DBG(LLCommon);
|
||||
}
|
||||
|
|
@ -393,27 +374,6 @@ void LLApp::setupErrorHandling(bool second_instance)
|
|||
#endif // ! LL_BUGSPLAT
|
||||
|
||||
#endif // ! LL_WINDOWS
|
||||
|
||||
#ifdef LL_BUGSPLAT
|
||||
// do not start our own error thread
|
||||
#else // ! LL_BUGSPLAT
|
||||
startErrorThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLApp::startErrorThread()
|
||||
{
|
||||
//
|
||||
// Start the error handling thread, which is responsible for taking action
|
||||
// when the app goes into the APP_STATUS_ERROR state
|
||||
//
|
||||
if(!mThreadErrorp)
|
||||
{
|
||||
LL_INFOS() << "Starting error thread" << LL_ENDL;
|
||||
mThreadErrorp = new LLErrorThread();
|
||||
mThreadErrorp->setUserData((void *) this);
|
||||
mThreadErrorp->start();
|
||||
}
|
||||
}
|
||||
|
||||
void LLApp::setErrorHandler(LLAppErrorHandler handler)
|
||||
|
|
@ -476,7 +436,7 @@ void LLApp::setStatus(EAppStatus status)
|
|||
// static
|
||||
void LLApp::setError()
|
||||
{
|
||||
// set app status to ERROR so that the LLErrorThread notices
|
||||
// set app status to ERROR
|
||||
setStatus(APP_STATUS_ERROR);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include <atomic>
|
||||
#include <chrono>
|
||||
// Forward declarations
|
||||
class LLErrorThread;
|
||||
class LLLiveFile;
|
||||
#if LL_LINUX
|
||||
#include <signal.h>
|
||||
|
|
@ -53,7 +52,6 @@ void clear_signals();
|
|||
|
||||
class LL_COMMON_API LLApp
|
||||
{
|
||||
friend class LLErrorThread;
|
||||
public:
|
||||
typedef enum e_app_status
|
||||
{
|
||||
|
|
@ -67,11 +65,6 @@ public:
|
|||
LLApp();
|
||||
virtual ~LLApp();
|
||||
|
||||
protected:
|
||||
LLApp(LLErrorThread* error_thread);
|
||||
void commonCtor();
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief Return the static app instance if one was created.
|
||||
*/
|
||||
|
|
@ -257,14 +250,14 @@ public:
|
|||
void setupErrorHandling(bool mSecondInstance=false);
|
||||
|
||||
void setErrorHandler(LLAppErrorHandler handler);
|
||||
static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
|
||||
static void runErrorHandler(); // run shortly after we detect an error
|
||||
//@}
|
||||
|
||||
|
||||
// the maximum length of the minidump filename returned by getMiniDumpFilename()
|
||||
static const U32 MAX_MINDUMP_PATH_LENGTH = 256;
|
||||
|
||||
// change the directory where Breakpad minidump files are written to
|
||||
void setDebugFileNames(const std::string &path);
|
||||
void setDebugFileNames(const std::string &path);
|
||||
|
||||
// Return the Google Breakpad minidump filename after a crash.
|
||||
char *getMiniDumpFilename() { return mMinidumpPath; }
|
||||
|
|
@ -310,13 +303,11 @@ protected:
|
|||
void stepFrame();
|
||||
|
||||
private:
|
||||
void startErrorThread();
|
||||
|
||||
// Contains the filename of the minidump file after a crash.
|
||||
char mMinidumpPath[MAX_MINDUMP_PATH_LENGTH];
|
||||
|
||||
std::string mStaticDebugFileName;
|
||||
std::string mDynamicDebugFileName;
|
||||
std::string mStaticDebugFileName;
|
||||
std::string mDynamicDebugFileName;
|
||||
|
||||
// *NOTE: On Windows, we need a routine to reset the structured
|
||||
// exception handler when some evil driver has taken it over for
|
||||
|
|
@ -324,9 +315,6 @@ private:
|
|||
typedef int(*signal_handler_func)(int signum);
|
||||
static LLAppErrorHandler sErrorHandler;
|
||||
|
||||
// Default application threads
|
||||
LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback
|
||||
|
||||
// This is the application level runnable scheduler.
|
||||
LLRunner mRunner;
|
||||
|
||||
|
|
|
|||
|
|
@ -276,7 +276,6 @@ namespace LLError
|
|||
// used to indicate no class info known for logging
|
||||
|
||||
//LLCallStacks keeps track of call stacks and output the call stacks to log file
|
||||
//when LLAppViewer::handleViewerCrash() is triggered.
|
||||
//
|
||||
//Note: to be simple, efficient and necessary to keep track of correct call stacks,
|
||||
//LLCallStacks is designed not to be thread-safe.
|
||||
|
|
|
|||
|
|
@ -1,133 +0,0 @@
|
|||
/**
|
||||
* @file llerrorthread.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&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 "linden_common.h"
|
||||
#include "llerrorthread.h"
|
||||
|
||||
#include "llapp.h"
|
||||
#include "lltimer.h" // ms_sleep()
|
||||
|
||||
LLErrorThread::LLErrorThread()
|
||||
: LLThread("Error"),
|
||||
mUserDatap(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
LLErrorThread::~LLErrorThread()
|
||||
{
|
||||
}
|
||||
|
||||
void LLErrorThread::setUserData(void* user_data)
|
||||
{
|
||||
mUserDatap = user_data;
|
||||
}
|
||||
|
||||
|
||||
void* LLErrorThread::getUserData() const
|
||||
{
|
||||
return mUserDatap;
|
||||
}
|
||||
|
||||
#if !LL_WINDOWS
|
||||
//
|
||||
// Various signal/error handling functions that can't be put into the class
|
||||
//
|
||||
void get_child_status(const int waitpid_status, int &process_status, bool &exited, bool do_logging)
|
||||
{
|
||||
exited = false;
|
||||
process_status = -1;
|
||||
// The child process exited. Call its callback, and then clean it up
|
||||
if (WIFEXITED(waitpid_status))
|
||||
{
|
||||
process_status = WEXITSTATUS(waitpid_status);
|
||||
exited = true;
|
||||
if (do_logging)
|
||||
{
|
||||
LL_INFOS() << "get_child_status - Child exited cleanly with return of " << process_status << LL_ENDL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (WIFSIGNALED(waitpid_status))
|
||||
{
|
||||
process_status = WTERMSIG(waitpid_status);
|
||||
exited = true;
|
||||
if (do_logging)
|
||||
{
|
||||
LL_INFOS() << "get_child_status - Child died because of uncaught signal " << process_status << LL_ENDL;
|
||||
#ifdef WCOREDUMP
|
||||
if (WCOREDUMP(waitpid_status))
|
||||
{
|
||||
LL_INFOS() << "get_child_status - Child dumped core" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "get_child_status - Child didn't dump core" << LL_ENDL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (do_logging)
|
||||
{
|
||||
// This is weird. I just dump the waitpid status into the status code,
|
||||
// not that there's any way of telling what it is...
|
||||
LL_INFOS() << "get_child_status - Got SIGCHILD but child didn't exit" << LL_ENDL;
|
||||
process_status = waitpid_status;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void LLErrorThread::run()
|
||||
{
|
||||
LLApp::sErrorThreadRunning = TRUE;
|
||||
// This thread sits and waits for the sole purpose
|
||||
// of waiting for the signal/exception handlers to flag the
|
||||
// application state as APP_STATUS_ERROR.
|
||||
LL_INFOS() << "thread_error - Waiting for an error" << LL_ENDL;
|
||||
|
||||
S32 counter = 0;
|
||||
while (! (LLApp::isError() || LLApp::isStopped()))
|
||||
{
|
||||
ms_sleep(10);
|
||||
counter++;
|
||||
}
|
||||
if (LLApp::isError())
|
||||
{
|
||||
// The app is in an error state, run the application's error handler.
|
||||
//LL_INFOS() << "thread_error - An error has occurred, running error callback!" << LL_ENDL;
|
||||
// Run the error handling callback
|
||||
LLApp::runErrorHandler();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Everything is okay, a clean exit.
|
||||
//LL_INFOS() << "thread_error - Application exited cleanly" << LL_ENDL;
|
||||
}
|
||||
|
||||
//LL_INFOS() << "thread_error - Exiting" << LL_ENDL;
|
||||
LLApp::sErrorThreadRunning = FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/**
|
||||
* @file llerrorthread.h
|
||||
* @brief Specialized thread to handle runtime errors.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&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_LLERRORTHREAD_H
|
||||
#define LL_LLERRORTHREAD_H
|
||||
|
||||
#include "llthread.h"
|
||||
|
||||
class LL_COMMON_API LLErrorThread : public LLThread
|
||||
{
|
||||
public:
|
||||
LLErrorThread();
|
||||
~LLErrorThread();
|
||||
|
||||
/*virtual*/ void run(void);
|
||||
void setUserData(void *user_data);
|
||||
void *getUserData() const;
|
||||
|
||||
protected:
|
||||
void* mUserDatap; // User data associated with this thread
|
||||
};
|
||||
|
||||
#endif // LL_LLERRORTHREAD_H
|
||||
|
|
@ -1142,6 +1142,7 @@ void LLSettingsSky::setSkyIceLevel(F32 ice_level)
|
|||
|
||||
void LLSettingsSky::setReflectionProbeAmbiance(F32 ambiance)
|
||||
{
|
||||
mCanAutoAdjust = false; // we've now touched this sky in a "new" way, it can no longer auto adjust
|
||||
setValue(SETTING_REFLECTION_PROBE_AMBIANCE, ambiance);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2056,7 +2056,8 @@ LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL ge
|
|||
mDetail = detail;
|
||||
mSculptLevel = -2;
|
||||
mSurfaceArea = 1.f; //only calculated for sculpts, defaults to 1 for all other prims
|
||||
mIsMeshAssetLoaded = FALSE;
|
||||
mIsMeshAssetLoaded = false;
|
||||
mIsMeshAssetUnavaliable = false;
|
||||
mLODScaleBias.setVec(1,1,1);
|
||||
mHullPoints = NULL;
|
||||
mHullIndices = NULL;
|
||||
|
|
@ -2804,14 +2805,32 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
|
|||
}
|
||||
|
||||
|
||||
BOOL LLVolume::isMeshAssetLoaded()
|
||||
bool LLVolume::isMeshAssetLoaded()
|
||||
{
|
||||
return mIsMeshAssetLoaded;
|
||||
}
|
||||
|
||||
void LLVolume::setMeshAssetLoaded(BOOL loaded)
|
||||
void LLVolume::setMeshAssetLoaded(bool loaded)
|
||||
{
|
||||
mIsMeshAssetLoaded = loaded;
|
||||
if (loaded)
|
||||
{
|
||||
mIsMeshAssetUnavaliable = false;
|
||||
}
|
||||
}
|
||||
|
||||
void LLVolume::setMeshAssetUnavaliable(bool unavaliable)
|
||||
{
|
||||
// Don't set it if at least one lod loaded
|
||||
if (!mIsMeshAssetLoaded)
|
||||
{
|
||||
mIsMeshAssetUnavaliable = unavaliable;
|
||||
}
|
||||
}
|
||||
|
||||
bool LLVolume::isMeshAssetUnavaliable()
|
||||
{
|
||||
return mIsMeshAssetUnavaliable;
|
||||
}
|
||||
|
||||
void LLVolume::copyFacesTo(std::vector<LLVolumeFace> &faces) const
|
||||
|
|
|
|||
|
|
@ -1111,15 +1111,18 @@ private:
|
|||
bool unpackVolumeFacesInternal(const LLSD& mdl);
|
||||
|
||||
public:
|
||||
virtual void setMeshAssetLoaded(BOOL loaded);
|
||||
virtual BOOL isMeshAssetLoaded();
|
||||
virtual void setMeshAssetLoaded(bool loaded);
|
||||
virtual bool isMeshAssetLoaded();
|
||||
virtual void setMeshAssetUnavaliable(bool unavaliable);
|
||||
virtual bool isMeshAssetUnavaliable();
|
||||
|
||||
protected:
|
||||
BOOL mUnique;
|
||||
F32 mDetail;
|
||||
S32 mSculptLevel;
|
||||
F32 mSurfaceArea; //unscaled surface area
|
||||
BOOL mIsMeshAssetLoaded;
|
||||
bool mIsMeshAssetLoaded;
|
||||
bool mIsMeshAssetUnavaliable;
|
||||
|
||||
const LLVolumeParams mParams;
|
||||
LLPath *mPathp;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ BOOL LLVolumeMgr::cleanup()
|
|||
// Note however that LLVolumeLODGroup that contains the volume
|
||||
// also holds a LLPointer so the volume will only go away after
|
||||
// anything holding the volume and the LODGroup are destroyed
|
||||
LLVolume* LLVolumeMgr::refVolume(const LLVolumeParams &volume_params, const S32 detail)
|
||||
LLVolume* LLVolumeMgr::refVolume(const LLVolumeParams &volume_params, const S32 lod)
|
||||
{
|
||||
LLVolumeLODGroup* volgroupp;
|
||||
if (mDataMutex)
|
||||
|
|
@ -109,7 +109,7 @@ LLVolume* LLVolumeMgr::refVolume(const LLVolumeParams &volume_params, const S32
|
|||
{
|
||||
mDataMutex->unlock();
|
||||
}
|
||||
return volgroupp->refLOD(detail);
|
||||
return volgroupp->refLOD(lod);
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -287,18 +287,18 @@ bool LLVolumeLODGroup::cleanupRefs()
|
|||
return res;
|
||||
}
|
||||
|
||||
LLVolume* LLVolumeLODGroup::refLOD(const S32 detail)
|
||||
LLVolume* LLVolumeLODGroup::refLOD(const S32 lod)
|
||||
{
|
||||
llassert(detail >=0 && detail < NUM_LODS);
|
||||
mAccessCount[detail]++;
|
||||
llassert(lod >=0 && lod < NUM_LODS);
|
||||
mAccessCount[lod]++;
|
||||
|
||||
mRefs++;
|
||||
if (mVolumeLODs[detail].isNull())
|
||||
if (mVolumeLODs[lod].isNull())
|
||||
{
|
||||
mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]);
|
||||
mVolumeLODs[lod] = new LLVolume(mVolumeParams, mDetailScales[lod]);
|
||||
}
|
||||
mLODRefs[detail]++;
|
||||
return mVolumeLODs[detail];
|
||||
mLODRefs[lod]++;
|
||||
return mVolumeLODs[lod];
|
||||
}
|
||||
|
||||
BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep)
|
||||
|
|
|
|||
|
|
@ -552,7 +552,9 @@ std::string LLCacheName::buildUsername(const std::string& full_name)
|
|||
|
||||
// if the input wasn't a correctly formatted legacy name, just return it
|
||||
// cleaned up from a potential terminal "Resident"
|
||||
return cleanFullName(full_name);
|
||||
std::string clean_name = cleanFullName(full_name);
|
||||
LLStringUtil::toLower(clean_name);
|
||||
return clean_name;
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -438,18 +438,18 @@ bool LLMaterial::operator != (const LLMaterial& rhs) const
|
|||
}
|
||||
|
||||
|
||||
U32 LLMaterial::getShaderMask(U32 alpha_mode)
|
||||
U32 LLMaterial::getShaderMask(U32 alpha_mode, BOOL is_alpha)
|
||||
{ //NEVER incorporate this value into the message system -- this function will vary depending on viewer implementation
|
||||
U32 ret = 0;
|
||||
|
||||
//two least significant bits are "diffuse alpha mode"
|
||||
if (alpha_mode != DIFFUSE_ALPHA_MODE_DEFAULT)
|
||||
//two least significant bits are "diffuse alpha mode"
|
||||
U32 ret = alpha_mode;
|
||||
if (ret == DIFFUSE_ALPHA_MODE_DEFAULT)
|
||||
{
|
||||
ret = alpha_mode;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = getDiffuseAlphaMode();
|
||||
ret = getDiffuseAlphaMode();
|
||||
if (ret == DIFFUSE_ALPHA_MODE_BLEND && !is_alpha)
|
||||
{
|
||||
ret = DIFFUSE_ALPHA_MODE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
llassert(ret < SHADER_COUNT);
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public:
|
|||
bool operator == (const LLMaterial& rhs) const;
|
||||
bool operator != (const LLMaterial& rhs) const;
|
||||
|
||||
U32 getShaderMask(U32 alpha_mode = DIFFUSE_ALPHA_MODE_DEFAULT);
|
||||
U32 getShaderMask(U32 alpha_mode, BOOL is_alpha);
|
||||
LLUUID getHash() const;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ F32 LLFontGL::getWidthF32(const std::string& utf8text, S32 begin_offset, S32 max
|
|||
return getWidthF32(wtext.c_str(), begin_offset, max_chars);
|
||||
}
|
||||
|
||||
F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars) const
|
||||
F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars, bool no_padding) const
|
||||
{
|
||||
const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
|
||||
|
||||
|
|
@ -517,12 +517,15 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
|
|||
|
||||
F32 advance = mFontFreetype->getXAdvance(fgi);
|
||||
|
||||
// for the last character we want to measure the greater of its width and xadvance values
|
||||
// so keep track of the difference between these values for the each character we measure
|
||||
// so we can fix things up at the end
|
||||
width_padding = llmax( 0.f, // always use positive padding amount
|
||||
width_padding - advance, // previous padding left over after advance of current character
|
||||
(F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character
|
||||
if (!no_padding)
|
||||
{
|
||||
// for the last character we want to measure the greater of its width and xadvance values
|
||||
// so keep track of the difference between these values for the each character we measure
|
||||
// so we can fix things up at the end
|
||||
width_padding = llmax(0.f, // always use positive padding amount
|
||||
width_padding - advance, // previous padding left over after advance of current character
|
||||
(F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character
|
||||
}
|
||||
|
||||
cur_x += advance;
|
||||
llwchar next_char = wchars[i+1];
|
||||
|
|
@ -539,8 +542,11 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
|
|||
cur_x = (F32)ll_round(cur_x);
|
||||
}
|
||||
|
||||
// add in extra pixels for last character's width past its xadvance
|
||||
cur_x += width_padding;
|
||||
if (!no_padding)
|
||||
{
|
||||
// add in extra pixels for last character's width past its xadvance
|
||||
cur_x += width_padding;
|
||||
}
|
||||
|
||||
return cur_x / sScaleX;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public:
|
|||
F32 getWidthF32(const std::string& utf8text) const;
|
||||
F32 getWidthF32(const llwchar* wchars) const;
|
||||
F32 getWidthF32(const std::string& text, S32 offset, S32 max_chars ) const;
|
||||
F32 getWidthF32(const llwchar* wchars, S32 offset, S32 max_chars) const;
|
||||
F32 getWidthF32(const llwchar* wchars, S32 offset, S32 max_chars, bool no_padding = false) const;
|
||||
|
||||
// The following are called often, frequently with large buffers, so do not use a string interface
|
||||
|
||||
|
|
|
|||
|
|
@ -905,9 +905,16 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
|
|||
stop_glerror();
|
||||
|
||||
if (prev_mip_data)
|
||||
delete[] prev_mip_data;
|
||||
{
|
||||
if (prev_mip_data != cur_mip_data)
|
||||
delete[] prev_mip_data;
|
||||
prev_mip_data = nullptr;
|
||||
}
|
||||
if (cur_mip_data)
|
||||
{
|
||||
delete[] cur_mip_data;
|
||||
cur_mip_data = nullptr;
|
||||
}
|
||||
|
||||
mGLTextureCreated = false;
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -1309,8 +1309,9 @@ void LLShaderMgr::initAttribsAndUniforms()
|
|||
mReservedUniforms.push_back("warmthAmount");
|
||||
mReservedUniforms.push_back("glowStrength");
|
||||
mReservedUniforms.push_back("glowDelta");
|
||||
mReservedUniforms.push_back("glowNoiseMap");
|
||||
|
||||
llassert(mReservedUniforms.size() == LLShaderMgr::GLOW_DELTA+1);
|
||||
llassert(mReservedUniforms.size() == LLShaderMgr::GLOW_NOISE_MAP+1);
|
||||
|
||||
|
||||
mReservedUniforms.push_back("minimum_alpha");
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ public:
|
|||
GLOW_WARMTH_AMOUNT, // "warmthAmount"
|
||||
GLOW_STRENGTH, // "glowStrength"
|
||||
GLOW_DELTA, // "glowDelta"
|
||||
GLOW_NOISE_MAP, // "glowNoiseMap"
|
||||
|
||||
MINIMUM_ALPHA, // "minimum_alpha"
|
||||
EMISSIVE_BRIGHTNESS, // "emissive_brightness"
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height )
|
|||
// it is purely visual, so it is fine to do at our laisure
|
||||
refreshSuffix();
|
||||
}
|
||||
mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight;
|
||||
mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight;
|
||||
mLabelWidthDirty = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
#include "lluiimage.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
#include "llgltexture.h"
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLIconCtrl> r("icon");
|
||||
|
||||
LLIconCtrl::Params::Params()
|
||||
|
|
@ -94,6 +96,22 @@ BOOL LLIconCtrl::handleHover(S32 x, S32 y, MASK mask)
|
|||
return LLUICtrl::handleHover(x, y, mask);
|
||||
}
|
||||
|
||||
void LLIconCtrl::onVisibilityChange(BOOL new_visibility)
|
||||
{
|
||||
LLUICtrl::onVisibilityChange(new_visibility);
|
||||
if (mPriority == LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
if (new_visibility)
|
||||
{
|
||||
loadImage(getValue(), mPriority);
|
||||
}
|
||||
else
|
||||
{
|
||||
mImagep = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
// value might be a string or a UUID
|
||||
void LLIconCtrl::setValue(const LLSD& value)
|
||||
|
|
@ -110,6 +128,14 @@ void LLIconCtrl::setValue(const LLSD& value, S32 priority)
|
|||
tvalue = LLSD(LLUUID(value.asString()));
|
||||
}
|
||||
LLUICtrl::setValue(tvalue);
|
||||
|
||||
loadImage(tvalue, priority);
|
||||
}
|
||||
|
||||
void LLIconCtrl::loadImage(const LLSD& tvalue, S32 priority)
|
||||
{
|
||||
if(mPriority == LLGLTexture::BOOST_ICON && !getVisible()) return;
|
||||
|
||||
if (tvalue.isUUID())
|
||||
{
|
||||
mImagep = LLUI::getUIImageByID(tvalue.asUUID(), priority);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public:
|
|||
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
|
||||
// lluictrl overrides
|
||||
void onVisibilityChange(BOOL new_visibility);
|
||||
virtual void setValue(const LLSD& value );
|
||||
|
||||
std::string getImageName() const;
|
||||
|
|
@ -95,6 +96,8 @@ protected:
|
|||
bool mInteractable;
|
||||
|
||||
private:
|
||||
void loadImage(const LLSD& value, S32 priority);
|
||||
|
||||
LLUIColor mColor;
|
||||
LLPointer<LLUIImage> mImagep;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -282,6 +282,17 @@ void LLLayoutStack::draw()
|
|||
}
|
||||
}
|
||||
|
||||
void LLLayoutStack::deleteAllChildren()
|
||||
{
|
||||
mPanels.clear();
|
||||
LLView::deleteAllChildren();
|
||||
|
||||
// Not really needed since nothing is left to
|
||||
// display, but for the sake of consistency
|
||||
updateFractionalSizes();
|
||||
mNeedsLayout = true;
|
||||
}
|
||||
|
||||
void LLLayoutStack::removeChild(LLView* view)
|
||||
{
|
||||
LLLayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view));
|
||||
|
|
@ -289,12 +300,14 @@ void LLLayoutStack::removeChild(LLView* view)
|
|||
if (embedded_panelp)
|
||||
{
|
||||
mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp));
|
||||
delete embedded_panelp;
|
||||
LLView::removeChild(view);
|
||||
updateFractionalSizes();
|
||||
mNeedsLayout = true;
|
||||
}
|
||||
|
||||
LLView::removeChild(view);
|
||||
else
|
||||
{
|
||||
LLView::removeChild(view);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLLayoutStack::postBuild()
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public:
|
|||
virtual ~LLLayoutStack();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild(LLView*);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ bool addChild(LLView* child, S32 tab_group = 0);
|
||||
|
|
|
|||
|
|
@ -1882,6 +1882,13 @@ bool LLMenuGL::addContextChild(LLView* view, S32 tab_group)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
void LLMenuGL::deleteAllChildren()
|
||||
{
|
||||
mItems.clear();
|
||||
LLUICtrl::deleteAllChildren();
|
||||
}
|
||||
|
||||
void LLMenuGL::removeChild( LLView* ctrl)
|
||||
{
|
||||
// previously a dynamic_cast with if statement to check validity
|
||||
|
|
|
|||
|
|
@ -442,6 +442,7 @@ public:
|
|||
/*virtual*/ void drawBackground(LLMenuItemGL* itemp, F32 alpha);
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild( LLView* ctrl);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ public:
|
|||
virtual void clearCtrls(); // overridden in LLPanelObject and LLPanelVolume
|
||||
|
||||
// Border controls
|
||||
const LLViewBorder* getBorder() const { return mBorder; }
|
||||
void addBorder( LLViewBorder::Params p);
|
||||
void addBorder();
|
||||
void removeBorder();
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ void LLTextBase::onValueChange(S32 start, S32 end)
|
|||
{
|
||||
}
|
||||
|
||||
std::vector<LLRect> LLTextBase::getSelctionRects()
|
||||
std::vector<LLRect> LLTextBase::getSelectionRects()
|
||||
{
|
||||
// Nor supposed to be called without selection
|
||||
llassert(hasSelection());
|
||||
|
|
@ -458,7 +458,7 @@ void LLTextBase::drawSelectionBackground()
|
|||
// Draw selection even if we don't have keyboard focus for search/replace
|
||||
if (hasSelection() && !mLineInfoList.empty())
|
||||
{
|
||||
std::vector<LLRect> selection_rects = getSelctionRects();
|
||||
std::vector<LLRect> selection_rects = getSelectionRects();
|
||||
|
||||
// Draw the selection box (we're using a box instead of reversing the colors on the selected text).
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
|
@ -1356,9 +1356,9 @@ void LLTextBase::draw()
|
|||
drawCursor();
|
||||
}
|
||||
|
||||
mDocumentView->setVisible(FALSE);
|
||||
mDocumentView->setVisibleDirect(FALSE);
|
||||
LLUICtrl::draw();
|
||||
mDocumentView->setVisible(TRUE);
|
||||
mDocumentView->setVisibleDirect(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3464,7 +3464,7 @@ bool LLNormalTextSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& w
|
|||
height = mFontHeight;
|
||||
const LLWString &text = getWText();
|
||||
// if last character is a newline, then return true, forcing line break
|
||||
width = mStyle->getFont()->getWidthF32(text.c_str(), mStart + first_char, num_chars);
|
||||
width = mStyle->getFont()->getWidthF32(text.c_str(), mStart + first_char, num_chars, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ protected:
|
|||
return mLabel.getString() + getToolTip();
|
||||
}
|
||||
|
||||
std::vector<LLRect> getSelctionRects();
|
||||
std::vector<LLRect> getSelectionRects();
|
||||
|
||||
protected:
|
||||
// text segmentation and flow
|
||||
|
|
|
|||
|
|
@ -171,7 +171,8 @@ void LLTextBox::reshapeToFitText(BOOL called_from_parent)
|
|||
|
||||
S32 width = getTextPixelWidth();
|
||||
S32 height = getTextPixelHeight();
|
||||
reshape( width + 2 * mHPad, height + 2 * mVPad, called_from_parent );
|
||||
//consider investigating reflow() to find missing width pixel (see SL-17045 changes)
|
||||
reshape( width + 2 * mHPad + 1, height + 2 * mVPad, called_from_parent );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -200,7 +200,6 @@ LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& defa
|
|||
void LLUIColorTable::setColor(const std::string& name, const LLColor4& color)
|
||||
{
|
||||
setColor(name, color, mUserSetColors);
|
||||
setColor(name, color, mLoadedColors);
|
||||
}
|
||||
|
||||
bool LLUIColorTable::loadFromSettings()
|
||||
|
|
@ -229,6 +228,11 @@ void LLUIColorTable::saveUserSettings() const
|
|||
it != mUserSetColors.end();
|
||||
++it)
|
||||
{
|
||||
// Compare user color value with the default value, skip if equal
|
||||
string_color_map_t::const_iterator itd = mLoadedColors.find(it->first);
|
||||
if(itd != mLoadedColors.end() && itd->second == it->second)
|
||||
continue;
|
||||
|
||||
ColorEntryParams color_entry;
|
||||
color_entry.name = it->first;
|
||||
color_entry.color.value = it->second;
|
||||
|
|
|
|||
|
|
@ -576,8 +576,10 @@ void LLView::deleteAllChildren()
|
|||
|
||||
while (!mChildList.empty())
|
||||
{
|
||||
LLView* viewp = mChildList.front();
|
||||
delete viewp; // will remove the child from mChildList
|
||||
LLView* viewp = mChildList.front();
|
||||
viewp->mParentView = NULL;
|
||||
delete viewp;
|
||||
mChildList.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ public:
|
|||
void setAllChildrenEnabled(BOOL b);
|
||||
|
||||
virtual void setVisible(BOOL visible);
|
||||
void setVisibleDirect(BOOL visible) { mVisible = visible; }
|
||||
const BOOL& getVisible() const { return mVisible; }
|
||||
virtual void setEnabled(BOOL enabled);
|
||||
BOOL getEnabled() const { return mEnabled; }
|
||||
|
|
|
|||
|
|
@ -118,7 +118,8 @@ public:
|
|||
|
||||
// Sets cursor, may set to arrow+hourglass
|
||||
virtual void setCursor(ECursorType cursor) { mNextCursor = cursor; };
|
||||
virtual ECursorType getCursor() const;
|
||||
virtual ECursorType getCursor() const;
|
||||
virtual ECursorType getNextCursor() const { return mNextCursor; };
|
||||
virtual void updateCursor() = 0;
|
||||
|
||||
virtual void captureMouse() = 0;
|
||||
|
|
|
|||
|
|
@ -9351,6 +9351,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderPostProcessingHDR</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable HDR for post processing buffer</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderMaxOpenGLVersion</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10166,6 +10177,17 @@
|
|||
<key>Value</key>
|
||||
<integer>9</integer>
|
||||
</map>
|
||||
<key>RenderGlowHDR</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable HDR for glow map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderGlowStrength</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10214,6 +10236,17 @@
|
|||
<key>Value</key>
|
||||
<real>1.3</real>
|
||||
</map>
|
||||
<key>RenderGlowNoise</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enables glow noise (dithering). Reduces banding from glow in certain cases.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<real>1</real>
|
||||
</map>
|
||||
<key>DisableAllRenderTypes</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10601,17 +10634,6 @@
|
|||
<key>Value</key>
|
||||
<integer>3</integer>
|
||||
</map>
|
||||
<key>RenderSkyHDRScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Amount to over-brighten sun for HDR effect during the day</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>RenderSkyAutoAdjustLegacy</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10623,6 +10645,28 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderSkyAutoAdjustAmbientScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Amount to scale ambient when auto-adjusting legacy skies</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.5</real>
|
||||
</map>
|
||||
<key>RenderSkyAutoAdjustHDRScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>HDR Scale value to use when auto-adjusting legacy skies</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>2.0</real>
|
||||
</map>
|
||||
<key>RenderReflectionProbeMaxLocalLightAmbiance</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10643,7 +10687,7 @@
|
|||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.4</real>
|
||||
<real>0.5</real>
|
||||
</map>
|
||||
<key>RenderShaderLODThreshold</key>
|
||||
<map>
|
||||
|
|
@ -13127,13 +13171,13 @@
|
|||
<key>TranslationService</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Translation API to use. (google|bing)</string>
|
||||
<string>Translation API to use. (google|azure)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>bing</string>
|
||||
<string>azure</string>
|
||||
</map>
|
||||
<key>GoogleTranslateAPIKey</key>
|
||||
<map>
|
||||
|
|
@ -13149,7 +13193,7 @@
|
|||
<key>BingTranslateAPIKey</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Bing AppID to use with the Microsoft Translator API</string>
|
||||
<string>(Deprecated) Bing AppID to use with the Microsoft Translator API</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -13157,6 +13201,28 @@
|
|||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>AzureTranslateAPIKey</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Azure Translation service data to use with the MS Azure Translator API</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>LLSD</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>DeepLTranslateAPIKey</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DeepL Translation service data to use with the DeepL Translator API</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>LLSD</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>TutorialURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ void main()
|
|||
// Combine
|
||||
vec3 color;
|
||||
color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient);
|
||||
color.rgb= max(vec3(0), color.rgb);
|
||||
color.rgb = clamp(color.rgb, vec3(0), vec3(1));
|
||||
color.rgb *= 2.0;
|
||||
|
||||
/// Gamma correct for WL (soft clip effect).
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ void main()
|
|||
color.rgb += rainbow(optic_d);
|
||||
color.rgb += halo_22;
|
||||
color.rgb *= 2.;
|
||||
color.rgb = clamp(color.rgb, vec3(0), vec3(5));
|
||||
|
||||
frag_data[0] = vec4(0);
|
||||
frag_data[1] = vec4(0);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@
|
|||
out vec4 frag_color;
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
#if HAS_NOISE
|
||||
uniform sampler2D glowNoiseMap;
|
||||
uniform vec2 screen_res;
|
||||
#endif
|
||||
uniform float minLuminance;
|
||||
uniform float maxExtractAlpha;
|
||||
uniform vec3 lumWeights;
|
||||
|
|
@ -44,7 +48,16 @@ void main()
|
|||
float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) );
|
||||
float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) );
|
||||
|
||||
frag_color.rgb = col.rgb;
|
||||
#if HAS_NOISE
|
||||
float TRUE_NOISE_RES = 128; // See mTrueNoiseMap
|
||||
// *NOTE: Usually this is vary_fragcoord not vary_texcoord0, but glow extraction is in screen space
|
||||
vec3 glow_noise = texture(glowNoiseMap, vary_texcoord0.xy * (screen_res / TRUE_NOISE_RES)).xyz;
|
||||
// Dithering. Reduces banding effects in the reduced precision glow buffer.
|
||||
float NOISE_DEPTH = 64.0;
|
||||
col.rgb += glow_noise / NOISE_DEPTH;
|
||||
col.rgb = max(col.rgb, vec3(0));
|
||||
#endif
|
||||
frag_color.rgb = col.rgb;
|
||||
frag_color.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
uniform mat3 normal_matrix;
|
||||
uniform mat4 texture_matrix0;
|
||||
uniform mat4 modelview_matrix;
|
||||
uniform mat4 modelview_projection_matrix;
|
||||
|
||||
in vec3 position;
|
||||
|
|
@ -54,14 +53,27 @@ float calcDirectionalLight(vec3 n, vec3 l)
|
|||
//====================================================================================================
|
||||
|
||||
|
||||
#ifdef HAS_SKIN
|
||||
mat4 getObjectSkinnedTransform();
|
||||
uniform mat4 modelview_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
|
||||
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
vec3 norm;
|
||||
#ifdef HAS_SKIN
|
||||
mat4 mat = getObjectSkinnedTransform();
|
||||
mat = modelview_matrix * mat;
|
||||
vec4 pos = mat * vec4(position.xyz, 1.0);
|
||||
gl_Position = projection_matrix * pos;
|
||||
norm = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz);
|
||||
#else
|
||||
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
norm = normalize(normal_matrix * normal);
|
||||
#endif
|
||||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
|
||||
vec3 norm = normalize(normal_matrix * normal);
|
||||
|
||||
vec4 col = vec4(0,0,0,1);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
|
|||
{
|
||||
light *= atten.r;
|
||||
additive = srgb_to_linear(additive*2.0);
|
||||
// magic 1.25 here is to match the default RenderSkyHDRScale -- this parameter needs to be plumbed into sky settings or something
|
||||
// so it's available to all shaders that call atmosFragLighting instead of just softenLightF.glsl
|
||||
additive *= sky_hdr_scale;
|
||||
light += additive;
|
||||
return light;
|
||||
|
|
|
|||
|
|
@ -368,7 +368,8 @@ return texCUBE(envMap, ReflDirectionWS);
|
|||
// dir - ray direction in clip space
|
||||
// i - probe index in refBox/refSphere
|
||||
// d - distance to nearest wall in clip space
|
||||
vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
|
||||
// scale - scale of box, default 1.0
|
||||
vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d, float scale)
|
||||
{
|
||||
// Intersection with OBB convert to unit box space
|
||||
// Transform in local unit parallax cube space (scaled and rotated)
|
||||
|
|
@ -379,7 +380,7 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
|
|||
|
||||
d = 1.0-max(max(abs(PositionLS.x), abs(PositionLS.y)), abs(PositionLS.z));
|
||||
|
||||
vec3 Unitary = vec3(1.0f, 1.0f, 1.0f);
|
||||
vec3 Unitary = vec3(scale);
|
||||
vec3 FirstPlaneIntersect = (Unitary - PositionLS) / RayLS;
|
||||
vec3 SecondPlaneIntersect = (-Unitary - PositionLS) / RayLS;
|
||||
vec3 FurthestPlane = max(FirstPlaneIntersect, SecondPlaneIntersect);
|
||||
|
|
@ -391,6 +392,11 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
|
|||
return IntersectPositionCS;
|
||||
}
|
||||
|
||||
vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
|
||||
{
|
||||
return boxIntersect(origin, dir, i, d, 1.0);
|
||||
}
|
||||
|
||||
void debugBoxCol(vec3 ro, vec3 rd, float t, vec3 p, inout vec4 col)
|
||||
{
|
||||
vec3 v = ro + rd * t;
|
||||
|
|
@ -539,7 +545,7 @@ vec3 tapIrradianceMap(vec3 pos, vec3 dir, out float w, out float dw, vec3 c, int
|
|||
if (refIndex[i].w < 0)
|
||||
{
|
||||
float d = 0.0;
|
||||
v = boxIntersect(pos, dir, i, d);
|
||||
v = boxIntersect(pos, dir, i, d, 3.0);
|
||||
w = max(d, 0.001);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version 57
|
||||
version 58
|
||||
// The version number above should be incremented IF AND ONLY IF some
|
||||
// change has been made that is sufficiently important to justify
|
||||
// resetting the graphics preferences of all users to the recommended
|
||||
|
|
@ -163,7 +163,7 @@ RenderScreenSpaceReflections 1 0
|
|||
RenderReflectionProbeLevel 1 1
|
||||
|
||||
//
|
||||
// Medium High Graphics Settings (deferred enabled)
|
||||
// Medium High Graphics Settings
|
||||
//
|
||||
list MidHigh
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -192,7 +192,7 @@ RenderScreenSpaceReflections 1 0
|
|||
RenderReflectionProbeLevel 1 2
|
||||
|
||||
//
|
||||
// High Graphics Settings (deferred + SSAO)
|
||||
// High Graphics Settings (SSAO + sun shadows)
|
||||
//
|
||||
list High
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -212,7 +212,7 @@ RenderTreeLODFactor 1 0.5
|
|||
RenderVolumeLODFactor 1 1.5
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
RenderShadowDetail 1 1
|
||||
WLSkyDetail 1 96
|
||||
RenderFSAASamples 1 2
|
||||
RenderReflectionsEnabled 1 1
|
||||
|
|
@ -221,7 +221,7 @@ RenderScreenSpaceReflections 1 0
|
|||
RenderReflectionProbeLevel 1 3
|
||||
|
||||
//
|
||||
// High Ultra Graphics Settings (deferred + SSAO + shadows)
|
||||
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
|
||||
//
|
||||
list HighUltra
|
||||
RenderAnisotropic 1 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version 52
|
||||
version 53
|
||||
// The version number above should be incremented IF AND ONLY IF some
|
||||
// change has been made that is sufficiently important to justify
|
||||
// resetting the graphics preferences of all users to the recommended
|
||||
|
|
@ -161,7 +161,7 @@ RenderScreenSpaceReflections 1 0
|
|||
RenderReflectionProbeLevel 1 0
|
||||
|
||||
//
|
||||
// Medium High Graphics Settings (deferred enabled)
|
||||
// Medium High Graphics Settings
|
||||
//
|
||||
list MidHigh
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -190,7 +190,7 @@ RenderScreenSpaceReflections 1 0
|
|||
RenderReflectionProbeLevel 1 0
|
||||
|
||||
//
|
||||
// High Graphics Settings (deferred + SSAO)
|
||||
// High Graphics Settings (SSAO + sun shadows)
|
||||
//
|
||||
list High
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -210,7 +210,7 @@ RenderTreeLODFactor 1 0.5
|
|||
RenderVolumeLODFactor 1 1.5
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
RenderShadowDetail 1 1
|
||||
WLSkyDetail 1 96
|
||||
RenderFSAASamples 1 2
|
||||
RenderReflectionsEnabled 1 1
|
||||
|
|
@ -219,7 +219,7 @@ RenderScreenSpaceReflections 1 0
|
|||
RenderReflectionProbeLevel 1 1
|
||||
|
||||
//
|
||||
// High Ultra Graphics Settings (deferred + SSAO + shadows)
|
||||
// High Ultra Graphics Settings (SSAO + all shadows)
|
||||
//
|
||||
list HighUltra
|
||||
RenderAnisotropic 1 1
|
||||
|
|
|
|||
|
|
@ -3574,8 +3574,6 @@ void LLAppViewer::writeSystemInfo()
|
|||
// "CrashNotHandled" is set here, while things are running well,
|
||||
// in case of a freeze. If there is a freeze, the crash logger will be launched
|
||||
// and can read this value from the debug_info.log.
|
||||
// If the crash is handled by LLAppViewer::handleViewerCrash, ie not a freeze,
|
||||
// then the value of "CrashNotHandled" will be set to true.
|
||||
gDebugInfo["CrashNotHandled"] = LLSD::Boolean(true);
|
||||
#else // LL_BUGSPLAT
|
||||
// "CrashNotHandled" is obsolete; it used (not very successsfully)
|
||||
|
|
@ -3667,163 +3665,6 @@ void getFileList()
|
|||
}
|
||||
#endif
|
||||
|
||||
void LLAppViewer::handleViewerCrash()
|
||||
{
|
||||
LL_INFOS("CRASHREPORT") << "Handle viewer crash entry." << LL_ENDL;
|
||||
|
||||
LL_INFOS("CRASHREPORT") << "Last render pool type: " << LLPipeline::sCurRenderPoolType << LL_ENDL ;
|
||||
|
||||
LLMemory::logMemoryInfo(true) ;
|
||||
|
||||
//print out recorded call stacks if there are any.
|
||||
LLError::LLCallStacks::print();
|
||||
|
||||
LLAppViewer* pApp = LLAppViewer::instance();
|
||||
if (pApp->beingDebugged())
|
||||
{
|
||||
// This will drop us into the debugger.
|
||||
abort();
|
||||
}
|
||||
|
||||
if (LLApp::isCrashloggerDisabled())
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
// Returns whether a dialog was shown.
|
||||
// Only do the logic in here once
|
||||
if (pApp->mReportedCrash)
|
||||
{
|
||||
return;
|
||||
}
|
||||
pApp->mReportedCrash = TRUE;
|
||||
|
||||
// Insert crash host url (url to post crash log to) if configured.
|
||||
std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl");
|
||||
if(crashHostUrl != "")
|
||||
{
|
||||
gDebugInfo["Dynamic"]["CrashHostUrl"] = crashHostUrl;
|
||||
}
|
||||
|
||||
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||
if ( parcel && parcel->getMusicURL()[0])
|
||||
{
|
||||
gDebugInfo["Dynamic"]["ParcelMusicURL"] = parcel->getMusicURL();
|
||||
}
|
||||
if ( parcel && parcel->getMediaURL()[0])
|
||||
{
|
||||
gDebugInfo["Dynamic"]["ParcelMediaURL"] = parcel->getMediaURL();
|
||||
}
|
||||
|
||||
gDebugInfo["Dynamic"]["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds());
|
||||
gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = LLSD::Integer(LLMemory::getCurrentRSS() / 1024);
|
||||
|
||||
if(gLogoutInProgress)
|
||||
{
|
||||
gDebugInfo["Dynamic"]["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH;
|
||||
}
|
||||
else
|
||||
{
|
||||
gDebugInfo["Dynamic"]["LastExecEvent"] = gLLErrorActivated ? LAST_EXEC_LLERROR_CRASH : LAST_EXEC_OTHER_CRASH;
|
||||
}
|
||||
|
||||
if(gAgent.getRegion())
|
||||
{
|
||||
gDebugInfo["Dynamic"]["CurrentSimHost"] = gAgent.getRegion()->getSimHostName();
|
||||
gDebugInfo["Dynamic"]["CurrentRegion"] = gAgent.getRegion()->getName();
|
||||
|
||||
const LLVector3& loc = gAgent.getPositionAgent();
|
||||
gDebugInfo["Dynamic"]["CurrentLocationX"] = loc.mV[0];
|
||||
gDebugInfo["Dynamic"]["CurrentLocationY"] = loc.mV[1];
|
||||
gDebugInfo["Dynamic"]["CurrentLocationZ"] = loc.mV[2];
|
||||
}
|
||||
|
||||
if(LLAppViewer::instance()->mMainloopTimeout)
|
||||
{
|
||||
gDebugInfo["Dynamic"]["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState();
|
||||
}
|
||||
|
||||
// The crash is being handled here so set this value to false.
|
||||
// Otherwise the crash logger will think this crash was a freeze.
|
||||
gDebugInfo["Dynamic"]["CrashNotHandled"] = LLSD::Boolean(false);
|
||||
|
||||
//Write out the crash status file
|
||||
//Use marker file style setup, as that's the simplest, especially since
|
||||
//we're already in a crash situation
|
||||
if (gDirUtilp)
|
||||
{
|
||||
std::string crash_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
gLLErrorActivated
|
||||
? LLERROR_MARKER_FILE_NAME
|
||||
: ERROR_MARKER_FILE_NAME);
|
||||
LLAPRFile crash_marker_file ;
|
||||
crash_marker_file.open(crash_marker_file_name, LL_APR_WB);
|
||||
if (crash_marker_file.getFileHandle())
|
||||
{
|
||||
LL_INFOS("MarkerFile") << "Created crash marker file " << crash_marker_file_name << LL_ENDL;
|
||||
recordMarkerVersion(crash_marker_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_marker_file_name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("MarkerFile") << "No gDirUtilp with which to create error marker file name" << LL_ENDL;
|
||||
}
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
Sleep(200);
|
||||
#endif
|
||||
|
||||
char *minidump_file = pApp->getMiniDumpFilename();
|
||||
LL_DEBUGS("CRASHREPORT") << "minidump file name " << minidump_file << LL_ENDL;
|
||||
if(minidump_file && minidump_file[0] != 0)
|
||||
{
|
||||
gDebugInfo["Dynamic"]["MinidumpPath"] = minidump_file;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef LL_WINDOWS
|
||||
getFileList();
|
||||
#else
|
||||
LL_WARNS("CRASHREPORT") << "no minidump file?" << LL_ENDL;
|
||||
#endif
|
||||
}
|
||||
gDebugInfo["Dynamic"]["CrashType"]="crash";
|
||||
|
||||
if (gMessageSystem && gDirUtilp)
|
||||
{
|
||||
std::string filename;
|
||||
filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log");
|
||||
LL_DEBUGS("CRASHREPORT") << "recording stats " << filename << LL_ENDL;
|
||||
llofstream file(filename.c_str(), std::ios_base::binary);
|
||||
if(file.good())
|
||||
{
|
||||
gMessageSystem->summarizeLogs(file);
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("CRASHREPORT") << "problem recording stats" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMessageSystem)
|
||||
{
|
||||
gMessageSystem->getCircuitInfo(gDebugInfo["CircuitInfo"]);
|
||||
gMessageSystem->stopLogging();
|
||||
}
|
||||
|
||||
if (LLWorld::instanceExists()) LLWorld::getInstance()->getInfo(gDebugInfo["Dynamic"]);
|
||||
|
||||
gDebugInfo["FatalMessage"] = LLError::getFatalMessage();
|
||||
|
||||
// Close the debug file
|
||||
pApp->writeDebugInfo(false); //false answers the isStatic question with the least overhead.
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file)
|
||||
{
|
||||
|
|
@ -4675,7 +4516,6 @@ public:
|
|||
static LLTrace::BlockTimerStatHandle FTM_AUDIO_UPDATE("Update Audio");
|
||||
static LLTrace::BlockTimerStatHandle FTM_CLEANUP("Cleanup");
|
||||
static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLES("Drawables");
|
||||
static LLTrace::BlockTimerStatHandle FTM_CLEANUP_OBJECTS("Objects");
|
||||
static LLTrace::BlockTimerStatHandle FTM_IDLE_CB("Idle Callbacks");
|
||||
static LLTrace::BlockTimerStatHandle FTM_LOD_UPDATE("Update LOD");
|
||||
static LLTrace::BlockTimerStatHandle FTM_OBJECTLIST_UPDATE("Update Objectlist");
|
||||
|
|
@ -4972,7 +4812,6 @@ void LLAppViewer::idle()
|
|||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CLEANUP);
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CLEANUP_OBJECTS);
|
||||
gObjectList.cleanDeadObjects();
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ public:
|
|||
|
||||
virtual bool restoreErrorTrap() = 0; // Require platform specific override to reset error handling mechanism.
|
||||
// return false if the error trap needed restoration.
|
||||
static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon.
|
||||
void checkForCrash();
|
||||
|
||||
// Thread accessors
|
||||
|
|
|
|||
|
|
@ -80,8 +80,6 @@ int main( int argc, char **argv )
|
|||
|
||||
// install unexpected exception handler
|
||||
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
|
||||
// install crash handlers
|
||||
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
|
||||
|
||||
bool ok = viewer_app_ptr->init();
|
||||
if(!ok)
|
||||
|
|
|
|||
|
|
@ -83,8 +83,6 @@ void constructViewer()
|
|||
}
|
||||
|
||||
gViewerAppPtr = new LLAppViewerMacOSX();
|
||||
|
||||
gViewerAppPtr->setErrorHandler(LLAppViewer::handleViewerCrash);
|
||||
}
|
||||
|
||||
bool initViewer()
|
||||
|
|
|
|||
|
|
@ -428,8 +428,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
|
||||
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
|
||||
|
||||
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
|
||||
|
||||
// Set a debug info flag to indicate if multiple instances are running.
|
||||
bool found_other_instance = !create_app_mutex();
|
||||
gDebugInfo["FoundOtherInstanceAtStartup"] = LLSD::Boolean(found_other_instance);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ struct LLAvatarData
|
|||
std::string profile_url;
|
||||
U8 caption_index;
|
||||
std::string caption_text;
|
||||
std::string customer_type;
|
||||
U32 flags;
|
||||
BOOL allow_publish;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ void LLDrawPoolAlpha::renderDebugAlpha()
|
|||
gGL.diffuseColor4f(1, 0, 0, 1);
|
||||
gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::getSmokeImage());
|
||||
|
||||
|
||||
renderAlphaHighlight();
|
||||
|
||||
pushUntexturedBatches(LLRenderPass::PASS_ALPHA_MASK);
|
||||
|
|
|
|||
|
|
@ -200,8 +200,6 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter)
|
|||
break;
|
||||
case FFLOAD_COLLADA:
|
||||
mOFN.lpstrFilter = COLLADA_FILTER \
|
||||
L"\0";
|
||||
break;
|
||||
case FFLOAD_XML:
|
||||
mOFN.lpstrFilter = XML_FILTER \
|
||||
L"\0";
|
||||
|
|
@ -780,7 +778,6 @@ void set_nav_save_data(LLFilePicker::ESaveFilter filter, std::string &extension,
|
|||
creator = "\?\?\?\?";
|
||||
extension = "xaf";
|
||||
break;
|
||||
|
||||
case LLFilePicker::FFSAVE_GLTF:
|
||||
type = "\?\?\?\?";
|
||||
creator = "\?\?\?\?";
|
||||
|
|
|
|||
|
|
@ -475,6 +475,8 @@ void LLFloaterEditExtDayCycle::refresh()
|
|||
void LLFloaterEditExtDayCycle::setEditSettingsAndUpdate(const LLSettingsBase::ptr_t &settings)
|
||||
{
|
||||
setEditDayCycle(std::dynamic_pointer_cast<LLSettingsDay>(settings));
|
||||
|
||||
showHDRNotification(std::dynamic_pointer_cast<LLSettingsDay>(settings));
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::setEditDayCycle(const LLSettingsDay::ptr_t &pday)
|
||||
|
|
@ -1710,6 +1712,28 @@ void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id, S32 track)
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &pday)
|
||||
{
|
||||
for (U32 i = LLSettingsDay::TRACK_GROUND_LEVEL; i <= LLSettingsDay::TRACK_MAX; i++)
|
||||
{
|
||||
LLSettingsDay::CycleTrack_t &day_track = pday->getCycleTrack(i);
|
||||
|
||||
LLSettingsDay::CycleTrack_t::iterator iter = day_track.begin();
|
||||
LLSettingsDay::CycleTrack_t::iterator end = day_track.end();
|
||||
|
||||
while (iter != end)
|
||||
{
|
||||
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
|
||||
if (sky && sky->canAutoAdjust())
|
||||
{
|
||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||
return;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterEditExtDayCycle::onAssetLoadedForInsertion(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 source_track, S32 dest_track, LLSettingsBase::TrackPosition frame)
|
||||
{
|
||||
std::function<void()> cb = [this, settings, frame, source_track, dest_track]()
|
||||
|
|
|
|||
|
|
@ -188,6 +188,8 @@ private:
|
|||
bool isRemovingFrameAllowed();
|
||||
bool isAddingFrameAllowed();
|
||||
|
||||
void showHDRNotification(const LLSettingsDay::ptr_t &pday);
|
||||
|
||||
LLSettingsDay::ptr_t mEditDay; // edited copy
|
||||
LLSettingsDay::Seconds mDayLength;
|
||||
U32 mCurrentTrack;
|
||||
|
|
|
|||
|
|
@ -174,7 +174,8 @@ void LLFloaterEnvironmentAdjust::refresh()
|
|||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setValue(mLiveSky->getCloudNoiseTextureId());
|
||||
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setValue(mLiveWater->getNormalMapID());
|
||||
|
||||
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setValue(mLiveSky->getReflectionProbeAmbiance());
|
||||
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
|
||||
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setValue(mLiveSky->getReflectionProbeAmbiance(should_auto_adjust));
|
||||
|
||||
LLColor3 glow(mLiveSky->getGlow());
|
||||
|
||||
|
|
@ -488,7 +489,9 @@ void LLFloaterEnvironmentAdjust::onReflectionProbeAmbianceChanged()
|
|||
void LLFloaterEnvironmentAdjust::updateGammaLabel()
|
||||
{
|
||||
if (!mLiveSky) return;
|
||||
F32 ambiance = mLiveSky->getReflectionProbeAmbiance();
|
||||
|
||||
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
|
||||
F32 ambiance = mLiveSky->getReflectionProbeAmbiance(should_auto_adjust);
|
||||
if (ambiance != 0.f)
|
||||
{
|
||||
childSetValue("scene_gamma_label", getString("hdr_string"));
|
||||
|
|
|
|||
|
|
@ -182,6 +182,12 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
|
|||
syncronizeTabs();
|
||||
refresh();
|
||||
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
|
||||
|
||||
// teach user about HDR settings
|
||||
if (mSettings && ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
|
||||
{
|
||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterFixedEnvironment::syncronizeTabs()
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd)
|
|||
mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&cb_do_nothing));
|
||||
mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&cb_do_nothing));
|
||||
mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&cb_do_nothing));
|
||||
|
||||
mMinFloaterHeight = EXPANDED_MIN_HEIGHT;
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
|
|||
mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2));
|
||||
mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2));
|
||||
mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&cb_group_do_nothing));
|
||||
|
||||
mMinFloaterHeight = getMinHeight();
|
||||
}
|
||||
|
||||
LLFloaterIMSessionTab::~LLFloaterIMSessionTab()
|
||||
|
|
@ -934,10 +936,13 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse)
|
|||
S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight()
|
||||
+ mChatLayoutPanel->getRect().getHeight() - mChatLayoutPanelHeight + 2;
|
||||
floater_rect.mTop -= height;
|
||||
|
||||
setResizeLimits(getMinWidth(), floater_rect.getHeight());
|
||||
}
|
||||
else
|
||||
{
|
||||
floater_rect.mTop = floater_rect.mBottom + mFloaterHeight;
|
||||
setResizeLimits(getMinWidth(), mMinFloaterHeight);
|
||||
}
|
||||
|
||||
enableResizeCtrls(true, true, !collapse);
|
||||
|
|
@ -962,6 +967,7 @@ void LLFloaterIMSessionTab::restoreFloater()
|
|||
setShape(floater_rect, true);
|
||||
mBodyStack->updateLayout();
|
||||
mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon"));
|
||||
setResizeLimits(getMinWidth(), mMinFloaterHeight);
|
||||
setMessagePaneExpanded(true);
|
||||
saveCollapsedState();
|
||||
mInputEditor->enableSingleLineMode(false);
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ protected:
|
|||
|
||||
bool mMessagePaneExpanded;
|
||||
bool mIsParticipantListExpanded;
|
||||
S32 mMinFloaterHeight;
|
||||
|
||||
|
||||
LLIMModel::LLIMSession* mSession;
|
||||
|
|
|
|||
|
|
@ -317,7 +317,6 @@ void LLFloaterRegionInfo::onOpen(const LLSD& key)
|
|||
}
|
||||
refreshFromRegion(gAgent.getRegion());
|
||||
requestRegionInfo();
|
||||
requestMeshRezInfo();
|
||||
|
||||
if (!mGodLevelChangeSlot.connected())
|
||||
{
|
||||
|
|
@ -1006,19 +1005,6 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
|
|||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterRegionInfo::requestMeshRezInfo()
|
||||
{
|
||||
std::string sim_console_url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
|
||||
if (!sim_console_url.empty())
|
||||
{
|
||||
std::string request_str = "get mesh_rez_enabled";
|
||||
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(sim_console_url, LLSD(request_str),
|
||||
"Requested mesh_rez_enabled", "Error requesting mesh_rez_enabled");
|
||||
}
|
||||
}
|
||||
|
||||
// setregioninfo
|
||||
// strings[0] = 'Y' - block terraform, 'N' - not
|
||||
// strings[1] = 'Y' - block fly, 'N' - not
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ public:
|
|||
|
||||
void onRegionChanged();
|
||||
void requestRegionInfo();
|
||||
void requestMeshRezInfo();
|
||||
void enableTopButtons();
|
||||
void disableTopButtons();
|
||||
|
||||
|
|
|
|||
|
|
@ -45,15 +45,9 @@
|
|||
LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
, mMachineTranslationCB(NULL)
|
||||
, mLanguageCombo(NULL)
|
||||
, mTranslationServiceRadioGroup(NULL)
|
||||
, mBingAPIKeyEditor(NULL)
|
||||
, mGoogleAPIKeyEditor(NULL)
|
||||
, mBingVerifyBtn(NULL)
|
||||
, mGoogleVerifyBtn(NULL)
|
||||
, mOKBtn(NULL)
|
||||
, mBingKeyVerified(false)
|
||||
, mAzureKeyVerified(false)
|
||||
, mGoogleKeyVerified(false)
|
||||
, mDeepLKeyVerified(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -63,24 +57,54 @@ BOOL LLFloaterTranslationSettings::postBuild()
|
|||
mMachineTranslationCB = getChild<LLCheckBoxCtrl>("translate_chat_checkbox");
|
||||
mLanguageCombo = getChild<LLComboBox>("translate_language_combo");
|
||||
mTranslationServiceRadioGroup = getChild<LLRadioGroup>("translation_service_rg");
|
||||
mBingAPIKeyEditor = getChild<LLLineEditor>("bing_api_key");
|
||||
mAzureAPIEndpointEditor = getChild<LLComboBox>("azure_api_endpoint_combo");
|
||||
mAzureAPIKeyEditor = getChild<LLLineEditor>("azure_api_key");
|
||||
mAzureAPIRegionEditor = getChild<LLLineEditor>("azure_api_region");
|
||||
mGoogleAPIKeyEditor = getChild<LLLineEditor>("google_api_key");
|
||||
mBingVerifyBtn = getChild<LLButton>("verify_bing_api_key_btn");
|
||||
mDeepLAPIDomainCombo = getChild<LLComboBox>("deepl_api_domain_combo");
|
||||
mDeepLAPIKeyEditor = getChild<LLLineEditor>("deepl_api_key");
|
||||
mAzureVerifyBtn = getChild<LLButton>("verify_azure_api_key_btn");
|
||||
mGoogleVerifyBtn = getChild<LLButton>("verify_google_api_key_btn");
|
||||
mDeepLVerifyBtn = getChild<LLButton>("verify_deepl_api_key_btn");
|
||||
mOKBtn = getChild<LLButton>("ok_btn");
|
||||
|
||||
mMachineTranslationCB->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
|
||||
mTranslationServiceRadioGroup->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
|
||||
mOKBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnOK, this));
|
||||
getChild<LLButton>("cancel_btn")->setClickedCallback(boost::bind(&LLFloater::closeFloater, this, false));
|
||||
mBingVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnBingVerify, this));
|
||||
mAzureVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnAzureVerify, this));
|
||||
mGoogleVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnGoogleVerify, this));
|
||||
mDeepLVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnDeepLVerify, this));
|
||||
|
||||
mAzureAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
|
||||
mAzureAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onAzureKeyEdited, this), NULL);
|
||||
mAzureAPIRegionEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
|
||||
mAzureAPIRegionEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onAzureKeyEdited, this), NULL);
|
||||
|
||||
mAzureAPIEndpointEditor->setFocusLostCallback([this](LLFocusableElement*)
|
||||
{
|
||||
setAzureVerified(false, false, 0);
|
||||
});
|
||||
mAzureAPIEndpointEditor->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param)
|
||||
{
|
||||
setAzureVerified(false, false, 0);
|
||||
});
|
||||
|
||||
mBingAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
|
||||
mBingAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onBingKeyEdited, this), NULL);
|
||||
mGoogleAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
|
||||
mGoogleAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onGoogleKeyEdited, this), NULL);
|
||||
|
||||
mDeepLAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
|
||||
mDeepLAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onDeepLKeyEdited, this), NULL);
|
||||
|
||||
mDeepLAPIDomainCombo->setFocusLostCallback([this](LLFocusableElement*)
|
||||
{
|
||||
setDeepLVerified(false, false, 0);
|
||||
});
|
||||
mDeepLAPIDomainCombo->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param)
|
||||
{
|
||||
setDeepLVerified(false, false, 0);
|
||||
});
|
||||
|
||||
center();
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -92,17 +116,28 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key)
|
|||
mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE);
|
||||
mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE);
|
||||
|
||||
std::string bing_key = gSavedSettings.getString("BingTranslateAPIKey");
|
||||
if (!bing_key.empty())
|
||||
LLSD azure_key = gSavedSettings.getLLSD("AzureTranslateAPIKey");
|
||||
if (azure_key.isMap() && !azure_key["id"].asString().empty())
|
||||
{
|
||||
mBingAPIKeyEditor->setText(bing_key);
|
||||
mBingAPIKeyEditor->setTentative(FALSE);
|
||||
verifyKey(LLTranslate::SERVICE_BING, bing_key, false);
|
||||
mAzureAPIKeyEditor->setText(azure_key["id"].asString());
|
||||
mAzureAPIKeyEditor->setTentative(false);
|
||||
if (azure_key.has("region") && !azure_key["region"].asString().empty())
|
||||
{
|
||||
mAzureAPIRegionEditor->setText(azure_key["region"].asString());
|
||||
mAzureAPIRegionEditor->setTentative(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mAzureAPIRegionEditor->setTentative(true);
|
||||
}
|
||||
mAzureAPIEndpointEditor->setValue(azure_key["endpoint"]);
|
||||
verifyKey(LLTranslate::SERVICE_AZURE, azure_key, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mBingAPIKeyEditor->setTentative(TRUE);
|
||||
mBingKeyVerified = FALSE;
|
||||
mAzureAPIKeyEditor->setTentative(TRUE);
|
||||
mAzureAPIRegionEditor->setTentative(true);
|
||||
mAzureKeyVerified = FALSE;
|
||||
}
|
||||
|
||||
std::string google_key = gSavedSettings.getString("GoogleTranslateAPIKey");
|
||||
|
|
@ -118,39 +153,74 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key)
|
|||
mGoogleKeyVerified = FALSE;
|
||||
}
|
||||
|
||||
LLSD deepl_key = gSavedSettings.getLLSD("DeepLTranslateAPIKey");
|
||||
if (deepl_key.isMap() && !deepl_key["id"].asString().empty())
|
||||
{
|
||||
mDeepLAPIKeyEditor->setText(deepl_key["id"].asString());
|
||||
mDeepLAPIKeyEditor->setTentative(false);
|
||||
mDeepLAPIDomainCombo->setValue(deepl_key["domain"]);
|
||||
verifyKey(LLTranslate::SERVICE_DEEPL, deepl_key, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mDeepLAPIKeyEditor->setTentative(TRUE);
|
||||
mDeepLKeyVerified = FALSE;
|
||||
}
|
||||
|
||||
updateControlsEnabledState();
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::setBingVerified(bool ok, bool alert)
|
||||
void LLFloaterTranslationSettings::setAzureVerified(bool ok, bool alert, S32 status)
|
||||
{
|
||||
if (alert)
|
||||
{
|
||||
showAlert(ok ? "bing_api_key_verified" : "bing_api_key_not_verified");
|
||||
showAlert(ok ? "azure_api_key_verified" : "azure_api_key_not_verified", status);
|
||||
}
|
||||
|
||||
mBingKeyVerified = ok;
|
||||
mAzureKeyVerified = ok;
|
||||
updateControlsEnabledState();
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::setGoogleVerified(bool ok, bool alert)
|
||||
void LLFloaterTranslationSettings::setGoogleVerified(bool ok, bool alert, S32 status)
|
||||
{
|
||||
if (alert)
|
||||
{
|
||||
showAlert(ok ? "google_api_key_verified" : "google_api_key_not_verified");
|
||||
showAlert(ok ? "google_api_key_verified" : "google_api_key_not_verified", status);
|
||||
}
|
||||
|
||||
mGoogleKeyVerified = ok;
|
||||
updateControlsEnabledState();
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::setDeepLVerified(bool ok, bool alert, S32 status)
|
||||
{
|
||||
if (alert)
|
||||
{
|
||||
showAlert(ok ? "deepl_api_key_verified" : "deepl_api_key_not_verified", status);
|
||||
}
|
||||
|
||||
mDeepLKeyVerified = ok;
|
||||
updateControlsEnabledState();
|
||||
}
|
||||
|
||||
std::string LLFloaterTranslationSettings::getSelectedService() const
|
||||
{
|
||||
return mTranslationServiceRadioGroup->getSelectedValue().asString();
|
||||
}
|
||||
|
||||
std::string LLFloaterTranslationSettings::getEnteredBingKey() const
|
||||
LLSD LLFloaterTranslationSettings::getEnteredAzureKey() const
|
||||
{
|
||||
return mBingAPIKeyEditor->getTentative() ? LLStringUtil::null : mBingAPIKeyEditor->getText();
|
||||
LLSD key;
|
||||
if (!mAzureAPIKeyEditor->getTentative())
|
||||
{
|
||||
key["endpoint"] = mAzureAPIEndpointEditor->getValue();
|
||||
key["id"] = mAzureAPIKeyEditor->getText();
|
||||
if (!mAzureAPIRegionEditor->getTentative())
|
||||
{
|
||||
key["region"] = mAzureAPIRegionEditor->getText();
|
||||
}
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
std::string LLFloaterTranslationSettings::getEnteredGoogleKey() const
|
||||
|
|
@ -158,10 +228,26 @@ std::string LLFloaterTranslationSettings::getEnteredGoogleKey() const
|
|||
return mGoogleAPIKeyEditor->getTentative() ? LLStringUtil::null : mGoogleAPIKeyEditor->getText();
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::showAlert(const std::string& msg_name) const
|
||||
LLSD LLFloaterTranslationSettings::getEnteredDeepLKey() const
|
||||
{
|
||||
LLSD key;
|
||||
if (!mDeepLAPIKeyEditor->getTentative())
|
||||
{
|
||||
key["domain"] = mDeepLAPIDomainCombo->getValue();
|
||||
key["id"] = mDeepLAPIKeyEditor->getText();
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::showAlert(const std::string& msg_name, S32 status) const
|
||||
{
|
||||
LLStringUtil::format_map_t string_args;
|
||||
// For now just show an http error code, whole 'reason' string might be added later
|
||||
string_args["[STATUS]"] = llformat("%d", status);
|
||||
std::string message = getString(msg_name, string_args);
|
||||
|
||||
LLSD args;
|
||||
args["MESSAGE"] = getString(msg_name);
|
||||
args["MESSAGE"] = message;
|
||||
LLNotificationsUtil::add("GenericAlert", args);
|
||||
}
|
||||
|
||||
|
|
@ -170,34 +256,51 @@ void LLFloaterTranslationSettings::updateControlsEnabledState()
|
|||
// Enable/disable controls based on the checkbox value.
|
||||
bool on = mMachineTranslationCB->getValue().asBoolean();
|
||||
std::string service = getSelectedService();
|
||||
bool bing_selected = service == "bing";
|
||||
bool azure_selected = service == "azure";
|
||||
bool google_selected = service == "google";
|
||||
bool deepl_selected = service == "deepl";
|
||||
|
||||
mTranslationServiceRadioGroup->setEnabled(on);
|
||||
mLanguageCombo->setEnabled(on);
|
||||
|
||||
getChild<LLTextBox>("bing_api_key_label")->setEnabled(on);
|
||||
mBingAPIKeyEditor->setEnabled(on);
|
||||
// MS Azure
|
||||
getChild<LLTextBox>("azure_api_endoint_label")->setEnabled(on);
|
||||
mAzureAPIEndpointEditor->setEnabled(on && azure_selected);
|
||||
getChild<LLTextBox>("azure_api_key_label")->setEnabled(on);
|
||||
mAzureAPIKeyEditor->setEnabled(on && azure_selected);
|
||||
getChild<LLTextBox>("azure_api_region_label")->setEnabled(on);
|
||||
mAzureAPIRegionEditor->setEnabled(on && azure_selected);
|
||||
|
||||
getChild<LLTextBox>("google_api_key_label")->setEnabled(on);
|
||||
mGoogleAPIKeyEditor->setEnabled(on);
|
||||
mAzureVerifyBtn->setEnabled(on && azure_selected &&
|
||||
!mAzureKeyVerified && getEnteredAzureKey().isMap());
|
||||
|
||||
mBingAPIKeyEditor->setEnabled(on && bing_selected);
|
||||
mGoogleAPIKeyEditor->setEnabled(on && google_selected);
|
||||
// Google
|
||||
getChild<LLTextBox>("google_api_key_label")->setEnabled(on);
|
||||
mGoogleAPIKeyEditor->setEnabled(on && google_selected);
|
||||
|
||||
mBingVerifyBtn->setEnabled(on && bing_selected &&
|
||||
!mBingKeyVerified && !getEnteredBingKey().empty());
|
||||
mGoogleVerifyBtn->setEnabled(on && google_selected &&
|
||||
!mGoogleKeyVerified && !getEnteredGoogleKey().empty());
|
||||
|
||||
bool service_verified = (bing_selected && mBingKeyVerified) || (google_selected && mGoogleKeyVerified);
|
||||
// DeepL
|
||||
getChild<LLTextBox>("deepl_api_domain_label")->setEnabled(on);
|
||||
mDeepLAPIDomainCombo->setEnabled(on && deepl_selected);
|
||||
getChild<LLTextBox>("deepl_api_key_label")->setEnabled(on);
|
||||
mDeepLAPIKeyEditor->setEnabled(on && deepl_selected);
|
||||
|
||||
mDeepLVerifyBtn->setEnabled(on && deepl_selected &&
|
||||
!mDeepLKeyVerified && getEnteredDeepLKey().isMap());
|
||||
|
||||
bool service_verified =
|
||||
(azure_selected && mAzureKeyVerified)
|
||||
|| (google_selected && mGoogleKeyVerified)
|
||||
|| (deepl_selected && mDeepLKeyVerified);
|
||||
gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified);
|
||||
|
||||
mOKBtn->setEnabled(!on || service_verified);
|
||||
}
|
||||
|
||||
/*static*/
|
||||
void LLFloaterTranslationSettings::setVerificationStatus(int service, bool ok, bool alert)
|
||||
void LLFloaterTranslationSettings::setVerificationStatus(int service, bool ok, bool alert, S32 status)
|
||||
{
|
||||
LLFloaterTranslationSettings* floater =
|
||||
LLFloaterReg::getTypedInstance<LLFloaterTranslationSettings>("prefs_translation");
|
||||
|
|
@ -210,20 +313,23 @@ void LLFloaterTranslationSettings::setVerificationStatus(int service, bool ok, b
|
|||
|
||||
switch (service)
|
||||
{
|
||||
case LLTranslate::SERVICE_BING:
|
||||
floater->setBingVerified(ok, alert);
|
||||
case LLTranslate::SERVICE_AZURE:
|
||||
floater->setAzureVerified(ok, alert, status);
|
||||
break;
|
||||
case LLTranslate::SERVICE_GOOGLE:
|
||||
floater->setGoogleVerified(ok, alert);
|
||||
floater->setGoogleVerified(ok, alert, status);
|
||||
break;
|
||||
case LLTranslate::SERVICE_DEEPL:
|
||||
floater->setDeepLVerified(ok, alert, status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterTranslationSettings::verifyKey(int service, const std::string& key, bool alert)
|
||||
void LLFloaterTranslationSettings::verifyKey(int service, const LLSD& key, bool alert)
|
||||
{
|
||||
LLTranslate::verifyKey(static_cast<LLTranslate::EService>(service), key,
|
||||
boost::bind(&LLFloaterTranslationSettings::setVerificationStatus, _1, _2, alert));
|
||||
boost::bind(&LLFloaterTranslationSettings::setVerificationStatus, _1, _2, alert, _3));
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
|
||||
|
|
@ -239,11 +345,13 @@ void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::onBingKeyEdited()
|
||||
void LLFloaterTranslationSettings::onAzureKeyEdited()
|
||||
{
|
||||
if (mBingAPIKeyEditor->isDirty())
|
||||
if (mAzureAPIKeyEditor->isDirty()
|
||||
|| mAzureAPIRegionEditor->isDirty())
|
||||
{
|
||||
setBingVerified(false, false);
|
||||
// todo: verify mAzureAPIEndpointEditor url
|
||||
setAzureVerified(false, false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -251,16 +359,24 @@ void LLFloaterTranslationSettings::onGoogleKeyEdited()
|
|||
{
|
||||
if (mGoogleAPIKeyEditor->isDirty())
|
||||
{
|
||||
setGoogleVerified(false, false);
|
||||
setGoogleVerified(false, false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::onBtnBingVerify()
|
||||
void LLFloaterTranslationSettings::onDeepLKeyEdited()
|
||||
{
|
||||
std::string key = getEnteredBingKey();
|
||||
if (!key.empty())
|
||||
if (mDeepLAPIKeyEditor->isDirty())
|
||||
{
|
||||
setDeepLVerified(false, false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::onBtnAzureVerify()
|
||||
{
|
||||
LLSD key = getEnteredAzureKey();
|
||||
if (key.isMap())
|
||||
{
|
||||
verifyKey(LLTranslate::SERVICE_BING, key);
|
||||
verifyKey(LLTranslate::SERVICE_AZURE, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -269,26 +385,40 @@ void LLFloaterTranslationSettings::onBtnGoogleVerify()
|
|||
std::string key = getEnteredGoogleKey();
|
||||
if (!key.empty())
|
||||
{
|
||||
verifyKey(LLTranslate::SERVICE_GOOGLE, key);
|
||||
verifyKey(LLTranslate::SERVICE_GOOGLE, LLSD(key));
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::onBtnDeepLVerify()
|
||||
{
|
||||
LLSD key = getEnteredDeepLKey();
|
||||
if (key.isMap())
|
||||
{
|
||||
verifyKey(LLTranslate::SERVICE_DEEPL, key);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTranslationSettings::onClose(bool app_quitting)
|
||||
{
|
||||
std::string service = gSavedSettings.getString("TranslationService");
|
||||
bool bing_selected = service == "bing";
|
||||
bool azure_selected = service == "azure";
|
||||
bool google_selected = service == "google";
|
||||
bool deepl_selected = service == "deepl";
|
||||
|
||||
bool service_verified = (bing_selected && mBingKeyVerified) || (google_selected && mGoogleKeyVerified);
|
||||
gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified);
|
||||
|
||||
bool service_verified =
|
||||
(azure_selected && mAzureKeyVerified)
|
||||
|| (google_selected && mGoogleKeyVerified)
|
||||
|| (deepl_selected && mDeepLKeyVerified);
|
||||
gSavedPerAccountSettings.setBOOL("TranslatingEnabled", service_verified);
|
||||
}
|
||||
void LLFloaterTranslationSettings::onBtnOK()
|
||||
{
|
||||
gSavedSettings.setBOOL("TranslateChat", mMachineTranslationCB->getValue().asBoolean());
|
||||
gSavedSettings.setString("TranslateLanguage", mLanguageCombo->getSelectedValue().asString());
|
||||
gSavedSettings.setString("TranslationService", getSelectedService());
|
||||
gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
|
||||
gSavedSettings.setLLSD("AzureTranslateAPIKey", getEnteredAzureKey());
|
||||
gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
|
||||
gSavedSettings.setLLSD("DeepLTranslateAPIKey", getEnteredDeepLKey());
|
||||
|
||||
closeFloater(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,38 +42,48 @@ public:
|
|||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
void setBingVerified(bool ok, bool alert);
|
||||
void setGoogleVerified(bool ok, bool alert);
|
||||
void setAzureVerified(bool ok, bool alert, S32 status);
|
||||
void setGoogleVerified(bool ok, bool alert, S32 status);
|
||||
void setDeepLVerified(bool ok, bool alert, S32 status);
|
||||
void onClose(bool app_quitting);
|
||||
|
||||
private:
|
||||
std::string getSelectedService() const;
|
||||
std::string getEnteredBingKey() const;
|
||||
LLSD getEnteredAzureKey() const;
|
||||
std::string getEnteredGoogleKey() const;
|
||||
void showAlert(const std::string& msg_name) const;
|
||||
LLSD getEnteredDeepLKey() const;
|
||||
void showAlert(const std::string& msg_name, S32 status) const;
|
||||
void updateControlsEnabledState();
|
||||
void verifyKey(int service, const std::string& key, bool alert = true);
|
||||
void verifyKey(int service, const LLSD& key, bool alert = true);
|
||||
|
||||
void onEditorFocused(LLFocusableElement* control);
|
||||
void onBingKeyEdited();
|
||||
void onAzureKeyEdited();
|
||||
void onGoogleKeyEdited();
|
||||
void onBtnBingVerify();
|
||||
void onDeepLKeyEdited();
|
||||
void onBtnAzureVerify();
|
||||
void onBtnGoogleVerify();
|
||||
void onBtnDeepLVerify();
|
||||
void onBtnOK();
|
||||
|
||||
static void setVerificationStatus(int service, bool alert, bool ok);
|
||||
static void setVerificationStatus(int service, bool alert, bool ok, S32 status);
|
||||
|
||||
LLCheckBoxCtrl* mMachineTranslationCB;
|
||||
LLComboBox* mLanguageCombo;
|
||||
LLLineEditor* mBingAPIKeyEditor;
|
||||
LLComboBox* mAzureAPIEndpointEditor;
|
||||
LLLineEditor* mAzureAPIKeyEditor;
|
||||
LLLineEditor* mAzureAPIRegionEditor;
|
||||
LLLineEditor* mGoogleAPIKeyEditor;
|
||||
LLComboBox* mDeepLAPIDomainCombo;
|
||||
LLLineEditor* mDeepLAPIKeyEditor;
|
||||
LLRadioGroup* mTranslationServiceRadioGroup;
|
||||
LLButton* mBingVerifyBtn;
|
||||
LLButton* mAzureVerifyBtn;
|
||||
LLButton* mGoogleVerifyBtn;
|
||||
LLButton* mDeepLVerifyBtn;
|
||||
LLButton* mOKBtn;
|
||||
|
||||
bool mBingKeyVerified;
|
||||
bool mAzureKeyVerified;
|
||||
bool mGoogleKeyVerified;
|
||||
bool mDeepLKeyVerified;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERTRANSLATIONSETTINGS_H
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public:
|
|||
|
||||
/*virtual*/ void onOpen(const LLSD& notification_id);
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void deleteAllChildren();
|
||||
/*virtual*/ void removeChild(LLView* child);
|
||||
private:
|
||||
void onToastDestroy(LLToast * toast);
|
||||
|
|
@ -122,6 +123,12 @@ BOOL LLInspectToast::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
return LLFloater::handleToolTip(x, y, mask);
|
||||
}
|
||||
|
||||
void LLInspectToast::deleteAllChildren()
|
||||
{
|
||||
mPanel = NULL;
|
||||
LLInspect::deleteAllChildren();
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLInspectToast::removeChild(LLView* child)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -592,7 +592,11 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot(
|
|||
}
|
||||
}
|
||||
|
||||
if(rv.isNull() && create_folder && root_id.notNull())
|
||||
if(rv.isNull()
|
||||
&& root_id.notNull()
|
||||
&& create_folder
|
||||
&& preferred_type != LLFolderType::FT_MARKETPLACE_LISTINGS
|
||||
&& preferred_type != LLFolderType::FT_OUTBOX)
|
||||
{
|
||||
|
||||
if (isInventoryUsable())
|
||||
|
|
|
|||
|
|
@ -30,8 +30,10 @@
|
|||
#include "llagent.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llcallbacklist.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llstartup.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewermessage.h"
|
||||
|
|
@ -408,6 +410,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
|
|||
// *TODO: Think I'd like to get a shared pointer to this and share it
|
||||
// among all the folder requests.
|
||||
uuid_vec_t recursive_cats;
|
||||
uuid_vec_t all_cats; // dupplicate avoidance
|
||||
|
||||
LLSD folder_request_body;
|
||||
LLSD folder_request_body_lib;
|
||||
|
|
@ -438,7 +441,8 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
|
|||
|
||||
if (cat)
|
||||
{
|
||||
if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
|
||||
if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()
|
||||
&& std::find(all_cats.begin(), all_cats.end(), cat_id) == all_cats.end())
|
||||
{
|
||||
LLSD folder_sd;
|
||||
folder_sd["folder_id"] = cat->getUUID();
|
||||
|
|
@ -477,6 +481,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
|
|||
{
|
||||
recursive_cats.push_back(cat_id);
|
||||
}
|
||||
all_cats.push_back(cat_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -796,6 +801,63 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
|
|||
<< LLCoreHttpUtil::responseToString(response) << "]" << LL_ENDL;
|
||||
|
||||
// Could use a 404 test here to try to detect revoked caps...
|
||||
|
||||
if(status == LLCore::HttpStatus(HTTP_FORBIDDEN))
|
||||
{
|
||||
// Too large, split into two if possible
|
||||
if (gDisconnected || LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string url(gAgent.getRegionCapability("FetchInventoryDescendents2"));
|
||||
if (url.empty())
|
||||
{
|
||||
LL_WARNS(LOG_INV) << "Failed to get AIS2 cap" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
S32 size = mRequestSD["folders"].size();
|
||||
|
||||
if (size > 1)
|
||||
{
|
||||
// Can split, assume that this isn't the library
|
||||
LLSD folders;
|
||||
uuid_vec_t recursive_cats;
|
||||
LLSD::array_iterator iter = mRequestSD["folders"].beginArray();
|
||||
LLSD::array_iterator end = mRequestSD["folders"].endArray();
|
||||
while (iter != end)
|
||||
{
|
||||
folders.append(*iter);
|
||||
LLUUID fodler_id = iter->get("folder_id").asUUID();
|
||||
if (std::find(mRecursiveCatUUIDs.begin(), mRecursiveCatUUIDs.end(), fodler_id) != mRecursiveCatUUIDs.end())
|
||||
{
|
||||
recursive_cats.push_back(fodler_id);
|
||||
}
|
||||
if (folders.size() == (S32)(size / 2))
|
||||
{
|
||||
LLSD request_body;
|
||||
request_body["folders"] = folders;
|
||||
LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
|
||||
gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
|
||||
recursive_cats.clear();
|
||||
folders.clear();
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
||||
LLSD request_body;
|
||||
request_body["folders"] = folders;
|
||||
LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
|
||||
gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Can't split
|
||||
LLNotificationsUtil::add("InventoryLimitReachedAIS");
|
||||
}
|
||||
}
|
||||
|
||||
// This was originally the request retry logic for the inventory
|
||||
// request which tested on HTTP_INTERNAL_ERROR status. This
|
||||
|
|
|
|||
|
|
@ -1268,8 +1268,10 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
BOOL handled = LLView::handleHover(x, y, mask);
|
||||
if(handled)
|
||||
{
|
||||
ECursorType cursor = getWindow()->getCursor();
|
||||
{
|
||||
// getCursor gets current cursor, setCursor sets next cursor
|
||||
// check that children didn't set own 'next' cursor
|
||||
ECursorType cursor = getWindow()->getNextCursor();
|
||||
if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW)
|
||||
{
|
||||
// replace arrow cursor with arrow and hourglass cursor
|
||||
|
|
|
|||
|
|
@ -1327,9 +1327,7 @@ void LLMaterialEditor::createInventoryItem(const std::string &buffer, const std:
|
|||
[](LLUUID item_id, LLUUID new_asset_id, LLUUID new_item_id, LLSD response)
|
||||
{
|
||||
// done callback
|
||||
LL_INFOS("Material") << "inventory item uploaded. item: " << item_id << " asset: " << new_asset_id << " new_item_id: " << new_item_id << " response: " << response << LL_ENDL;
|
||||
LLSD params = llsd::map("ASSET_ID", new_asset_id);
|
||||
LLNotificationsUtil::add("MaterialCreated", params);
|
||||
LL_INFOS("Material") << "inventory item uploaded. item: " << item_id << " new_item_id: " << new_item_id << " response: " << response << LL_ENDL;
|
||||
},
|
||||
nullptr // failure callback, floater already closed
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3021,7 +3021,7 @@ S32 LLMeshRepository::getActualMeshLOD(LLMeshHeader& header, S32 lod)
|
|||
}
|
||||
|
||||
//search up to find then ext available higher lod
|
||||
for (S32 i = lod+1; i < 4; ++i)
|
||||
for (S32 i = lod+1; i < LLVolumeLODGroup::NUM_LODS; ++i)
|
||||
{
|
||||
if (header.mLodSize[i] > 0)
|
||||
{
|
||||
|
|
@ -3183,7 +3183,7 @@ void LLMeshHeaderHandler::processFailure(LLCore::HttpStatus status)
|
|||
|
||||
// Can't get the header so none of the LODs will be available
|
||||
LLMutexLock lock(gMeshRepo.mThread->mMutex);
|
||||
for (int i(0); i < 4; ++i)
|
||||
for (int i(0); i < LLVolumeLODGroup::NUM_LODS; ++i)
|
||||
{
|
||||
gMeshRepo.mThread->mUnavailableQ.push_back(LLMeshRepoThread::LODRequest(mMeshParams, i));
|
||||
}
|
||||
|
|
@ -3212,7 +3212,7 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
|
|||
|
||||
// Can't get the header so none of the LODs will be available
|
||||
LLMutexLock lock(gMeshRepo.mThread->mMutex);
|
||||
for (int i(0); i < 4; ++i)
|
||||
for (int i(0); i < LLVolumeLODGroup::NUM_LODS; ++i)
|
||||
{
|
||||
gMeshRepo.mThread->mUnavailableQ.push_back(LLMeshRepoThread::LODRequest(mMeshParams, i));
|
||||
}
|
||||
|
|
@ -3293,7 +3293,7 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
|
|||
|
||||
// headerReceived() parsed header, but header's data is invalid so none of the LODs will be available
|
||||
LLMutexLock lock(gMeshRepo.mThread->mMutex);
|
||||
for (int i(0); i < 4; ++i)
|
||||
for (int i(0); i < LLVolumeLODGroup::NUM_LODS; ++i)
|
||||
{
|
||||
gMeshRepo.mThread->mUnavailableQ.push_back(LLMeshRepoThread::LODRequest(mMeshParams, i));
|
||||
}
|
||||
|
|
@ -3654,7 +3654,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
|
|||
// Manage time-to-load metrics for mesh download operations.
|
||||
metricsProgress(1);
|
||||
|
||||
if (detail < 0 || detail >= 4)
|
||||
if (detail < 0 || detail >= LLVolumeLODGroup::NUM_LODS)
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
|
|
@ -3717,7 +3717,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
|
|||
}
|
||||
|
||||
//no lower LOD is a available, is a higher lod available?
|
||||
for (S32 i = detail+1; i < 4; ++i)
|
||||
for (S32 i = detail+1; i < LLVolumeLODGroup::NUM_LODS; ++i)
|
||||
{
|
||||
LLVolume* lod = group->refLOD(i);
|
||||
if (lod && lod->isMeshAssetLoaded() && lod->getNumVolumeFaces() > 0)
|
||||
|
|
@ -3918,7 +3918,7 @@ void LLMeshRepository::notifyLoadedMeshes()
|
|||
//create score map
|
||||
std::map<LLUUID, F32> score_map;
|
||||
|
||||
for (U32 i = 0; i < 4; ++i)
|
||||
for (U32 i = 0; i < LLVolumeLODGroup::NUM_LODS; ++i)
|
||||
{
|
||||
for (mesh_load_map::iterator iter = mLoadingMeshes[i].begin(); iter != mLoadingMeshes[i].end(); ++iter)
|
||||
{
|
||||
|
|
@ -4067,7 +4067,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol
|
|||
if (sys_volume)
|
||||
{
|
||||
sys_volume->copyVolumeFaces(volume);
|
||||
sys_volume->setMeshAssetLoaded(TRUE);
|
||||
sys_volume->setMeshAssetLoaded(true);
|
||||
LLPrimitive::getVolumeManager()->unrefVolume(sys_volume);
|
||||
}
|
||||
else
|
||||
|
|
@ -4099,6 +4099,12 @@ void LLMeshRepository::notifyMeshUnavailable(const LLVolumeParams& mesh_params,
|
|||
{
|
||||
F32 detail = LLVolumeLODGroup::getVolumeScaleFromDetail(lod);
|
||||
|
||||
LLVolume* sys_volume = LLPrimitive::getVolumeManager()->refVolume(mesh_params, lod);
|
||||
if (sys_volume)
|
||||
{
|
||||
sys_volume->setMeshAssetUnavaliable(true);
|
||||
}
|
||||
|
||||
for (LLVOVolume* vobj : obj_iter->second)
|
||||
{
|
||||
if (vobj)
|
||||
|
|
@ -4255,6 +4261,37 @@ bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool LLMeshRepository::hasSkinInfo(const LLUUID& mesh_id)
|
||||
{
|
||||
if (mesh_id.isNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mThread->hasSkinInfoInHeader(mesh_id))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const LLMeshSkinInfo* skininfo = getSkinInfo(mesh_id);
|
||||
if (skininfo)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLMeshRepository::hasHeader(const LLUUID& mesh_id)
|
||||
{
|
||||
if (mesh_id.isNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return mThread->hasHeader(mesh_id);
|
||||
}
|
||||
|
||||
bool LLMeshRepoThread::hasPhysicsShapeInHeader(const LLUUID& mesh_id)
|
||||
{
|
||||
LLMutexLock lock(mHeaderMutex);
|
||||
|
|
@ -4271,6 +4308,29 @@ bool LLMeshRepoThread::hasPhysicsShapeInHeader(const LLUUID& mesh_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool LLMeshRepoThread::hasSkinInfoInHeader(const LLUUID& mesh_id)
|
||||
{
|
||||
LLMutexLock lock(mHeaderMutex);
|
||||
mesh_header_map::iterator iter = mMeshHeader.find(mesh_id);
|
||||
if (iter != mMeshHeader.end() && iter->second.first > 0)
|
||||
{
|
||||
LLMeshHeader& mesh = iter->second.second;
|
||||
if (mesh.mSkinOffset >= 0
|
||||
&& mesh.mSkinSize > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLMeshRepoThread::hasHeader(const LLUUID& mesh_id)
|
||||
{
|
||||
LLMutexLock lock(mHeaderMutex);
|
||||
mesh_header_map::iterator iter = mMeshHeader.find(mesh_id);
|
||||
return iter != mMeshHeader.end();
|
||||
}
|
||||
|
||||
void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,
|
||||
bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position,
|
||||
|
|
@ -4420,7 +4480,7 @@ F32 LLMeshRepository::getStreamingCostLegacy(LLUUID mesh_id, F32 radius, S32* by
|
|||
{
|
||||
LL_WARNS() << mesh_id << "bytes mismatch " << *bytes << " " << data.getSizeTotal() << LL_ENDL;
|
||||
}
|
||||
if (bytes_visible && (lod >=0) && (lod < 4) && (*bytes_visible != data.getSizeByLOD(lod)))
|
||||
if (bytes_visible && (lod >=0) && (lod < LLVolumeLODGroup::NUM_LODS) && (*bytes_visible != data.getSizeByLOD(lod)))
|
||||
{
|
||||
LL_WARNS() << mesh_id << "bytes_visible mismatch " << *bytes_visible << " " << data.getSizeByLOD(lod) << LL_ENDL;
|
||||
}
|
||||
|
|
@ -4580,7 +4640,7 @@ bool LLMeshCostData::init(const LLMeshHeader& header)
|
|||
static LLCachedControl<U32> minimum_size(gSavedSettings, "MeshMinimumByteSize", 16); //make sure nothing is "free"
|
||||
static LLCachedControl<U32> bytes_per_triangle(gSavedSettings, "MeshBytesPerTriangle", 16);
|
||||
|
||||
for (S32 i=0; i<4; i++)
|
||||
for (S32 i=0; i<LLVolumeLODGroup::NUM_LODS; i++)
|
||||
{
|
||||
mEstTrisByLOD[i] = llmax((F32)mSizeByLOD[i] - (F32)metadata_discount, (F32)minimum_size) / (F32)bytes_per_triangle;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,6 +401,8 @@ public:
|
|||
bool decompositionReceived(const LLUUID& mesh_id, U8* data, S32 data_size);
|
||||
EMeshProcessingResult physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32 data_size);
|
||||
bool hasPhysicsShapeInHeader(const LLUUID& mesh_id);
|
||||
bool hasSkinInfoInHeader(const LLUUID& mesh_id);
|
||||
bool hasHeader(const LLUUID& mesh_id);
|
||||
|
||||
void notifyLoadedMeshes();
|
||||
S32 getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
|
||||
|
|
@ -650,6 +652,8 @@ public:
|
|||
LLModel::Decomposition* getDecomposition(const LLUUID& mesh_id);
|
||||
void fetchPhysicsShape(const LLUUID& mesh_id);
|
||||
bool hasPhysicsShape(const LLUUID& mesh_id);
|
||||
bool hasSkinInfo(const LLUUID& mesh_id);
|
||||
bool hasHeader(const LLUUID& mesh_id);
|
||||
|
||||
void buildHull(const LLVolumeParams& params, S32 detail);
|
||||
void buildPhysicsMesh(LLModel::Decomposition& decomp);
|
||||
|
|
|
|||
|
|
@ -2751,6 +2751,16 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
|
||||
base_iter++;
|
||||
|
||||
bool skinned = include_skin_weights && !mdl->mSkinWeights.empty();
|
||||
|
||||
LLMatrix4a mat_normal;
|
||||
if (skinned)
|
||||
{
|
||||
glh::matrix4f m((F32*)mdl->mSkinInfo.mBindShapeMatrix.getF32ptr());
|
||||
m = m.inverse().transpose();
|
||||
mat_normal.loadu(m.m);
|
||||
}
|
||||
|
||||
S32 num_faces = mdl->getNumVolumeFaces();
|
||||
for (S32 i = 0; i < num_faces; ++i)
|
||||
{
|
||||
|
|
@ -2765,7 +2775,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
|
||||
LLVertexBuffer* vb = NULL;
|
||||
|
||||
bool skinned = include_skin_weights && !mdl->mSkinWeights.empty();
|
||||
|
||||
|
||||
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
|
||||
|
|
@ -2803,6 +2813,15 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
|
||||
LLVector4a::memcpyNonAliased16((F32*)vertex_strider.get(), (F32*)vf.mPositions, num_vertices * 4 * sizeof(F32));
|
||||
|
||||
if (skinned)
|
||||
{
|
||||
for (U32 i = 0; i < num_vertices; ++i)
|
||||
{
|
||||
LLVector4a* v = (LLVector4a*)vertex_strider.get();
|
||||
mdl->mSkinInfo.mBindShapeMatrix.affineTransform(*v, *v);
|
||||
vertex_strider++;
|
||||
}
|
||||
}
|
||||
if (vf.mTexCoords)
|
||||
{
|
||||
vb->getTexCoord0Strider(tc_strider);
|
||||
|
|
@ -2813,7 +2832,25 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
if (vf.mNormals)
|
||||
{
|
||||
vb->getNormalStrider(normal_strider);
|
||||
LLVector4a::memcpyNonAliased16((F32*)normal_strider.get(), (F32*)vf.mNormals, num_vertices * 4 * sizeof(F32));
|
||||
|
||||
if (skinned)
|
||||
{
|
||||
F32* normals = (F32*)normal_strider.get();
|
||||
LLVector4a* src = vf.mNormals;
|
||||
LLVector4a* end = src + num_vertices;
|
||||
|
||||
while (src < end)
|
||||
{
|
||||
LLVector4a normal;
|
||||
mat_normal.rotate(*src++, normal);
|
||||
normal.store4a(normals);
|
||||
normals += 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVector4a::memcpyNonAliased16((F32*)normal_strider.get(), (F32*)vf.mNormals, num_vertices * 4 * sizeof(F32));
|
||||
}
|
||||
}
|
||||
|
||||
if (skinned)
|
||||
|
|
@ -3276,7 +3313,7 @@ BOOL LLModelPreview::render()
|
|||
refresh();
|
||||
}
|
||||
|
||||
gObjectPreviewProgram.bind();
|
||||
gObjectPreviewProgram.bind(skin_weight);
|
||||
|
||||
gGL.loadIdentity();
|
||||
gPipeline.enableLightsPreview();
|
||||
|
|
@ -3351,11 +3388,11 @@ BOOL LLModelPreview::render()
|
|||
}
|
||||
|
||||
gGL.pushMatrix();
|
||||
|
||||
LLMatrix4 mat = instance.mTransform;
|
||||
|
||||
gGL.multMatrix((GLfloat*)mat.mMatrix);
|
||||
|
||||
|
||||
|
||||
U32 num_models = mVertexBuffer[mPreviewLOD][model].size();
|
||||
for (U32 i = 0; i < num_models; ++i)
|
||||
{
|
||||
|
|
@ -3685,65 +3722,41 @@ BOOL LLModelPreview::render()
|
|||
{
|
||||
LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i];
|
||||
|
||||
const LLVolumeFace& face = model->getVolumeFace(i);
|
||||
model->mSkinInfo.updateHash();
|
||||
LLRenderPass::uploadMatrixPalette(mPreviewAvatar, &model->mSkinInfo);
|
||||
|
||||
LLStrider<LLVector3> position;
|
||||
buffer->getVertexStrider(position);
|
||||
|
||||
LLStrider<LLVector4> weight;
|
||||
buffer->getWeight4Strider(weight);
|
||||
|
||||
//quick 'n dirty software vertex skinning
|
||||
|
||||
//build matrix palette
|
||||
|
||||
LLMatrix4a mat[LL_MAX_JOINTS_PER_MESH_OBJECT];
|
||||
LLSkinningUtil::initSkinningMatrixPalette(mat, joint_count,
|
||||
skin, getPreviewAvatar());
|
||||
|
||||
const LLMatrix4a& bind_shape_matrix = skin->mBindShapeMatrix;
|
||||
U32 max_joints = LLSkinningUtil::getMaxJointCount();
|
||||
for (U32 j = 0; j < buffer->getNumVerts(); ++j)
|
||||
{
|
||||
LLMatrix4a final_mat;
|
||||
F32 *wptr = weight[j].mV;
|
||||
LLSkinningUtil::getPerVertexSkinMatrix(wptr, mat, true, final_mat, max_joints);
|
||||
|
||||
//VECTORIZE THIS
|
||||
LLVector4a& v = face.mPositions[j];
|
||||
|
||||
LLVector4a t;
|
||||
LLVector4a dst;
|
||||
bind_shape_matrix.affineTransform(v, t);
|
||||
final_mat.affineTransform(t, dst);
|
||||
|
||||
position[j][0] = dst[0];
|
||||
position[j][1] = dst[1];
|
||||
position[j][2] = dst[2];
|
||||
}
|
||||
|
||||
llassert(model->mMaterialList.size() > i);
|
||||
const std::string& binding = instance.mModel->mMaterialList[i];
|
||||
const LLImportMaterial& material = instance.mMaterial[binding];
|
||||
|
||||
buffer->unmapBuffer();
|
||||
|
||||
buffer->setBuffer();
|
||||
gGL.diffuseColor4fv(material.mDiffuseColor.mV);
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
// Find the tex for this material, bind it, and add it to our set
|
||||
//
|
||||
LLViewerFetchedTexture* tex = bindMaterialDiffuseTexture(material);
|
||||
if (tex)
|
||||
if (textures)
|
||||
{
|
||||
mTextureSet.insert(tex);
|
||||
int materialCnt = instance.mModel->mMaterialList.size();
|
||||
if (i < materialCnt)
|
||||
{
|
||||
const std::string& binding = instance.mModel->mMaterialList[i];
|
||||
const LLImportMaterial& material = instance.mMaterial[binding];
|
||||
|
||||
gGL.diffuseColor4fv(material.mDiffuseColor.mV);
|
||||
|
||||
// Find the tex for this material, bind it, and add it to our set
|
||||
//
|
||||
LLViewerFetchedTexture* tex = bindMaterialDiffuseTexture(material);
|
||||
if (tex)
|
||||
{
|
||||
mTextureSet.insert(tex);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gGL.diffuseColor4fv(PREVIEW_BASE_COL.mV);
|
||||
}
|
||||
|
||||
buffer->setBuffer();
|
||||
buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0);
|
||||
|
||||
if (edges)
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV);
|
||||
glLineWidth(PREVIEW_EDGE_WIDTH);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ public:
|
|||
BOOL isMuted(const LLUUID& id, const std::string& name = LLStringUtil::null, U32 flags = 0) const;
|
||||
|
||||
// Workaround for username-based mute search, a lot of string conversions so use cautiously
|
||||
// Expects lower case username
|
||||
BOOL isMuted(const std::string& username, U32 flags = 0) const;
|
||||
|
||||
// Alternate (convenience) form for places we don't need to pass the name, but do need flags
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "llsettingssky.h"
|
||||
#include "llenvironment.h"
|
||||
#include "llatmosphere.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -207,14 +208,16 @@ void LLPanelSettingsSkyAtmosTab::refresh()
|
|||
F32 moisture_level = mSkySettings->getSkyMoistureLevel();
|
||||
F32 droplet_radius = mSkySettings->getSkyDropletRadius();
|
||||
F32 ice_level = mSkySettings->getSkyIceLevel();
|
||||
F32 rp_ambiance = mSkySettings->getReflectionProbeAmbiance();
|
||||
|
||||
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
|
||||
F32 rp_ambiance = mSkySettings->getReflectionProbeAmbiance(should_auto_adjust);
|
||||
|
||||
getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->setValue(moisture_level);
|
||||
getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->setValue(droplet_radius);
|
||||
getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->setValue(ice_level);
|
||||
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setValue(rp_ambiance);
|
||||
|
||||
updateGammaLabel();
|
||||
updateGammaLabel(should_auto_adjust);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -332,10 +335,10 @@ void LLPanelSettingsSkyAtmosTab::onReflectionProbeAmbianceChanged()
|
|||
}
|
||||
|
||||
|
||||
void LLPanelSettingsSkyAtmosTab::updateGammaLabel()
|
||||
void LLPanelSettingsSkyAtmosTab::updateGammaLabel(bool auto_adjust)
|
||||
{
|
||||
if (!mSkySettings) return;
|
||||
F32 ambiance = mSkySettings->getReflectionProbeAmbiance();
|
||||
F32 ambiance = mSkySettings->getReflectionProbeAmbiance(auto_adjust);
|
||||
if (ambiance != 0.f)
|
||||
{
|
||||
childSetValue("scene_gamma_label", getString("hdr_string"));
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ private:
|
|||
void onDropletRadiusChanged();
|
||||
void onIceLevelChanged();
|
||||
void onReflectionProbeAmbianceChanged();
|
||||
void updateGammaLabel();
|
||||
void updateGammaLabel(bool auto_adjust = false);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -520,7 +520,11 @@ void LLPanelFace::sendTexture()
|
|||
{
|
||||
id = mTextureCtrl->getImageAssetID();
|
||||
}
|
||||
LLSelectMgr::getInstance()->selectionSetImage(id);
|
||||
if (!LLSelectMgr::getInstance()->selectionSetImage(id))
|
||||
{
|
||||
// need to refresh value in texture ctrl
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1000,7 +1004,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
{ //set state of UI to match state of texture entry(ies) (calls setEnabled, setValue, etc, but NOT setVisible)
|
||||
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
|
||||
|
||||
if( objectp
|
||||
if (objectp
|
||||
&& objectp->getPCode() == LL_PCODE_VOLUME
|
||||
&& objectp->permModify())
|
||||
{
|
||||
|
|
@ -1030,7 +1034,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
|
||||
mComboMatMedia->setEnabled(editable);
|
||||
|
||||
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
|
||||
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
|
||||
|
||||
if (radio_mat_type->getSelectedIndex() < MATTYPE_DIFFUSE)
|
||||
{
|
||||
radio_mat_type->selectNthItem(MATTYPE_DIFFUSE);
|
||||
|
|
@ -1054,7 +1059,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
// *NOTE: The "identical" variable is currently only used to decide if
|
||||
// the texgen control should be tentative - this is not used by GLTF
|
||||
// materials. -Cosmic;2022-11-09
|
||||
bool identical = true; // true because it is anded below
|
||||
bool identical = true; // true because it is anded below
|
||||
bool identical_diffuse = false;
|
||||
bool identical_norm = false;
|
||||
bool identical_spec = false;
|
||||
|
|
@ -1071,12 +1076,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
{
|
||||
getChildView("color label")->setEnabled(editable);
|
||||
}
|
||||
LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("colorswatch");
|
||||
LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("colorswatch");
|
||||
|
||||
LLColor4 color = LLColor4::white;
|
||||
bool identical_color = false;
|
||||
LLColor4 color = LLColor4::white;
|
||||
bool identical_color = false;
|
||||
|
||||
if(color_swatch)
|
||||
if (color_swatch)
|
||||
{
|
||||
LLSelectedTE::getColor(color, identical_color);
|
||||
LLColor4 prev_color = color_swatch->get();
|
||||
|
|
@ -1110,7 +1115,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
|
||||
LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess");
|
||||
if (combobox_shininess)
|
||||
{
|
||||
{
|
||||
combobox_shininess->selectNthItem((S32)shiny);
|
||||
}
|
||||
|
||||
|
|
@ -1130,8 +1135,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
getChild<LLUICtrl>("shinycolorswatch")->setTentative(!identical_spec);
|
||||
|
||||
LLColorSwatchCtrl* mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
|
||||
if(mShinyColorSwatch)
|
||||
{
|
||||
if (mShinyColorSwatch)
|
||||
{
|
||||
mShinyColorSwatch->setValid(editable);
|
||||
mShinyColorSwatch->setEnabled( editable );
|
||||
mShinyColorSwatch->setCanApplyImmediately( editable );
|
||||
|
|
@ -1149,18 +1154,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
bumpy = norm_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
|
||||
|
||||
if (combobox_bumpiness)
|
||||
{
|
||||
{
|
||||
combobox_bumpiness->selectNthItem((S32)bumpy);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
LL_WARNS() << "failed childGetSelectionInterface for 'combobox bumpiness'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
getChildView("combobox bumpiness")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("combobox bumpiness")->setTentative(!identical_bumpy);
|
||||
getChildView("label bumpiness")->setEnabled(editable);
|
||||
}
|
||||
}
|
||||
|
||||
// Texture
|
||||
{
|
||||
|
|
@ -1174,25 +1179,25 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
bool identical_image_format = false;
|
||||
LLSelectedTE::getImageFormat(image_format, identical_image_format);
|
||||
|
||||
mIsAlpha = FALSE;
|
||||
switch (image_format)
|
||||
{
|
||||
case GL_RGBA:
|
||||
case GL_ALPHA:
|
||||
{
|
||||
mIsAlpha = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case GL_RGB: break;
|
||||
default:
|
||||
{
|
||||
LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
|
||||
}
|
||||
break;
|
||||
mIsAlpha = FALSE;
|
||||
switch (image_format)
|
||||
{
|
||||
case GL_RGBA:
|
||||
case GL_ALPHA:
|
||||
{
|
||||
mIsAlpha = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
if(LLViewerMedia::getInstance()->textureHasMedia(id))
|
||||
case GL_RGB: break;
|
||||
default:
|
||||
{
|
||||
LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (LLViewerMedia::getInstance()->textureHasMedia(id))
|
||||
{
|
||||
getChildView("button align")->setEnabled(editable);
|
||||
}
|
||||
|
|
@ -1244,7 +1249,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
}
|
||||
else if (id.isNull())
|
||||
{
|
||||
// None selected
|
||||
// None selected
|
||||
texture_ctrl->setTentative(FALSE);
|
||||
texture_ctrl->setEnabled(FALSE);
|
||||
texture_ctrl->setImageAssetID(LLUUID::null);
|
||||
|
|
@ -1257,7 +1262,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
}
|
||||
else
|
||||
{
|
||||
// Tentative: multiple selected with different textures
|
||||
// Tentative: multiple selected with different textures
|
||||
texture_ctrl->setTentative(TRUE);
|
||||
texture_ctrl->setEnabled(editable && !has_pbr_material);
|
||||
texture_ctrl->setImageAssetID(id);
|
||||
|
|
@ -1268,7 +1273,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
|
||||
texture_ctrl->setBakeTextureEnabled(TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (shinytexture_ctrl)
|
||||
|
|
@ -1526,15 +1530,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
combobox_texgen->selectNthItem(((S32)selected_texgen) >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
LL_WARNS() << "failed childGetSelectionInterface for 'combobox texgen'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
getChildView("combobox texgen")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("combobox texgen")->setTentative(!identical);
|
||||
getChildView("tex gen")->setEnabled(editable);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
U8 fullbright_flag = 0;
|
||||
|
|
@ -1564,7 +1567,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
|
||||
LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen");
|
||||
if (mComboTexGen)
|
||||
{
|
||||
{
|
||||
S32 index = mComboTexGen ? mComboTexGen->getCurrentIndex() : 0;
|
||||
bool enabled = editable && (index != 1);
|
||||
bool identical_repeats = true;
|
||||
|
|
@ -1660,14 +1663,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
if (!mIsAlpha)
|
||||
{ // ... unless there is no alpha channel in the texture, in which case alpha mode MUST ebe none
|
||||
alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
combobox_alphamode->selectNthItem(alpha_mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
getChild<LLUICtrl>("maskcutoff")->setValue(material->getAlphaMaskCutoff());
|
||||
updateAlphaControls();
|
||||
|
||||
|
|
@ -1679,15 +1682,15 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
texture_ctrl->setImageAssetID(material->getSpecularID());
|
||||
|
||||
if (!material->getSpecularID().isNull() && (shiny == SHINY_TEXTURE))
|
||||
{
|
||||
{
|
||||
material->getSpecularOffset(offset_x,offset_y);
|
||||
material->getSpecularRepeat(repeat_x,repeat_y);
|
||||
|
||||
if (identical_planar_texgen)
|
||||
{
|
||||
{
|
||||
repeat_x *= 2.0f;
|
||||
repeat_y *= 2.0f;
|
||||
}
|
||||
}
|
||||
|
||||
rot = material->getSpecularRotation();
|
||||
getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
|
||||
|
|
@ -1700,7 +1703,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
getChild<LLUICtrl>("mirror")->setValue(material->getEnvironmentIntensity());
|
||||
|
||||
updateShinyControls(!material->getSpecularID().isNull(), true);
|
||||
}
|
||||
}
|
||||
|
||||
// Assert desired colorswatch color to match material AFTER updateShinyControls
|
||||
// to avoid getting overwritten with the default on some UI state changes.
|
||||
|
|
@ -1768,14 +1771,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
pbr_ctrl->setEnabled(FALSE);
|
||||
}
|
||||
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
|
||||
if(texture_ctrl)
|
||||
if (texture_ctrl)
|
||||
{
|
||||
texture_ctrl->setImageAssetID( LLUUID::null );
|
||||
texture_ctrl->setEnabled( FALSE ); // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
|
||||
// texture_ctrl->setValid(FALSE);
|
||||
}
|
||||
LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
|
||||
if(mColorSwatch)
|
||||
if (mColorSwatch)
|
||||
{
|
||||
mColorSwatch->setEnabled( FALSE );
|
||||
mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
|
||||
|
|
@ -1890,7 +1893,6 @@ void LLPanelFace::updateCopyTexButton()
|
|||
&& (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1));
|
||||
std::string tooltip = (objectp && objectp->isInventoryPending()) ? LLTrans::getString("LoadingContents") : getString("paste_options");
|
||||
mMenuClipboardTexture->setToolTip(tooltip);
|
||||
|
||||
}
|
||||
|
||||
void LLPanelFace::refresh()
|
||||
|
|
@ -3050,7 +3052,11 @@ void LLPanelFace::onCommitPbr(const LLSD& data)
|
|||
{
|
||||
id = pbr_ctrl->getImageAssetID();
|
||||
}
|
||||
LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id);
|
||||
if (!LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id))
|
||||
{
|
||||
// If failed to set material, refresh pbr_ctrl's value
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3074,8 +3080,14 @@ void LLPanelFace::onSelectPbr(const LLSD& data)
|
|||
{
|
||||
id = pbr_ctrl->getImageAssetID();
|
||||
}
|
||||
LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id);
|
||||
LLSelectedTEMaterial::setMaterialID(this, id);
|
||||
if (LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id))
|
||||
{
|
||||
LLSelectedTEMaterial::setMaterialID(this, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,8 +138,9 @@ protected:
|
|||
void sendTexGen(); // applies and sends bump map
|
||||
void sendShiny(U32 shininess); // applies and sends shininess
|
||||
void sendFullbright(); // applies and sends full bright
|
||||
|
||||
void sendMirror();
|
||||
void sendGlow();
|
||||
void sendGlow();
|
||||
void alignTestureLayer();
|
||||
|
||||
void updateCopyTexButton();
|
||||
|
|
@ -262,7 +263,6 @@ protected:
|
|||
|
||||
|
||||
private:
|
||||
|
||||
bool isAlpha() { return mIsAlpha; }
|
||||
|
||||
// Convenience funcs to keep the visual flack to a minimum
|
||||
|
|
@ -271,10 +271,10 @@ private:
|
|||
LLUUID getCurrentSpecularMap();
|
||||
U32 getCurrentShininess();
|
||||
U32 getCurrentBumpiness();
|
||||
U8 getCurrentDiffuseAlphaMode();
|
||||
U8 getCurrentAlphaMaskCutoff();
|
||||
U8 getCurrentEnvIntensity();
|
||||
U8 getCurrentGlossiness();
|
||||
U8 getCurrentDiffuseAlphaMode();
|
||||
U8 getCurrentAlphaMaskCutoff();
|
||||
U8 getCurrentEnvIntensity();
|
||||
U8 getCurrentGlossiness();
|
||||
F32 getCurrentBumpyRot();
|
||||
F32 getCurrentBumpyScaleU();
|
||||
F32 getCurrentBumpyScaleV();
|
||||
|
|
@ -350,7 +350,7 @@ private:
|
|||
|
||||
U32 new_alpha_mode = new_material->getDiffuseAlphaMode();
|
||||
LLUUID new_normal_map_id = new_material->getNormalID();
|
||||
LLUUID new_spec_map_id = new_material->getSpecularID();
|
||||
LLUUID new_spec_map_id = new_material->getSpecularID();
|
||||
|
||||
if ((new_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) && !is_alpha_face)
|
||||
{
|
||||
|
|
@ -595,7 +595,6 @@ public:
|
|||
class LLSelectedTE
|
||||
{
|
||||
public:
|
||||
|
||||
static void getFace(class LLFace*& face_to_return, bool& identical_face);
|
||||
static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face);
|
||||
static void getTexId(LLUUID& id, bool& identical);
|
||||
|
|
|
|||
|
|
@ -1427,7 +1427,8 @@ void LLPanelObjectInventory::reset()
|
|||
LLEditMenuHandler::gEditMenuHandler = mFolders;
|
||||
}
|
||||
|
||||
LLRect scroller_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
|
||||
int offset = hasBorder() ? getBorder()->getBorderWidth() << 1 : 0;
|
||||
LLRect scroller_rect(0, getRect().getHeight() - offset, getRect().getWidth() - offset, 0);
|
||||
LLScrollContainer::Params scroll_p;
|
||||
scroll_p.name("task inventory scroller");
|
||||
scroll_p.rect(scroller_rect);
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
|
|||
avatar_data->fl_about_text = result["fl_about_text"].asString();
|
||||
avatar_data->born_on = result["member_since"].asDate();
|
||||
avatar_data->profile_url = getProfileURL(agent_id.asString());
|
||||
avatar_data->customer_type = result["customer_type"].asString();
|
||||
|
||||
avatar_data->flags = 0;
|
||||
|
||||
|
|
@ -1051,6 +1052,8 @@ void LLPanelProfileSecondLife::resetData()
|
|||
mCantEditObjectsIcon->setEnabled(false);
|
||||
|
||||
childSetVisible("partner_layout", FALSE);
|
||||
childSetVisible("badge_layout", FALSE);
|
||||
childSetVisible("partner_spacer_layout", TRUE);
|
||||
}
|
||||
|
||||
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
|
||||
|
|
@ -1258,6 +1261,59 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
|
|||
|
||||
std::string caption_text = getString("CaptionTextAcctInfo", args);
|
||||
getChild<LLUICtrl>("account_info")->setValue(caption_text);
|
||||
|
||||
const S32 LINDEN_EMPLOYEE_INDEX = 3;
|
||||
LLDate sl_release;
|
||||
sl_release.fromYMDHMS(2003, 6, 23, 0, 0, 0);
|
||||
std::string customer_lower = avatar_data->customer_type;
|
||||
LLStringUtil::toLower(customer_lower);
|
||||
if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX)
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Linden");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLinden"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (avatar_data->born_on < sl_release)
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBeta"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "beta_lifetime")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBetaLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "lifetime")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "secondlifetime_premium")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Premium_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "secondlifetime_premium_plus")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumPlusLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetVisible("badge_layout", FALSE);
|
||||
childSetVisible("partner_spacer_layout", TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelProfileSecondLife::fillRightsData()
|
||||
|
|
@ -1412,7 +1468,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
|
|||
}
|
||||
else
|
||||
{
|
||||
childSetVisible("frind_layout", false);
|
||||
childSetVisible("friend_layout", false);
|
||||
childSetVisible("online_layout", false);
|
||||
childSetVisible("offline_layout", false);
|
||||
}
|
||||
|
|
@ -1420,7 +1476,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
|
|||
|
||||
void LLPanelProfileSecondLife::processOnlineStatus(bool is_friend, bool show_online, bool online)
|
||||
{
|
||||
childSetVisible("frind_layout", is_friend);
|
||||
childSetVisible("friend_layout", is_friend);
|
||||
childSetVisible("online_layout", online && show_online);
|
||||
childSetVisible("offline_layout", !online && show_online);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -529,6 +529,7 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
|
|||
pick_name = parcel->getName();
|
||||
pick_desc = parcel->getDesc();
|
||||
snapshot_id = parcel->getSnapshotID();
|
||||
mPickDescription->setParseHTML(false);
|
||||
}
|
||||
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ void LLPanelWearing::onRemoveAttachment()
|
|||
{
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]);
|
||||
LLSelectMgr::getInstance()->sendDropAttachment();
|
||||
LLSelectMgr::getInstance()->sendDetach();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ void LLReflectionMap::autoAdjustOrigin()
|
|||
{
|
||||
int face = -1;
|
||||
LLVector4a intersection;
|
||||
LLDrawable* drawable = mGroup->lineSegmentIntersect(bounds[0], corners[i], true, false, true, &face, &intersection);
|
||||
LLDrawable* drawable = mGroup->lineSegmentIntersect(bounds[0], corners[i], false, false, true, &face, &intersection);
|
||||
if (drawable != nullptr)
|
||||
{
|
||||
hit = true;
|
||||
|
|
|
|||
|
|
@ -260,6 +260,10 @@ void LLReflectionMapManager::update()
|
|||
|
||||
if (probe != mDefaultProbe)
|
||||
{
|
||||
if (probe->mViewerObject) //make sure probes track the viewer objects they are attached to
|
||||
{
|
||||
probe->mOrigin.load3(probe->mViewerObject->getPositionAgent().mV);
|
||||
}
|
||||
d.setSub(camera_pos, probe->mOrigin);
|
||||
probe->mDistance = d.getLength3().getF32() - probe->mRadius;
|
||||
}
|
||||
|
|
@ -952,8 +956,9 @@ void LLReflectionMapManager::updateUniforms()
|
|||
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
|
||||
F32 minimum_ambiance = psky->getTotalReflectionProbeAmbiance(cloud_shadow_scale, should_auto_adjust);
|
||||
|
||||
F32 ambscale = gCubeSnapshot && !isRadiancePass() ? 0.f : 1.f;
|
||||
F32 radscale = gCubeSnapshot && !isRadiancePass() ? 0.5f : 1.f;
|
||||
bool is_ambiance_pass = gCubeSnapshot && !isRadiancePass();
|
||||
F32 ambscale = is_ambiance_pass ? 0.f : 1.f;
|
||||
F32 radscale = is_ambiance_pass ? 0.5f : 1.f;
|
||||
|
||||
for (auto* refmap : mReflectionMaps)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ void LLScriptEditor::drawSelectionBackground()
|
|||
// Draw selection even if we don't have keyboard focus for search/replace
|
||||
if( hasSelection() && !mLineInfoList.empty())
|
||||
{
|
||||
std::vector<LLRect> selection_rects = getSelctionRects();
|
||||
std::vector<LLRect> selection_rects = getSelectionRects();
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
const LLColor4& color = mReadOnly ? mReadOnlyFgColor : mFgColor;
|
||||
|
|
|
|||
|
|
@ -1821,7 +1821,7 @@ void LLObjectSelection::applyNoCopyPbrMaterialToTEs(LLViewerInventoryItem* item)
|
|||
// selectionSetImage()
|
||||
//-----------------------------------------------------------------------------
|
||||
// *TODO: re-arch texture applying out of lltooldraganddrop
|
||||
void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
||||
bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
||||
{
|
||||
// First for (no copy) textures and multiple object selection
|
||||
LLViewerInventoryItem* item = gInventory.getItem(imageid);
|
||||
|
|
@ -1829,9 +1829,11 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
|||
&& !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())
|
||||
&& (mSelectedObjects->getNumNodes() > 1) )
|
||||
{
|
||||
LL_WARNS() << "Attempted to apply no-copy texture to multiple objects"
|
||||
<< LL_ENDL;
|
||||
return;
|
||||
LL_DEBUGS() << "Attempted to apply no-copy texture " << imageid
|
||||
<< " to multiple objects" << LL_ENDL;
|
||||
|
||||
LLNotificationsUtil::add("FailedToApplyTextureNoCopyToMultiple");
|
||||
return false;
|
||||
}
|
||||
|
||||
struct f : public LLSelectedTEFunctor
|
||||
|
|
@ -1896,12 +1898,14 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
|||
}
|
||||
} sendfunc(item);
|
||||
getSelection()->applyToObjects(&sendfunc);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// selectionSetGLTFMaterial()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
||||
bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
||||
{
|
||||
// First for (no copy) textures and multiple object selection
|
||||
LLViewerInventoryItem* item = gInventory.getItem(mat_id);
|
||||
|
|
@ -1909,9 +1913,11 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
|||
&& !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())
|
||||
&& (mSelectedObjects->getNumNodes() > 1))
|
||||
{
|
||||
LL_WARNS() << "Attempted to apply no-copy material to multiple objects"
|
||||
<< LL_ENDL;
|
||||
return;
|
||||
LL_DEBUGS() << "Attempted to apply no-copy material " << mat_id
|
||||
<< "to multiple objects" << LL_ENDL;
|
||||
|
||||
LLNotificationsUtil::add("FailedToApplyGLTFNoCopyToMultiple");
|
||||
return false;
|
||||
}
|
||||
|
||||
struct f : public LLSelectedTEFunctor
|
||||
|
|
@ -1983,6 +1989,8 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
|||
getSelection()->applyToObjects(&sendfunc);
|
||||
|
||||
LLGLTFMaterialList::flushUpdates();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -634,8 +634,8 @@ public:
|
|||
void selectionSetDensity(F32 density);
|
||||
void selectionSetRestitution(F32 restitution);
|
||||
void selectionSetMaterial(U8 material);
|
||||
void selectionSetImage(const LLUUID& imageid); // could be item or asset id
|
||||
void selectionSetGLTFMaterial(const LLUUID& mat_id); // could be item or asset id
|
||||
bool selectionSetImage(const LLUUID& imageid); // could be item or asset id
|
||||
bool selectionSetGLTFMaterial(const LLUUID& mat_id); // could be item or asset id
|
||||
void selectionSetColor(const LLColor4 &color);
|
||||
void selectionSetColorOnly(const LLColor4 &color); // Set only the RGB channels
|
||||
void selectionSetAlphaOnly(const F32 alpha); // Set only the alpha channel
|
||||
|
|
|
|||
|
|
@ -719,6 +719,8 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
|
|||
F32 g = getGamma();
|
||||
|
||||
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
|
||||
static LLCachedControl<F32> auto_adjust_ambient_scale(gSavedSettings, "RenderSkyAutoAdjustAmbientScale", 0.75f);
|
||||
static LLCachedControl<F32> auto_adjust_hdr_scale(gSavedSettings, "RenderSkyAutoAdjustHDRScale", 2.f);
|
||||
|
||||
static LLCachedControl<F32> cloud_shadow_scale(gSavedSettings, "RenderCloudShadowAmbianceFactor", 0.125f);
|
||||
F32 probe_ambiance = getTotalReflectionProbeAmbiance(cloud_shadow_scale);
|
||||
|
|
@ -736,9 +738,9 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
|
|||
}
|
||||
else if (psky->canAutoAdjust() && should_auto_adjust)
|
||||
{ // auto-adjust legacy sky to take advantage of probe ambiance
|
||||
shader->uniform3fv(LLShaderMgr::AMBIENT, (ambient * 0.5f).mV);
|
||||
shader->uniform1f(LLShaderMgr::SKY_HDR_SCALE, 2.f);
|
||||
probe_ambiance = 1.f;
|
||||
shader->uniform3fv(LLShaderMgr::AMBIENT, (ambient * auto_adjust_ambient_scale).mV);
|
||||
shader->uniform1f(LLShaderMgr::SKY_HDR_SCALE, auto_adjust_hdr_scale);
|
||||
probe_ambiance = 1.f; // NOTE -- must match LLSettingsSky::getReflectionProbeAmbiance value for "auto_adjust" true
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -777,7 +777,8 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
|
|||
assert_states_valid(this);
|
||||
}
|
||||
|
||||
void LLSpatialGroup::destroyGL(bool keep_occlusion)
|
||||
|
||||
void LLSpatialGroup::destroyGLState(bool keep_occlusion)
|
||||
{
|
||||
setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY);
|
||||
|
||||
|
|
@ -1290,45 +1291,11 @@ void drawBoxOutline(const LLVector4a& pos, const LLVector4a& size)
|
|||
drawBoxOutline(reinterpret_cast<const LLVector3&>(pos), reinterpret_cast<const LLVector3&>(size));
|
||||
}
|
||||
|
||||
class LLOctreeDirty : public OctreeTraveler
|
||||
{
|
||||
public:
|
||||
virtual void visit(const OctreeNode* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
group->destroyGL();
|
||||
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
|
||||
if(!drawable)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (drawable->getVObj().notNull() && !group->getSpatialPartition()->mRenderByGroup)
|
||||
{
|
||||
gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
for (LLSpatialGroup::bridge_list_t::iterator i = group->mBridgeList.begin(); i != group->mBridgeList.end(); ++i)
|
||||
{
|
||||
LLSpatialBridge* bridge = *i;
|
||||
traverse(bridge->mOctree);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void LLSpatialPartition::restoreGL()
|
||||
{
|
||||
}
|
||||
|
||||
void LLSpatialPartition::resetVertexBuffers()
|
||||
{
|
||||
LLOctreeDirty dirty;
|
||||
dirty.traverse(mOctree);
|
||||
}
|
||||
|
||||
BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
|
||||
|
|
|
|||
|
|
@ -295,7 +295,9 @@ public:
|
|||
BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE);
|
||||
BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group
|
||||
void shift(const LLVector4a &offset);
|
||||
void destroyGL(bool keep_occlusion = false);
|
||||
|
||||
// TODO: this no longer appears to be called, figure out if it's important and if not remove it
|
||||
void destroyGLState(bool keep_occlusion = false);
|
||||
|
||||
void updateDistance(LLCamera& camera);
|
||||
F32 getUpdateUrgency() const;
|
||||
|
|
@ -419,7 +421,6 @@ public:
|
|||
void renderDebug();
|
||||
void renderIntersectingBBoxes(LLCamera* camera);
|
||||
void restoreGL();
|
||||
void resetVertexBuffers();
|
||||
|
||||
BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax);
|
||||
|
||||
|
|
|
|||
|
|
@ -1396,8 +1396,16 @@ bool idle_startup()
|
|||
}
|
||||
else if (regionp->capabilitiesError())
|
||||
{
|
||||
// Try to connect despite capabilities' error state
|
||||
LLStartUp::setStartupState(STATE_SEED_CAP_GRANTED);
|
||||
LL_WARNS("AppInit") << "Failed to get capabilities. Backing up to login screen!" << LL_ENDL;
|
||||
if (gRememberPassword)
|
||||
{
|
||||
LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("LoginPacketNeverReceivedNoTP", LLSD(), LLSD(), login_alert_status);
|
||||
}
|
||||
reset_login();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1901,6 +1909,7 @@ bool idle_startup()
|
|||
LLNotificationsUtil::add("InventoryUnusable");
|
||||
}
|
||||
|
||||
LLInventoryModelBackgroundFetch::instance().start();
|
||||
gInventory.createCommonSystemCategories();
|
||||
|
||||
// It's debatable whether this flag is a good idea - sets all
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "llfloatertools.h"
|
||||
#include "llgesturemgr.h"
|
||||
#include "llgiveinventory.h"
|
||||
#include "llgltfmateriallist.h"
|
||||
#include "llhudmanager.h"
|
||||
#include "llhudeffecttrail.h"
|
||||
#include "llimview.h"
|
||||
|
|
@ -1095,6 +1096,9 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj,
|
|||
LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no material item." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// SL-20013 must save asset_id before handleDropMaterialProtections since our item instance
|
||||
// may be deleted if it is moved into task inventory
|
||||
LLUUID asset_id = item->getAssetUUID();
|
||||
BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
|
||||
if (!success)
|
||||
|
|
@ -1102,6 +1106,12 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj,
|
|||
return;
|
||||
}
|
||||
|
||||
if (asset_id.isNull())
|
||||
{
|
||||
// use blank material
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
|
||||
hit_obj->setRenderMaterialID(hit_face, asset_id);
|
||||
|
||||
dialog_refresh_all();
|
||||
|
|
@ -1121,13 +1131,23 @@ void LLToolDragAndDrop::dropMaterialAllFaces(LLViewerObject* hit_obj,
|
|||
LL_WARNS() << "LLToolDragAndDrop::dropTextureAllFaces no material item." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// SL-20013 must save asset_id before handleDropMaterialProtections since our item instance
|
||||
// may be deleted if it is moved into task inventory
|
||||
LLUUID asset_id = item->getAssetUUID();
|
||||
BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (asset_id.isNull())
|
||||
{
|
||||
// use blank material
|
||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
|
||||
hit_obj->setRenderMaterialIDs(asset_id);
|
||||
dialog_refresh_all();
|
||||
// send the update to the simulator
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -59,11 +59,12 @@ class LLTranslate: public LLSingleton<LLTranslate>
|
|||
public :
|
||||
|
||||
typedef enum e_service {
|
||||
SERVICE_BING,
|
||||
SERVICE_AZURE,
|
||||
SERVICE_GOOGLE,
|
||||
SERVICE_DEEPL,
|
||||
} EService;
|
||||
|
||||
typedef boost::function<void(EService, bool)> KeyVerificationResult_fn;
|
||||
typedef boost::function<void(EService, bool, S32)> KeyVerificationResult_fn;
|
||||
typedef boost::function<void(std::string , std::string )> TranslationSuccess_fn;
|
||||
typedef boost::function<void(int, std::string)> TranslationFailure_fn;
|
||||
|
||||
|
|
@ -78,12 +79,12 @@ public :
|
|||
static void translateMessage(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, TranslationSuccess_fn success, TranslationFailure_fn failure);
|
||||
|
||||
/**
|
||||
* Verify given API key of a translation service.
|
||||
*
|
||||
* @param receiver Object to pass verification result to.
|
||||
* @param key Key to verify.
|
||||
*/
|
||||
static void verifyKey(EService service, const std::string &key, KeyVerificationResult_fn fnc);
|
||||
* Verify given API key of a translation service.
|
||||
*
|
||||
* @param receiver Object to pass verification result to.
|
||||
* @param key Key to verify.
|
||||
*/
|
||||
static void verifyKey(EService service, const LLSD &key, KeyVerificationResult_fn fnc);
|
||||
|
||||
/**
|
||||
* @return translation target language
|
||||
|
|
|
|||
|
|
@ -700,6 +700,7 @@ void settings_setup_listeners()
|
|||
setting_setup_signal_listener(gSavedSettings, "RenderUIBuffer", handleWindowResized);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderDepthOfField", handleReleaseGLBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderFSAASamples", handleReleaseGLBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderPostProcessingHDR", handleReleaseGLBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderSpecularResX", handleLUTBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged);
|
||||
|
|
@ -708,6 +709,8 @@ void settings_setup_listeners()
|
|||
setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleReleaseGLBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderGlow", handleSetShaderChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderGlowResolutionPow", handleReleaseGLBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderGlowHDR", handleReleaseGLBufferChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderGlowNoise", handleSetShaderChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderGammaFull", handleSetShaderChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderVolumeLODFactor", handleVolumeLODChanged);
|
||||
setting_setup_signal_listener(gSavedSettings, "RenderAvatarLODFactor", handleAvatarLODChanged);
|
||||
|
|
|
|||
|
|
@ -1597,7 +1597,8 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
|
|||
|
||||
BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down)
|
||||
{
|
||||
BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down);
|
||||
bool is_toolmgr_action = false;
|
||||
BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action);
|
||||
|
||||
if (clicktype != CLICK_NONE)
|
||||
{
|
||||
|
|
@ -1616,7 +1617,7 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask,
|
|||
|
||||
// If the first LMB click is handled by the menu, skip the following double click
|
||||
static bool skip_double_click = false;
|
||||
if (clicktype == CLICK_LEFT && down )
|
||||
if (clicktype == CLICK_LEFT && down && !is_toolmgr_action)
|
||||
{
|
||||
skip_double_click = handled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7826,10 +7826,6 @@ class LLToggleShaderControl : public view_listener_t
|
|||
BOOL checked = gSavedSettings.getBOOL( control_name );
|
||||
gSavedSettings.setBOOL( control_name, !checked );
|
||||
LLPipeline::refreshCachedSettings();
|
||||
//gPipeline.updateRenderDeferred();
|
||||
//gPipeline.releaseGLBuffers();
|
||||
//gPipeline.createGLBuffers();
|
||||
//gPipeline.resetVertexBuffers();
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
return !checked;
|
||||
}
|
||||
|
|
@ -8560,6 +8556,9 @@ class LLViewHighlightTransparent : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha;
|
||||
|
||||
// invisible objects skip building their render batches unless sShowDebugAlpha is true, so rebuild batches whenever toggling this flag
|
||||
gPipeline.rebuildDrawInfo();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1532,7 +1532,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
|
|||
LLFloaterReg::showInstance("preview_sound", LLSD(obj_id), take_focus);
|
||||
break;
|
||||
case LLAssetType::AT_MATERIAL:
|
||||
LLFloaterReg::showInstance("material editor", LLSD(obj_id), take_focus);
|
||||
LLFloaterReg::showInstance("material_editor", LLSD(obj_id), take_focus);
|
||||
break;
|
||||
default:
|
||||
LL_DEBUGS("Messaging") << "No preview method for previewable asset type : " << LLAssetType::lookupHumanReadable(asset_type) << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -418,6 +418,7 @@ void LLViewerObject::markDead()
|
|||
{
|
||||
if (!mDead)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
//LL_INFOS() << "Marking self " << mLocalID << " as dead." << LL_ENDL;
|
||||
|
||||
// Root object of this hierarchy unlinks itself.
|
||||
|
|
@ -1153,6 +1154,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
const EObjectUpdateType update_type,
|
||||
LLDataPacker *dp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL;
|
||||
|
||||
LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL;
|
||||
|
|
@ -1269,7 +1271,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
LL_INFOS() << "Full:" << getID() << LL_ENDL;
|
||||
#endif
|
||||
//clear cost and linkset cost
|
||||
mCostStale = true;
|
||||
setObjectCostStale();
|
||||
if (isSelected())
|
||||
{
|
||||
gFloaterTools->dirty();
|
||||
|
|
@ -1825,7 +1827,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
#ifdef DEBUG_UPDATE_TYPE
|
||||
LL_INFOS() << "CompFull:" << getID() << LL_ENDL;
|
||||
#endif
|
||||
mCostStale = true;
|
||||
setObjectCostStale();
|
||||
|
||||
if (isSelected())
|
||||
{
|
||||
|
|
@ -3779,6 +3781,16 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)
|
|||
}
|
||||
}
|
||||
|
||||
void LLViewerObject::setObjectCostStale()
|
||||
{
|
||||
mCostStale = true;
|
||||
// *NOTE: This is harmlessly redundant for Blinn-Phong material updates, as
|
||||
// the root prim currently gets set stale anyway due to other property
|
||||
// updates. But it is needed for GLTF material ID updates.
|
||||
// -Cosmic,2023-06-27
|
||||
getRootEdit()->mCostStale = true;
|
||||
}
|
||||
|
||||
void LLViewerObject::setObjectCost(F32 cost)
|
||||
{
|
||||
mObjectCost = cost;
|
||||
|
|
@ -6818,7 +6830,7 @@ void LLViewerObject::setPhysicsShapeType(U8 type)
|
|||
if (type != mPhysicsShapeType)
|
||||
{
|
||||
mPhysicsShapeType = type;
|
||||
mCostStale = true;
|
||||
setObjectCostStale();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7325,6 +7337,12 @@ void LLViewerObject::setRenderMaterialID(S32 te_in, const LLUUID& id, bool updat
|
|||
LLGLTFMaterialList::queueApply(this, te, id);
|
||||
}
|
||||
}
|
||||
|
||||
if (!update_server)
|
||||
{
|
||||
// Land impact may have changed
|
||||
setObjectCostStale();
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerObject::setRenderMaterialIDs(const LLUUID& id)
|
||||
|
|
|
|||
|
|
@ -638,6 +638,7 @@ public:
|
|||
std::vector<LLVector3> mUnselectedChildrenPositions ;
|
||||
|
||||
private:
|
||||
void setObjectCostStale();
|
||||
bool isAssetInInventory(LLViewerInventoryItem* item);
|
||||
|
||||
ExtraParameter* createNewParameterEntry(U16 param_type);
|
||||
|
|
|
|||
|
|
@ -1353,6 +1353,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
|
|||
|
||||
BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// Don't ever kill gAgentAvatarp, just force it to the agent's region
|
||||
// unless region is NULL which is assumed to mean you are logging out.
|
||||
if ((objectp == gAgentAvatarp) && gAgent.getRegion())
|
||||
|
|
@ -1379,6 +1380,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
|
|||
|
||||
void LLViewerObjectList::killObjects(LLViewerRegion *regionp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLViewerObject *objectp;
|
||||
|
||||
|
||||
|
|
@ -1438,6 +1440,8 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer)
|
|||
return;
|
||||
}
|
||||
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
S32 num_removed = 0;
|
||||
LLViewerObject *objectp;
|
||||
|
||||
|
|
|
|||
|
|
@ -716,6 +716,7 @@ static LLTrace::BlockTimerStatHandle FTM_SAVE_REGION_CACHE("Save Region Cache");
|
|||
|
||||
LLViewerRegion::~LLViewerRegion()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mDead = TRUE;
|
||||
mImpl->mActiveSet.clear();
|
||||
mImpl->mVisibleEntries.clear();
|
||||
|
|
@ -1590,6 +1591,7 @@ void LLViewerRegion::lightIdleUpdate()
|
|||
|
||||
void LLViewerRegion::idleUpdate(F32 max_update_time)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLTimer update_timer;
|
||||
F32 max_time;
|
||||
|
||||
|
|
@ -1693,6 +1695,10 @@ BOOL LLViewerRegion::isViewerCameraStatic()
|
|||
|
||||
void LLViewerRegion::killInvisibleObjects(F32 max_time)
|
||||
{
|
||||
#if 1 // TODO: kill this. This is ill-conceived, objects that aren't in the camera frustum should not be deleted from memory.
|
||||
// because of this, every time you turn around the simulator sends a swarm of full object update messages from cache
|
||||
// probe misses and objects have to be reloaded from scratch. From some reason, disabling this causes holes to
|
||||
// appear in the scene when flying back and forth between regions
|
||||
if(!sVOCacheCullingEnabled)
|
||||
{
|
||||
return;
|
||||
|
|
@ -1769,6 +1775,7 @@ void LLViewerRegion::killInvisibleObjects(F32 max_time)
|
|||
}
|
||||
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue