# Conflicts:
#	indra/llappearance/llavatarappearance.h
#	indra/llcharacter/llcharacter.cpp
#	indra/llcharacter/llcharacter.h
#	indra/llcharacter/lljoint.cpp
#	indra/llcharacter/lljoint.h
#	indra/llimage/llimagedimensionsinfo.cpp
#	indra/llprimitive/lldaeloader.h
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewer.h
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llpanelface.cpp
#	indra/newview/llpanelmaininventory.cpp
#	indra/newview/llpanelprofilepicks.cpp
#	indra/newview/llpanelprofilepicks.h
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/llvoavatar.h
#	indra/newview/llvoavatarself.cpp
#	indra/newview/llvoavatarself.h
#	indra/newview/llwatchdog.cpp
#	indra/newview/llwatchdog.h
master
Ansariel 2025-05-03 15:45:54 +02:00
commit fef4f9a07e
55 changed files with 739 additions and 640 deletions

View File

@ -140,10 +140,7 @@ public:
LLVector3 mHeadOffset{}; // current head position
LLAvatarJoint* mRoot{ nullptr };
//<FS:Ansariel> Joint-lookup improvements
// typedef std::map<std::string, LLJoint*> joint_map_t;
typedef std::map<std::string, LLJoint*, std::less<>> joint_map_t;
joint_map_t mJointMap;
typedef std::map<std::string, LLVector3> joint_state_map_t;
@ -156,7 +153,7 @@ public:
public:
typedef std::vector<LLAvatarJoint*> avatar_joint_list_t;
const avatar_joint_list_t& getSkeleton() { return mSkeleton; }
typedef std::map<std::string, std::string> joint_alias_map_t;
typedef std::map<std::string, std::string, std::less<>> joint_alias_map_t;
const joint_alias_map_t& getJointAliases();

View File

@ -131,7 +131,7 @@ LLQuaternion::Order bvhStringToOrder( char *str )
// LLBVHLoader()
//-----------------------------------------------------------------------------
LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map )
LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string, std::less<>>& joint_alias_map )
{
reset();
errorLine = 0;

View File

@ -227,7 +227,7 @@ class LLBVHLoader
friend class LLKeyframeMotion;
public:
// Constructor
LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map );
LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string, std::less<>>& joint_alias_map );
~LLBVHLoader();
/*

View File

@ -77,14 +77,11 @@ LLCharacter::~LLCharacter()
//-----------------------------------------------------------------------------
// getJoint()
//-----------------------------------------------------------------------------
//<FS:Ansariel> Joint-lookup improvements
//LLJoint *LLCharacter::getJoint( const std::string &name )
LLJoint* LLCharacter::getJoint(std::string_view name)
{
LLJoint* joint = NULL;
LLJoint* joint = nullptr;
LLJoint *root = getRootJoint();
if (root)
if (LLJoint* root = getRootJoint())
{
joint = root->findJoint(name);
}

View File

@ -76,8 +76,6 @@ public:
// get the specified joint
// default implementation does recursive search,
// subclasses may optimize/cache results.
//<FS:Ansariel> Joint-lookup improvements
// virtual LLJoint *getJoint( const std::string &name );
virtual LLJoint* getJoint(std::string_view name);
// get the position of the character

View File

@ -242,8 +242,6 @@ LLJoint *LLJoint::getRoot()
//-----------------------------------------------------------------------------
// findJoint()
//-----------------------------------------------------------------------------
//<FS:Ansariel> Joint-lookup improvements
//LLJoint *LLJoint::findJoint( const std::string &name )
LLJoint* LLJoint::findJoint(std::string_view name)
{
if (name == getName())
@ -253,15 +251,14 @@ LLJoint *LLJoint::findJoint(std::string_view name)
{
if(joint)
{
LLJoint *found = joint->findJoint(name);
if (found)
if (LLJoint* found = joint->findJoint(name))
{
return found;
}
}
}
return NULL;
return nullptr;
}

View File

@ -222,8 +222,6 @@ public:
LLJoint *getRoot();
// search for child joints by name
//<FS:Ansariel> Joint-lookup improvements
//LLJoint *findJoint( const std::string &name );
LLJoint* findJoint(std::string_view name);
// add/remove children

View File

@ -69,7 +69,7 @@ public:
// Called from MAIN THREAD.
void pause();
void unpause();
bool isPaused() { return isStopped() || mPaused; }
bool isPaused() const { return isStopped() || mPaused; }
// Cause the thread to wake up and check its condition
void wake();

View File

@ -75,7 +75,7 @@ bool LLImageDimensionsInfo::load(const std::string& src_filename,U32 codec)
bool LLImageDimensionsInfo::getImageDimensionsBmp()
{
// Make sure the file is long enough.
const S32 DATA_LEN = 26; // BMP header (14) + DIB header size (4) + width (4) + height (4)
constexpr S32 DATA_LEN = 26; // BMP header (14) + DIB header size (4) + width (4) + height (4)
if (!checkFileLength(DATA_LEN))
{
LL_WARNS() << "Premature end of file" << LL_ENDL;
@ -105,7 +105,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp()
bool LLImageDimensionsInfo::getImageDimensionsTga()
{
const S32 TGA_FILE_HEADER_SIZE = 12;
constexpr S32 TGA_FILE_HEADER_SIZE = 12;
// Make sure the file is long enough.
if (!checkFileLength(TGA_FILE_HEADER_SIZE + 1 /* width */ + 1 /* height */))
@ -124,7 +124,7 @@ bool LLImageDimensionsInfo::getImageDimensionsTga()
bool LLImageDimensionsInfo::getImageDimensionsPng()
{
const S32 PNG_MAGIC_SIZE = 8;
constexpr S32 PNG_MAGIC_SIZE = 8;
// Make sure the file is long enough.
if (!checkFileLength(PNG_MAGIC_SIZE + 8 + sizeof(S32) * 2 /* width, height */))
@ -134,7 +134,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng()
}
// Read PNG signature.
const U8 png_magic[PNG_MAGIC_SIZE] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
constexpr U8 png_magic[PNG_MAGIC_SIZE] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
U8 signature[PNG_MAGIC_SIZE];
mInfile.read((void*)signature, PNG_MAGIC_SIZE);
@ -167,35 +167,35 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg()
sJpegErrorEncountered = false;
clean();
FILE* fp = LLFile::fopen(mSrcFilename, "rb");
if (fp == NULL)
if (!fp)
{
setLastError("Unable to open file for reading", mSrcFilename);
return false;
}
/* Make sure this is a JPEG file. */
const size_t JPEG_MAGIC_SIZE = 2;
const U8 jpeg_magic[JPEG_MAGIC_SIZE] = {0xFF, 0xD8};
constexpr size_t JPEG_MAGIC_SIZE = 2;
constexpr U8 jpeg_magic[JPEG_MAGIC_SIZE] = {0xFF, 0xD8};
U8 signature[JPEG_MAGIC_SIZE];
if (fread(signature, sizeof(signature), 1, fp) != 1)
{
LL_WARNS() << "Premature end of file" << LL_ENDL;
fclose(fp); // <FS:Ansariel> Don't leak the file handle
fclose(fp);
return false;
}
if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0)
{
LL_WARNS() << "Not a JPEG" << LL_ENDL;
mWarning = "texture_load_format_error";
fclose(fp); // <FS:ND/> Don't leak the file handle
fclose(fp);
return false;
}
fseek(fp, 0, SEEK_SET); // go back to start of the file
/* Init jpeg */
jpeg_error_mgr jerr;
jpeg_decompress_struct cinfo;
jpeg_decompress_struct cinfo{};
cinfo.err = jpeg_std_error(&jerr);
// Call our function instead of exit() if Libjpeg encounters an error.
// This is done to avoid crash in this case (STORM-472).

View File

@ -38,7 +38,7 @@ class LLImageDimensionsInfo
{
public:
LLImageDimensionsInfo():
mData(NULL)
mData(nullptr)
,mHeight(0)
,mWidth(0)
{}
@ -67,7 +67,7 @@ protected:
{
mInfile.close();
delete[] mData;
mData = NULL;
mData = nullptr;
mWidth = 0;
mHeight = 0;
}

View File

@ -554,7 +554,20 @@ public:
opj_set_warning_handler(encoder, opj_warn, this);
opj_set_error_handler(encoder, opj_error, this);
U32 tile_count = (rawImageIn.getWidth() >> 6) * (rawImageIn.getHeight() >> 6);
U32 width_tiles = (rawImageIn.getWidth() >> 6);
U32 height_tiles = (rawImageIn.getHeight() >> 6);
// Allow images with a width or height that are MIN_IMAGE_SIZE <= x < 64
if (width_tiles == 0 && (rawImageIn.getWidth() >= MIN_IMAGE_SIZE))
{
width_tiles = 1;
}
if (height_tiles == 0 && (rawImageIn.getHeight() >= MIN_IMAGE_SIZE))
{
height_tiles = 1;
}
U32 tile_count = width_tiles * height_tiles;
U32 data_size_guess = tile_count * TILE_SIZE;
// will be freed in opj_free_user_data_write
@ -915,12 +928,11 @@ bool LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
{
JPEG2KEncode encode(comment_text, reversible);
bool encoded = encode.encode(raw_image, base);
if (encoded)
if (!encoded)
{
LL_WARNS() << "Openjpeg encoding implementation isn't complete, returning false" << LL_ENDL;
LL_WARNS() << "Openjpeg encoding was unsuccessful, returning false" << LL_ENDL;
}
return encoded;
//return false;
}
bool LLImageJ2COJ::getMetadata(LLImageJ2C &base)

View File

@ -37,98 +37,98 @@
#include "llsettingsdaycycle.h"
// Grid out of which parcels taken is stepped every 4 meters.
const F32 PARCEL_GRID_STEP_METERS = 4.f;
constexpr F32 PARCEL_GRID_STEP_METERS = 4.f;
// Area of one "square" of parcel
const S32 PARCEL_UNIT_AREA = 16;
constexpr S32 PARCEL_UNIT_AREA = 16;
// Height _above_ground_ that parcel boundary ends
const F32 PARCEL_HEIGHT = 50.f;
constexpr F32 PARCEL_HEIGHT = 50.f;
//Height above ground which parcel boundries exist for explicitly banned avatars
const F32 BAN_HEIGHT = 5000.f;
constexpr F32 BAN_HEIGHT = 5000.f;
// Maximum number of entries in an access list
const S32 PARCEL_MAX_ACCESS_LIST = 300;
constexpr S32 PARCEL_MAX_ACCESS_LIST = 300;
//Maximum number of entires in an update packet
//for access/ban lists.
const F32 PARCEL_MAX_ENTRIES_PER_PACKET = 48.f;
constexpr F32 PARCEL_MAX_ENTRIES_PER_PACKET = 48.f;
// Maximum number of experiences
const S32 PARCEL_MAX_EXPERIENCE_LIST = 24;
constexpr S32 PARCEL_MAX_EXPERIENCE_LIST = 24;
// Weekly charge for listing a parcel in the directory
const S32 PARCEL_DIRECTORY_FEE = 30;
constexpr S32 PARCEL_DIRECTORY_FEE = 30;
const S32 PARCEL_PASS_PRICE_DEFAULT = 10;
const F32 PARCEL_PASS_HOURS_DEFAULT = 1.f;
constexpr S32 PARCEL_PASS_PRICE_DEFAULT = 10;
constexpr F32 PARCEL_PASS_HOURS_DEFAULT = 1.f;
// Number of "chunks" in which parcel overlay data is sent
// Chunk 0 = southern rows, entire width
const S32 PARCEL_OVERLAY_CHUNKS = 4;
constexpr S32 PARCEL_OVERLAY_CHUNKS = 4;
// Bottom three bits are a color index for the land overlay
const U8 PARCEL_COLOR_MASK = 0x07;
const U8 PARCEL_PUBLIC = 0x00;
const U8 PARCEL_OWNED = 0x01;
const U8 PARCEL_GROUP = 0x02;
const U8 PARCEL_SELF = 0x03;
const U8 PARCEL_FOR_SALE = 0x04;
const U8 PARCEL_AUCTION = 0x05;
constexpr U8 PARCEL_COLOR_MASK = 0x07;
constexpr U8 PARCEL_PUBLIC = 0x00;
constexpr U8 PARCEL_OWNED = 0x01;
constexpr U8 PARCEL_GROUP = 0x02;
constexpr U8 PARCEL_SELF = 0x03;
constexpr U8 PARCEL_FOR_SALE = 0x04;
constexpr U8 PARCEL_AUCTION = 0x05;
// unused 0x06
// unused 0x07
// flag, unused 0x08
const U8 PARCEL_HIDDENAVS = 0x10; // avatars not visible outside of parcel. Used for 'see avs' feature, but must be off for compatibility
const U8 PARCEL_SOUND_LOCAL = 0x20;
const U8 PARCEL_WEST_LINE = 0x40; // flag, property line on west edge
const U8 PARCEL_SOUTH_LINE = 0x80; // flag, property line on south edge
constexpr U8 PARCEL_HIDDENAVS = 0x10; // avatars not visible outside of parcel. Used for 'see avs' feature, but must be off for compatibility
constexpr U8 PARCEL_SOUND_LOCAL = 0x20;
constexpr U8 PARCEL_WEST_LINE = 0x40; // flag, property line on west edge
constexpr U8 PARCEL_SOUTH_LINE = 0x80; // flag, property line on south edge
// Transmission results for parcel properties
const S32 PARCEL_RESULT_NO_DATA = -1;
const S32 PARCEL_RESULT_SUCCESS = 0; // got exactly one parcel
const S32 PARCEL_RESULT_MULTIPLE = 1; // got multiple parcels
constexpr S32 PARCEL_RESULT_NO_DATA = -1;
constexpr S32 PARCEL_RESULT_SUCCESS = 0; // got exactly one parcel
constexpr S32 PARCEL_RESULT_MULTIPLE = 1; // got multiple parcels
const S32 SELECTED_PARCEL_SEQ_ID = -10000;
const S32 COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID = -20000;
const S32 COLLISION_BANNED_PARCEL_SEQ_ID = -30000;
const S32 COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID = -40000;
const S32 HOVERED_PARCEL_SEQ_ID = -50000;
constexpr S32 SELECTED_PARCEL_SEQ_ID = -10000;
constexpr S32 COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID = -20000;
constexpr S32 COLLISION_BANNED_PARCEL_SEQ_ID = -30000;
constexpr S32 COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID = -40000;
constexpr S32 HOVERED_PARCEL_SEQ_ID = -50000;
const U32 RT_NONE = 0x1 << 0;
const U32 RT_OWNER = 0x1 << 1;
const U32 RT_GROUP = 0x1 << 2;
const U32 RT_OTHER = 0x1 << 3;
const U32 RT_LIST = 0x1 << 4;
const U32 RT_SELL = 0x1 << 5;
constexpr U32 RT_NONE = 0x1 << 0;
constexpr U32 RT_OWNER = 0x1 << 1;
constexpr U32 RT_GROUP = 0x1 << 2;
constexpr U32 RT_OTHER = 0x1 << 3;
constexpr U32 RT_LIST = 0x1 << 4;
constexpr U32 RT_SELL = 0x1 << 5;
const S32 INVALID_PARCEL_ID = -1;
constexpr S32 INVALID_PARCEL_ID = -1;
const S32 INVALID_PARCEL_ENVIRONMENT_VERSION = -2;
constexpr S32 INVALID_PARCEL_ENVIRONMENT_VERSION = -2;
// if Region settings are used, parcel env. version is -1
const S32 UNSET_PARCEL_ENVIRONMENT_VERSION = -1;
constexpr S32 UNSET_PARCEL_ENVIRONMENT_VERSION = -1;
// Timeouts for parcels
// default is 21 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 1814400000000
const U64 DEFAULT_USEC_CONVERSION_TIMEOUT = U64L(1814400000000);
constexpr U64 DEFAULT_USEC_CONVERSION_TIMEOUT = U64L(1814400000000);
// ***** TESTING is 10 minutes
//const U64 DEFAULT_USEC_CONVERSION_TIMEOUT = U64L(600000000);
// group is 60 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 5184000000000
const U64 GROUP_USEC_CONVERSION_TIMEOUT = U64L(5184000000000);
constexpr U64 GROUP_USEC_CONVERSION_TIMEOUT = U64L(5184000000000);
// ***** TESTING is 10 minutes
//const U64 GROUP_USEC_CONVERSION_TIMEOUT = U64L(600000000);
// default sale timeout is 2 days -> 172800000000
const U64 DEFAULT_USEC_SALE_TIMEOUT = U64L(172800000000);
constexpr U64 DEFAULT_USEC_SALE_TIMEOUT = U64L(172800000000);
// ***** TESTING is 10 minutes
//const U64 DEFAULT_USEC_SALE_TIMEOUT = U64L(600000000);
// more grace period extensions.
const U64 SEVEN_DAYS_IN_USEC = U64L(604800000000);
constexpr U64 SEVEN_DAYS_IN_USEC = U64L(604800000000);
// if more than 100,000s before sale revert, and no extra extension
// has been given, go ahead and extend it more. That's about 1.2 days.
const S32 EXTEND_GRACE_IF_MORE_THAN_SEC = 100000;
constexpr S32 EXTEND_GRACE_IF_MORE_THAN_SEC = 100000;

View File

@ -27,7 +27,6 @@
#include "linden_common.h"
#include "math.h"
//#include "vmath.h"
#include "v3math.h"
#include "llquaternion.h"
#include "m3math.h"

View File

@ -27,7 +27,6 @@
#include "linden_common.h"
#include "llmath.h"
//#include "vmath.h"
#include "v3math.h"
#include "patch_dct.h"
#include "patch_code.h"

View File

@ -27,7 +27,6 @@
#include "linden_common.h"
#include "llmath.h"
//#include "vmath.h"
#include "v3math.h"
#include "patch_dct.h"

View File

@ -27,7 +27,6 @@
#include "linden_common.h"
#include "llmath.h"
//#include "vmath.h"
#include "v3math.h"
#include "patch_dct.h"

View File

@ -917,7 +917,7 @@ LLDAELoader::LLDAELoader(
void* opaque_userdata,
JointTransformMap& jointTransformMap,
JointNameSet& jointsFromNodes,
std::map<std::string, std::string>& jointAliasMap,
std::map<std::string, std::string, std::less<>>& jointAliasMap,
U32 maxJointsPerMesh,
U32 modelLimit,
// <FS:Beq> mesh loader suffix configuration

View File

@ -58,7 +58,7 @@ public:
void* opaque_userdata,
JointTransformMap& jointTransformMap,
JointNameSet& jointsFromNodes,
std::map<std::string, std::string>& jointAliasMap,
std::map<std::string, std::string, std::less<>>& jointAliasMap,
U32 maxJointsPerMesh,
U32 modelLimit,
// <FS:Beq> configrable lod suffix support

View File

@ -75,7 +75,7 @@ LLGLTFLoader::LLGLTFLoader(std::string filename,
void * opaque_userdata,
JointTransformMap & jointTransformMap,
JointNameSet & jointsFromNodes,
std::map<std::string, std::string> &jointAliasMap,
std::map<std::string, std::string, std::less<>> & jointAliasMap,
U32 maxJointsPerMesh,
U32 modelLimit) //,
//bool preprocess)

View File

@ -129,7 +129,7 @@ class LLGLTFLoader : public LLModelLoader
void * opaque_userdata,
JointTransformMap & jointTransformMap,
JointNameSet & jointsFromNodes,
std::map<std::string, std::string> &jointAliasMap,
std::map<std::string, std::string,std::less<>> &jointAliasMap,
U32 maxJointsPerMesh,
U32 modelLimit); //,
//bool preprocess );

View File

@ -36,7 +36,7 @@ class LLJoint;
typedef std::map<std::string, LLMatrix4> JointTransformMap;
typedef std::map<std::string, LLMatrix4>::iterator JointTransformMapIt;
typedef std::map<std::string, std::string> JointMap;
typedef std::map<std::string, std::string, std::less<>> JointMap;
typedef std::deque<std::string> JointNameSet;
const S32 SLM_SUPPORTED_VERSION = 3;

View File

@ -1 +1 @@
7.1.13
7.1.16

View File

@ -184,35 +184,7 @@ void readSelectedGLTFMaterial(std::function<T(const LLGLTFMaterial*)> func, T& v
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&select_func, value, has_tolerance, tolerance);
}
void getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo channel, F32& repeats, bool& identical)
{
// The All channel should read base color values
if (channel == LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_COUNT)
channel = LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_BASE_COLOR;
struct LLSelectedTEGetGLTFMaterialMaxRepeatsFunctor : public LLSelectedTEGetFunctor<F32>
{
LLSelectedTEGetGLTFMaterialMaxRepeatsFunctor(LLGLTFMaterial::TextureInfo channel) : mChannel(channel) {}
virtual ~LLSelectedTEGetGLTFMaterialMaxRepeatsFunctor() {};
F32 get(LLViewerObject* object, S32 face) override
{
const LLTextureEntry* tep = object->getTE(face);
const LLGLTFMaterial* render_material = tep->getGLTFRenderMaterial();
if (!render_material)
return 0.f;
U32 s_axis = VX;
U32 t_axis = VY;
LLPrimitive::getTESTAxes(face, &s_axis, &t_axis);
F32 repeats_u = render_material->mTextureTransform[mChannel].mScale[VX] / object->getScale().mV[s_axis];
F32 repeats_v = render_material->mTextureTransform[mChannel].mScale[VY] / object->getScale().mV[t_axis];
return llmax(repeats_u, repeats_v);
}
LLGLTFMaterial::TextureInfo mChannel;
} max_repeats_func(channel);
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&max_repeats_func, repeats);
}
void getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo channel, F32& repeats, bool& identical); // Defined in llpanelface.cpp
//
// keep LLRenderMaterialFunctor in sync with llmaterialeditor.cpp - Would be nice if we

View File

@ -4140,11 +4140,14 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
bool LLAgent::leftButtonGrabbed() const
{
const bool camera_mouse_look = gAgentCamera.cameraMouselook();
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0)
|| (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
if (gAgentCamera.cameraMouselook())
{
return mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0;
}
else
{
return mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0;
}
}
bool LLAgent::rotateGrabbed() const

View File

@ -2141,16 +2141,6 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
isConstrained = true;
}
}
// JC - Could constrain camera based on parcel stuff here.
// LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(camera_position_global);
//
// if (regionp && !regionp->mParcelOverlay->isBuildCameraAllowed(regionp->getPosRegionFromGlobal(camera_position_global)))
// {
// camera_position_global = last_position_global;
//
// isConstrained = true;
// }
}
// [RLVa:KB] - Checked: RLVa-2.0.0

View File

@ -6610,10 +6610,7 @@ void LLAppViewer::forceErrorThreadCrash()
thread->start();
}
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
//void LLAppViewer::initMainloopTimeout(const std::string& state, F32 secs)
void LLAppViewer::initMainloopTimeout( char const* state, F32 secs)
// </FS:ND>
void LLAppViewer::initMainloopTimeout(std::string_view state, F32 secs)
{
if (!mMainloopTimeout)
{
@ -6627,20 +6624,17 @@ void LLAppViewer::destroyMainloopTimeout()
if (mMainloopTimeout)
{
delete mMainloopTimeout;
mMainloopTimeout = NULL;
mMainloopTimeout = nullptr;
}
}
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
//void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs)
void LLAppViewer::resumeMainloopTimeout( char const* state, F32 secs)
// </FS:ND>
void LLAppViewer::resumeMainloopTimeout(std::string_view state, F32 secs)
{
if (mMainloopTimeout)
{
if (secs < 0.0f)
{
static LLCachedControl<F32> mainloop_timeout(gSavedSettings, "MainloopTimeoutDefault", 60);
static LLCachedControl<F32> mainloop_timeout(gSavedSettings, "MainloopTimeoutDefault", 60.f);
secs = mainloop_timeout;
}
@ -6657,10 +6651,7 @@ void LLAppViewer::pauseMainloopTimeout()
}
}
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
//void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
void LLAppViewer::pingMainloopTimeout( char const* state, F32 secs)
// </FS:ND>
void LLAppViewer::pingMainloopTimeout(std::string_view state, F32 secs)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;

View File

@ -198,25 +198,11 @@ public:
// For thread debugging.
// llstartup needs to control init.
// llworld, send_agent_pause() also controls pause/resume.
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
// void initMainloopTimeout(const std::string& state, F32 secs = -1.0f);
void initMainloopTimeout( char const *state, F32 secs = -1.0f);
// </FS:ND>
void initMainloopTimeout(std::string_view state, F32 secs = -1.0f);
void destroyMainloopTimeout();
void pauseMainloopTimeout();
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
// void resumeMainloopTimeout(const std::string& state = "", F32 secs = -1.0f);
// void pingMainloopTimeout(const std::string& state, F32 secs = -1.0f);
void resumeMainloopTimeout( char const *state = "", F32 secs = -1.0f);
void pingMainloopTimeout( char const *state, F32 secs = -1.0f);
// </FS:ND>
void resumeMainloopTimeout(std::string_view state = "", F32 secs = -1.0f);
void pingMainloopTimeout(std::string_view state, F32 secs = -1.0f);
// Handle the 'login completed' event.
// *NOTE:Mani Fix this for login abstraction!!

View File

@ -217,7 +217,7 @@ void LLFloaterBvhPreview::setAnimCallbacks()
getChild<LLUICtrl>("ease_out_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseOut, this, _1));
}
std::map <std::string, std::string> LLFloaterBvhPreview::getJointAliases()
std::map<std::string, std::string, std::less<>> LLFloaterBvhPreview::getJointAliases()
{
LLPointer<LLVOAvatar> av = (LLVOAvatar*)mAnimPreview->getDummyAvatar();
return av->getJointAliases();
@ -337,7 +337,7 @@ bool LLFloaterBvhPreview::loadBVH()
ELoadStatus load_status = E_ST_OK;
S32 line_number = 0;
std::map<std::string, std::string> joint_alias_map = getJointAliases();
auto joint_alias_map = getJointAliases();
loaderp = new LLBVHLoader(file_buffer, load_status, line_number, joint_alias_map);
std::string status = getString(STATUS[load_status]);

View File

@ -123,7 +123,7 @@ public:
// </FS:Sei>
private:
void setAnimCallbacks() ;
std::map <std::string, std::string> getJointAliases();
std::map<std::string, std::string, std::less<>> getJointAliases();
// <FS> Reload animation from disk
bool loadBVH();

View File

@ -1671,7 +1671,7 @@ void LLFloaterModelPreview::updateAvatarTab(bool highlight_overrides)
{
// Populate table
std::map<std::string, std::string> joint_alias_map;
std::map<std::string, std::string, std::less<>> joint_alias_map;
mModelPreview->getJointAliases(joint_alias_map);
S32 conflicts = 0;

View File

@ -1060,7 +1060,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
boost::char_separator<char> sep("+");
tokenizer tokens(filter_sub_string_new, sep);
for (auto token_iter : tokens)
for (const auto& token_iter : tokens)
{
mFilterTokens.push_back(token_iter);
}
@ -1128,7 +1128,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
// </FS:Zi>
// Cancel out UUID once the search string is modified
if (mFilterOps.mFilterTypes == FILTERTYPE_UUID)
if (mFilterOps.mFilterTypes & FILTERTYPE_UUID)
{
// <FS:Ansariel> Find all links unhiding hidden empty system folders
//mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID;
@ -1948,7 +1948,7 @@ std::string LLInventoryFilter::getEmptyLookupMessage(bool is_empty_folder) const
}
}
bool LLInventoryFilter::areDateLimitsSet()
bool LLInventoryFilter::areDateLimitsSet() const
{
return mFilterOps.mMinDate != time_min()
|| mFilterOps.mMaxDate != time_max()

View File

@ -363,7 +363,7 @@ public:
bool checkAgainstFilterThumbnails(const LLUUID& object_id) const;
private:
bool areDateLimitsSet();
bool areDateLimitsSet() const;
bool checkAgainstFilterSubString(const std::string& desc) const;
bool checkAgainstFilterType(const class LLFolderViewModelItemInventory* listener) const;
bool checkAgainstFilterType(const LLInventoryItem* item) const;

View File

@ -1020,7 +1020,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
clearGLODGroup();
}
// </FS:Beq>
std::map<std::string, std::string> joint_alias_map;
std::map<std::string, std::string, std::less<>> joint_alias_map;
getJointAliases(joint_alias_map);
LLHandle<LLModelPreview> preview_handle = getHandle();

View File

@ -164,6 +164,36 @@ void LLPanelFace::updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&select_func);
}
void LLPanelFace::updateSelectedGLTFMaterialsWithScale(std::function<void(LLGLTFMaterial*, const F32, const F32)> func)
{
struct LLSelectedTEGLTFMaterialFunctor : public LLSelectedTEFunctor
{
LLSelectedTEGLTFMaterialFunctor(std::function<void(LLGLTFMaterial*, const F32, const F32)> func) : mFunc(func) {}
virtual ~LLSelectedTEGLTFMaterialFunctor() {};
bool apply(LLViewerObject* object, S32 face) override
{
LLGLTFMaterial new_override;
const LLTextureEntry* tep = object->getTE(face);
if (tep->getGLTFMaterialOverride())
{
new_override = *tep->getGLTFMaterialOverride();
}
U32 s_axis = VX;
U32 t_axis = VY;
LLPrimitive::getTESTAxes(face, &s_axis, &t_axis);
mFunc(&new_override, object->getScale().mV[s_axis], object->getScale().mV[t_axis]);
LLGLTFMaterialList::queueModify(object, face, &new_override);
return true;
}
std::function<void(LLGLTFMaterial*, const F32, const F32)> mFunc;
} select_func(func);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&select_func);
}
template<typename T>
void readSelectedGLTFMaterial(std::function<T(const LLGLTFMaterial*)> func, T& value, bool& identical, bool has_tolerance, T tolerance)
{
@ -184,6 +214,36 @@ void readSelectedGLTFMaterial(std::function<T(const LLGLTFMaterial*)> func, T& v
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&select_func, value, has_tolerance, tolerance);
}
void getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo channel, F32& repeats, bool& identical)
{
// The All channel should read base color values
if (channel == LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_COUNT)
channel = LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_BASE_COLOR;
struct LLSelectedTEGetGLTFMaterialMaxRepeatsFunctor : public LLSelectedTEGetFunctor<F32>
{
LLSelectedTEGetGLTFMaterialMaxRepeatsFunctor(LLGLTFMaterial::TextureInfo channel) : mChannel(channel) {}
virtual ~LLSelectedTEGetGLTFMaterialMaxRepeatsFunctor() {};
F32 get(LLViewerObject* object, S32 face) override
{
const LLTextureEntry* tep = object->getTE(face);
const LLGLTFMaterial* render_material = tep->getGLTFRenderMaterial();
if (!render_material)
return 0.f;
U32 s_axis = VX;
U32 t_axis = VY;
LLPrimitive::getTESTAxes(face, &s_axis, &t_axis);
F32 repeats_u = render_material->mTextureTransform[mChannel].mScale[VX] / object->getScale().mV[s_axis];
F32 repeats_v = render_material->mTextureTransform[mChannel].mScale[VY] / object->getScale().mV[t_axis];
return llmax(repeats_u, repeats_v);
}
LLGLTFMaterial::TextureInfo mChannel;
} max_repeats_func(channel);
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&max_repeats_func, repeats);
}
BOOST_STATIC_ASSERT(MATTYPE_DIFFUSE == LLRender::DIFFUSE_MAP && MATTYPE_NORMAL == LLRender::NORMAL_MAP && MATTYPE_SPECULAR == LLRender::SPECULAR_MAP);
//
@ -332,6 +392,7 @@ bool LLPanelFace::postBuild()
getChildSetCommitCallback(mPBRScaleU, "gltfTextureScaleU", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureScaleU(); });
getChildSetCommitCallback(mPBRScaleV, "gltfTextureScaleV", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureScaleV(); });
getChildSetCommitCallback(mPBRRepeat, "gltfRptctrl", [&](LLUICtrl*, const LLSD&) { onCommitGLTFRepeatsPerMeter(); });
getChildSetCommitCallback(mPBRRotate, "gltfTextureRotation", [&](LLUICtrl*, const LLSD&) { onCommitGLTFRotation(); });
getChildSetCommitCallback(mPBROffsetU, "gltfTextureOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureOffsetU(); });
getChildSetCommitCallback(mPBROffsetV, "gltfTextureOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureOffsetV(); });
@ -1443,9 +1504,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
spec_scale_s = editable ? spec_scale_s : 1.0f;
spec_scale_s *= identical_planar_texgen ? 2.0f : 1.0f;
if (force_set_values)
{
mTexScaleU->forceSetValue(diff_scale_s);
mShinyScaleU->forceSetValue(spec_scale_s);
mBumpyScaleU->forceSetValue(norm_scale_s);
}
else
{
mTexScaleU->setValue(diff_scale_s);
mShinyScaleU->setValue(spec_scale_s);
mBumpyScaleU->setValue(norm_scale_s);
}
mTexScaleU->setEnabled(editable && has_material);
// <FS:CR> Materials alignment
@ -1502,13 +1572,16 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (force_set_values)
{
mTexScaleV->forceSetValue(diff_scale_t);
mShinyScaleV->forceSetValue(spec_scale_t);
mBumpyScaleV->forceSetValue(norm_scale_t);
}
else
{
mTexScaleV->setValue(diff_scale_t);
}
mShinyScaleV->setValue(spec_scale_t);
mBumpyScaleV->setValue(norm_scale_t);
}
mTexScaleV->setTentative(LLSD(diff_scale_tentative));
mShinyScaleV->setTentative(LLSD(spec_scale_tentative));
@ -1657,36 +1730,57 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
F32 repeats_norm = 1.f;
F32 repeats_spec = 1.f;
F32 repeats_pbr_basecolor = 1.f;
F32 repeats_pbr_metallic_roughness = 1.f;
F32 repeats_pbr_normal = 1.f;
F32 repeats_pbr_emissive = 1.f;
bool identical_diff_repeats = false;
bool identical_norm_repeats = false;
bool identical_spec_repeats = false;
LLSelectedTE::getMaxDiffuseRepeats(repeats_diff, identical_diff_repeats);
LLSelectedTEMaterial::getMaxNormalRepeats(repeats_norm, identical_norm_repeats);
LLSelectedTEMaterial::getMaxSpecularRepeats(repeats_spec, identical_spec_repeats);
bool identical_pbr_basecolor_repeats = false;
bool identical_pbr_metallic_roughness_repeats = false;
bool identical_pbr_normal_repeats = false;
bool identical_pbr_emissive_repeats = false;
{
LLSpinCtrl* repeats_spin_ctrl = nullptr;
S32 index = mComboTexGen ? mComboTexGen->getCurrentIndex() : 0;
bool enabled = editable && (index != 1);
bool identical_repeats = true;
S32 material_selection = mComboMatMedia->getCurrentIndex();
F32 repeats = 1.0f;
U32 material_type = MATTYPE_DIFFUSE;
if (material_selection == MATMEDIA_MATERIAL)
LLRender::eTexIndex material_channel = LLRender::DIFFUSE_MAP;
if (material_selection != MATMEDIA_PBR)
{
material_type = mRadioMaterialType->getSelectedIndex();
repeats_spin_ctrl = mTexRepeat;
material_channel = getMatTextureChannel();
LLSelectedTE::getMaxDiffuseRepeats(repeats_diff, identical_diff_repeats);
LLSelectedTEMaterial::getMaxNormalRepeats(repeats_norm, identical_norm_repeats);
LLSelectedTEMaterial::getMaxSpecularRepeats(repeats_spec, identical_spec_repeats);
}
else if (material_selection == MATMEDIA_PBR)
{
repeats_spin_ctrl = mPBRRepeat;
enabled = editable && has_pbr_material;
material_type = mRadioPbrType->getSelectedIndex();
material_channel = getPBRTextureChannel();
getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_BASE_COLOR,
repeats_pbr_basecolor, identical_pbr_basecolor_repeats);
getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS,
repeats_pbr_metallic_roughness, identical_pbr_metallic_roughness_repeats);
getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_NORMAL,
repeats_pbr_normal, identical_pbr_normal_repeats);
getSelectedGLTFMaterialMaxRepeats(LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_EMISSIVE,
repeats_pbr_emissive, identical_pbr_emissive_repeats);
}
switch (material_type)
switch (material_channel)
{
default:
case MATTYPE_DIFFUSE:
case LLRender::DIFFUSE_MAP:
if (material_selection != MATMEDIA_PBR)
{
enabled = editable && !id.isNull();
@ -1694,7 +1788,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
identical_repeats = identical_diff_repeats;
repeats = repeats_diff;
break;
case MATTYPE_SPECULAR:
case LLRender::SPECULAR_MAP:
if (material_selection != MATMEDIA_PBR)
{
enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull())
@ -1703,7 +1797,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
identical_repeats = identical_spec_repeats;
repeats = repeats_spec;
break;
case MATTYPE_NORMAL:
case LLRender::NORMAL_MAP:
if (material_selection != MATMEDIA_PBR)
{
enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull())
@ -1712,6 +1806,23 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
identical_repeats = identical_norm_repeats;
repeats = repeats_norm;
break;
case LLRender::NUM_TEXTURE_CHANNELS:
case LLRender::BASECOLOR_MAP:
identical_repeats = identical_pbr_basecolor_repeats;
repeats = repeats_pbr_basecolor;
break;
case LLRender::METALLIC_ROUGHNESS_MAP:
identical_repeats = identical_pbr_metallic_roughness_repeats;
repeats = repeats_pbr_metallic_roughness;
break;
case LLRender::GLTF_NORMAL_MAP:
identical_repeats = identical_pbr_normal_repeats;
repeats = repeats_pbr_normal;
break;
case LLRender::EMISSIVE_MAP:
identical_repeats = identical_pbr_emissive_repeats;
repeats = repeats_pbr_emissive;
break;
}
bool repeats_tentative = !identical_repeats;
@ -1719,14 +1830,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (force_set_values)
{
// onCommit, previosly edited element updates related ones
mTexRepeat->forceSetValue(editable ? repeats : 1.0f);
repeats_spin_ctrl->forceSetValue(editable ? repeats : 1.0f);
}
else
{
mTexRepeat->setValue(editable ? repeats : 1.0f);
repeats_spin_ctrl->setValue(editable ? repeats : 1.0f);
}
mTexRepeat->setTentative(LLSD(repeats_tentative));
mTexRepeat->setEnabled(has_material && !identical_planar_texgen && enabled);
repeats_spin_ctrl->setTentative(LLSD(repeats_tentative));
repeats_spin_ctrl->setEnabled(!identical_planar_texgen && enabled);
// <FS:CR> FIRE-11407 - Flip buttons
mBtnTexFlipScaleU->setEnabled(enabled);
mBtnTexFlipScaleV->setEnabled(enabled);
@ -1886,6 +1997,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
mLabelColorTransp->setEnabled(false);
mTexRepeat->setEnabled(false);
mPBRRepeat->setEnabled(false);
mLabelTexGen->setEnabled(false);
mLabelShininess->setEnabled(false);
mLabelBumpiness->setEnabled(false);
@ -2086,6 +2198,7 @@ void LLPanelFace::updateVisibilityGLTF(LLViewerObject* objectp /*= nullptr */)
mPBRRotate->setVisible(show_pbr);
mPBROffsetU->setVisible(show_pbr);
mPBROffsetV->setVisible(show_pbr);
mPBRRepeat->setVisible(show_pbr);
}
void LLPanelFace::updateCopyTexButton()
@ -3757,18 +3870,8 @@ void LLPanelFace::onCommitRepeatsPerMeter()
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
mShinyScaleU->setValue(obj_scale_s * repeats_per_meter);
mShinyScaleV->setValue(obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::selectionNormalScaleAutofit(this, repeats_per_meter);
LLSelectedTEMaterial::selectionSpecularScaleAutofit(this, repeats_per_meter);
}
else
{
@ -3779,18 +3882,10 @@ void LLPanelFace::onCommitRepeatsPerMeter()
LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
break;
case MATTYPE_NORMAL:
mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::selectionNormalScaleAutofit(this, repeats_per_meter);
break;
case MATTYPE_SPECULAR:
mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
LLSelectedTEMaterial::selectionSpecularScaleAutofit(this, repeats_per_meter);
break;
default:
llassert(false);
@ -3801,6 +3896,21 @@ void LLPanelFace::onCommitRepeatsPerMeter()
updateUI(true);
}
// Commit the number of GLTF repeats per meter
void LLPanelFace::onCommitGLTFRepeatsPerMeter()
{
F32 repeats_per_meter = (F32)mPBRRepeat->getValue().asReal();
LLGLTFMaterial::TextureInfo material_type = getPBRTextureInfo();
updateGLTFTextureTransformWithScale(material_type, [&](LLGLTFMaterial::TextureTransform* new_transform, F32 scale_s, F32 scale_t)
{
new_transform->mScale.mV[VX] = scale_s * repeats_per_meter;
new_transform->mScale.mV[VY] = scale_t * repeats_per_meter;
});
updateUI(true);
}
struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
{
virtual bool apply(LLViewerObject* object, S32 te)
@ -4775,6 +4885,29 @@ void LLPanelFace::updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::
}
}
void LLPanelFace::updateGLTFTextureTransformWithScale(const LLGLTFMaterial::TextureInfo texture_info, std::function<void(LLGLTFMaterial::TextureTransform*, const F32, const F32)> edit)
{
if (texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT)
{
updateSelectedGLTFMaterialsWithScale([&](LLGLTFMaterial* new_override, const F32 scale_s, const F32 scale_t)
{
for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
{
LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[(LLGLTFMaterial::TextureInfo)i];
edit(&new_transform, scale_s, scale_t);
}
});
}
else
{
updateSelectedGLTFMaterialsWithScale([&](LLGLTFMaterial* new_override, const F32 scale_s, const F32 scale_t)
{
LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[texture_info];
edit(&new_transform, scale_s, scale_t);
});
}
}
void LLPanelFace::setMaterialOverridesFromSelection()
{
const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
@ -4850,8 +4983,9 @@ void LLPanelFace::setMaterialOverridesFromSelection()
}
}
mPBRScaleU->setValue(transform.mScale[VX]);
mPBRScaleV->setValue(transform.mScale[VY]);
// Force set scales just in case they were set by repeats per meter and their spinner is focused
mPBRScaleU->forceSetValue(transform.mScale[VX]);
mPBRScaleV->forceSetValue(transform.mScale[VY]);
mPBRRotate->setValue(transform.mRotation * RAD_TO_DEG);
mPBROffsetU->setValue(transform.mOffset[VX]);
mPBROffsetV->setValue(transform.mOffset[VY]);
@ -4861,6 +4995,12 @@ void LLPanelFace::setMaterialOverridesFromSelection()
mPBRRotate->setTentative(!rotation_same);
mPBROffsetU->setTentative(!offset_u_same);
mPBROffsetV->setTentative(!offset_v_same);
F32 repeats = 1.f;
bool identical = false;
getSelectedGLTFMaterialMaxRepeats(getPBRDropChannel(), repeats, identical);
mPBRRepeat->forceSetValue(repeats);
mPBRRepeat->setTentative(!identical || !scale_u_same || !scale_v_same);
}
void LLPanelFace::Selection::connect()
@ -5354,6 +5494,62 @@ void LLPanelFace::LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(U8& diffuse_a
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &get_diff_mode, diffuse_alpha_mode);
}
void LLPanelFace::LLSelectedTEMaterial::selectionNormalScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter)
{
struct f : public LLSelectedTEFunctor
{
LLPanelFace* mFacePanel;
F32 mRepeatsPerMeter;
f(LLPanelFace* face_panel, const F32& repeats_per_meter) : mFacePanel(face_panel), mRepeatsPerMeter(repeats_per_meter) {}
bool apply(LLViewerObject* object, S32 te)
{
if (object->permModify())
{
// Compute S,T to axis mapping
U32 s_axis, t_axis;
if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis))
return true;
F32 new_s = object->getScale().mV[s_axis] * mRepeatsPerMeter;
F32 new_t = object->getScale().mV[t_axis] * mRepeatsPerMeter;
setNormalRepeatX(mFacePanel, new_s, te);
setNormalRepeatY(mFacePanel, new_t, te);
}
return true;
}
} setfunc(panel_face, repeats_per_meter);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
void LLPanelFace::LLSelectedTEMaterial::selectionSpecularScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter)
{
struct f : public LLSelectedTEFunctor
{
LLPanelFace* mFacePanel;
F32 mRepeatsPerMeter;
f(LLPanelFace* face_panel, const F32& repeats_per_meter) : mFacePanel(face_panel), mRepeatsPerMeter(repeats_per_meter) {}
bool apply(LLViewerObject* object, S32 te)
{
if (object->permModify())
{
// Compute S,T to axis mapping
U32 s_axis, t_axis;
if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis))
return true;
F32 new_s = object->getScale().mV[s_axis] * mRepeatsPerMeter;
F32 new_t = object->getScale().mV[t_axis] * mRepeatsPerMeter;
setSpecularRepeatX(mFacePanel, new_s, te);
setSpecularRepeatY(mFacePanel, new_t, te);
}
return true;
}
} setfunc(panel_face, repeats_per_meter);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
void LLPanelFace::LLSelectedTE::getObjectScaleS(F32& scale_s, bool& identical)
{
struct LLSelectedTEGetObjectScaleS : public LLSelectedTEGetFunctor<F32>
@ -5544,6 +5740,12 @@ void LLPanelFace::changePrecision(S32 decimal_precision)
mBumpyRotate->setPrecision(decimal_precision);
mShinyRotate->setPrecision(decimal_precision);
mTexRepeat->setPrecision(decimal_precision);
mPBRScaleU->setPrecision(decimal_precision);
mPBRScaleV->setPrecision(decimal_precision);
mPBRRotate->setPrecision(decimal_precision);
mPBROffsetU->setPrecision(decimal_precision);
mPBROffsetV->setPrecision(decimal_precision);
mPBRRepeat->setPrecision(decimal_precision);
}
// </FS:CR>

View File

@ -251,6 +251,7 @@ protected:
void onCommitGLTFRotation();
void onCommitGLTFTextureOffsetU();
void onCommitGLTFTextureOffsetV();
void onCommitGLTFRepeatsPerMeter();
void onClickAutoFix();
void onAlignTexture();
@ -384,6 +385,7 @@ private:
LLButton* mDelMedia { nullptr };
LLSpinCtrl* mPBRScaleU { nullptr };
LLSpinCtrl* mPBRScaleV { nullptr };
LLSpinCtrl* mPBRRepeat { nullptr };
LLSpinCtrl* mPBRRotate { nullptr };
LLSpinCtrl* mPBROffsetU { nullptr };
LLSpinCtrl* mPBROffsetV { nullptr };
@ -585,7 +587,9 @@ private:
void updateVisibilityGLTF(LLViewerObject* objectp = nullptr);
void updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func);
void updateSelectedGLTFMaterialsWithScale(std::function<void(LLGLTFMaterial*, const F32, const F32)> func);
void updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
void updateGLTFTextureTransformWithScale(const LLGLTFMaterial::TextureInfo texture_info, std::function<void(LLGLTFMaterial::TextureTransform*, const F32, const F32)> edit);
void setMaterialOverridesFromSelection();
@ -684,6 +688,8 @@ public:
static void getMaxSpecularRepeats(F32& repeats, bool& identical);
static void getMaxNormalRepeats(F32& repeats, bool& identical);
static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha);
static void selectionNormalScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter);
static void selectionSpecularScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter);
DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getNormalID, LLUUID::null, false, LLUUID::null);
DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getSpecularID, LLUUID::null, false, LLUUID::null);

View File

@ -88,8 +88,8 @@ class LLFloaterInventoryFinder : public LLFloater
{
public:
LLFloaterInventoryFinder(LLPanelMainInventory* inventory_view);
virtual void draw();
/*virtual*/ bool postBuild();
void draw();
bool postBuild();
void changeFilter(LLInventoryFilter* filter);
void updateElementsFromFilter();
bool getCheckShowEmpty();
@ -106,20 +106,44 @@ public:
void onPermissionsChanged(); // <FS:Zi> FIRE-1175 - Filter Permissions Menu
static void onTimeAgo(LLUICtrl*, void *);
static void onCloseBtn(void* user_data);
static void selectAllTypes(void* user_data);
static void selectNoTypes(void* user_data);
void onTimeAgo();
void onCloseBtn();
void selectAllTypes();
void selectNoTypes();
// <FS:Ansariel> FIRE-5160: Don't reset inventory filter when clearing search term
void onResetBtn();
private:
LLPanelMainInventory* mPanelMainInventory;
LLSpinCtrl* mSpinSinceDays;
LLSpinCtrl* mSpinSinceHours;
LLCheckBoxCtrl* mCreatorSelf;
LLCheckBoxCtrl* mCreatorOthers;
LLInventoryFilter* mFilter;
LLPanelMainInventory* mPanelMainInventory{ nullptr };
LLSpinCtrl* mSpinSinceDays{ nullptr };
LLSpinCtrl* mSpinSinceHours{ nullptr };
LLCheckBoxCtrl* mCreatorSelf{ nullptr };
LLCheckBoxCtrl* mCreatorOthers{ nullptr };
LLInventoryFilter* mFilter{ nullptr };
LLCheckBoxCtrl* mCheckAnimation{ nullptr };
LLCheckBoxCtrl* mCheckCallingCard{ nullptr };
LLCheckBoxCtrl* mCheckClothing{ nullptr };
LLCheckBoxCtrl* mCheckGesture{ nullptr };
LLCheckBoxCtrl* mCheckLandmark{ nullptr };
LLCheckBoxCtrl* mCheckMaterial{ nullptr };
LLCheckBoxCtrl* mCheckNotecard{ nullptr };
LLCheckBoxCtrl* mCheckObject{ nullptr };
LLCheckBoxCtrl* mCheckScript{ nullptr };
LLCheckBoxCtrl* mCheckSounds{ nullptr };
LLCheckBoxCtrl* mCheckTexture{ nullptr };
LLCheckBoxCtrl* mCheckSnapshot{ nullptr };
LLCheckBoxCtrl* mCheckSettings{ nullptr };
LLCheckBoxCtrl* mCheckShowEmpty{ nullptr };
LLCheckBoxCtrl* mCheckSinceLogoff{ nullptr };
// <FS:Zi> FIRE-1175 - Filter Permissions Menu
LLCheckBoxCtrl* mCheckModify{ nullptr };
LLCheckBoxCtrl* mCheckCopy{ nullptr };
LLCheckBoxCtrl* mCheckTransfer{ nullptr };
// </FS:Zie>
LLRadioGroup* mRadioDateSearchDirection{ nullptr };
// <FS:minerjr> [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
LLCheckBoxCtrl* mOnlyCoalescedFilterCheck; // Stores the pointer to the Only Coalesced filter checkbox
LLComboBox* mShowLinksFilterCombo; // Stores the pointer to the Show Links filter combo box
@ -963,7 +987,6 @@ bool LLPanelMainInventory::filtersVisible(void* user_data)
void LLPanelMainInventory::onClearSearch()
{
bool initially_active = false;
LLFloater *finder = getFinder();
// <FS:Ansariel> Worn inventory panel
//if (mActivePanel && (getActivePanel() != mWornItemsPanel))
if (mActivePanel)
@ -978,9 +1001,9 @@ void LLPanelMainInventory::onClearSearch()
// </FS:Ansariel>
}
if (finder)
if (LLFloaterInventoryFinder* finder = getFinder())
{
LLFloaterInventoryFinder::selectAllTypes(finder);
finder->selectAllTypes();
}
// re-open folders that were initially open in case filter was active
@ -1099,7 +1122,7 @@ void LLPanelMainInventory::onFilterTypeSelected(const std::string& filter_type_n
// update subwindow if it's open
if (finder)
{
LLFloaterInventoryFinder::selectAllTypes(finder);
finder->selectAllTypes();
}
}
// special treatment for "custom" filter
@ -1562,65 +1585,71 @@ bool LLFloaterInventoryFinder::postBuild()
const LLRect& viewrect = mPanelMainInventory->getRect();
setRect(LLRect(viewrect.mLeft - getRect().getWidth(), viewrect.mTop, viewrect.mLeft, viewrect.mTop - getRect().getHeight()));
childSetAction("All", selectAllTypes, this);
childSetAction("None", selectNoTypes, this);
childSetAction("All", [this](LLUICtrl*, const LLSD&) { selectAllTypes(); });
childSetAction("None", [this](LLUICtrl*, const LLSD&) { selectNoTypes(); });
mSpinSinceHours = getChild<LLSpinCtrl>("spin_hours_ago");
childSetCommitCallback("spin_hours_ago", onTimeAgo, this);
mSpinSinceHours->setCommitCallback([this](LLUICtrl*, const LLSD&) { onTimeAgo(); });
mSpinSinceDays = getChild<LLSpinCtrl>("spin_days_ago");
childSetCommitCallback("spin_days_ago", onTimeAgo, this);
mSpinSinceDays->setCommitCallback([this](LLUICtrl*, const LLSD&) { onTimeAgo(); });
mCreatorSelf = getChild<LLCheckBoxCtrl>("check_created_by_me");
mCreatorOthers = getChild<LLCheckBoxCtrl>("check_created_by_others");
mCreatorSelf->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorSelfFilterCommit, this));
mCreatorOthers->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorOtherFilterCommit, this));
mCheckAnimation = getChild<LLCheckBoxCtrl>("check_animation");
mCheckCallingCard = getChild<LLCheckBoxCtrl>("check_calling_card");
mCheckClothing = getChild<LLCheckBoxCtrl>("check_clothing");
mCheckGesture = getChild<LLCheckBoxCtrl>("check_gesture");
mCheckLandmark = getChild<LLCheckBoxCtrl>("check_landmark");
mCheckMaterial = getChild<LLCheckBoxCtrl>("check_material");
mCheckNotecard = getChild<LLCheckBoxCtrl>("check_notecard");
mCheckObject = getChild<LLCheckBoxCtrl>("check_object");
mCheckScript = getChild<LLCheckBoxCtrl>("check_script");
mCheckSounds = getChild<LLCheckBoxCtrl>("check_sound");
mCheckTexture = getChild<LLCheckBoxCtrl>("check_texture");
mCheckSnapshot = getChild<LLCheckBoxCtrl>("check_snapshot");
mCheckSettings = getChild<LLCheckBoxCtrl>("check_settings");
mCheckShowEmpty = getChild<LLCheckBoxCtrl>("check_show_empty");
mCheckSinceLogoff = getChild<LLCheckBoxCtrl>("check_since_logoff");
mRadioDateSearchDirection = getChild<LLRadioGroup>("date_search_direction");
childSetAction("Close", [this](LLUICtrl*, const LLSD&) { onCloseBtn(); });
// <FS:minerjr> [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
// Get the Finder's Only Coalesced check box for use later on, instead of calling getChild everytime accessing it
mOnlyCoalescedFilterCheck = getChild<LLCheckBoxCtrl>("check_only_coalesced");
// If the checkbox could be found, then set the commit callback to onOnlyCoalescedFilterCommit to update the mFilter object
// with the value in the checkbox.
if (mOnlyCoalescedFilterCheck)
{
mOnlyCoalescedFilterCheck->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit, this));
}
// Get the Finder's Show Links Filter combobox for use later as well to also prevent having to call get child everytime accessing it.
mShowLinksFilterCombo = getChild<LLComboBox>("inventory_filter_show_links_combo");
// If the combobox could be found, then set the commit callback to onShowLinksFilterCommit to update the mFilter object
// with the value in the checkbox.
if (mShowLinksFilterCombo)
{
mShowLinksFilterCombo->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onShowLinksFilterCommit, this));
}
// </FS:minerjr> [FIRE-35042]
childSetAction("Close", onCloseBtn, this);
// <FS:Ansariel> FIRE-5160: Don't reset inventory filter when clearing search term
getChild<LLButton>("btnReset")->setClickedCallback(boost::bind(&LLFloaterInventoryFinder::onResetBtn, this));
updateElementsFromFilter();
// <FS:Zi> FIRE-1175 - Filter Permissions Menu
getChild<LLUICtrl>("check_modify")->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onPermissionsChanged, this));
getChild<LLUICtrl>("check_copy")->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onPermissionsChanged, this));
getChild<LLUICtrl>("check_transfer")->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onPermissionsChanged, this));
mCheckModify = getChild<LLCheckBoxCtrl>("check_modify");
mCheckCopy = getChild<LLCheckBoxCtrl>("check_copy");
mCheckTransfer = getChild<LLCheckBoxCtrl>("check_transfer");
mCheckModify->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onPermissionsChanged, this));
mCheckCopy->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onPermissionsChanged, this));
mCheckTransfer->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onPermissionsChanged, this));
// </FS:Zi>
return true;
}
void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data)
{
LLFloaterInventoryFinder *self = (LLFloaterInventoryFinder *)user_data;
if (!self) return;
if ( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() )
void LLFloaterInventoryFinder::onTimeAgo()
{
self->getChild<LLUICtrl>("check_since_logoff")->setValue(false);
if (mSpinSinceDays->get() || mSpinSinceHours->get())
{
mCheckSinceLogoff->setValue(false);
U32 days = (U32)self->mSpinSinceDays->get();
U32 hours = (U32)self->mSpinSinceHours->get();
U32 days = (U32)mSpinSinceDays->get();
U32 hours = (U32)mSpinSinceHours->get();
if (hours >= 24)
{
// Try to handle both cases of spinner clicking and text input in a sensible fashion as best as possible.
@ -1636,11 +1665,11 @@ void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data)
days = hours / 24;
}
hours = (U32)hours % 24;
self->mSpinSinceHours->setFocus(false);
self->mSpinSinceDays->setFocus(false);
self->mSpinSinceDays->set((F32)days);
self->mSpinSinceHours->set((F32)hours);
self->mSpinSinceHours->setFocus(true);
mSpinSinceHours->setFocus(false);
mSpinSinceDays->setFocus(false);
mSpinSinceDays->set((F32)days);
mSpinSinceHours->set((F32)hours);
mSpinSinceHours->setFocus(true);
}
}
}
@ -1679,34 +1708,33 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
setTitle(LLTrans::getString(mFilter->getName()));
// </FS:PP>
getChild<LLUICtrl>("check_animation")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_ANIMATION));
mCheckAnimation->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_ANIMATION));
mCheckCallingCard->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD));
mCheckClothing->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE));
mCheckGesture->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE));
mCheckLandmark->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK));
mCheckMaterial->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_MATERIAL));
mCheckNotecard->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD));
mCheckObject->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT));
mCheckScript->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LSL));
mCheckSounds->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
mCheckTexture->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
mCheckSnapshot->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
mCheckSettings->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS));
mCheckShowEmpty->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
getChild<LLUICtrl>("check_calling_card")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD));
getChild<LLUICtrl>("check_clothing")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE));
getChild<LLUICtrl>("check_gesture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE));
getChild<LLUICtrl>("check_landmark")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK));
getChild<LLUICtrl>("check_material")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_MATERIAL));
getChild<LLUICtrl>("check_notecard")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD));
getChild<LLUICtrl>("check_object")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT));
getChild<LLUICtrl>("check_script")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LSL));
getChild<LLUICtrl>("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
getChild<LLUICtrl>("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
getChild<LLUICtrl>("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
getChild<LLUICtrl>("check_settings")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS));
getChild<LLUICtrl>("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
mCreatorSelf->setValue(show_created_by_me);
mCreatorOthers->setValue(show_created_by_others);
getChild<LLUICtrl>("check_created_by_me")->setValue(show_created_by_me);
getChild<LLUICtrl>("check_created_by_others")->setValue(show_created_by_others);
getChild<LLUICtrl>("check_since_logoff")->setValue(mFilter->isSinceLogoff());
mCheckSinceLogoff->setValue(mFilter->isSinceLogoff());
mSpinSinceHours->set((F32)(hours % 24));
mSpinSinceDays->set((F32)(hours / 24));
getChild<LLRadioGroup>("date_search_direction")->setSelectedIndex(date_search_direction);
mRadioDateSearchDirection->setSelectedIndex(date_search_direction);
// <FS:Zi> FIRE-1175 - Filter Permissions Menu
getChild<LLUICtrl>("check_modify")->setValue((bool) (mFilter->getFilterPermissions() & PERM_MODIFY));
getChild<LLUICtrl>("check_copy")->setValue((bool) (mFilter->getFilterPermissions() & PERM_COPY));
getChild<LLUICtrl>("check_transfer")->setValue((bool) (mFilter->getFilterPermissions() & PERM_TRANSFER));
mCheckModify->setValue(mFilter->getFilterPermissions() & PERM_MODIFY);
mCheckCopy->setValue(mFilter->getFilterPermissions() & PERM_COPY);
mCheckTransfer->setValue(mFilter->getFilterPermissions() & PERM_TRANSFER);
// </FS:Zi>
// <FS:minerjr> [FIRE-35042] Inventory - Only Coalesced Filter - More accessible
@ -1735,80 +1763,80 @@ void LLFloaterInventoryFinder::draw()
U64 filter = 0xffffffffffffffffULL;
bool filtered_by_all_types = true;
if (!getChild<LLUICtrl>("check_animation")->getValue())
if (!mCheckAnimation->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_ANIMATION);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_calling_card")->getValue())
if (!mCheckCallingCard->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_CALLINGCARD);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_clothing")->getValue())
if (!mCheckClothing->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_WEARABLE);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_gesture")->getValue())
if (!mCheckGesture->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_GESTURE);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_landmark")->getValue())
if (!mCheckLandmark->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_LANDMARK);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_material")->getValue())
if (!mCheckMaterial->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_MATERIAL);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_notecard")->getValue())
if (!mCheckNotecard->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_NOTECARD);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_object")->getValue())
if (!mCheckObject->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_OBJECT);
filter &= ~(0x1 << LLInventoryType::IT_ATTACHMENT);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_script")->getValue())
if (!mCheckScript->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_LSL);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_sound")->getValue())
if (!mCheckSounds->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SOUND);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_texture")->getValue())
if (!mCheckTexture->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_TEXTURE);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_snapshot")->getValue())
if (!mCheckSnapshot->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SNAPSHOT);
filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_settings")->getValue())
if (!mCheckSettings->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SETTINGS);
filtered_by_all_types = false;
@ -1929,17 +1957,17 @@ void LLFloaterInventoryFinder::onPermissionsChanged()
{
PermissionMask perms = PERM_NONE;
if (getChild<LLUICtrl>("check_modify")->getValue().asBoolean())
if (mCheckModify->getValue().asBoolean())
{
perms |= PERM_MODIFY;
}
if (getChild<LLUICtrl>("check_copy")->getValue().asBoolean())
if (mCheckCopy->getValue().asBoolean())
{
perms |= PERM_COPY;
}
if (getChild<LLUICtrl>("check_transfer")->getValue().asBoolean())
if (mCheckTransfer->getValue().asBoolean())
{
perms |= PERM_TRANSFER;
}
@ -1974,65 +2002,56 @@ void LLFloaterInventoryFinder::onShowLinksFilterCommit()
bool LLFloaterInventoryFinder::getCheckShowEmpty()
{
return getChild<LLUICtrl>("check_show_empty")->getValue();
return mCheckShowEmpty->getValue();
}
bool LLFloaterInventoryFinder::getCheckSinceLogoff()
{
return getChild<LLUICtrl>("check_since_logoff")->getValue();
return mCheckSinceLogoff->getValue();
}
U32 LLFloaterInventoryFinder::getDateSearchDirection()
{
return getChild<LLRadioGroup>("date_search_direction")->getSelectedIndex();
return mRadioDateSearchDirection->getSelectedIndex();
}
void LLFloaterInventoryFinder::onCloseBtn(void* user_data)
void LLFloaterInventoryFinder::onCloseBtn()
{
LLFloaterInventoryFinder* finderp = (LLFloaterInventoryFinder*)user_data;
finderp->closeFloater();
closeFloater();
}
// static
void LLFloaterInventoryFinder::selectAllTypes(void* user_data)
void LLFloaterInventoryFinder::selectAllTypes()
{
LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
if(!self) return;
self->getChild<LLUICtrl>("check_animation")->setValue(true);
self->getChild<LLUICtrl>("check_calling_card")->setValue(true);
self->getChild<LLUICtrl>("check_clothing")->setValue(true);
self->getChild<LLUICtrl>("check_gesture")->setValue(true);
self->getChild<LLUICtrl>("check_landmark")->setValue(true);
self->getChild<LLUICtrl>("check_material")->setValue(true);
self->getChild<LLUICtrl>("check_notecard")->setValue(true);
self->getChild<LLUICtrl>("check_object")->setValue(true);
self->getChild<LLUICtrl>("check_script")->setValue(true);
self->getChild<LLUICtrl>("check_sound")->setValue(true);
self->getChild<LLUICtrl>("check_texture")->setValue(true);
self->getChild<LLUICtrl>("check_snapshot")->setValue(true);
self->getChild<LLUICtrl>("check_settings")->setValue(true);
mCheckAnimation->setValue(true);
mCheckCallingCard->setValue(true);
mCheckClothing->setValue(true);
mCheckGesture->setValue(true);
mCheckLandmark->setValue(true);
mCheckMaterial->setValue(true);
mCheckNotecard->setValue(true);
mCheckObject->setValue(true);
mCheckScript->setValue(true);
mCheckSounds->setValue(true);
mCheckTexture->setValue(true);
mCheckSnapshot->setValue(true);
mCheckSettings->setValue(true);
}
//static
void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
void LLFloaterInventoryFinder::selectNoTypes()
{
LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
if(!self) return;
self->getChild<LLUICtrl>("check_animation")->setValue(false);
self->getChild<LLUICtrl>("check_calling_card")->setValue(false);
self->getChild<LLUICtrl>("check_clothing")->setValue(false);
self->getChild<LLUICtrl>("check_gesture")->setValue(false);
self->getChild<LLUICtrl>("check_landmark")->setValue(false);
self->getChild<LLUICtrl>("check_material")->setValue(false);
self->getChild<LLUICtrl>("check_notecard")->setValue(false);
self->getChild<LLUICtrl>("check_object")->setValue(false);
self->getChild<LLUICtrl>("check_script")->setValue(false);
self->getChild<LLUICtrl>("check_sound")->setValue(false);
self->getChild<LLUICtrl>("check_texture")->setValue(false);
self->getChild<LLUICtrl>("check_snapshot")->setValue(false);
self->getChild<LLUICtrl>("check_settings")->setValue(false);
mCheckAnimation->setValue(false);
mCheckCallingCard->setValue(false);
mCheckClothing->setValue(false);
mCheckGesture->setValue(false);
mCheckLandmark->setValue(false);
mCheckMaterial->setValue(false);
mCheckNotecard->setValue(false);
mCheckObject->setValue(false);
mCheckScript->setValue(false);
mCheckSounds->setValue(false);
mCheckTexture->setValue(false);
mCheckSnapshot->setValue(false);
mCheckSettings->setValue(false);
}
// <FS:Zi> Inventory Collapse and Expand Buttons

View File

@ -267,7 +267,6 @@ void LLPanelProfilePicks::onClickNewBtn()
label(pick_panel->getPickName()));
updateButtons();
// <FS:Ansariel> Keep set location button
pick_panel->addLocationChangedCallbacks();
}
@ -670,14 +669,12 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
{
mPickName->setEnabled(true);
mPickDescription->setEnabled(true);
// <FS:Zi> Make sure the "Set Location" button is only visible when viewing own picks
childSetVisible("set_to_curr_location_btn_lp", true);
mSetCurrentLocationButton->setVisible(true);
}
else
{
// <FS:Zi> Make sure the "Set Location" button is only visible when viewing own picks
childSetVisible("set_to_curr_location_btn_lp", false);
mSnapshotCtrl->setEnabled(false);
mSetCurrentLocationButton->setVisible(false);
}
}
@ -688,7 +685,8 @@ bool LLPanelProfilePick::postBuild()
mSaveButton = getChild<LLButton>("save_changes_btn");
mCreateButton = getChild<LLButton>("create_changes_btn");
mCancelButton = getChild<LLButton>("cancel_changes_btn");
mSetCurrentLocationButton = getChild<LLButton>("set_to_curr_location_btn"); // <FS:Ansariel> Keep set location button
mSetCurrentLocationButton = getChild<LLButton>("set_to_curr_location_btn");
mPreviewButton = getChild<LLButton>("btn_preview"); // <AS:Chanayane> Preview button
mSnapshotCtrl = getChild<LLTextureCtrl>("pick_snapshot");
@ -702,7 +700,8 @@ bool LLPanelProfilePick::postBuild()
mSaveButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this));
mCreateButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this));
mCancelButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickCancel, this));
mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this)); // <FS:Ansariel> Keep set location button
mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this));
// <AS:Chanayane> Preview button
mPreviewButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickPreview, this));
// </AS:Chanayane>
@ -894,7 +893,6 @@ bool LLPanelProfilePick::isDirty() const
return false;
}
// <FS:Ansariel> Keep set location button
void LLPanelProfilePick::onClickSetLocation()
{
// Save location for later use.
@ -920,8 +918,6 @@ void LLPanelProfilePick::onClickSetLocation()
mLocationChanged = true;
enableSaveButton(true);
}
// </FS:Ansariel>
// <AS:Chanayane> Preview button
void LLPanelProfilePick::onClickPreview()
{
@ -954,12 +950,10 @@ void LLPanelProfilePick::onClickSave()
{
mParcelCallbackConnection.disconnect();
}
// <FS:Ansariel> Keep set location button
if (mLocationChanged)
{
onClickSetLocation();
}
// </FS:Ansariel>
sendUpdate();
mLocationChanged = false;
@ -1010,6 +1004,12 @@ void LLPanelProfilePick::processParcelInfo(const LLParcelData& parcel_data)
}
}
void LLPanelProfilePick::addLocationChangedCallbacks()
{
mRegionCallbackConnection = gAgent.addRegionChangedCallback([this]() { onClickSetLocation(); });
mParcelCallbackConnection = gAgent.addParcelChangedCallback([this]() { onClickSetLocation(); });
}
void LLPanelProfilePick::setParcelID(const LLUUID& parcel_id)
{
if (mParcelId != parcel_id)
@ -1024,14 +1024,6 @@ void LLPanelProfilePick::setParcelID(const LLUUID& parcel_id)
}
}
// <FS:Ansariel> Keep set location button
void LLPanelProfilePick::addLocationChangedCallbacks()
{
mRegionCallbackConnection = gAgent.addRegionChangedCallback([this]() { onClickSetLocation(); });
mParcelCallbackConnection = gAgent.addParcelChangedCallback([this]() { onClickSetLocation(); });
}
// </FS:Ansariel>
void LLPanelProfilePick::sendUpdate()
{
LLPickData pick_data;

View File

@ -148,7 +148,7 @@ public:
LLUUID getParcelID() const { return mParcelId; }
void setErrorStatus(S32 status, const std::string& reason) override {};
void addLocationChangedCallbacks(); // <FS:Ansariel> Keep set location button
void addLocationChangedCallbacks();
protected:
@ -214,12 +214,10 @@ public:
*/
void resetDirty() override;
// <FS:Ansariel> Keep set location button
/**
* Callback for "Set Location" button click
*/
void onClickSetLocation();
// <FS:Ansariel>
// <AS:Chanayane> Preview button
/**
@ -250,7 +248,7 @@ protected:
LLTextureCtrl* mSnapshotCtrl;
LLLineEditor* mPickName;
LLTextEditor* mPickDescription;
LLButton* mSetCurrentLocationButton; // <FS:Ansariel> Keep set location button
LLButton* mSetCurrentLocationButton;
LLButton* mSaveButton;
LLButton* mCreateButton;
LLButton* mCancelButton;

View File

@ -28,7 +28,6 @@
#define LL_LLSKY_H
#include "llmath.h"
//#include "vmath.h"
#include "v3math.h"
#include "v4math.h"
#include "v4color.h"

View File

@ -27,8 +27,6 @@
#ifndef LL_LLSPRITE_H
#define LL_LLSPRITE_H
////#include "vmath.h"
//#include "llmath.h"
#include "v3math.h"
#include "v4math.h"
#include "v4color.h"

View File

@ -27,7 +27,6 @@
#ifndef LL_LLSURFACE_H
#define LL_LLSURFACE_H
//#include "vmath.h"
#include "v3math.h"
#include "v3dmath.h"
#include "v4math.h"

View File

@ -107,13 +107,13 @@
extern LLPointer<LLViewerTexture> gStartTexture;
extern bool gShiftFrame;
LLPointer<LLViewerTexture> gDisconnectedImagep = NULL;
LLPointer<LLViewerTexture> gDisconnectedImagep = nullptr;
// used to toggle renderer back on after teleport
bool gTeleportDisplay = false;
LLFrameTimer gTeleportDisplayTimer;
LLFrameTimer gTeleportArrivalTimer;
const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures before we raise the curtain
constexpr F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures before we raise the curtain
// <FS:Ansariel> Draw Distance stepping; originally based on SpeedRez by Henri Beauchamp, licensed under LGPL
F32 gSavedDrawDistance = 0.0f;
F32 gLastDrawDistanceStep = 0.0f;
@ -132,9 +132,9 @@ bool gSnapshotNoPost = false;
bool gShaderProfileFrame = false;
// This is how long the sim will try to teleport you before giving up.
const F32 TELEPORT_EXPIRY = 15.0f;
constexpr F32 TELEPORT_EXPIRY = 15.0f;
// Additional time (in seconds) to wait per attachment
const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
constexpr F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
U32 gRecentFrameCount = 0; // number of 'recent' frames
LLFrameTimer gRecentFPSTime;
@ -142,8 +142,6 @@ LLFrameTimer gRecentMemoryTime;
LLFrameTimer gAssetStorageLogTime;
// Rendering stuff
void pre_show_depth_buffer();
void post_show_depth_buffer();
void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
void swap();
void render_hud_attachments();
@ -224,7 +222,8 @@ void display_update_camera()
F32 final_far = gAgentCamera.mDrawDistance;
if (gCubeSnapshot)
{
final_far = gSavedSettings.getF32("RenderReflectionProbeDrawDistance");
static LLCachedControl<F32> reflection_probe_draw_distance(gSavedSettings, "RenderReflectionProbeDrawDistance", 64.f);
final_far = reflection_probe_draw_distance();
}
else if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode())
@ -252,7 +251,7 @@ void display_update_camera()
void display_stats()
{
LL_PROFILE_ZONE_SCOPED;
const F32 FPS_LOG_FREQUENCY = 10.f;
constexpr F32 FPS_LOG_FREQUENCY = 10.f;
if (gRecentFPSTime.getElapsedTimeF32() >= FPS_LOG_FREQUENCY)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - FPS");
@ -261,11 +260,7 @@ void display_stats()
gRecentFrameCount = 0;
gRecentFPSTime.reset();
}
// <FS:Ansariel> gSavedSettings replacement
//F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency");
static LLCachedControl<F32> memoryLogFrequency(gSavedSettings, "MemoryLogFrequency");
F32 mem_log_freq = (F32)memoryLogFrequency;
// </FS:Ansariel>
static LLCachedControl<F32> mem_log_freq(gSavedSettings, "MemoryLogFrequency", 600.f);
if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - Memory");
@ -275,7 +270,7 @@ void display_stats()
LLMemory::logMemoryInfo(true) ;
gRecentMemoryTime.reset();
}
const F32 ASSET_STORAGE_LOG_FREQUENCY = 60.f;
constexpr F32 ASSET_STORAGE_LOG_FREQUENCY = 60.f;
if (gAssetStorageLogTime.getElapsedTimeF32() >= ASSET_STORAGE_LOG_FREQUENCY)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("DS - Asset Storage");
@ -623,21 +618,15 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
LLImageGL::updateStats(gFrameTimeSeconds);
static LLCachedControl<S32> avatar_name_tag_mode(gSavedSettings, "AvatarNameTagMode", 1);
static LLCachedControl<bool> name_tag_show_group_titles(gSavedSettings, "NameTagShowGroupTitles", true);
// <FS:CR> Aurora sim
//LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode");
static LLCachedControl<S32> avatarNameTagMode(gSavedSettings, "AvatarNameTagMode");
S32 RenderName = (S32)avatarNameTagMode;
if(RenderName > LLWorld::getInstance()->getAllowRenderName())//The most restricted gets set here
RenderName = LLWorld::getInstance()->getAllowRenderName();
LLVOAvatar::sRenderName = RenderName;
//LLVOAvatar::sRenderName = avatar_name_tag_mode;
//LLVOAvatar::sRenderGroupTitles = name_tag_show_group_titles && avatar_name_tag_mode > 0;
auto& world_instance = LLWorld::instance();
LLVOAvatar::sRenderName = avatar_name_tag_mode > world_instance.getAllowRenderName() ? world_instance.getAllowRenderName() : avatar_name_tag_mode;
// <FS:CR> Aurora sim
// <FS:Ansariel> gSavedSettings replacement
//LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("NameTagShowGroupTitles") && gSavedSettings.getS32("AvatarNameTagMode"));
static LLCachedControl<bool> nameTagShowGroupTitles(gSavedSettings, "NameTagShowGroupTitles");
LLVOAvatar::sRenderGroupTitles = (nameTagShowGroupTitles && LLVOAvatar::sRenderName);
// </FS:Ansariel>
LLVOAvatar::sRenderGroupTitles = name_tag_show_group_titles && LLVOAvatar::sRenderName > 0;
gPipeline.mBackfaceCull = true;
gFrameCount++;
@ -899,7 +888,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
}
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
glClearColor(0.f, 0.f, 0.f, 0.f);
LLGLState::checkStates();
@ -1073,7 +1062,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
gPipeline.mRT->deferredScreen.bindTarget();
if (gUseWireframe)
{
F32 g = 0.5f;
constexpr F32 g = 0.5f;
glClearColor(g, g, g, 1.f);
}
else
@ -1092,15 +1081,12 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 5")
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
// <FS:Ansariel> gSavedSettings replacement
//if (gSavedSettings.getBOOL("RenderDepthPrePass"))
static LLCachedControl<bool> renderDepthPrePass(gSavedSettings, "RenderDepthPrePass");
if (renderDepthPrePass)
// </FS:Ansariel>
static LLCachedControl<bool> render_depth_pre_pass(gSavedSettings, "RenderDepthPrePass", false);
if (render_depth_pre_pass)
{
gGL.setColorMask(false, false);
static const U32 types[] = {
constexpr U32 types[] = {
LLRenderPass::PASS_SIMPLE,
LLRenderPass::PASS_FULLBRIGHT,
LLRenderPass::PASS_SHINY
@ -1315,7 +1301,7 @@ void display_cube_face()
gGL.setColorMask(true, true);
glClearColor(0, 0, 0, 0);
glClearColor(0.f, 0.f, 0.f, 0.f);
gPipeline.generateSunShadow(*LLViewerCamera::getInstance());
glClear(GL_DEPTH_BUFFER_BIT); // | GL_STENCIL_BUFFER_BIT);
@ -1351,7 +1337,7 @@ void display_cube_face()
}
else
{
glClearColor(1, 0, 1, 1);
glClearColor(1.f, 0.f, 1.f, 1.f);
}
gPipeline.mRT->deferredScreen.clear();
@ -1396,15 +1382,12 @@ void render_hud_attachments()
{
LLPipeline::sRenderingHUDs = true;
LLCamera hud_cam = *LLViewerCamera::getInstance();
hud_cam.setOrigin(-1.f,0,0);
hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1));
hud_cam.setOrigin(-1.f, 0.f, 0.f);
hud_cam.setAxes(LLVector3(1.f, 0.f, 0.f), LLVector3(0.f, 1.f, 0.f), LLVector3(0.f, 0.f, 1.f));
LLViewerCamera::updateFrustumPlanes(hud_cam, true);
// <FS:Ansariel> gSavedSettings replacement
//bool render_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) && gSavedSettings.getBOOL("RenderHUDParticles");
static LLCachedControl<bool> renderHUDParticles(gSavedSettings, "RenderHUDParticles");
bool render_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) && renderHUDParticles;
// </FS:Ansariel>
static LLCachedControl<bool> render_hud_particles(gSavedSettings, "RenderHUDParticles", false);
bool render_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) && render_hud_particles;
//only render hud objects
gPipeline.pushRenderTypeMask();
@ -1785,14 +1768,11 @@ void render_ui_3d()
stop_glerror();
gUIProgram.bind();
gGL.color4f(1, 1, 1, 1);
gGL.color4f(1.f, 1.f, 1.f, 1.f);
// Coordinate axes
// <FS:Ansariel> gSavedSettings replacement
//if (gSavedSettings.getBOOL("ShowAxes"))
static LLCachedControl<bool> showAxes(gSavedSettings, "ShowAxes");
if (showAxes)
// </FS:Ansariel>
static LLCachedControl<bool> show_axes(gSavedSettings, "ShowAxes");
if (show_axes())
{
draw_axes();
}
@ -1857,9 +1837,7 @@ void render_ui_2d()
gGL.pushMatrix();
S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2);
S32 half_height = (gViewerWindow->getWorldViewHeightScaled() / 2);
// <FS:Ansariel> Factor out instance() call
//gGL.scalef(LLUI::getScaleFactor().mV[0], LLUI::getScaleFactor().mV[1], 1.f);
gGL.scalef(ui_scale_factor.mV[0], ui_scale_factor.mV[1], 1.f);
gGL.scalef(LLUI::getScaleFactor().mV[VX], LLUI::getScaleFactor().mV[VY], 1.f);
gGL.translatef((F32)half_width, (F32)half_height, 0.f);
F32 zoom = gAgentCamera.mHUDCurZoom;
gGL.scalef(zoom,zoom,1.f);
@ -1881,7 +1859,7 @@ void render_ui_2d()
gPipeline.mUIScreen.bindTarget();
gGL.setColorMask(true, true);
{
static const S32 pad = 8;
constexpr S32 pad = 8;
LLView::sDirtyRect.mLeft -= pad;
LLView::sDirtyRect.mRight += pad;
@ -1939,8 +1917,6 @@ void render_ui_2d()
gViewerWindow->draw();
}
// reset current origin for font rendering, in case of tiling render
LLFontGL::sCurOrigin.set(0, 0);
}
@ -1949,7 +1925,7 @@ void render_disconnected_background()
{
gUIProgram.bind();
gGL.color4f(1,1,1,1);
gGL.color4f(1.f, 1.f, 1.f, 1.f);
if (!gDisconnectedImagep && gDisconnected)
{
LL_INFOS() << "Loading last bitmap..." << LL_ENDL;
@ -2024,6 +2000,5 @@ void render_disconnected_background()
void display_cleanup()
{
gDisconnectedImagep = NULL;
gDisconnectedImagep = nullptr;
}

View File

@ -33,6 +33,7 @@
#include "llfloaterreg.h"
#include "llgl.h"
#include "llrender.h"
#include "lluicolor.h"
#include "v4color.h"
#include "v2math.h"
@ -50,8 +51,8 @@
#include "pipeline.h"
static const U8 OVERLAY_IMG_COMPONENTS = 4;
static const F32 LINE_WIDTH = 0.0625f;
static constexpr U8 OVERLAY_IMG_COMPONENTS = 4;
static constexpr F32 LINE_WIDTH = 0.0625f;
bool LLViewerParcelOverlay::sColorSetInitialized = false;
LLUIColor LLViewerParcelOverlay::sAvailColor;
@ -165,10 +166,10 @@ bool LLViewerParcelOverlay::encroachesOwned(const std::vector<LLBBox>& boxes) co
LLVector3 min = boxes[i].getMinAgent();
LLVector3 max = boxes[i].getMaxAgent();
S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 top = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 bottom = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 top = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 bottom = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
for (S32 row = top; row <= bottom; row++)
{
@ -193,10 +194,10 @@ bool LLViewerParcelOverlay::encroachesOnUnowned(const std::vector<LLBBox>& boxes
LLVector3 min = boxes[i].getMinAgent();
LLVector3 max = boxes[i].getMaxAgent();
S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 top = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 bottom = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 top = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 bottom = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
for (S32 row = top; row <= bottom; row++)
{
@ -230,10 +231,10 @@ bool LLViewerParcelOverlay::encroachesOnNearbyParcel(const std::vector<LLBBox>&
return true;
}
S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 bottom = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 top = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 bottom = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
S32 top = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1.f));
const S32 GRIDS_PER_EDGE = mParcelGridsPerEdge;
@ -414,10 +415,10 @@ void LLViewerParcelOverlay::updateOverlayTexture()
break;
}
raw[pixel_index + 0] = (U8)r;
raw[pixel_index + 1] = (U8)g;
raw[pixel_index + 2] = (U8)b;
raw[pixel_index + 3] = (U8)a;
raw[pixel_index + VRED] = (U8)r;
raw[pixel_index + VGREEN] = (U8)g;
raw[pixel_index + VBLUE] = (U8)b;
raw[pixel_index + VALPHA] = (U8)a;
pixel_index += OVERLAY_IMG_COMPONENTS;
}
@ -438,7 +439,6 @@ void LLViewerParcelOverlay::updateOverlayTexture()
}
}
void LLViewerParcelOverlay::uncompressLandOverlay(S32 chunk, U8* packed_overlay)
{
// Unpack the message data into the ownership array
@ -472,7 +472,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
mEdges.clear();
const F32 GRID_STEP = PARCEL_GRID_STEP_METERS;
constexpr F32 GRID_STEP = PARCEL_GRID_STEP_METERS;
const S32 GRIDS_PER_EDGE = mParcelGridsPerEdge;
for (S32 row = 0; row < GRIDS_PER_EDGE; row++)
@ -549,16 +549,16 @@ void LLViewerParcelOverlay::addPropertyLine(F32 start_x, F32 start_y, F32 dx, F3
auto split = [&](const LLVector3& start, F32 x, F32 y, F32 z, F32 part)
{
F32 new_x = start.mV[0] + (x - start.mV[0]) * part;
F32 new_y = start.mV[1] + (y - start.mV[1]) * part;
F32 new_z = start.mV[2] + (z - start.mV[2]) * part;
F32 new_x = start.mV[VX] + (x - start.mV[VX]) * part;
F32 new_y = start.mV[VY] + (y - start.mV[VY]) * part;
F32 new_z = start.mV[VZ] + (z - start.mV[VZ]) * part;
edge.vertices.emplace_back(new_x, new_y, new_z);
};
auto checkForSplit = [&]()
{
const LLVector3& last_outside = edge.vertices.back();
F32 z0 = last_outside.mV[2];
F32 z0 = last_outside.mV[VZ];
F32 z1 = outside_z;
if ((z0 >= water_z && z1 >= water_z) || (z0 < water_z && z1 < water_z))
return;
@ -593,7 +593,7 @@ void LLViewerParcelOverlay::addPropertyLine(F32 start_x, F32 start_y, F32 dx, F3
outside_y += dy * (dy - LINE_WIDTH);
// Middle part, full width
const S32 GRID_STEP = (S32)PARCEL_GRID_STEP_METERS;
constexpr S32 GRID_STEP = (S32)PARCEL_GRID_STEP_METERS;
for (S32 i = 1; i < GRID_STEP; i++)
{
inside_z = land.resolveHeightRegion( inside_x, inside_y );
@ -727,7 +727,7 @@ void LLViewerParcelOverlay::renderPropertyLines()
bool render_hidden = LLSelectMgr::sRenderHiddenSelections && LLFloaterReg::instanceVisible("build");
const F32 PROPERTY_LINE_CLIP_DIST_SQUARED = 256.f * 256.f;
constexpr F32 PROPERTY_LINE_CLIP_DIST_SQUARED = 256.f * 256.f;
for (const Edge& edge : mEdges)
{
@ -760,7 +760,7 @@ void LLViewerParcelOverlay::renderPropertyLines()
else
{
LLVector3 visible = vertex;
visible.mV[2] = water_z;
visible.mV[VZ] = water_z;
gGL.vertex3fv(visible.mV);
}
}
@ -774,7 +774,7 @@ void LLViewerParcelOverlay::renderPropertyLines()
gGL.begin(LLRender::TRIANGLE_STRIP);
LLColor4U color = edge.color;
color.mV[3] /= 4;
color.mV[VALPHA] /= 4;
gGL.color4ubv(color.mV);
for (const LLVector3& vertex : edge.vertices)
@ -819,8 +819,8 @@ void LLViewerParcelOverlay::renderPropertyLinesOnMinimap(F32 scale_pixels_per_me
LLVector3 origin_agent = mRegion->getOriginAgent();
LLVector3 rel_region_pos = origin_agent - gAgentCamera.getCameraPositionAgent();
F32 region_left = rel_region_pos.mV[0] * scale_pixels_per_meter;
F32 region_bottom = rel_region_pos.mV[1] * scale_pixels_per_meter;
F32 region_left = rel_region_pos.mV[VX] * scale_pixels_per_meter;
F32 region_bottom = rel_region_pos.mV[VY] * scale_pixels_per_meter;
F32 map_parcel_width = PARCEL_GRID_STEP_METERS * scale_pixels_per_meter;
const S32 GRIDS_PER_EDGE = mParcelGridsPerEdge;

View File

@ -34,12 +34,11 @@
#include "llframetimer.h"
#include "lluuid.h"
#include "llviewertexture.h"
#include "llgl.h"
#include "lluicolor.h"
class LLViewerRegion;
class LLVector3;
class LLColor4U;
class LLUIColor;
class LLVector2;
class LLViewerParcelOverlay : public LLGLUpdate
@ -65,7 +64,6 @@ public:
bool isSoundLocal(const LLVector3& pos) const;
bool isBuildCameraAllowed(const LLVector3& pos) const;
F32 getOwnedRatio() const;
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3)
const U8* getOwnership() const { return mOwnership; }
@ -96,8 +94,7 @@ public:
private:
// This is in parcel rows and columns, not grid rows and columns
// Stored in bottom three bits.
U8 ownership(S32 row, S32 col) const
{ return parcelFlags(row, col, (U8)0x7); }
U8 ownership(S32 row, S32 col) const { return parcelFlags(row, col, (U8)0x7); }
U8 parcelFlags(S32 row, S32 col, U8 flags) const;

View File

@ -38,7 +38,6 @@
#include "llregionhandle.h"
#include "llsurface.h"
#include "message.h"
//#include "vmath.h"
#include "v3math.h"
#include "v4math.h"

View File

@ -7267,8 +7267,6 @@ const LLUUID& LLVOAvatar::getID() const
// getJoint()
//-----------------------------------------------------------------------------
// RN: avatar joints are multi-rooted to include screen-based attachments
//<FS:Ansariel> Joint-lookup improvements
//LLJoint *LLVOAvatar::getJoint(const std::string &name)
LLJoint* LLVOAvatar::getJoint(std::string_view name)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
@ -7276,17 +7274,15 @@ LLJoint *LLVOAvatar::getJoint(std::string_view name)
//joint_map_t::iterator iter = mJointMap.find( name );
joint_map_t::iterator iter = mJointMap.find(name.data());
LLJoint* jointp = NULL;
LLJoint* jointp = nullptr;
if( iter == mJointMap.end() || iter->second == NULL )
if (iter == mJointMap.end() || iter->second == nullptr)
{ //search for joint and cache found joint in lookup table
if (mJointAliasMap.empty())
{
getJointAliases();
}
//<FS:Ansariel> Joint-lookup improvements
//joint_alias_map_t::const_iterator alias_iter = mJointAliasMap.find(name);
joint_alias_map_t::const_iterator alias_iter = mJointAliasMap.find(std::string(name));
joint_alias_map_t::const_iterator alias_iter = mJointAliasMap.find(name);
std::string canonical_name;
if (alias_iter != mJointAliasMap.end())
{
@ -7297,8 +7293,6 @@ LLJoint *LLVOAvatar::getJoint(std::string_view name)
canonical_name = name;
}
jointp = mRoot->findJoint(canonical_name);
//<FS:Ansariel> Joint-lookup improvements
//mJointMap[name] = jointp;
mJointMap[std::string(name)] = jointp;
}
else

View File

@ -204,8 +204,6 @@ public:
void startDefaultMotions();
void dumpAnimationState();
//<FS:Ansariel> Joint-lookup improvements
//virtual LLJoint* getJoint(const std::string &name);
virtual LLJoint* getJoint(std::string_view name);
LLJoint* getJoint(S32 num);
void initAllJoints();

View File

@ -1029,20 +1029,16 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time)
}
// virtual
//<FS:Ansariel> Joint-lookup improvements
//LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
LLJoint* LLVOAvatarSelf::getJoint(std::string_view name)
{
std::lock_guard lock(mJointMapMutex);
LLJoint *jointp = NULL;
LLJoint* jointp = nullptr;
jointp = LLVOAvatar::getJoint(name);
if (!jointp && mScreenp)
{
jointp = mScreenp->findJoint(name);
if (jointp)
{
//<FS:Ansariel> Joint-lookup improvements
//mJointMap[name] = jointp;
mJointMap[std::string(name)] = jointp;
}
}

View File

@ -90,9 +90,6 @@ public:
/*virtual*/ bool hasMotionFromSource(const LLUUID& source_id);
/*virtual*/ void stopMotionFromSource(const LLUUID& source_id);
/*virtual*/ void requestStopMotion(LLMotion* motion);
//<FS:Ansariel> Joint-lookup improvements
// /*virtual*/ LLJoint* getJoint(const std::string &name);
/*virtual*/ LLJoint* getJoint(std::string_view name);
/*virtual*/ void renderJoints();

View File

@ -29,7 +29,7 @@
#include "llwatchdog.h"
#include "llthread.h"
const U32 WATCHDOG_SLEEP_TIME_USEC = 1000000;
constexpr U32 WATCHDOG_SLEEP_TIME_USEC = 1000000U;
// This class runs the watchdog timing thread.
class LLWatchdogTimerThread : public LLThread
@ -51,7 +51,7 @@ public:
mSleepMsecs = 1;
}
/* virtual */ void run()
void run() override
{
while(!mStopping)
{
@ -118,10 +118,7 @@ void LLWatchdogTimeout::setTimeout(F32 d)
mTimeout = d;
}
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
// void LLWatchdogTimeout::start(const std::string& state)
void LLWatchdogTimeout::start(const char *state)
// </FS:ND>
void LLWatchdogTimeout::start(std::string_view state)
{
if (mTimeout == 0)
{
@ -143,12 +140,9 @@ void LLWatchdogTimeout::stop()
mTimer.stop();
}
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
// void LLWatchdogTimeout::ping(const std::string& state)
void LLWatchdogTimeout::ping(const char *state)
// </FS:ND>
void LLWatchdogTimeout::ping(std::string_view state)
{
if(state)
if (!state.empty())
{
mPingState = state;
}
@ -158,7 +152,7 @@ void LLWatchdogTimeout::ping(const char *state)
// LLWatchdog
LLWatchdog::LLWatchdog()
:mSuspectsAccessMutex()
,mTimer(NULL)
,mTimer(nullptr)
,mLastClockCount(0)
{
}
@ -202,13 +196,13 @@ void LLWatchdog::cleanup()
{
mTimer->stop();
delete mTimer;
mTimer = NULL;
mTimer = nullptr;
}
if (mSuspectsAccessMutex)
{
delete mSuspectsAccessMutex;
mSuspectsAccessMutex = NULL;
mSuspectsAccessMutex = nullptr;
}
mLastClockCount = 0;
@ -221,7 +215,7 @@ void LLWatchdog::run()
// Check the time since the last call to run...
// If the time elapsed is two times greater than the regualr sleep time
// reset the active timeouts.
const U32 TIME_ELAPSED_MULTIPLIER = 2;
constexpr U32 TIME_ELAPSED_MULTIPLIER = 2;
U64 current_time = LLTimer::getTotalTime();
U64 current_run_delta = current_time - mLastClockCount;
mLastClockCount = current_time;
@ -258,7 +252,7 @@ void LLWatchdog::run()
void LLWatchdog::lockThread()
{
if(mSuspectsAccessMutex != NULL)
if (mSuspectsAccessMutex)
{
mSuspectsAccessMutex->lock();
}
@ -266,7 +260,7 @@ void LLWatchdog::lockThread()
void LLWatchdog::unlockThread()
{
if(mSuspectsAccessMutex != NULL)
if (mSuspectsAccessMutex)
{
mSuspectsAccessMutex->unlock();
}

View File

@ -56,35 +56,20 @@ public:
LLWatchdogTimeout();
virtual ~LLWatchdogTimeout();
/* virtual */ bool isAlive() const;
/* virtual */ void reset();
/* virtual */ void start() { start(""); }
/* virtual */ void stop();
bool isAlive() const override;
void reset() override;
void start() override { start(""); }
void stop() override;
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
// void start(const std::string& state);
// void setTimeout(F32 d);
// void ping(const std::string& state);
// const std::string& getState() {return mPingState; }
void start( char const *state);
void start(std::string_view state);
void setTimeout(F32 d);
void ping( char const *state );
std::string getState() {return mPingState; }
// </FS:ND>
void ping(std::string_view state);
const std::string& getState() {return mPingState; }
private:
LLTimer mTimer;
F32 mTimeout;
// <FS:ND> Change from std::string to char const*, saving a lot of object construction/destruction per frame
// std::string mPingState;
char const *mPingState;
// </FS:ND>
std::string mPingState;
};
class LLWatchdogTimerThread; // Defined in the cpp

View File

@ -29,13 +29,10 @@
Leuchten
</text>
<check_box label="Ganz hell" name="checkbox fullbright"/>
<check_box label="Wasser verstecken" name="checkbox_hide_water" left="135"/>
<check_box label="Wasser verst." name="checkbox_hide_water"/>
<button name="copy_face_btn" tool_tip="Textur-Parameter in Zwischenablage kopieren"/>
<button name="paste_face_btn" tool_tip="Textur-Parameter aus Zwischenablage einfügen"/>
<menu_button name="paste_face_gear_btn" tool_tip="Einfüge-Optionen"/>
<text name="label_matmedia">
Material
</text>
<combo_box name="combobox matmedia">
<combo_box.item label="Texturen" name="Materials"/>
<combo_box.item label="PBR metallische Unebenheit" name="PBR"/>
@ -47,9 +44,11 @@
<radio_item label="Glanz (specular)" name="Shininess (specular)"/>
</radio_group>
<radio_group name="radio_pbr_type">
<radio_item label="Farbe/ausstrahlend" name="Color/emissive"/>
<radio_item label="Normal" name="Normal"/>
<radio_item label="Komplettes Material" name="Complete material"/>
<radio_item label="Basis-Farbe" name="Base color"/>
<radio_item label="Metallisch/Unenbenheit" name="Metallic/roughness"/>
<radio_item label="Ausstrahlend" name="Emissive"/>
<radio_item label="Normal" name="Normal"/>
</radio_group>
<texture_picker label="Material" name="pbr_control" tool_tip="Klicken, um ein PBR-Material zu wählen"/>
<!-- <button name="pbr_from_inventory" label="Aus Inventory wählen"/> -->
@ -150,6 +149,7 @@
<spinner label="Versatz Vertikal" name="shinyOffsetV"/>
<spinner label="Skalierung u" name="gltfTextureScaleU"/>
<spinner label="Skalierung v" name="gltfTextureScaleV"/>
<spinner label="Wiederh. / Meter" name="gltfRptctrl"/>
<spinner label="Rotation˚" name="gltfTextureRotation"/>
<spinner label="Versatz u" name="gltfTextureOffsetU"/>
<spinner label="Versatz v" name="gltfTextureOffsetV"/>

View File

@ -110,12 +110,12 @@
top_pad="4"
width="81" />
<check_box
height="19"
height="17"
label="Hide water"
layout="topleft"
left="172"
left="7"
name="checkbox_hide_water"
top_delta="0"
top_pad="0"
width="81" />
<button
follows="top|right"
@ -144,6 +144,7 @@
top_pad="5"
width="25">
</button>
<!-- FS:Ansariel: Removed to make enough room
<text
type="string"
length="1"
@ -156,6 +157,7 @@
width="90">
Material
</text>
-->
<combo_box
height="23"
layout="topleft"
@ -973,7 +975,7 @@
height="19"
initial_value="1"
label="Scale u"
label_width="205"
label_width="195"
layout="topleft"
left="10"
min_val="-100"
@ -986,32 +988,44 @@
height="19"
initial_value="1"
label="Scale v"
label_width="205"
label_width="195"
layout="topleft"
left="10"
min_val="-100"
max_val="100"
name="gltfTextureScaleV"
width="265" />
<spinner
decimal_digits="1"
follows="left|top"
height="19"
initial_value=""
label="Repeats per meter"
layout="topleft"
label_width="195"
left="10"
max_val="100"
min_val="-100"
name="gltfRptctrl"
width="265" />
<spinner
follows="left|top"
height="19"
initial_value="0"
label="Rotation"
label_width="205"
label_width="195"
layout="topleft"
left="10"
min_val="-360"
max_val="360"
name="gltfTextureRotation"
top_pad="27"
width="265" />
<spinner
follows="left|top"
height="19"
initial_value="0"
label="Offset u"
label_width="205"
label_width="195"
layout="topleft"
left="10"
min_val="-999"
@ -1023,7 +1037,7 @@
height="19"
initial_value="0"
label="Offset v"
label_width="205"
label_width="195"
layout="topleft"
left="10"
min_val="-999"

View File

@ -471,7 +471,7 @@ bool LLLocalMeshImportDAE::processObject(domMesh* current_mesh, LLLocalMeshObjec
}
// Function to load the JointMap
JointMap loadJointMap()
static JointMap loadJointMap()
{
JointMap joint_map = gAgentAvatarp->getJointAliases();
@ -483,7 +483,7 @@ JointMap loadJointMap()
extra_names.insert(extra_names.end(), more_extra_names.begin(), more_extra_names.end());
// add the extras to jointmap
for (auto extra_name : extra_names)
for (const auto& extra_name : extra_names)
{
joint_map[extra_name] = extra_name;
}
@ -1067,7 +1067,7 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll
return true;
}
bool LLLocalMeshImportDAE::processSkeletonJoint(domNode* current_node, std::map<std::string, std::string>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children)
bool LLLocalMeshImportDAE::processSkeletonJoint(domNode* current_node, std::map<std::string, std::string, std::less<>>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children)
{
// safety checks & name check
const auto node_name = current_node->getName();

View File

@ -71,7 +71,7 @@ public:
loadFile_return loadFile(LLLocalMeshFile* data, LLLocalMeshFileLOD lod);
bool processObject(domMesh* current_mesh, LLLocalMeshObject* current_object);
bool processSkin(daeDatabase* collada_db, daeElement* collada_document_root, domMesh* current_mesh, domSkin* current_skin, std::unique_ptr<LLLocalMeshObject>& current_object);
bool processSkeletonJoint(domNode* current_node, std::map<std::string, std::string>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children=false);
bool processSkeletonJoint(domNode* current_node, std::map<std::string, std::string, std::less<>>& joint_map, std::map<std::string, LLMatrix4>& joint_transforms, bool recurse_children=false);
bool readMesh_CommonElements(const domInputLocalOffset_Array& inputs,
int& offset_position, int& offset_normals, int& offset_uvmap, int& index_stride,