NOTE: Partial merges of the maintenance branch up. The bulk of maintenance 62831:63347 is awaiting final QA and merging, post 1.17.0

svn merge -r 63182:63183 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
svn merge -r 63341:63342 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
svn merge -r 63420:63421 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release

Rush in the following fixes:

* SL-27250 "Stop All Animations" doesn't work when stuck in a pose after teleporting
* SL-44718 VWR-1040: crash when opening several gestures quickly
* SL-44326 recurring error message in agni nightly #1
master
Josh Bell 2007-06-11 18:24:15 +00:00
parent 309b56280b
commit 28435a0898
14 changed files with 68 additions and 40 deletions

View File

@ -169,6 +169,15 @@ void LLCharacter::updateMotion(BOOL force_update)
}
//-----------------------------------------------------------------------------
// deactivateAllMotions()
//-----------------------------------------------------------------------------
void LLCharacter::deactivateAllMotions()
{
mMotionController.deactivateAllMotions();
}
//-----------------------------------------------------------------------------
// flushAllMotions()
//-----------------------------------------------------------------------------

View File

@ -150,6 +150,9 @@ public:
// no cached references to character joint data. This is
// useful if a character wants to rebuild it's skeleton.
virtual void flushAllMotions();
// Flush only wipes active animations.
virtual void deactivateAllMotions();
// dumps information for debugging
virtual void dumpCharacter( LLJoint *joint = NULL );

View File

@ -835,6 +835,23 @@ LLMotion *LLMotionController::findMotion(const LLUUID& id)
return mAllMotions[id];
}
//-----------------------------------------------------------------------------
// deactivateAllMotions()
//-----------------------------------------------------------------------------
void LLMotionController::deactivateAllMotions()
{
//They must all die, precious.
for (std::map<LLUUID, LLMotion*>::iterator iter = mAllMotions.begin();
iter != mAllMotions.end(); iter++)
{
LLMotion* motionp = iter->second;
if (motionp) motionp->deactivate();
}
// delete all motion instances
deleteAllMotions();
}
//-----------------------------------------------------------------------------
// flushAllMotions()

View File

@ -138,6 +138,9 @@ public:
// releases all motion instances
void flushAllMotions();
//Flush is a liar.
void deactivateAllMotions();
// pause and continue all motions
void pause();
void unpause();

View File

@ -50,7 +50,7 @@ LLPreview::LLPreview(const std::string& name) :
mAutoFocus = FALSE;
}
LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize, S32 min_width, S32 min_height, LLViewerInventoryItem* inv_item )
LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize, S32 min_width, S32 min_height, LLPointer<LLViewerInventoryItem> inv_item )
: LLFloater(name, rect, title, allow_resize, min_width, min_height ),
mItemUUID(item_uuid),
mSourceID(LLUUID::null),
@ -135,11 +135,11 @@ void LLPreview::setSourceID(const LLUUID& source_id)
sPreviewsBySource.insert(preview_multimap_t::value_type(mSourceID, mViewHandle));
}
LLViewerInventoryItem* LLPreview::getItem() const
const LLViewerInventoryItem *LLPreview::getItem() const
{
if(mItem != NULL)
if(mItem)
return mItem;
LLViewerInventoryItem* item = NULL;
const LLViewerInventoryItem *item = NULL;
if(mObjectUUID.isNull())
{
// it's an inventory item, so get the item.
@ -160,7 +160,7 @@ LLViewerInventoryItem* LLPreview::getItem() const
// Sub-classes should override this function if they allow editing
void LLPreview::onCommit()
{
LLViewerInventoryItem* item = getItem();
const LLViewerInventoryItem *item = getItem();
if(item)
{
if (!item->isComplete())
@ -333,7 +333,7 @@ BOOL LLPreview::handleHover(S32 x, S32 y, MASK mask)
{
S32 screen_x;
S32 screen_y;
LLViewerInventoryItem *item = getItem();
const LLViewerInventoryItem *item = getItem();
localPointToScreen(x, y, &screen_x, &screen_y );
if(item
@ -419,7 +419,7 @@ void LLPreview::onDiscardBtn(void* data)
{
LLPreview* self = (LLPreview*)data;
LLViewerInventoryItem* item = self->getItem();
const LLViewerInventoryItem* item = self->getItem();
if (!item) return;
self->mForceClose = TRUE;

View File

@ -51,13 +51,13 @@ public:
public:
// Used for XML-based construction.
LLPreview(const std::string& name);
LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize = FALSE, S32 min_width = 0, S32 min_height = 0, LLViewerInventoryItem* inv_item = NULL );
LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize = FALSE, S32 min_width = 0, S32 min_height = 0, LLPointer<LLViewerInventoryItem> inv_item = NULL );
virtual ~LLPreview();
void setItemID(const LLUUID& item_id);
void setObjectID(const LLUUID& object_id);
void setSourceID(const LLUUID& source_id);
LLViewerInventoryItem* getItem() const; // searches if not constructed with it
const LLViewerInventoryItem *getItem() const; // searches if not constructed with it
static LLPreview* find(const LLUUID& item_uuid);
static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE );
@ -134,7 +134,7 @@ protected:
static preview_map_t sInstances;
LLUUID mNotecardInventoryID;
LLUUID mObjectID;
LLViewerInventoryItem* mItem;
LLPointer<LLViewerInventoryItem> mItem;
};

View File

@ -31,7 +31,7 @@ LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const
childSetAction("Anim play btn",playAnim,this);
childSetAction("Anim audition btn",auditionAnim,this);
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
@ -87,7 +87,7 @@ void LLPreviewAnim::endAnimCallback( void *userdata )
void LLPreviewAnim::playAnim( void *userdata )
{
LLPreviewAnim* self = (LLPreviewAnim*) userdata;
LLInventoryItem *item = self->getItem();
const LLInventoryItem *item = self->getItem();
if(item)
{
@ -124,7 +124,7 @@ void LLPreviewAnim::playAnim( void *userdata )
void LLPreviewAnim::auditionAnim( void *userdata )
{
LLPreviewAnim* self = (LLPreviewAnim*) userdata;
LLInventoryItem *item = self->getItem();
const LLInventoryItem *item = self->getItem();
if(item)
{
@ -160,7 +160,7 @@ void LLPreviewAnim::auditionAnim( void *userdata )
void LLPreviewAnim::saveAnim( void *userdata )
{
LLPreviewAnim* self = (LLPreviewAnim*) userdata;
LLInventoryItem *item = self->getItem();
const LLInventoryItem *item = self->getItem();
if(item)
{
@ -186,7 +186,7 @@ void LLPreviewAnim::saveAnim( void *userdata )
void LLPreviewAnim::onClose(bool app_quitting)
{
LLInventoryItem *item = getItem();
const LLInventoryItem *item = getItem();
if(item)
{

View File

@ -504,7 +504,7 @@ BOOL LLPreviewGesture::postBuild()
addSounds();
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
if (item)
{
@ -830,7 +830,7 @@ void LLPreviewGesture::initDefaultGesture()
void LLPreviewGesture::loadAsset()
{
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
if (!item) return;
LLUUID asset_id = item->getAssetUUID();
@ -1100,7 +1100,7 @@ void LLPreviewGesture::saveIfNeeded()
file.write((U8*)buffer, size);
// Upload that asset to the database
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
if (item)
{
std::string agent_url = gAgent.getRegion()->getCapability("UpdateGestureAgentInventory");

View File

@ -62,7 +62,7 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
const LLUUID& object_id,
const LLUUID& asset_id,
BOOL show_keep_discard,
LLViewerInventoryItem* inv_item) :
LLPointer<LLViewerInventoryItem> inv_item) :
LLPreview(name, rect, title, item_id, object_id, TRUE,
PREVIEW_MIN_WIDTH,
PREVIEW_MIN_HEIGHT,
@ -86,7 +86,7 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
if( mAssetID.isNull() )
{
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
if( item )
{
mAssetID = item->getAssetUUID();
@ -103,7 +103,7 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
childSetVisible("lock", FALSE);
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
childSetCommitCallback("desc", LLPreview::onText, this);
if (item)
@ -242,7 +242,7 @@ void LLPreviewNotecard::refreshFromInventory()
void LLPreviewNotecard::loadAsset()
{
// request the asset.
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
LLViewerTextEditor* editor = LLViewerUICtrlFactory::getViewerTextEditorByName(this, "Notecard Editor");
if (!editor)
@ -366,7 +366,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
previewEditor->makePristine();
LLInventoryItem* item = preview->getItem();
const LLInventoryItem* item = preview->getItem();
BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY,
item->getPermissions(), GP_OBJECT_MANIPULATE);
preview->setEnabled(modifiable);
@ -471,7 +471,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
file.setMaxSize(size);
file.write((U8*)buffer.c_str(), size);
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
// save it out to database
if (item)
{

View File

@ -30,7 +30,7 @@ public:
const LLUUID& object_id = LLUUID::null,
const LLUUID& asset_id = LLUUID::null,
BOOL show_keep_discard = FALSE,
LLViewerInventoryItem* inv_item = NULL);
LLPointer<LLViewerInventoryItem> inv_item = NULL);
// llpreview
virtual bool saveItem(LLPointer<LLInventoryItem>* itemptr);

View File

@ -1077,7 +1077,7 @@ LLPreviewLSL::LLPreviewLSL(const std::string& name, const LLRect& rect,
moveResizeHandleToFront();
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
@ -1131,7 +1131,7 @@ void LLPreviewLSL::loadAsset()
// *HACK: we poke into inventory to see if it's there, and if so,
// then it might be part of the inventory library. If it's in the
// library, then you can see the script, but not modify it.
LLInventoryItem* item = gInventory.getItem(mItemUUID);
const LLInventoryItem* item = gInventory.getItem(mItemUUID);
BOOL is_library = item
&& !gInventory.isObjectDescendentOf(mItemUUID,
gAgent.getInventoryRootID());
@ -1258,7 +1258,7 @@ void LLPreviewLSL::saveIfNeeded()
fclose(fp);
fp = NULL;
LLInventoryItem *inv_item = getItem();
const LLInventoryItem *inv_item = getItem();
// save it out to asset server
std::string url = gAgent.getRegion()->getCapability("UpdateScriptAgentInventory");
if(inv_item)
@ -1373,8 +1373,8 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
{
if (info)
{
LLViewerInventoryItem* item;
item = (LLViewerInventoryItem*)gInventory.getItem(info->mItemUUID);
const LLViewerInventoryItem* item;
item = (const LLViewerInventoryItem*)gInventory.getItem(info->mItemUUID);
if(item)
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);

View File

@ -39,7 +39,7 @@ LLPreviewSound::LLPreviewSound(const std::string& name, const LLRect& rect, cons
button = LLUICtrlFactory::getButtonByName(this, "Sound audition btn");
button->setSoundFlags(LLView::SILENT);
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
@ -65,7 +65,7 @@ LLPreviewSound::LLPreviewSound(const std::string& name, const LLRect& rect, cons
void LLPreviewSound::playSound( void *userdata )
{
LLPreviewSound* self = (LLPreviewSound*) userdata;
LLInventoryItem *item = self->getItem();
const LLInventoryItem *item = self->getItem();
if(item && gAudiop)
{
@ -77,7 +77,7 @@ void LLPreviewSound::playSound( void *userdata )
void LLPreviewSound::auditionSound( void *userdata )
{
LLPreviewSound* self = (LLPreviewSound*) userdata;
LLInventoryItem *item = self->getItem();
const LLInventoryItem *item = self->getItem();
if(item && gAudiop)
{

View File

@ -47,7 +47,7 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
mLastHeight(0),
mLastWidth(0)
{
LLInventoryItem *item = getItem();
const LLInventoryItem *item = getItem();
if(item)
{
mImageID = item->getAssetUUID();
@ -157,7 +157,7 @@ void LLPreviewTexture::init()
if (!mCopyToInv)
{
LLInventoryItem* item = getItem();
const LLInventoryItem* item = getItem();
if (item)
{

View File

@ -4538,11 +4538,7 @@ class LLToolsStopAllAnimations : public view_listener_t
if (!avatarp) return true;
LLVOAvatar::AnimSourceIterator anim_it = avatarp->mAnimationSources.begin();
for (;anim_it != avatarp->mAnimationSources.end(); ++anim_it)
{
avatarp->stopMotion( anim_it->second, TRUE );
}
avatarp->deactivateAllMotions();
avatarp->processAnimationStateChanges();
return true;