Merge viewer-bear

master
Ansariel 2016-02-19 10:30:02 +01:00
commit a0fa2e5762
18 changed files with 186 additions and 125 deletions

View File

@ -370,6 +370,8 @@ Dimitrio Lewis
Dirk
Draconis Neurocam
STORM-1259
Drake Arconis
MAINT-6107
Drew Dri
VWR-19683
Drew Dwi
@ -772,6 +774,12 @@ Kitty Barnett
VWR-24217
STORM-1804
MAINT-5416
MAINT-6041
MAINT-6142
MAINT-6144
MAINT-6152
MAINT-6153
MAINT-6154
Kolor Fall
Komiko Okamoto
Korvel Noh

View File

@ -848,7 +848,8 @@ LLDAELoader::LLDAELoader(
void* opaque_userdata,
JointTransformMap& jointMap,
JointSet& jointsFromNodes,
U32 modelLimit)
U32 modelLimit,
bool preprocess)
: LLModelLoader(
filename,
lod,
@ -859,7 +860,8 @@ LLDAELoader::LLDAELoader(
opaque_userdata,
jointMap,
jointsFromNodes),
mGeneratedModelLimit(modelLimit)
mGeneratedModelLimit(modelLimit),
mPreprocessDAE(preprocess)
{
}
@ -892,12 +894,20 @@ bool LLDAELoader::OpenFile(const std::string& filename)
//no suitable slm exists, load from the .dae file
DAE dae;
std::string fileURI = "from memory"; // set to a null device
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
//domCOLLADA* dom = dae.openFromMemory(fileURI, preprocessDAE(filename).c_str());
domCOLLADA* dom = dae.openFromMemory(fileURI, preprocessDAE(tmp_file).c_str());
// </FS:Ansariel>
domCOLLADA* dom;
if (mPreprocessDAE)
{
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
//dom = dae.openFromMemory(filename, preprocessDAE(filename).c_str());
dom = dae.openFromMemory(filename, preprocessDAE(tmp_file).c_str());
}
else
{
LL_INFOS() << "Skipping dae preprocessing" << LL_ENDL;
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
//dom = dae.open(filename);
dom = dae.open(tmp_file);
}
if (!dom)
{
@ -925,7 +935,7 @@ bool LLDAELoader::OpenFile(const std::string& filename)
daeInt count = db->getElementCount(NULL, COLLADA_TYPE_MESH);
daeDocument* doc = dae.getDoc(fileURI);
daeDocument* doc = dae.getDoc(filename);
if (!doc)
{
LL_WARNS() << "can't find internal doc" << LL_ENDL;

View File

@ -56,7 +56,8 @@ public:
void* opaque_userdata,
JointTransformMap& jointMap,
JointSet& jointsFromNodes,
U32 modelLimit);
U32 modelLimit,
bool preprocess);
virtual ~LLDAELoader() ;
virtual bool OpenFile(const std::string& filename);
@ -104,6 +105,7 @@ protected:
private:
U32 mGeneratedModelLimit; // Attempt to limit amount of generated submodels
bool mPreprocessDAE;
};
#endif // LL_LLDAELLOADER_H

View File

@ -1446,6 +1446,17 @@
<string>U32</string>
<key>Value</key>
<integer>768</integer>
</map>
<key>ImporterPreprocessDAE</key>
<map>
<key>Comment</key>
<string>Enable preprocessing for DAE files to fix some ColladaDOM related problems (like support for space characters within names and ids).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>IMShowTime</key>
<map>

View File

@ -39,6 +39,7 @@
#include "llagent.h"
#include "llagentaccess.h"
#include "llappviewer.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@ -497,6 +498,30 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");
mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND);
mBtnBuyPass = getChild<LLButton>("Buy Pass...");
mBtnBuyPass->setClickedCallback(onClickBuyPass, this);
mBtnReleaseLand = getChild<LLButton>("Abandon Land...");
mBtnReleaseLand->setClickedCallback(onClickRelease, NULL);
mBtnReclaimLand = getChild<LLButton>("Reclaim Land...");
mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL);
mBtnStartAuction = getChild<LLButton>("Linden Sale...");
mBtnStartAuction->setClickedCallback(onClickStartAuction, this);
mBtnScriptLimits = getChild<LLButton>("Scripts...");
if(gDisconnected)
{
return TRUE;
}
// note: on region change this will not be re checked, should not matter on Agni as
// 99% of the time all regions will return the same caps. In case of an erroneous setting
// to enabled the floater will just throw an error when trying to get it's cap
@ -506,7 +531,6 @@ BOOL LLPanelLandGeneral::postBuild()
// </FS:Ansariel>
if (!url.empty())
{
mBtnScriptLimits = getChild<LLButton>("Scripts...");
if(mBtnScriptLimits)
{
mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this);
@ -514,28 +538,11 @@ BOOL LLPanelLandGeneral::postBuild()
}
else
{
mBtnScriptLimits = getChild<LLButton>("Scripts...");
if(mBtnScriptLimits)
{
mBtnScriptLimits->setVisible(false);
}
}
mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");
mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND);
mBtnBuyPass = getChild<LLButton>("Buy Pass...");
mBtnBuyPass->setClickedCallback(onClickBuyPass, this);
mBtnReleaseLand = getChild<LLButton>("Abandon Land...");
mBtnReleaseLand->setClickedCallback(onClickRelease, NULL);
mBtnReclaimLand = getChild<LLButton>("Reclaim Land...");
mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL);
mBtnStartAuction = getChild<LLButton>("Linden Sale...");
mBtnStartAuction->setClickedCallback(onClickStartAuction, this);
return TRUE;
}
@ -549,9 +556,61 @@ LLPanelLandGeneral::~LLPanelLandGeneral()
// public
void LLPanelLandGeneral::refresh()
{
mBtnStartAuction->setVisible(gAgent.isGodlike());
mEditName->setEnabled(FALSE);
mEditName->setText(LLStringUtil::null);
LLParcel *parcel = mParcel->getParcel();
mEditUUID->setText(LLStringUtil::null);
mEditDesc->setEnabled(FALSE);
mEditDesc->setText(getString("no_selection_text"));
mTextSalePending->setText(LLStringUtil::null);
mTextSalePending->setEnabled(FALSE);
mBtnDeedToGroup->setEnabled(FALSE);
mBtnSetGroup->setEnabled(FALSE);
mBtnStartAuction->setEnabled(FALSE);
mCheckDeedToGroup ->set(FALSE);
mCheckDeedToGroup ->setEnabled(FALSE);
mCheckContributeWithDeed->set(FALSE);
mCheckContributeWithDeed->setEnabled(FALSE);
mTextOwner->setText(LLStringUtil::null);
mContentRating->setText(LLStringUtil::null);
mLandType->setText(LLStringUtil::null);
// <FS:Ansariel> Doesn't exists as of 2014-04-14
//mBtnProfile->setLabel(getString("profile_text"));
//mBtnProfile->setEnabled(FALSE);
mTextClaimDate->setText(LLStringUtil::null);
mTextGroup->setText(LLStringUtil::null);
mTextPrice->setText(LLStringUtil::null);
mSaleInfoForSale1->setVisible(FALSE);
mSaleInfoForSale2->setVisible(FALSE);
mSaleInfoForSaleObjects->setVisible(FALSE);
mSaleInfoForSaleNoObjects->setVisible(FALSE);
mSaleInfoNotForSale->setVisible(FALSE);
mBtnSellLand->setVisible(FALSE);
mBtnStopSellLand->setVisible(FALSE);
mTextPriceLabel->setText(LLStringUtil::null);
mTextDwell->setText(LLStringUtil::null);
mBtnBuyLand->setEnabled(FALSE);
mBtnScriptLimits->setEnabled(FALSE);
mBtnBuyGroupLand->setEnabled(FALSE);
mBtnReleaseLand->setEnabled(FALSE);
mBtnReclaimLand->setEnabled(FALSE);
mBtnBuyPass->setEnabled(FALSE);
if(gDisconnected)
{
return;
}
mBtnStartAuction->setVisible(gAgent.isGodlike());
bool region_owner = false;
LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(regionp && (regionp->getOwner() == gAgent.getID()))
@ -565,59 +624,8 @@ void LLPanelLandGeneral::refresh()
mBtnReleaseLand->setVisible(TRUE);
mBtnReclaimLand->setVisible(FALSE);
}
if (!parcel)
{
// nothing selected, disable panel
mEditName->setEnabled(FALSE);
mEditName->setText(LLStringUtil::null);
mEditUUID->setText(LLStringUtil::null);
mEditDesc->setEnabled(FALSE);
mEditDesc->setText(getString("no_selection_text"));
mTextSalePending->setText(LLStringUtil::null);
mTextSalePending->setEnabled(FALSE);
mBtnDeedToGroup->setEnabled(FALSE);
mBtnSetGroup->setEnabled(FALSE);
mBtnStartAuction->setEnabled(FALSE);
mCheckDeedToGroup ->set(FALSE);
mCheckDeedToGroup ->setEnabled(FALSE);
mCheckContributeWithDeed->set(FALSE);
mCheckContributeWithDeed->setEnabled(FALSE);
mTextOwner->setText(LLStringUtil::null);
mContentRating->setText(LLStringUtil::null);
mLandType->setText(LLStringUtil::null);
// <FS:Ansariel> Doesn't exists as of 2014-04-14
//mBtnProfile->setLabel(getString("profile_text"));
//mBtnProfile->setEnabled(FALSE);
mTextClaimDate->setText(LLStringUtil::null);
mTextGroup->setText(LLStringUtil::null);
mTextPrice->setText(LLStringUtil::null);
mSaleInfoForSale1->setVisible(FALSE);
mSaleInfoForSale2->setVisible(FALSE);
mSaleInfoForSaleObjects->setVisible(FALSE);
mSaleInfoForSaleNoObjects->setVisible(FALSE);
mSaleInfoNotForSale->setVisible(FALSE);
mBtnSellLand->setVisible(FALSE);
mBtnStopSellLand->setVisible(FALSE);
mTextPriceLabel->setText(LLStringUtil::null);
mTextDwell->setText(LLStringUtil::null);
mBtnBuyLand->setEnabled(FALSE);
mBtnScriptLimits->setEnabled(FALSE);
mBtnBuyGroupLand->setEnabled(FALSE);
mBtnReleaseLand->setEnabled(FALSE);
mBtnReclaimLand->setEnabled(FALSE);
mBtnBuyPass->setEnabled(FALSE);
}
else
LLParcel *parcel = mParcel->getParcel();
if (parcel)
{
// something selected, hooray!
BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus());
@ -1342,7 +1350,7 @@ void LLPanelLandObjects::refresh()
mOwnerList->deleteAllItems();
mOwnerList->setEnabled(FALSE);
if (!parcel)
if (!parcel || gDisconnected)
{
mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", 0));
mSWTotalObjects->setTextArg("[TOTAL]", llformat("%d", 0));
@ -2124,7 +2132,7 @@ void LLPanelLandOptions::refresh()
refreshSearch();
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
if (!parcel || gDisconnected)
{
mCheckEditObjects ->set(FALSE);
mCheckEditObjects ->setEnabled(FALSE);
@ -2365,7 +2373,7 @@ void LLPanelLandOptions::draw()
void LLPanelLandOptions::refreshSearch()
{
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
if (!parcel || gDisconnected)
{
mCheckShowDirectory->set(FALSE);
mCheckShowDirectory->setEnabled(FALSE);
@ -2651,7 +2659,7 @@ void LLPanelLandAccess::refresh()
LLParcel *parcel = mParcel->getParcel();
// Display options
if (parcel)
if (parcel && !gDisconnected)
{
BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
@ -2845,7 +2853,7 @@ void LLPanelLandAccess::refresh_ui()
getChildView("remove_banned")->setEnabled(FALSE);
LLParcel *parcel = mParcel->getParcel();
if (parcel)
if (parcel && !gDisconnected)
{
BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);
@ -3204,7 +3212,7 @@ BOOL LLPanelLandCovenant::postBuild()
void LLPanelLandCovenant::refresh()
{
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return;
if(!region || gDisconnected) return;
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name)
@ -3429,7 +3437,7 @@ void LLPanelLandExperiences::refreshPanel(LLPanelExperienceListEditor* panel, U3
{
return;
}
if (parcel == NULL)
if (!parcel || gDisconnected)
{
// disable the panel
panel->setEnabled(FALSE);

View File

@ -1865,7 +1865,8 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
this,
mJointTransformMap,
mJointsFromNode,
gSavedSettings.getU32("ImporterModelLimit"));
gSavedSettings.getU32("ImporterModelLimit"),
gSavedSettings.getBOOL("ImporterPreprocessDAE"));
if (force_disable_slm)
{

View File

@ -250,10 +250,12 @@ BOOL LLFloaterRegionInfo::postBuild()
panel->buildFromFile("panel_region_debug.xml");
mTab->addTabPanel(panel);
// <FS:Ansariel> Crash fix
//if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
if (gAgent.getRegion() && !gAgent.getRegion()->getCapability("RegionExperiences").empty())
// </FS:Ansariel>
if(gDisconnected)
{
return TRUE;
}
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
{
panel = new LLPanelRegionExperiences;
mInfoPanels.push_back(panel);
@ -276,6 +278,11 @@ LLFloaterRegionInfo::~LLFloaterRegionInfo()
void LLFloaterRegionInfo::onOpen(const LLSD& key)
{
if(gDisconnected)
{
disableTabCtrls();
return;
}
refreshFromRegion(gAgent.getRegion());
requestRegionInfo();
requestMeshRezInfo();
@ -516,7 +523,16 @@ LLPanelRegionExperiences* LLFloaterRegionInfo::getPanelExperiences()
return (LLPanelRegionExperiences*)tab->getChild<LLPanel>("Experiences");
}
void LLFloaterRegionInfo::disableTabCtrls()
{
LLTabContainer* tab = getChild<LLTabContainer>("region_panels");
tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
}
// <FS:CR> Aurora Sim - Region Settings Console
// static
@ -3320,6 +3336,11 @@ bool LLPanelEnvironmentInfo::refreshFromRegion(LLViewerRegion* region)
void LLPanelEnvironmentInfo::refresh()
{
if(gDisconnected)
{
return;
}
populateWaterPresetsList();
populateSkyPresetsList();
populateDayCyclesList();

View File

@ -116,6 +116,7 @@ private:
protected:
void onTabSelected(const LLSD& param);
void disableTabCtrls();
void refreshFromRegion(LLViewerRegion* region);
// member data

View File

@ -3593,6 +3593,11 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id)
void LLInventoryModel::removeObject(const LLUUID& object_id)
{
if(object_id.isNull())
{
return;
}
LLInventoryObject* obj = getObject(object_id);
if (dynamic_cast<LLViewerInventoryItem*>(obj))
{

View File

@ -306,6 +306,12 @@ void LLInventoryFetchItemsObserver::startFetch()
continue;
}
if ((*it).isNull())
{
LL_WARNS("Inventory") << "Skip fetching for a NULL uuid" << LL_ENDL;
continue;
}
// It's incomplete, so put it on the incomplete container, and
// pack this on the message.
mIncomplete.push_back(*it);

View File

@ -1485,6 +1485,11 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
}
else
{
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (floater_inventory)
{
floater_inventory->setFocus(TRUE);
}
active_panel->setSelection(obj_id, TAKE_FOCUS_YES);
}
}

View File

@ -393,10 +393,7 @@ LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Param
buildFromFile("panel_notification_list_item.xml");
}
// <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
//LLGroupNoticeNotificationListItem::~LLGroupNoticeNotificationListItem()
LLGroupNotificationListItem::~LLGroupNotificationListItem()
// </FS:Ansariel>
{
LLGroupMgr::getInstance()->removeObserver(this);
}
@ -587,8 +584,6 @@ void LLGroupNoticeNotificationListItem::close()
mInventoryOffer->forceResponse(IOR_DECLINE);
mInventoryOffer = NULL;
}
// <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
//LLGroupMgr::getInstance()->removeObserver(this);
}
void LLGroupNoticeNotificationListItem::onClickAttachment()

View File

@ -140,7 +140,7 @@ class LLGroupNotificationListItem
: public LLNotificationListItem, public LLGroupMgrObserver
{
public:
virtual ~LLGroupNotificationListItem(); // <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
virtual ~LLGroupNotificationListItem();
virtual BOOL postBuild();
void setGroupId(const LLUUID& value);
@ -202,7 +202,6 @@ class LLGroupNoticeNotificationListItem
: public LLGroupNotificationListItem
{
public:
//~LLGroupNoticeNotificationListItem(); // <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
static std::set<std::string> getTypes();
virtual BOOL postBuild();

View File

@ -30,7 +30,7 @@
#include "lluictrlfactory.h"
#include "roles_constants.h"
#include "llappviewer.h"
#include "llhttpclient.h"
#include "llagent.h"
#include "llviewerregion.h"
@ -98,7 +98,7 @@ BOOL LLPanelGroupExperiences::postBuild()
void LLPanelGroupExperiences::activate()
{
if (getGroupID() == LLUUID::null)
if ((getGroupID() == LLUUID::null) || gDisconnected)
{
return;
}
@ -111,7 +111,7 @@ void LLPanelGroupExperiences::activate()
// </FS:Ansariel>
// search for experiences owned by the current group
std::string url = gAgent.getRegion()->getCapability("GroupExperiences");
std::string url = (gAgent.getRegion()) ? gAgent.getRegion()->getCapability("GroupExperiences") : LLStringUtil::null;
if (!url.empty())
{
url += "?" + getGroupID().asString();

View File

@ -137,15 +137,11 @@ LLPreviewTexture::~LLPreviewTexture()
getWindow()->decBusyCount();
}
// <FS:ND> mImage can be 0.
// mImage->setBoostLevel(mImageOldBoostLevel);
if( mImage )
if (mImage.notNull())
{
mImage->setBoostLevel(mImageOldBoostLevel);
// <FS:ND>
mImage = NULL;
mImage = NULL;
}
}
// virtual

View File

@ -419,11 +419,9 @@ void LLToolMgr::clearTransientTool()
void LLToolMgr::onAppFocusLost()
{
// <FS:ND> During shutdown the viewer might be in a state that leads to crashes.
if( LLApp::isQuitting() )
if (LLApp::isQuitting())
return;
// </FS:ND>
if (mSelectedTool)
{
mSelectedTool->handleDeselect();

View File

@ -2177,12 +2177,9 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
{
LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
//<FS:Ansariel> Possible crash fix by Drake Arconis
if (cur_material.isNull())
{
continue;
}
// </FS:Ansariel>
switch(range_it->second.map)
{
case LLRender::DIFFUSE_MAP:
@ -3984,10 +3981,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
if (mDrawable->isState(LLDrawable::RIGGED))
{
// if ((pick_rigged) || ((getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools))))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if ((pick_rigged) || (getAvatar() && getAvatar()->isSelf() && (LLFloater::isVisible(gFloaterTools))))
// [/SL:KB]
if ((pick_rigged) || (getAvatar() && (getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools))))
{
updateRiggedVolume(true);
volume = mRiggedVolume;

View File

@ -640,6 +640,7 @@
height="15"
increment="0.125"
initial_value="160"
min_val="0.125"
label=" Trees"
label_width="140"
layout="topleft"