Added local chat status messages to AO import, fixed AO reloading getting stuck in some cases. FIRE-1444
parent
3548c9faee
commit
f5578150b2
|
|
@ -40,7 +40,7 @@
|
|||
#include <boost/graph/graph_concepts.hpp>
|
||||
|
||||
FloaterAO::FloaterAO(const LLSD& key)
|
||||
: LLTransientDockableFloater(NULL,true,key),
|
||||
: LLTransientDockableFloater(NULL,true,key),LLEventTimer(10.0),
|
||||
mSetList(0),
|
||||
mSelectedSet(0),
|
||||
mSelectedState(0),
|
||||
|
|
@ -48,6 +48,7 @@ FloaterAO::FloaterAO(const LLSD& key)
|
|||
mImportRunning(FALSE),
|
||||
mMore(TRUE)
|
||||
{
|
||||
mEventTimer.stop();
|
||||
}
|
||||
|
||||
FloaterAO::~FloaterAO()
|
||||
|
|
@ -56,11 +57,24 @@ FloaterAO::~FloaterAO()
|
|||
|
||||
void FloaterAO::reloading(BOOL yes)
|
||||
{
|
||||
if(yes)
|
||||
mEventTimer.start();
|
||||
else
|
||||
mEventTimer.stop();
|
||||
|
||||
mReloadCoverPanel->setVisible(yes);
|
||||
enableSetControls(!yes);
|
||||
enableStateControls(!yes);
|
||||
}
|
||||
|
||||
BOOL FloaterAO::tick()
|
||||
{
|
||||
// reloading took too long, probably missed the signal, so we hide the reload cover
|
||||
llwarns << "AO reloading timeout." << llendl;
|
||||
updateList();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void FloaterAO::updateSetParameters()
|
||||
{
|
||||
mOverrideSitsCheckBox->setValue(mSelectedSet->getSitOverride());
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#ifndef AO_H
|
||||
#define AO_H
|
||||
|
||||
#include "lleventtimer.h"
|
||||
#include "lltransientdockablefloater.h"
|
||||
#include "aoset.h"
|
||||
|
||||
|
|
@ -40,7 +41,8 @@ class LLSpinCtrl;
|
|||
class LLTextBox;
|
||||
|
||||
class FloaterAO
|
||||
: public LLTransientDockableFloater
|
||||
: public LLTransientDockableFloater,
|
||||
public LLEventTimer
|
||||
{
|
||||
friend class LLFloaterReg;
|
||||
|
||||
|
|
@ -98,6 +100,8 @@ class FloaterAO
|
|||
BOOL newSetCallback(const LLSD& notification,const LLSD& response);
|
||||
BOOL removeSetCallback(const LLSD& notification,const LLSD& response);
|
||||
|
||||
virtual BOOL tick();
|
||||
|
||||
std::vector<AOSet*> mSetList;
|
||||
AOSet* mSelectedSet;
|
||||
AOSet::AOState* mSelectedState;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "llinventoryfunctions.h" // for ROOT_FIRESTORM_FOLDER
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventoryobserver.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llstring.h"
|
||||
#include "llvfs.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
|
@ -1303,13 +1304,13 @@ BOOL AOEngine::importNotecard(const LLInventoryItem* item)
|
|||
llwarns << "importing AO notecard: " << item->getName() << llendl;
|
||||
if(getSetByName(item->getName()))
|
||||
{
|
||||
llwarns << "set with this name already exists" << llendl;
|
||||
LLNotificationsUtil::add("AOImportSetAlreadyExists", LLSD());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!gAgent.allowOperation(PERM_COPY,item->getPermissions(),GP_OBJECT_MANIPULATE) && !gAgent.isGodlike())
|
||||
{
|
||||
llwarns << "Insufficient permissions to read notecard." << llendl;
|
||||
LLNotificationsUtil::add("AOImportPermissionDenied", LLSD());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1318,7 +1319,7 @@ BOOL AOEngine::importNotecard(const LLInventoryItem* item)
|
|||
mImportSet=new AOSet(item->getParentUUID());
|
||||
if(!mImportSet)
|
||||
{
|
||||
llwarns << "could not create import set." << llendl;
|
||||
LLNotificationsUtil::add("AOImportCreateSetFailed", LLSD());
|
||||
return FALSE;
|
||||
}
|
||||
mImportSet->setName(item->getName());
|
||||
|
|
@ -1353,7 +1354,8 @@ void AOEngine::onNotecardLoadComplete( LLVFS* vfs,const LLUUID& assetUUID,LLAsse
|
|||
{
|
||||
if(status!=LL_ERR_NOERR)
|
||||
{
|
||||
llwarns << "Error downloading import notecard." << llendl;
|
||||
// AOImportDownloadFailed
|
||||
LLNotificationsUtil::add("AOImportDownloadFailed", LLSD());
|
||||
// NULL tells the importer to cancel all operations and free the import set memory
|
||||
AOEngine::instance().parseNotecard(NULL);
|
||||
return;
|
||||
|
|
@ -1401,7 +1403,7 @@ void AOEngine::parseNotecard(const char* buffer)
|
|||
|
||||
if(found==-1)
|
||||
{
|
||||
llwarns << "notecard is missing the text portion" << llendl;
|
||||
LLNotificationsUtil::add("AOImportNoText", LLSD());
|
||||
delete mImportSet;
|
||||
mImportSet=0;
|
||||
mUpdatedSignal();
|
||||
|
|
@ -1411,7 +1413,7 @@ void AOEngine::parseNotecard(const char* buffer)
|
|||
LLViewerInventoryCategory* importCategory=gInventory.getCategory(mImportSet->getInventoryUUID());
|
||||
if(!importCategory)
|
||||
{
|
||||
llwarns << "couldn't find folder to read the animations" << llendl;
|
||||
LLNotificationsUtil::add("AOImportNoFolder", LLSD());
|
||||
delete mImportSet;
|
||||
mImportSet=0;
|
||||
mUpdatedSignal();
|
||||
|
|
@ -1442,14 +1444,18 @@ void AOEngine::parseNotecard(const char* buffer)
|
|||
LLStringUtil::trim(line);
|
||||
if(line.find("[")!=0)
|
||||
{
|
||||
llwarns << "line " << index << " has no valid [ state prefix" << llendl;
|
||||
LLSD args;
|
||||
args["LINE"]=(S32) index;
|
||||
LLNotificationsUtil::add("AOImportNoStatePrefix",args);
|
||||
continue;
|
||||
}
|
||||
|
||||
U32 endTag=line.find("]");
|
||||
if(endTag==std::string::npos)
|
||||
{
|
||||
llwarns << "line " << index << " has no valid ] delimiter" << llendl;
|
||||
LLSD args;
|
||||
args["LINE"]=(S32) index;
|
||||
LLNotificationsUtil::add("AOImportNoValidDelimiter",args);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1459,7 +1465,9 @@ void AOEngine::parseNotecard(const char* buffer)
|
|||
AOSet::AOState* newState=mImportSet->getStateByName(stateName);
|
||||
if(!newState)
|
||||
{
|
||||
llwarns << "state name " << stateName << " not found." << llendl;
|
||||
LLSD args;
|
||||
args["NAME"]=stateName;
|
||||
LLNotificationsUtil::add("AOImportStateNameNotFound",args);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1474,7 +1482,9 @@ void AOEngine::parseNotecard(const char* buffer)
|
|||
animation.mInventoryUUID=animationMap[animation.mName];
|
||||
if(animation.mInventoryUUID.isNull())
|
||||
{
|
||||
llwarns << "couldn't find animation " << animation.mName << " in animation map." << llendl;
|
||||
LLSD args;
|
||||
args["NAME"]=animation.mName;
|
||||
LLNotificationsUtil::add("AOImportAnimationNotFound",args);
|
||||
continue;
|
||||
}
|
||||
animation.mSortOrder=animIndex;
|
||||
|
|
@ -1485,7 +1495,7 @@ void AOEngine::parseNotecard(const char* buffer)
|
|||
|
||||
if(!isValid)
|
||||
{
|
||||
llwarns << "Notecard didn't contain any usable data. Aborting import." << llendl;
|
||||
LLNotificationsUtil::add("AOImportInvalid",LLSD());
|
||||
// NOTE: cleanup is always the same, needs streamlining
|
||||
delete mImportSet;
|
||||
mImportSet=0;
|
||||
|
|
@ -1514,10 +1524,16 @@ void AOEngine::processImport()
|
|||
mImportSet=0;
|
||||
mImportCategory.setNull();
|
||||
mUpdatedSignal();
|
||||
llwarns << "could not create import category for set " << mImportSet->getName() << " ... giving up" << llendl;
|
||||
LLSD args;
|
||||
args["NAME"]=mImportSet->getName();
|
||||
LLNotificationsUtil::add("AOImportAbortCreateSet",args);
|
||||
}
|
||||
else
|
||||
llwarns << "could not create import category for set " << mImportSet->getName() << " ... retrying ..." << llendl;
|
||||
{
|
||||
LLSD args;
|
||||
args["NAME"]=mImportSet->getName();
|
||||
LLNotificationsUtil::add("AOImportRetryCreateSet",args);
|
||||
}
|
||||
return;
|
||||
}
|
||||
mImportSet->setInventoryUUID(mImportCategory);
|
||||
|
|
@ -1543,7 +1559,11 @@ void AOEngine::processImport()
|
|||
lldebugs << "deleted, size now: " << state->mAnimations.size() << llendl;
|
||||
}
|
||||
else
|
||||
llwarns << "linking animation failed!" << llendl;
|
||||
{
|
||||
LLSD args;
|
||||
args["NAME"]=state->mAnimations[animationIndex].mName;
|
||||
LLNotificationsUtil::add("AOImportLinkFailed",args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7201,6 +7201,104 @@ Remove AO set "[AO_SET_NAME]" from the list?
|
|||
yestext="Remove"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportSetAlreadyExists"
|
||||
type="notifytip">
|
||||
An animation set with this name already exists.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportPermissionDenied"
|
||||
type="notifytip">
|
||||
Insufficient permissions to read notecard.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportCreateSetFailed"
|
||||
type="notifytip">
|
||||
Error while creating import set.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportDownloadFailed"
|
||||
type="notifytip">
|
||||
Could not download notecard.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportNoText"
|
||||
type="notifytip">
|
||||
Notecard is empty or unreadable.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportNoFolder"
|
||||
type="notifytip">
|
||||
Couldn't find folder to read the animations.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportNoStatePrefix"
|
||||
type="notifytip">
|
||||
Notecard line [LINE] has no valid [ state prefix.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportNoValidDelimiter"
|
||||
type="notifytip">
|
||||
Notecard line [LINE] has no valid ] delimiter.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportStateNameNotFound"
|
||||
type="notifytip">
|
||||
State name [NAME] not found.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportAnimationNotFound"
|
||||
type="notifytip">
|
||||
Couldn't find animation [NAME]. Please make sure it's present in the same folder as the import notecard.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportInvalid"
|
||||
type="notifytip">
|
||||
Notecard didn't contain any usable data. Aborting import.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportRetryCreateSet"
|
||||
type="notifytip">
|
||||
Could not create import folder for animation set [NAME]. Retrying ...
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportAbortCreateSet"
|
||||
type="notifytip">
|
||||
Could not create import folder for animation set [NAME]. Giving up.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="AOImportLinkFailed"
|
||||
type="notifytip">
|
||||
Creating animation link for animation "[NAME]" failed!
|
||||
</notification>
|
||||
|
||||
<!-- ## Zi: Animation Overrider -->
|
||||
|
||||
<notification
|
||||
|
|
|
|||
Loading…
Reference in New Issue