From a0802dd33996df650a473577fc75bf8276f0d20b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 22 Dec 2009 17:48:52 -0600 Subject: Added prim cost equivalency to UI for importer and tools floater. --- indra/newview/llfloatertools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloatertools.cpp') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index babef5b63d..41bb239fda 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -423,7 +423,7 @@ void LLFloaterTools::refresh() LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); childSetTextArg("obj_count", "[COUNT]", obj_count_string); std::string prim_count_string; - LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); + LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount(TRUE)); childSetTextArg("prim_count", "[COUNT]", prim_count_string); // calculate selection rendering cost -- cgit v1.3 From 246dd9c168550bfe4b1b71bba75f5af9456e86dd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 15 May 2010 02:45:58 -0500 Subject: Highlight for object cost and proper retrieval/display of prim object cost and linkset cost. --- indra/newview/app_settings/settings.xml | 44 ++++++++++++++++++++++++++++ indra/newview/llfloatertools.cpp | 12 ++++---- indra/newview/llselectmgr.cpp | 47 ++++++++++++++++++++++++++++++ indra/newview/llselectmgr.h | 3 ++ indra/newview/llspatialpartition.cpp | 51 ++++++++++++++++++++++----------- indra/newview/llviewerobject.cpp | 44 ++++++++++++++++++++++++++-- indra/newview/llviewerobject.h | 11 +++++-- indra/newview/llviewerobjectlist.cpp | 7 +++-- indra/newview/llviewerobjectlist.h | 2 +- 9 files changed, 189 insertions(+), 32 deletions(-) (limited to 'indra/newview/llfloatertools.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4c72b03b2e..107f98071c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5418,6 +5418,50 @@ Value 0.0 + ObjectCostHighThreshold + + Comment + Threshold at which object cost is considered high (displayed in red). + Persist + 1 + Type + F32 + Value + 128.0 + + ObjectCostLowColor + + Comment + Color for object with a low object cost. + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.5 + 1.0 + 0.5 + + + ObjectCostHighColor + + Comment + Color for object a high object cost. + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.0 + 0.0 + 0.75 + + + ParcelMediaAutoPlayEnable Comment diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index a8172bbfae..30d2a02b5b 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -419,12 +419,12 @@ void LLFloaterTools::refresh() // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); - std::string obj_count_string; - LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); - childSetTextArg("obj_count", "[COUNT]", obj_count_string); - std::string prim_count_string; - LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount(TRUE)); - childSetTextArg("prim_count", "[COUNT]", prim_count_string); + + F32 obj_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectCost(); + F32 link_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost(); + + childSetTextArg("obj_count", "[COUNT]", llformat("%.1f", obj_cost)); + childSetTextArg("prim_count", "[COUNT]", llformat("%.1f", link_cost)); // calculate selection rendering cost if (sShowObjectCost) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e66be1023d..5acbae0c77 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6183,6 +6183,53 @@ S32 LLObjectSelection::getObjectCount(BOOL mesh_adjust) return count; } +F32 LLObjectSelection::getSelectedObjectCost() +{ + cleanupNodes(); + F32 cost = 0.f; + + for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + + if (object) + { + cost += object->getObjectCost(); + } + } + + return cost; +} + +F32 LLObjectSelection::getSelectedLinksetCost() +{ + cleanupNodes(); + F32 cost = 0.f; + + std::set me_roots; + + for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + + if (object) + { + LLViewerObject* root = static_cast(object->getRoot()); + if (root) + { + if (me_roots.find(root) == me_roots.end()) + { + me_roots.insert(root); + cost += root->getLinksetCost(); + } + } + } + } + + return cost; +} //----------------------------------------------------------------------------- // getTECount() diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 34f2082b82..5302cfae68 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -292,6 +292,9 @@ public: // count members S32 getObjectCount(BOOL mesh_adjust = FALSE); + F32 getSelectedObjectCost(); + F32 getSelectedLinksetCost(); + S32 getTECount(); S32 getRootObjectCount(); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index f11195303e..1290e6b9a6 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2294,6 +2294,14 @@ void pushVerts(LLFace* face, U32 mask) } } +void pushVerts(LLDrawable* drawable, U32 mask) +{ + for (S32 i = 0; i < drawable->getNumFaces(); ++i) + { + pushVerts(drawable->getFace(i), mask); + } +} + void pushBufferVerts(LLVertexBuffer* buffer, U32 mask) { if (buffer) @@ -2664,36 +2672,35 @@ void renderPhysicsShape(LLDrawable* drawable) LLVOVolume* volume = drawable->getVOVolume(); if (volume) { + F32 threshold = gSavedSettings.getF32("ObjectCostHighThreshold"); + F32 cost = volume->getObjectCost(); + + LLColor4 low = gSavedSettings.getColor4("ObjectCostLowColor"); + LLColor4 high = gSavedSettings.getColor4("ObjectCostHighColor"); + + LLColor4 color = lerp(low, high, cost/threshold); + + U32 data_mask = LLVertexBuffer::MAP_VERTEX; + if (volume->isMesh()) - { + { LLUUID mesh_id = volume->getVolume()->getParams().getSculptID(); const LLMeshDecomposition* decomp = gMeshRepo.getDecomposition(mesh_id); if (decomp) { - if (volume->getObjectCost() == -1) - { - gObjectList.updateObjectCost(volume); - } - gGL.pushMatrix(); glMultMatrixf((F32*) volume->getRelativeXform().mMatrix); - static std::vector color; - + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); for (U32 i = 0; i < decomp->mHull.size(); ++i) - { - if (color.size() <= i) - { - color.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 255)); - } - + { LLVertexBuffer* buff = decomp->mMesh[i]; - buff->setBuffer(LLVertexBuffer::MAP_VERTEX); + buff->setBuffer(data_mask); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glColor3ub(color[i].mV[0], color[i].mV[1], color[i].mV[2]); + glColor3fv(color.mV); buff->drawArrays(LLRender::TRIANGLES, 0, buff->getNumVerts()); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); @@ -2701,14 +2708,24 @@ void renderPhysicsShape(LLDrawable* drawable) LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_ALPHA); LLGLDepthTest depth(GL_TRUE, GL_FALSE); - glColor4ub(color[i].mV[0], color[i].mV[1], color[i].mV[2], 64); + glColor4fv(color.mV); buff->drawArrays(LLRender::TRIANGLES, 0, buff->getNumVerts()); } } gGL.popMatrix(); + + return; } } + + //push faces + glColor3fv(color.mV); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + pushVerts(drawable, data_mask); + glColor4fv(color.mV); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + pushVerts(drawable, data_mask); } } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 38a29ba432..ff5d7e9c17 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -232,7 +232,9 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mState(0), mMedia(NULL), mClickAction(0), - mObjectCost(-1), + mObjectCost(0.f), + mLinksetCost(0.f), + mCostStale(true), mAttachmentItemID(LLUUID::null) { if (!is_global) @@ -829,6 +831,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, #ifdef DEBUG_UPDATE_TYPE llinfos << "Full:" << getID() << llendl; #endif + //clear cost and linkset cost + mCostStale = true; + LLUUID audio_uuid; LLUUID owner_id; // only valid if audio_uuid or particle system is not null F32 gain; @@ -1394,6 +1399,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, #ifdef DEBUG_UPDATE_TYPE llinfos << "CompFull:" << getID() << llendl; #endif + mCostStale = true; + dp->unpackU32(crc, "CRC"); mTotalCRC = crc; dp->unpackU8(material, "Material"); @@ -2864,6 +2871,39 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) } } +void LLViewerObject::setObjectCost(F32 cost) +{ + mObjectCost = cost; + mCostStale = false; +} + +void LLViewerObject::setLinksetCost(F32 cost) +{ + mLinksetCost = cost; + mCostStale = false; +} + + +F32 LLViewerObject::getObjectCost() +{ + if (mCostStale) + { + gObjectList.updateObjectCost(this); + } + + return mObjectCost; +} + +F32 LLViewerObject::getLinksetCost() +{ + if (mCostStale) + { + gObjectList.updateObjectCost(this); + } + + return mLinksetCost; +} + void LLViewerObject::updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax) { LLVector3 center = getRenderPosition(); @@ -4970,7 +5010,7 @@ void LLViewerObject::updateFlags() if (getPhysicsShapeType() != 0) { - llwarns << "sent non default physics rep" << llendl; + llwarns << "sent non default physics rep " << (S32) getPhysicsShapeType() << llendl; } } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index d2e465fe5a..15fabc9f82 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -334,8 +334,11 @@ public: virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE); - void setObjectCost(S32 cost) { mObjectCost = cost; } - S32 getObjectCost() { return mObjectCost; } + void setObjectCost(F32 cost); + F32 getObjectCost(); + void setLinksetCost(F32 cost); + F32 getLinksetCost(); + void sendShapeUpdate(); @@ -671,7 +674,9 @@ protected: U8 mState; // legacy LLViewerObjectMedia* mMedia; // NULL if no media associated U8 mClickAction; - S32 mObjectCost; //resource cost of this object or -1 if unknown + F32 mObjectCost; //resource cost of this object or -1 if unknown + F32 mLinksetCost; + bool mCostStale; static U32 sNumZombieObjects; // Objects which are dead, but not deleted diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 422ac4e84f..9d41e2a530 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -665,8 +665,8 @@ public: for (LLSD::map_const_iterator iter = content.beginMap(); iter != content.endMap(); ++iter) { LLUUID object_id = LLUUID(iter->first); - S32 link_cost = iter->second["LinkResourceCost"].asInteger(); - S32 prim_cost = iter->second["PrimResourceCost"].asInteger(); + F32 link_cost = iter->second["LinksetResourceCost"].asReal(); + F32 prim_cost = iter->second["PrimResourceCost"].asReal(); gObjectList.updateObjectCost(object_id, prim_cost, link_cost); } @@ -1099,7 +1099,7 @@ void LLViewerObjectList::updateObjectCost(LLViewerObject* object) mStaleObjectCost.insert(object->getID()); } -void LLViewerObjectList::updateObjectCost(LLUUID object_id, S32 prim_cost, S32 link_cost) +void LLViewerObjectList::updateObjectCost(LLUUID object_id, F32 prim_cost, F32 link_cost) { mPendingObjectCost.erase(object_id); @@ -1107,6 +1107,7 @@ void LLViewerObjectList::updateObjectCost(LLUUID object_id, S32 prim_cost, S32 l if (object) { object->setObjectCost(prim_cost); + object->setLinksetCost(link_cost); } } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index db9324bdbd..4064a68eb2 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -92,7 +92,7 @@ public: void update(LLAgent &agent, LLWorld &world); void updateObjectCost(LLViewerObject* object); - void updateObjectCost(LLUUID object_id, S32 prim_cost, S32 link_cost); + void updateObjectCost(LLUUID object_id, F32 prim_cost, F32 link_cost); void shiftObjects(const LLVector3 &offset); -- cgit v1.3 From 671609239f63bc6dc293a0580e6f1b8e48239b26 Mon Sep 17 00:00:00 2001 From: jwolk Date: Fri, 13 Aug 2010 17:30:09 -0700 Subject: Added new UI to show linked set cost and object cost. Changed terminology in edit tools. Updated request payload when requesting object cost. Paired with davep --- indra/newview/llfloatertools.cpp | 44 ++++++-- indra/newview/llselectmgr.cpp | 23 ---- indra/newview/llviewerobjectlist.cpp | 123 ++++++++++++++++++--- indra/newview/llviewerobjectlist.h | 3 +- .../newview/skins/default/xui/en/floater_tools.xml | 68 ++++++++++-- 5 files changed, 206 insertions(+), 55 deletions(-) (limited to 'indra/newview/llfloatertools.cpp') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 03c9bd4e4f..c84ce12f80 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -419,14 +419,38 @@ void LLFloaterTools::refresh() // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); - - F32 obj_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectCost(); - F32 link_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost(); - - childSetTextArg("obj_count", "[COUNT]", llformat("%.1f", obj_cost)); - childSetTextArg("prim_count", "[COUNT]", llformat("%.1f", link_cost)); - // calculate selection rendering cost + // Get the number of objects selected + std::string root_object_count_string; + std::string object_count_string; + + LLResMgr::getInstance()->getIntegerString( + root_object_count_string, + LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); + LLResMgr::getInstance()->getIntegerString( + object_count_string, + LLSelectMgr::getInstance()->getSelection()->getObjectCount()); + + F32 obj_cost = + LLSelectMgr::getInstance()->getSelection()->getSelectedObjectCost(); + F32 link_cost = + LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost(); + + // Update the text for the counts + childSetTextArg( + "linked_set_count", + "[COUNT]", + root_object_count_string); + childSetTextArg("object_count", "[COUNT]", object_count_string); + + // Update the text for the resource costs + childSetTextArg( + "linked_set_cost", + "[COST]", + llformat("%.1f", link_cost)); + childSetTextArg("object_cost", "[COST]", llformat("%.1f", obj_cost)); + + // Display rendering cost if needed if (sShowObjectCost) { std::string prim_cost_string; @@ -437,8 +461,10 @@ void LLFloaterTools::refresh() // disable the object and prim counts if nothing selected bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); - childSetEnabled("obj_count", have_selection); - childSetEnabled("prim_count", have_selection); + childSetEnabled("linked_set_count", have_selection); + childSetEnabled("object_count", have_selection); + childSetEnabled("linked_set_cost", have_selection); + childSetEnabled("object_cost", have_selection); childSetEnabled("RenderingCost", have_selection && sShowObjectCost); // Refresh child tabs diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6aadf0afd2..42f09f7396 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6182,29 +6182,6 @@ S32 LLObjectSelection::getObjectCount(BOOL mesh_adjust) cleanupNodes(); S32 count = mList.size(); -#if LL_MESH_ENABLED - if (mesh_adjust) - { - for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter) - { - LLSelectNode* node = *iter; - LLViewerObject* object = node->getObject(); - - if (object && object->getVolume()) - { - LLVOVolume* vobj = (LLVOVolume*) object; - if (vobj->isMesh()) - { - LLUUID mesh_id = vobj->getVolume()->getParams().getSculptID(); - U32 cost = gMeshRepo.getResourceCost(mesh_id); - count += cost-1; - } - } - - } - } -#endif - return count; } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 900aa3ce12..e6f1d8e728 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -660,17 +660,86 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) class LLObjectCostResponder : public LLCurl::Responder { public: + LLObjectCostResponder(const LLSD& object_ids) + : mObjectIDs(object_ids) + { + } + + // Clear's the global object list's pending + // request list for all objects requested + void clear_object_list_pending_requests() + { + // TODO*: No more hard coding + for ( + LLSD::array_iterator iter = mObjectIDs.beginArray(); + iter != mObjectIDs.endArray(); + ++iter) + { + gObjectList.onObjectCostFetchFailure(iter->asUUID()); + } + } + + void error(U32 statusNum, const std::string& reason) + { + lldebugs + << "Transport error requesting object cost " + << "HTTP status: " << statusNum << ", reason: " + << reason << "." << llendl; + + // TODO*: Error message to user + // For now just clear the request from the pending list + clear_object_list_pending_requests(); + } + void result(const LLSD& content) { - for (LLSD::map_const_iterator iter = content.beginMap(); iter != content.endMap(); ++iter) + if ( !content.isMap() || content.has("error") ) + { + // Improper response or the request had an error, + // show an error to the user? + lldebugs + << "Application level error when fetching object " + << "cost. Message: " << content["error"]["message"].asString() + << ", identifier: " << content["error"]["identifier"].asString() + << llendl; + + // TODO*: Adaptively adjust request size if the + // service says we've requested too many and retry + + // TODO*: Error message if not retrying + clear_object_list_pending_requests(); + return; + } + + // Success, grab the resource cost and linked set costs + // for an object if one was returned + for ( + LLSD::array_iterator iter = mObjectIDs.beginArray(); + iter != mObjectIDs.endArray(); + ++iter) { - LLUUID object_id = LLUUID(iter->first); - F32 link_cost = iter->second["LinksetResourceCost"].asReal(); - F32 prim_cost = iter->second["PrimResourceCost"].asReal(); + LLUUID object_id = iter->asUUID(); - gObjectList.updateObjectCost(object_id, prim_cost, link_cost); + // Check to see if the request contains data for the object + if ( content.has(iter->asString()) ) + { + F32 link_cost = + content[iter->asString()]["linked_set_resource_cost"].asReal(); + F32 object_cost = + content[iter->asString()]["resource_cost"].asReal(); + + gObjectList.updateObjectCost(object_id, object_cost, link_cost); + } + else + { + // TODO*: Give user feedback about the missing data? + gObjectList.onObjectCostFetchFailure(object_id); + } } } + +private: + LLSD mObjectIDs; }; void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) @@ -769,7 +838,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } } - //issue http request for stale object physics costs + // issue http request for stale object physics costs if (!mStaleObjectCost.empty()) { LLViewerRegion* regionp = gAgent.getRegion(); @@ -781,21 +850,40 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) if (!url.empty()) { LLSD id_list; - U32 idx = 0; - for (std::set::iterator iter = mStaleObjectCost.begin(); iter != mStaleObjectCost.end(); ++iter) + U32 object_index = 0; + + for ( + std::set::iterator iter = mStaleObjectCost.begin(); + iter != mStaleObjectCost.end(); + ++iter) { - if (mPendingObjectCost.find(*iter) == mPendingObjectCost.end()) + // Check to see if a request for this object + // has already been made. + if ( mPendingObjectCost.find(*iter) == + mPendingObjectCost.end() ) { + // Why is this line here if + // we set mPendingObjectCost to be + // mStaleObjectCost below? mPendingObjectCost.insert(*iter); - id_list[idx++] = *iter; + id_list[object_index++] = *iter; } } - mPendingObjectCost = mStaleObjectCost; + + // id_list should now contain all + // requests in mStaleObjectCost before, so clear + // it now mStaleObjectCost.clear(); - if (id_list.size() > 0) + if ( id_list.size() > 0 ) { - LLHTTPClient::post(url, id_list, new LLObjectCostResponder()); + LLSD post_data = LLSD::emptyMap(); + + post_data["object_ids"] = id_list; + LLHTTPClient::post( + url, + post_data, + new LLObjectCostResponder(id_list)); } } else @@ -1099,18 +1187,23 @@ void LLViewerObjectList::updateObjectCost(LLViewerObject* object) mStaleObjectCost.insert(object->getID()); } -void LLViewerObjectList::updateObjectCost(LLUUID object_id, F32 prim_cost, F32 link_cost) +void LLViewerObjectList::updateObjectCost(LLUUID object_id, F32 object_cost, F32 link_cost) { mPendingObjectCost.erase(object_id); LLViewerObject* object = findObject(object_id); if (object) { - object->setObjectCost(prim_cost); + object->setObjectCost(object_cost); object->setLinksetCost(link_cost); } } +void LLViewerObjectList::onObjectCostFetchFailure(LLUUID object_id) +{ + mPendingObjectCost.erase(object_id); +} + void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { // This is called when we shift our origin when we cross region boundaries... diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 4064a68eb2..0f58e543ac 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -92,7 +92,8 @@ public: void update(LLAgent &agent, LLWorld &world); void updateObjectCost(LLViewerObject* object); - void updateObjectCost(LLUUID object_id, F32 prim_cost, F32 link_cost); + void updateObjectCost(LLUUID object_id, F32 object_cost, F32 link_cost); + void onObjectCostFetchFailure(LLUUID object_id); void shiftObjects(const LLVector3 &offset); diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index b0e8f29a0a..bbb90eba6e 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -730,11 +730,25 @@ follows="left|top" halign="right" layout="topleft" - right="-10" - name="obj_count" + right="-100" + name="linked_set_count" top_pad="5" - width="143"> - Objects: [COUNT] + width="80"> + Linked Sets: [COUNT] + + + Cost: [COST] + Objects: [COUNT] + + - Prims: [COUNT] + name="object_cost" + width="80"> + Cost: [COST] + + + + + + + + + + + + + + + + + + + + + + + + + +