From 8dca737dc85fa352dadbcf806858307d863737bb Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 11 Sep 2014 22:26:45 -0400 Subject: [PATCH] Solve Issue 1539: XML Export consistently fails as of latest alpha (build 5824) --- indra/newview/llviewerobjectbackup.cpp | 2 +- indra/newview/llviewerobjectlist.cpp | 11 +++++++++++ indra/newview/llviewerobjectlist.h | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewerobjectbackup.cpp b/indra/newview/llviewerobjectbackup.cpp index d4f3230c5..7a2db36db 100644 --- a/indra/newview/llviewerobjectbackup.cpp +++ b/indra/newview/llviewerobjectbackup.cpp @@ -627,7 +627,7 @@ void LLObjectBackup::exportWorker(void *userdata) virtual bool apply(LLSelectNode* node) { LLViewerObject* object = node->getObject(); - return object->getPhysicsShapeUnknown(); + return gObjectList.gotObjectPhysicsFlags(object); } } func; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6220096b9..d76659943 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1216,6 +1216,17 @@ void LLViewerObjectList::fetchPhysicsFlags() } } +bool LLViewerObjectList::gotObjectPhysicsFlags(LLViewerObject* objectp) +{ + // This will insert objectp in mStalePhysicsFlags if needed: + objectp->getPhysicsShapeType(); + // Data has been retrieved if the object is not in either of the + // two lists: + const LLUUID& id = objectp->getID(); + return mPendingPhysicsFlags.count(id) == 0 && + mStalePhysicsFlags.count(id) == 0; +} + void LLViewerObjectList::clearDebugText() { for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index c5b6b98f6..516c3d1e1 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -99,6 +99,8 @@ public: void fetchObjectCosts(); void fetchPhysicsFlags(); + bool gotObjectPhysicsFlags(LLViewerObject* objectp); + void updateObjectCost(LLViewerObject* object); void updateObjectCost(const LLUUID& object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost); void onObjectCostFetchFailure(const LLUUID& object_id);