Merge branch 'DRTVWR-559' into DRTVWR-583
commit
4192cfc1ea
|
|
@ -703,7 +703,7 @@ bool LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
|
|||
|
||||
for (U32 i = start; i <= end; ++i)
|
||||
{
|
||||
if (!v->isFinite3())
|
||||
if (!v[i].isFinite3())
|
||||
{
|
||||
LL_ERRS() << "Non-finite vertex position data detected." << LL_ENDL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "llenvironment.h"
|
||||
#include "llerrorcontrol.h"
|
||||
#include "lleventtimer.h"
|
||||
#include "llfile.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llagent.h"
|
||||
|
|
@ -2979,9 +2980,33 @@ void LLAppViewer::initStrings()
|
|||
std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file);
|
||||
if (strings_path_full.empty() || !LLFile::isfile(strings_path_full))
|
||||
{
|
||||
if (strings_path_full.empty())
|
||||
{
|
||||
LL_WARNS() << "The file '" << strings_file << "' is not found" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llstat st;
|
||||
int rc = LLFile::stat(strings_path_full, &st);
|
||||
if (rc != 0)
|
||||
{
|
||||
LL_WARNS() << "The file '" << strings_path_full << "' failed to get status. Error code: " << rc << LL_ENDL;
|
||||
}
|
||||
else if (S_ISDIR(st.st_mode))
|
||||
{
|
||||
LL_WARNS() << "The filename '" << strings_path_full << "' is a directory name" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "The filename '" << strings_path_full << "' doesn't seem to be a regular file name" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// initial check to make sure files are there failed
|
||||
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
|
||||
LL_ERRS() << "Viewer failed to find localization and UI files. Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
|
||||
LL_ERRS() << "Viewer failed to find localization and UI files."
|
||||
<< " Please reinstall viewer from https://secondlife.com/support/downloads"
|
||||
<< " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
|
||||
}
|
||||
LLTransUtil::parseStrings(strings_file, default_trans_args);
|
||||
LLTransUtil::parseLanguageStrings("language_settings.xml");
|
||||
|
|
|
|||
|
|
@ -1174,7 +1174,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
{
|
||||
if (gDebugGL)
|
||||
{
|
||||
llassert(false);
|
||||
LL_WARNS() << "Index buffer overflow!" << LL_ENDL;
|
||||
LL_WARNS() << "Indices Count: " << mIndicesCount
|
||||
<< " VF Num Indices: " << num_indices
|
||||
|
|
@ -1182,6 +1181,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
<< " VB Num Indices: " << mVertexBuffer->getNumIndices() << LL_ENDL;
|
||||
LL_WARNS() << " Face Index: " << f
|
||||
<< " Pool Type: " << mPoolType << LL_ENDL;
|
||||
llassert(false);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1190,8 +1190,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
{
|
||||
if (gDebugGL)
|
||||
{
|
||||
llassert(false);
|
||||
LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL;
|
||||
llassert(false);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1197,10 +1197,16 @@ bool LLMaterialEditor::saveIfNeeded()
|
|||
}
|
||||
else
|
||||
{
|
||||
//make a new inventory item
|
||||
std::string res_desc = buildMaterialDescription();
|
||||
// Make a new inventory item and set upload permissions
|
||||
LLPermissions local_permissions;
|
||||
local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
|
||||
|
||||
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
|
||||
U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
|
||||
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
|
||||
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
|
||||
|
||||
std::string res_desc = buildMaterialDescription();
|
||||
createInventoryItem(buffer, mMaterialName, res_desc, local_permissions);
|
||||
|
||||
// We do not update floater with uploaded asset yet, so just close it.
|
||||
|
|
@ -1947,6 +1953,32 @@ bool LLMaterialEditor::canSaveObjectsMaterial()
|
|||
return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY}), permissions, item_out);
|
||||
}
|
||||
|
||||
bool LLMaterialEditor::canClipboardObjectsMaterial()
|
||||
{
|
||||
if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
struct LLSelectedTEGetNullMat : public LLSelectedTEFunctor
|
||||
{
|
||||
bool apply(LLViewerObject* objectp, S32 te_index)
|
||||
{
|
||||
return objectp->getRenderMaterialID(te_index).isNull();
|
||||
}
|
||||
} null_func;
|
||||
|
||||
if (LLSelectMgr::getInstance()->getSelection()->applyToTEs(&null_func))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
LLSelectedTEGetMatData func(true);
|
||||
LLPermissions permissions;
|
||||
LLViewerInventoryItem* item_out;
|
||||
return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY, PERM_TRANSFER}), permissions, item_out);
|
||||
}
|
||||
|
||||
void LLMaterialEditor::saveObjectsMaterialAs()
|
||||
{
|
||||
LLSelectedTEGetMatData func(true);
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener
|
|||
|
||||
static bool canModifyObjectsMaterial();
|
||||
static bool canSaveObjectsMaterial();
|
||||
static bool canClipboardObjectsMaterial();
|
||||
static void saveObjectsMaterialAs();
|
||||
static void onCopyObjectsMaterialAsMsgCallback(const LLSD& notification, const LLSD& response, const LLPermissions& permissions, const LLUUID& object_id, const LLUUID& item_id);
|
||||
static void onSaveObjectsMaterialAsMsgCallback(const LLSD& notification, const LLSD& response, const LLPermissions& permissions);
|
||||
|
|
|
|||
|
|
@ -1976,7 +1976,8 @@ void LLPanelFace::updateCopyTexButton()
|
|||
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
|
||||
mMenuClipboardTexture->setEnabled(objectp && objectp->getPCode() == LL_PCODE_VOLUME && objectp->permModify()
|
||||
&& !objectp->isPermanentEnforced() && !objectp->isInventoryPending()
|
||||
&& (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1));
|
||||
&& (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)
|
||||
&& LLMaterialEditor::canClipboardObjectsMaterial());
|
||||
std::string tooltip = (objectp && objectp->isInventoryPending()) ? LLTrans::getString("LoadingContents") : getString("paste_options");
|
||||
mMenuClipboardTexture->setToolTip(tooltip);
|
||||
}
|
||||
|
|
@ -4148,7 +4149,8 @@ void LLPanelFace::onCopyTexture()
|
|||
|| objectp->getPCode() != LL_PCODE_VOLUME
|
||||
|| !objectp->permModify()
|
||||
|| objectp->isPermanentEnforced()
|
||||
|| selected_count > 1)
|
||||
|| selected_count > 1
|
||||
|| !LLMaterialEditor::canClipboardObjectsMaterial())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -4343,7 +4345,8 @@ void LLPanelFace::onPasteTexture()
|
|||
|| objectp->getPCode() != LL_PCODE_VOLUME
|
||||
|| !objectp->permModify()
|
||||
|| objectp->isPermanentEnforced()
|
||||
|| selected_count > 1)
|
||||
|| selected_count > 1
|
||||
|| !LLMaterialEditor::canClipboardObjectsMaterial())
|
||||
{
|
||||
// not supposed to happen
|
||||
LL_WARNS() << "Failed to paste texture due to missing or wrong selection" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -4076,7 +4076,8 @@ void LLCullResult::assertDrawMapsEmpty()
|
|||
{
|
||||
if (mRenderMapSize[i] != 0)
|
||||
{
|
||||
LL_ERRS() << "Stale LLDrawInfo's in LLCullResult!" << LL_ENDL;
|
||||
LL_ERRS() << "Stale LLDrawInfo's in LLCullResult!"
|
||||
<< " (mRenderMapSize[" << i << "] = " << mRenderMapSize[i] << ")" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ void LLVOPartGroup::getGeometry(const LLViewerPart& part,
|
|||
up.setCross3(right, at);
|
||||
up.normalize3fast();
|
||||
|
||||
if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
|
||||
if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK && !part.mVelocity.isExactlyZero())
|
||||
{
|
||||
LLVector4a normvel;
|
||||
normvel.load3(part.mVelocity.mV);
|
||||
|
|
|
|||
Loading…
Reference in New Issue