diff options
Diffstat (limited to 'indra/newview')
27 files changed, 1124 insertions, 711 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7e1d46f0e8..da3778d4bb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -77,7 +77,7 @@ include_directories( set(viewer_SOURCE_FILES groupchatlistener.cpp - llaccountingquotamanager.cpp + llaccountingcostmanager.cpp llagent.cpp llagentaccess.cpp llagentcamera.cpp @@ -213,6 +213,7 @@ set(viewer_SOURCE_FILES llfloatermodelwizard.cpp llfloaternamedesc.cpp llfloaternotificationsconsole.cpp + llfloaterobjectweights.cpp llfloateropenobject.cpp llfloaterpay.cpp llfloaterperms.cpp @@ -638,7 +639,7 @@ set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake groupchatlistener.h - llaccountingquotamanager.h + llaccountingcostmanager.h llagent.h llagentaccess.h llagentcamera.h @@ -775,6 +776,7 @@ set(viewer_HEADER_FILES llfloatermodelwizard.h llfloaternamedesc.h llfloaternotificationsconsole.h + llfloaterobjectweights.h llfloateropenobject.h llfloaterpay.h llfloaterperms.h diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp new file mode 100644 index 0000000000..5059efbeec --- /dev/null +++ b/indra/newview/llaccountingcostmanager.cpp @@ -0,0 +1,170 @@ +/** + * @file LLAccountingQuotaManager.cpp + * @ Handles the setting and accessing for costs associated with mesh + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llaccountingcostmanager.h" +#include "llagent.h" +#include "llcurl.h" +#include "llhttpclient.h" + +//=============================================================================== +LLAccountingCostManager::LLAccountingCostManager() +{ +} +//=============================================================================== +class LLAccountingCostResponder : public LLCurl::Responder +{ +public: + LLAccountingCostResponder( const LLSD& objectIDs ) + : mObjectIDs( objectIDs ) + { + } + + void clearPendingRequests ( void ) + { + for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter ) + { + LLAccountingCostManager::getInstance()->removePendingObject( iter->asUUID() ); + } + } + + void error( U32 statusNum, const std::string& reason ) + { + llwarns << "Transport error "<<reason<<llendl; + clearPendingRequests(); + } + + void result( const LLSD& content ) + { + //Check for error + if ( !content.isMap() || content.has("error") ) + { + llwarns << "Error on fetched data"<< llendl; + clearPendingRequests(); + return; + } + + bool containsSelection = content.has("selected"); + if ( containsSelection ) + { + S32 dataCount = content["selected"].size(); + + for(S32 i = 0; i < dataCount; i++) + { + + F32 physicsCost = 0.0f; + F32 networkCost = 0.0f; + F32 simulationCost = 0.0f; + + //LLTransactionID transactionID; + + //transactionID = content["selected"][i]["local_id"].asUUID(); + physicsCost = content["selected"][i]["physics"].asReal(); + networkCost = content["selected"][i]["streaming"].asReal(); + simulationCost = content["selected"][i]["simulation"].asReal(); + + SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost ); + + //How do you want to handle the updating of the invoking object/ui element? + + } + } + } + +private: + //List of posted objects + LLSD mObjectIDs; +}; +//=============================================================================== +void LLAccountingCostManager::fetchCosts( eSelectionType selectionType, const std::string& url ) +{ + // Invoking system must have already determined capability availability + if ( !url.empty() ) + { + LLSD objectList; + U32 objectIndex = 0; + + IDIt IDIter = mObjectList.begin(); + IDIt IDIterEnd = mObjectList.end(); + + for ( ; IDIter != IDIterEnd; ++IDIter ) + { + // Check to see if a request for this object has already been made. + if ( mPendingObjectQuota.find( *IDIter ) == mPendingObjectQuota.end() ) + { + mObjectList.insert( *IDIter ); + objectList[objectIndex++] = *IDIter; + } + } + + mObjectList.clear(); + + //Post results + if ( objectList.size() > 0 ) + { + std::string keystr; + if ( selectionType == Roots ) + { + keystr="selected_roots"; + } + else + if ( selectionType == Prims ) + { + keystr="prim_roots"; + } + else + { + llinfos<<"Invalid selection type "<<llendl; + mObjectList.clear(); + mPendingObjectQuota.clear(); + return; + } + + LLSD dataToPost = LLSD::emptyMap(); + dataToPost[keystr.c_str()] = objectList; + + LLHTTPClient::post( url, dataToPost, new LLAccountingCostResponder( objectList )); + } + } + else + { + //url was empty - warn & continue + llwarns<<"Supplied url is empty "<<llendl; + mObjectList.clear(); + mPendingObjectQuota.clear(); + } +} +//=============================================================================== +void LLAccountingCostManager::addObject( const LLUUID& objectID ) +{ + mObjectList.insert( objectID ); +} +//=============================================================================== +void LLAccountingCostManager::removePendingObject( const LLUUID& objectID ) +{ + mPendingObjectQuota.erase( objectID ); +} +//=============================================================================== diff --git a/indra/newview/llaccountingquotamanager.h b/indra/newview/llaccountingcostmanager.h index 9251ef9351..8ae696a98d 100644 --- a/indra/newview/llaccountingquotamanager.h +++ b/indra/newview/llaccountingcostmanager.h @@ -27,29 +27,29 @@ #ifndef LL_ACCOUNTINGQUOTAMANAGER_H #define LL_ACCOUNTINGQUOTAMANAGER_H //=============================================================================== -#include "llaccountingquota.h" +#include "llaccountingcost.h" //=============================================================================== -class LLAccountingQuotaManager : public LLSingleton<LLAccountingQuotaManager> +class LLAccountingCostManager : public LLSingleton<LLAccountingCostManager> { public: //Ctor - LLAccountingQuotaManager(); + LLAccountingCostManager(); //Store an object that will be eventually fetched - void updateObjectCost( const LLUUID& objectID ); + void addObject( const LLUUID& objectID ); //Request quotas for object list - void fetchQuotas( const std::string& url ); + void fetchCosts( eSelectionType selectionType, const std::string& url ); //Delete a specific object from the pending list - void removePendingObjectQuota( const LLUUID& objectID ); + void removePendingObject( const LLUUID& objectID ); private: - //Set of objects that need to update their cost - std::set<LLUUID> mUpdateObjectQuota; - //During fetchQuota we move object into a the pending set to signify that + //Set of objects that will be used to generate a cost + std::set<LLUUID> mObjectList; + //During fetchCosts we move object into a the pending set to signify that //a fetch has been instigated. std::set<LLUUID> mPendingObjectQuota; typedef std::set<LLUUID>::iterator IDIt; }; //=============================================================================== -#endif // LLACCOUNTINGQUOTAMANAGER +#endif // LLACCOUNTINGCOSTMANAGER diff --git a/indra/newview/llaccountingquotamanager.cpp b/indra/newview/llaccountingquotamanager.cpp deleted file mode 100644 index a4f5de5632..0000000000 --- a/indra/newview/llaccountingquotamanager.cpp +++ /dev/null @@ -1,278 +0,0 @@ -/** - * @file LLAccountingQuotaManager.cpp - * @ Handles the setting and accessing for costs associated with mesh - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" -#include "llaccountingquotamanager.h" -#include "llagent.h" -#include "llviewerregion.h" -#include "llviewerobject.h" -#include "llviewerobjectlist.h" -#include "llviewerparcelmgr.h" -#include "llparcel.h" - -//=============================================================================== -LLAccountingQuotaManager::LLAccountingQuotaManager() -{ -} -//=============================================================================== -class LLAccountingQuotaResponder : public LLCurl::Responder -{ -public: - LLAccountingQuotaResponder( const LLSD& objectIDs ) - : mObjectIDs( objectIDs ) - { - } - - void clearPendingRequests ( void ) - { - for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter ) - { - LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( iter->asUUID() ); - } - } - - void error( U32 statusNum, const std::string& reason ) - { - llwarns << "Transport error "<<reason<<llendl; - //prep#do we really want to remove all because of one failure - verify - clearPendingRequests(); - } - - void result( const LLSD& content ) - { - if ( !content.isMap() || content.has("error") ) - { - llwarns << "Error on fetched data"<< llendl; - //prep#do we really want to remove all because of one failure - verify - clearPendingRequests(); - return; - } - - //Differentiate what the incoming caps could be from the data - bool containsParcel = content.has("parcel"); - bool containsSelection = content.has("selected"); - - //Loop over the stored object ids checking against the incoming data - for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter ) - { - LLUUID objectID = iter->asUUID(); - - LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( objectID ); - - if ( containsParcel ) - { - //Typically should be one - S32 dataCount = content["parcel"].size(); - for(S32 i = 0; i < dataCount; i++) - { - //prep#todo verify that this is safe, otherwise just add a bool - LLUUID parcelId; - //S32 parcelOwner = 0; - if ( content["parcel"][i].has("parcel_id") ) - { - parcelId = content["parcel"][i]["parcel_id"].asUUID(); - } - - //if ( content["parcel"][i].has("parcel_owner") ) - //{ - // parcelOwner = content["parcel"][i]["parcel_owner"].asInteger(); - //} - - F32 ownerRenderCost = 0; - F32 ownerPhysicsCost = 0; - F32 ownerNetworkCost = 0; - F32 ownerSimulationCost = 0; - - F32 groupRenderCost = 0; - F32 groupPhysicsCost = 0; - F32 groupNetworkCost = 0; - F32 groupSimulationCost = 0; - - F32 otherRenderCost = 0; - F32 otherPhysicsCost = 0; - F32 otherNetworkCost = 0; - F32 otherSimulationCost = 0; - - F32 tempRenderCost = 0; - F32 tempPhysicsCost = 0; - F32 tempNetworkCost = 0; - F32 tempSimulationCost = 0; - - F32 selectedRenderCost = 0; - F32 selectedPhysicsCost = 0; - F32 selectedNetworkCost = 0; - F32 selectedSimulationCost = 0; - - F32 parcelCapacity = 0; - - if ( content["parcel"][i].has("capacity") ) - { - parcelCapacity = content["parcel"][i].has("capacity"); - } - - if ( content["parcel"][i].has("owner") ) - { - ownerRenderCost = content["parcel"][i]["owner"]["rendering"].asReal(); - ownerPhysicsCost = content["parcel"][i]["owner"]["physics"].asReal(); - ownerNetworkCost = content["parcel"][i]["owner"]["streaming"].asReal(); - ownerSimulationCost = content["parcel"][i]["owner"]["simulation"].asReal(); - } - - if ( content["parcel"][i].has("group") ) - { - groupRenderCost = content["parcel"][i]["group"]["rendering"].asReal(); - groupPhysicsCost = content["parcel"][i]["group"]["physics"].asReal(); - groupNetworkCost = content["parcel"][i]["group"]["streaming"].asReal(); - groupSimulationCost = content["parcel"][i]["group"]["simulation"].asReal(); - - } - if ( content["parcel"][i].has("other") ) - { - otherRenderCost = content["parcel"][i]["other"]["rendering"].asReal(); - otherPhysicsCost = content["parcel"][i]["other"]["physics"].asReal(); - otherNetworkCost = content["parcel"][i]["other"]["streaming"].asReal(); - otherSimulationCost = content["parcel"][i]["other"]["simulation"].asReal(); - } - - if ( content["parcel"][i].has("temp") ) - { - tempRenderCost = content["parcel"][i]["total"]["rendering"].asReal(); - tempPhysicsCost = content["parcel"][i]["total"]["physics"].asReal(); - tempNetworkCost = content["parcel"][i]["total"]["streaming"].asReal(); - tempSimulationCost = content["parcel"][i]["total"]["simulation"].asReal(); - } - - if ( content["parcel"][i].has("selected") ) - { - selectedRenderCost = content["parcel"][i]["total"]["rendering"].asReal(); - selectedPhysicsCost = content["parcel"][i]["total"]["physics"].asReal(); - selectedNetworkCost = content["parcel"][i]["total"]["streaming"].asReal(); - selectedSimulationCost = content["parcel"][i]["total"]["simulation"].asReal(); - } - - ParcelQuota parcelQuota( ownerRenderCost, ownerPhysicsCost, ownerNetworkCost, ownerSimulationCost, - groupRenderCost, groupPhysicsCost, groupNetworkCost, groupSimulationCost, - otherRenderCost, otherPhysicsCost, otherNetworkCost, otherSimulationCost, - tempRenderCost, tempPhysicsCost, tempNetworkCost, tempSimulationCost, - selectedRenderCost, selectedPhysicsCost, selectedNetworkCost, selectedSimulationCost, - parcelCapacity ); - //Update the Parcel - LLParcel* pParcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); - if ( pParcel ) - { - pParcel->updateQuota( objectID, parcelQuota ); - } - } - } - else - if ( containsSelection ) - { - S32 dataCount = content["selected"].size(); - for(S32 i = 0; i < dataCount; i++) - { - - F32 renderCost = 0; - F32 physicsCost = 0; - F32 networkCost = 0; - F32 simulationCost = 0; - - LLUUID objectId; - - objectId = content["selected"][i]["local_id"].asUUID(); - renderCost = content["selected"][i]["rendering"].asReal(); - physicsCost = content["selected"][i]["physics"].asReal(); - networkCost = content["selected"][i]["streaming"].asReal(); - simulationCost = content["selected"][i]["simulation"].asReal(); - - SelectionQuota selectionQuota( objectId, renderCost, physicsCost, networkCost, simulationCost ); - - //Update the objects - gObjectList.updateQuota( objectId, selectionQuota ); - - } - } - else - { - //Nothing in string - LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( objectID ); - } - } - } - -private: - //List of posted objects - LLSD mObjectIDs; -}; -//=============================================================================== -void LLAccountingQuotaManager::fetchQuotas( const std::string& url ) -{ - // Invoking system must have already determined capability availability - if ( !url.empty() ) - { - LLSD objectList; - U32 objectIndex = 0; - IDIt IDIter = mUpdateObjectQuota.begin(); - IDIt IDIterEnd = mUpdateObjectQuota.end(); - - for ( ; IDIter != IDIterEnd; ++IDIter ) - { - // Check to see if a request for this object has already been made. - if ( mPendingObjectQuota.find( *IDIter ) == mPendingObjectQuota.end() ) - { - mPendingObjectQuota.insert( *IDIter ); - objectList[objectIndex++] = *IDIter; - } - } - - mUpdateObjectQuota.clear(); - - //Post results - if ( objectList.size() > 0 ) - { - LLSD dataToPost = LLSD::emptyMap(); - dataToPost["object_ids"] = objectList; - LLHTTPClient::post( url, dataToPost, new LLAccountingQuotaResponder( objectList )); - } - } - else - { - //url was empty - warn & continue - llwarns<<"Supplied url is empty "<<llendl; - mUpdateObjectQuota.clear(); - mPendingObjectQuota.clear(); - } -} -//=============================================================================== -void LLAccountingQuotaManager::updateObjectCost( const LLUUID& objectID ) -{ - mUpdateObjectQuota.insert( objectID ); -} -//=============================================================================== -void LLAccountingQuotaManager::removePendingObjectQuota( const LLUUID& objectID ) -{ - mPendingObjectQuota.erase( objectID ); -} -//=============================================================================== diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index ef846ec42e..195c70c5a6 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -768,6 +768,7 @@ void LLFloaterModelPreview::draw() if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_PARSING ) { childSetTextArg("status", "[STATUS]", getString("status_parse_error")); + toggleCalculateButton(false); } else { @@ -776,7 +777,7 @@ void LLFloaterModelPreview::draw() } childSetEnabled("ok_btn", mHasUploadPerm && !mUploadModelUrl.empty()); - + childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost)); childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size())); @@ -1032,6 +1033,11 @@ void LLFloaterModelPreview::onPhysicsStageCancel(LLUICtrl* ctrl, void*data) } sInstance->mCurRequest.clear(); + + if (sInstance->mModelPreview) + { + sInstance->mModelPreview->updateStatusMessages(); + } } } @@ -1385,9 +1391,23 @@ bool LLModelLoader::doLoadModel() if (!dom) { + llinfos<<" Error with dae - traditionally indicates a corrupt file."<<llendl; + setLoadState( ERROR_PARSING ); return false; } + //determine if this dae is a valid version. + domVersionType docVersion = dom->getVersion(); + + if ( docVersion != VERSIONTYPE_1_4_0 ) + { + llinfos<<" Error with dae - unsupported dae version "<<llendl; + //setLoadState( ERROR_PARSING ); + //return false; + + } + + daeDatabase* db = dae.getDatabase(); daeInt count = db->getElementCount(NULL, COLLADA_TYPE_MESH); @@ -1536,8 +1556,7 @@ bool LLModelLoader::doLoadModel() LLMatrix4 trans = normalized_transformation; trans *= skin_info.mBindShapeMatrix; - skin_info.mBindShapeMatrix = trans; - + skin_info.mBindShapeMatrix = trans; } @@ -1610,7 +1629,7 @@ bool LLModelLoader::doLoadModel() { //Build a joint for the resolver to work with char str[64]={0}; - sprintf(str,"./%s",(*jointIt).second.c_str() ); + sprintf(str,"./%s",(*jointIt).first.c_str() ); //llwarns<<"Joint "<< str <<llendl; //Setup the resolver @@ -1740,7 +1759,7 @@ bool LLModelLoader::doLoadModel() } } - model->mSkinInfo.mInvBindMatrix.push_back(mat); + model->mSkinInfo.mInvBindMatrix.push_back(mat); } } } @@ -1748,7 +1767,7 @@ bool LLModelLoader::doLoadModel() } //Now that we've parsed the joint array, let's determine if we have a full rig - //(which means we have all the joints that are required for an avatar versus + //(which means we have all the joint sthat are required for an avatar versus //a skinned asset attached to a node in a file that contains an entire skeleton, //but does not use the skeleton). buildJointToNodeMappingFromScene( root ); @@ -2152,15 +2171,29 @@ void LLModelLoader::processJointToNodeMapping( domNode* pNode ) mJointsFromNode.push_front( pNode->getName() ); } //2. Handle the kiddo's - daeTArray< daeSmartRef<daeElement> > childOfChild = pNode->getChildren(); - S32 childOfChildCount = childOfChild.getCount(); - for (S32 i = 0; i < childOfChildCount; ++i) + processChildJoints( pNode ); + } + else + { + //Determine if the're any children wrt to this failed node. + //This occurs when an armature is exported and ends up being what essentially amounts to + //as the root for the visual_scene + processChildJoints( pNode ); + } +} +//----------------------------------------------------------------------------- +// processChildJoint() +//----------------------------------------------------------------------------- +void LLModelLoader::processChildJoints( domNode* pParentNode ) +{ + daeTArray< daeSmartRef<daeElement> > childOfChild = pParentNode->getChildren(); + S32 childOfChildCount = childOfChild.getCount(); + for (S32 i = 0; i < childOfChildCount; ++i) + { + domNode* pChildNode = daeSafeCast<domNode>( childOfChild[i] ); + if ( pChildNode ) { - domNode* pChildNode = daeSafeCast<domNode>( childOfChild[i] ); - if ( pChildNode ) - { - processJointToNodeMapping( pChildNode ); - } + processJointToNodeMapping( pChildNode ); } } } @@ -2185,15 +2218,11 @@ void LLModelPreview::critiqueRigForUploadApplicability( const std::vector<std::s setRigValidForJointPositionUpload( true ); } - if ( isRigLegacyOK ) - { + if ( isRigLegacyOK) + { setLegacyRigValid( true ); } - if ( getRigWithSceneParity() && isJointPositionUploadOK ) - { - setResetJointFlag( true ); - } } //----------------------------------------------------------------------------- // critiqueJointToNodeMappingFromScene() @@ -2233,12 +2262,7 @@ void LLModelPreview::critiqueJointToNodeMappingFromScene( void ) //2. Partial rig but w/o parity between the scene and joint array if ( result ) { - setResetJointFlag( true ); setRigWithSceneParity( true ); - } - else - { - setResetJointFlag( false ); } } //----------------------------------------------------------------------------- @@ -2355,8 +2379,20 @@ void LLModelLoader::loadTextures() //----------------------------------------------------------------------------- bool LLModelLoader::isNodeAJoint( domNode* pNode ) { - if ( !pNode || pNode->getName() == NULL) + if ( !pNode ) + { + llinfos<<"Created node is NULL"<<llendl; + return false; + } + + if ( pNode->getName() == NULL ) { + llinfos<<"Parsed node has no name "<<llendl; + //Attempt to write the node id, if possible (aids in debugging the visual scene) + if ( pNode->getId() ) + { + llinfos<<"Parsed node ID: "<<pNode->getId()<<llendl; + } return false; } @@ -2996,13 +3032,7 @@ U32 LLModelPreview::calcResourceCost() if ( uploadingJointPositions && !isRigValidForJointPositionUpload() ) { mFMP->childDisable("ok_btn"); - } - else - if ( !isLegacyRigValid() ) - { - mFMP->childDisable("ok_btn"); - } - //ok_btn should not have been changed unless something was wrong with joint list + } } std::set<LLModel*> accounted; @@ -3089,6 +3119,7 @@ U32 LLModelPreview::calcResourceCost() void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost) { + assert_main_thread(); childSetTextArg("import_dimensions", "[X]", llformat("%.3f", x)); childSetTextArg("import_dimensions", "[Y]", llformat("%.3f", y)); childSetTextArg("import_dimensions", "[Z]", llformat("%.3f", z)); @@ -3106,6 +3137,7 @@ void LLModelPreview::rebuildUploadData() std::string requested_name = mFMP->getChild<LLUICtrl>("description_form")->getValue().asString(); + std::string metric = mFMP->getChild<LLUICtrl>("model_category_combo")->getValue().asString(); LLSpinCtrl* scale_spinner = mFMP->getChild<LLSpinCtrl>("import_scale"); @@ -3167,6 +3199,7 @@ void LLModelPreview::rebuildUploadData() if (base_model) { base_model->mRequestedLabel = requested_name; + base_model->mMetric = metric; } S32 idx = 0; @@ -3343,6 +3376,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable if ( getLoadState() >= LLModelLoader::ERROR_PARSING ) { mFMP->childDisable("ok_btn"); + mFMP->childDisable( "calculate_btn" ); } if (lod == mPreviewLOD) @@ -4213,12 +4247,7 @@ void LLModelPreview::updateStatusMessages() if ( uploadingJointPositions && !isRigValidForJointPositionUpload() ) { skinAndRigOk = false; - } - else - if ( !isLegacyRigValid() ) - { - skinAndRigOk = false; - } + } } if(upload_ok && mModelLoader) @@ -4313,7 +4342,7 @@ void LLModelPreview::updateStatusMessages() //fmp->childSetEnabled("physics_optimize", !use_hull); - bool enable = phys_tris > 0 || phys_hulls > 0; + bool enable = (phys_tris > 0 || phys_hulls > 0) && fmp->mCurRequest.empty(); //enable = enable && !use_hull && fmp->childGetValue("physics_optimize").asBoolean(); //enable/disable "analysis" UI @@ -4325,7 +4354,7 @@ void LLModelPreview::updateStatusMessages() child = panel->findNextSibling(child); } - enable = phys_hulls > 0; + enable = phys_hulls > 0 && fmp->mCurRequest.empty(); //enable/disable "simplification" UI panel = fmp->getChild<LLPanel>("physics simplification"); child = panel->getFirstChild(); @@ -4352,6 +4381,11 @@ void LLModelPreview::updateStatusMessages() fmp->childEnable("Decompose"); } } + else + { + fmp->childEnable("simplify_cancel"); + fmp->childEnable("decompose_cancel"); + } } const char* lod_controls[] = @@ -4814,8 +4848,12 @@ BOOL LLModelPreview::render() mFMP->childSetValue("upload_joints", false); upload_joints = false; } - - mFMP->childSetEnabled("upload_joints", upload_skin); + + //Only enable joint offsets if it passed the earlier critiquing + if ( isRigValidForJointPositionUpload() ) + { + mFMP->childSetEnabled("upload_joints", upload_skin); + } F32 explode = mFMP->childGetValue("physics_explode").asReal(); @@ -4869,6 +4907,8 @@ BOOL LLModelPreview::render() target_pos); // point of interest + z_near = llclamp(z_far * 0.001f, 0.001f, 0.1f); + LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, width, height, FALSE, z_near, z_far); stop_glerror(); @@ -4945,18 +4985,22 @@ BOOL LLModelPreview::render() if (textures) { - const std::string& binding = instance.mModel->mMaterialList[i]; - const LLImportMaterial& material = instance.mMaterial[binding]; + int materialCnt = instance.mModel->mMaterialList.size(); + if ( i < materialCnt ) + { + const std::string& binding = instance.mModel->mMaterialList[i]; + const LLImportMaterial& material = instance.mMaterial[binding]; - llassert(binding == model->mMaterialList[i]); + llassert(binding == model->mMaterialList[i]); - glColor4fv(material.mDiffuseColor.mV); - if (material.mDiffuseMap.notNull()) - { - if (material.mDiffuseMap->getDiscardLevel() > -1) + glColor4fv(material.mDiffuseColor.mV); + if (material.mDiffuseMap.notNull()) { - gGL.getTexUnit(0)->bind(material.mDiffuseMap, true); - mTextureSet.insert(material.mDiffuseMap.get()); + if (material.mDiffuseMap->getDiscardLevel() > -1) + { + gGL.getTexUnit(0)->bind(material.mDiffuseMap, true); + mTextureSet.insert(material.mDiffuseMap.get()); + } } } } @@ -4984,184 +5028,197 @@ BOOL LLModelPreview::render() if (physics) { glClear(GL_DEPTH_BUFFER_BIT); - LLGLEnable blend(GL_BLEND); - gGL.blendFunc(LLRender::BF_ONE, LLRender::BF_ZERO); - - for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) + + for (U32 i = 0; i < 2; i++) { - LLModelInstance& instance = *iter; + if (i == 0) + { //depth only pass + gGL.setColorMask(false, false); + } + else + { + gGL.setColorMask(true, true); + } - LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS]; + //enable alpha blending on second pass but not first pass + LLGLState blend(GL_BLEND, i); + + gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA); - if (!model) + for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) { - continue; - } + LLModelInstance& instance = *iter; - gGL.pushMatrix(); - LLMatrix4 mat = instance.mTransform; + LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS]; - glMultMatrixf((GLfloat*) mat.mMatrix); + if (!model) + { + continue; + } + gGL.pushMatrix(); + LLMatrix4 mat = instance.mTransform; - bool render_mesh = true; + glMultMatrixf((GLfloat*) mat.mMatrix); - LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; - if (decomp) - { - LLMutexLock(decomp->mMutex); - LLModel::Decomposition& physics = model->mPhysics; + bool render_mesh = true; - if (!physics.mHull.empty()) + LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; + if (decomp) { - render_mesh = false; + LLMutexLock(decomp->mMutex); - if (physics.mMesh.empty()) - { //build vertex buffer for physics mesh - gMeshRepo.buildPhysicsMesh(physics); - } + LLModel::Decomposition& physics = model->mPhysics; + + if (!physics.mHull.empty()) + { + render_mesh = false; + + if (physics.mMesh.empty()) + { //build vertex buffer for physics mesh + gMeshRepo.buildPhysicsMesh(physics); + } - if (!physics.mMesh.empty()) - { //render hull instead of mesh - for (U32 i = 0; i < physics.mMesh.size(); ++i) - { - if (explode > 0.f) + if (!physics.mMesh.empty()) + { //render hull instead of mesh + for (U32 i = 0; i < physics.mMesh.size(); ++i) { - gGL.pushMatrix(); + if (explode > 0.f) + { + gGL.pushMatrix(); - LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters; - offset *= explode; + LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters; + offset *= explode; - gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]); - } + gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]); + } - static std::vector<LLColor4U> hull_colors; + static std::vector<LLColor4U> hull_colors; - if (i+1 >= hull_colors.size()) - { - hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 255)); - } + if (i+1 >= hull_colors.size()) + { + hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128)); + } glColor4ubv(hull_colors[i].mV); - LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals); + LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals); - if (explode > 0.f) - { - gGL.popMatrix(); + if (explode > 0.f) + { + gGL.popMatrix(); + } } } } } - } - if (render_mesh) - { - if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) + if (render_mesh) { - genBuffers(LLModel::LOD_PHYSICS, false); - } - for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i) - { - LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; - - buffer->setBuffer(type_mask & buffer->getTypeMask()); + if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) + { + genBuffers(LLModel::LOD_PHYSICS, false); + } + for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i) + { + LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; - buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - glColor4f(0.4f, 0.4f, 0.0f, 0.4f); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + glColor4f(0.4f, 0.4f, 0.0f, 0.4f); - buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); + buffer->setBuffer(type_mask & buffer->getTypeMask()); + buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - glColor3f(1.f, 1.f, 0.f); + glColor3f(1.f, 1.f, 0.f); - glLineWidth(2.f); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); + glLineWidth(2.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glLineWidth(1.f); + } } - } - - gGL.popMatrix(); - } - - glLineWidth(3.f); - glPointSize(8.f); - gPipeline.enableLightsFullbright(LLColor4::white); - //show degenerate triangles - LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS); - LLGLDisable cull(GL_CULL_FACE); - glColor4f(1.f,0.f,0.f,1.f); - const LLVector4a scale(0.5f); - for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) - { - LLModelInstance& instance = *iter; + gGL.popMatrix(); + } - LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS]; + glLineWidth(3.f); + glPointSize(8.f); + gPipeline.enableLightsFullbright(LLColor4::white); + //show degenerate triangles + LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS); + LLGLDisable cull(GL_CULL_FACE); + glColor4f(1.f,0.f,0.f,1.f); + const LLVector4a scale(0.5f); - if (!model) + for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) { - continue; - } + LLModelInstance& instance = *iter; - gGL.pushMatrix(); - LLMatrix4 mat = instance.mTransform; + LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS]; - glMultMatrixf((GLfloat*) mat.mMatrix); + if (!model) + { + continue; + } + gGL.pushMatrix(); + LLMatrix4 mat = instance.mTransform; - LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; - if (decomp) - { - LLMutexLock(decomp->mMutex); + glMultMatrixf((GLfloat*) mat.mMatrix); - LLModel::Decomposition& physics = model->mPhysics; - if (physics.mHull.empty()) + LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; + if (decomp) { - if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) + LLMutexLock(decomp->mMutex); + + LLModel::Decomposition& physics = model->mPhysics; + + if (physics.mHull.empty()) { - genBuffers(LLModel::LOD_PHYSICS, false); - } + if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) + { + genBuffers(LLModel::LOD_PHYSICS, false); + } - for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i) - { - LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; + for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i) + { + LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; - buffer->setBuffer(type_mask & buffer->getTypeMask()); + buffer->setBuffer(type_mask & buffer->getTypeMask()); - LLStrider<LLVector3> pos_strider; - buffer->getVertexStrider(pos_strider, 0); - LLVector4a* pos = (LLVector4a*) pos_strider.get(); + LLStrider<LLVector3> pos_strider; + buffer->getVertexStrider(pos_strider, 0); + LLVector4a* pos = (LLVector4a*) pos_strider.get(); - LLStrider<U16> idx; - buffer->getIndexStrider(idx, 0); + LLStrider<U16> idx; + buffer->getIndexStrider(idx, 0); - for (U32 i = 0; i < buffer->getNumIndices(); i += 3) - { - LLVector4a v1; v1.setMul(pos[*idx++], scale); - LLVector4a v2; v2.setMul(pos[*idx++], scale); - LLVector4a v3; v3.setMul(pos[*idx++], scale); - - if (ll_is_degenerate(v1,v2,v3)) + for (U32 i = 0; i < buffer->getNumIndices(); i += 3) { - buffer->draw(LLRender::LINE_LOOP, 3, i); - buffer->draw(LLRender::POINTS, 3, i); + LLVector4a v1; v1.setMul(pos[*idx++], scale); + LLVector4a v2; v2.setMul(pos[*idx++], scale); + LLVector4a v3; v3.setMul(pos[*idx++], scale); + + if (ll_is_degenerate(v1,v2,v3)) + { + buffer->draw(LLRender::LINE_LOOP, 3, i); + buffer->draw(LLRender::POINTS, 3, i); + } } } } } - } - gGL.popMatrix(); + gGL.popMatrix(); + } + glLineWidth(1.f); + glPointSize(1.f); + gPipeline.enableLightsPreview(); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } - glLineWidth(1.f); - glPointSize(1.f); - gPipeline.enableLightsPreview(); - gGL.setSceneBlendType(LLRender::BT_ALPHA); } } else @@ -5475,11 +5532,6 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) { mCalculateBtn->setVisible( false ); } - else - if ( !mModelPreview->isLegacyRigValid() ) - { - mCalculateBtn->setVisible( false ); - } } mUploadBtn->setVisible(!visible); @@ -5488,10 +5540,10 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) if (visible) { std::string tbd = getString("tbd"); - childSetTextArg("weights", "[EQ]", tbd); - childSetTextArg("weights", "[ST]", tbd); - childSetTextArg("weights", "[SIM]", tbd); - childSetTextArg("weights", "[PH]", tbd); + childSetTextArg("weights_right", "[EQ]", tbd); + childSetTextArg("weights_left", "[ST]", tbd); + childSetTextArg("weights_right", "[SIM]", tbd); + childSetTextArg("weights_left", "[PH]", tbd); childSetTextArg("upload_fee", "[FEE]", tbd); childSetTextArg("price_breakdown", "[STREAMING]", tbd); childSetTextArg("price_breakdown", "[PHYSICS]", tbd); @@ -5514,17 +5566,16 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived() const LLSD& result = mModelPhysicsFee; mUploadModelUrl = result["url"].asString(); - childSetTextArg("weights", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal())); - childSetTextArg("weights", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal())); - childSetTextArg("weights", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal())); - childSetTextArg("weights", "[PH]", llformat("%0.3f", result["physics_cost"].asReal())); + childSetTextArg("weights_right", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal())); + childSetTextArg("weights_left", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal())); + childSetTextArg("weights_right", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal())); + childSetTextArg("weights_left", "[PH]", llformat("%0.3f", result["physics_cost"].asReal())); childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger())); childSetTextArg("price_breakdown", "[STREAMING]", llformat("%d", result["upload_price_breakdown"]["mesh_streaming"].asInteger())); childSetTextArg("price_breakdown", "[PHYSICS]", llformat("%d", result["upload_price_breakdown"]["mesh_physics"].asInteger())); childSetTextArg("price_breakdown", "[INSTANCES]", llformat("%d", result["upload_price_breakdown"]["mesh_instance"].asInteger())); childSetTextArg("price_breakdown", "[TEXTURES]", llformat("%d", result["upload_price_breakdown"]["texture"].asInteger())); childSetTextArg("price_breakdown", "[MODEL]", llformat("%d", result["upload_price_breakdown"]["model"].asInteger())); - childSetVisible("weights", true); childSetVisible("upload_fee", true); childSetVisible("price_breakdown", true); mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty()); @@ -5532,19 +5583,21 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived() void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) { - toggleCalculateButton(true); llwarns << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << llendl; + doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true)); } /*virtual*/ void LLFloaterModelPreview::onModelUploadSuccess() { + assert_main_thread(); closeFloater(false); } /*virtual*/ void LLFloaterModelPreview::onModelUploadFailure() { + assert_main_thread(); toggleCalculateButton(true); } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 3a5f7602fe..f383b3fe98 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -125,7 +125,7 @@ public: void buildJointToNodeMappingFromScene( daeElement* pRoot ); void processJointToNodeMapping( domNode* pNode ); - + void processChildJoints( domNode* pParentNode ); //map of avatar joints as named in COLLADA assets to internal joint names std::map<std::string, std::string> mJointMap; @@ -365,9 +365,6 @@ public: void setLoadState( U32 state ) { mLoadState = state; } U32 getLoadState() { return mLoadState; } - //setRestJointFlag: If an asset comes through that changes the joints, we want the reset to persist - void setResetJointFlag( bool state ) { if ( !mResetJoints ) mResetJoints = state; } - const bool getResetJointFlag( void ) const { return mResetJoints; } void setRigWithSceneParity( bool state ) { mRigParityWithScene = state; } const bool getRigWithSceneParity( void ) const { return mRigParityWithScene; } diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp new file mode 100644 index 0000000000..93aa8dcf08 --- /dev/null +++ b/indra/newview/llfloaterobjectweights.cpp @@ -0,0 +1,99 @@ +/** + * @file llfloaterobjectweights.cpp + * @brief Object weights advanced view floater + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llfloaterobjectweights.h" + +#include "lltextbox.h" + +LLFloaterObjectWeights::LLFloaterObjectWeights(const LLSD& key) +: LLFloater(key), + mSelectedObjects(NULL), + mSelectedPrims(NULL), + mSelectedDownloadWeight(NULL), + mSelectedPhysicsWeight(NULL), + mSelectedServerWeight(NULL), + mSelectedDisplayWeight(NULL), + mSelectedOnLand(NULL), + mRezzedOnLand(NULL), + mRemainingCapacity(NULL), + mTotalCapacity(NULL) +{ +} + +LLFloaterObjectWeights::~LLFloaterObjectWeights() +{ +} + +// virtual +BOOL LLFloaterObjectWeights::postBuild() +{ + mSelectedObjects = getChild<LLTextBox>("objects"); + mSelectedPrims = getChild<LLTextBox>("prims"); + + mSelectedDownloadWeight = getChild<LLTextBox>("download"); + mSelectedPhysicsWeight = getChild<LLTextBox>("physics"); + mSelectedServerWeight = getChild<LLTextBox>("server"); + mSelectedDisplayWeight = getChild<LLTextBox>("display"); + + mSelectedOnLand = getChild<LLTextBox>("used_download_weight"); + mRezzedOnLand = getChild<LLTextBox>("used_download_weight"); + mRemainingCapacity = getChild<LLTextBox>("used_download_weight"); + mTotalCapacity = getChild<LLTextBox>("used_download_weight"); + + return TRUE; +} + +// virtual +void LLFloaterObjectWeights::onOpen(const LLSD& key) +{ + updateIfNothingSelected(); +} + +void LLFloaterObjectWeights::toggleLoadingIndicators(bool visible) +{ + childSetVisible("download_loading_indicator", visible); + childSetVisible("physics_loading_indicator", visible); + childSetVisible("server_loading_indicator", visible); + childSetVisible("display_loading_indicator", visible); +} + +void LLFloaterObjectWeights::updateIfNothingSelected() +{ + const std::string text = getString("nothing_selected"); + + mSelectedObjects->setText(text); + mSelectedPrims->setText(text); + + mSelectedDownloadWeight->setText(text); + mSelectedPhysicsWeight->setText(text); + mSelectedServerWeight->setText(text); + mSelectedDisplayWeight->setText(text); + + mSelectedOnLand->setText(text); + + toggleLoadingIndicators(false); +} diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h new file mode 100644 index 0000000000..10e35ad7a7 --- /dev/null +++ b/indra/newview/llfloaterobjectweights.h @@ -0,0 +1,64 @@ +/** + * @file llfloaterobjectweights.h + * @brief Object weights advanced view floater + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATEROBJECTWEIGHTS_H +#define LL_LLFLOATEROBJECTWEIGHTS_H + +#include "llfloater.h" + +class LLTextBox; + +class LLFloaterObjectWeights : public LLFloater +{ +public: + LOG_CLASS(LLFloaterObjectWeights); + + LLFloaterObjectWeights(const LLSD& key); + ~LLFloaterObjectWeights(); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void onOpen(const LLSD& key); + +private: + void toggleLoadingIndicators(bool visible); + void updateIfNothingSelected(); + + LLTextBox *mSelectedObjects; + LLTextBox *mSelectedPrims; + + LLTextBox *mSelectedDownloadWeight; + LLTextBox *mSelectedPhysicsWeight; + LLTextBox *mSelectedServerWeight; + LLTextBox *mSelectedDisplayWeight; + + LLTextBox *mSelectedOnLand; + LLTextBox *mRezzedOnLand; + LLTextBox *mRemainingCapacity; + LLTextBox *mTotalCapacity; +}; + +#endif //LL_LLFLOATEROBJECTWEIGHTS_H diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 9a99417e93..676059779c 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -172,30 +172,9 @@ bool estate_dispatch_initialized = false; LLUUID LLFloaterRegionInfo::sRequestInvoice; -void LLFloaterRegionInfo::onConsoleReplyReceived(const std::string& output) -{ - llwarns << "here is what they're giving us: " << output << llendl; - - if (output.find("FALSE") != std::string::npos) - { - getChild<LLUICtrl>("mesh_rez_enabled_check")->setValue(FALSE); - } - else - { - getChild<LLUICtrl>("mesh_rez_enabled_check")->setValue(TRUE); - } -} - - LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) : LLFloater(seed) -{ - mConsoleReplySignalConnection = LLFloaterRegionDebugConsole::setConsoleReplyCallback( - boost::bind( - &LLFloaterRegionInfo::onConsoleReplyReceived, - this, - _1)); -} +{} BOOL LLFloaterRegionInfo::postBuild() { @@ -246,9 +225,7 @@ BOOL LLFloaterRegionInfo::postBuild() } LLFloaterRegionInfo::~LLFloaterRegionInfo() -{ - mConsoleReplySignalConnection.disconnect(); -} +{} void LLFloaterRegionInfo::onOpen(const LLSD& key) { @@ -638,9 +615,6 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) getChildView("im_btn")->setEnabled(allow_modify); getChildView("manage_telehub_btn")->setEnabled(allow_modify); - const bool enable_mesh = gMeshRepo.meshRezEnabled(); - getChildView("mesh_rez_enabled_check")->setVisible(enable_mesh); - getChildView("mesh_rez_enabled_check")->setEnabled(getChildView("mesh_rez_enabled_check")->getEnabled() && enable_mesh); // Data gets filled in by processRegionInfo return LLPanelRegionInfo::refreshFromRegion(region); @@ -659,7 +633,6 @@ BOOL LLPanelRegionGeneralInfo::postBuild() initCtrl("access_combo"); initCtrl("restrict_pushobject"); initCtrl("block_parcel_search_check"); - initCtrl("mesh_rez_enabled_check"); childSetAction("kick_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickKick, this)); childSetAction("kick_all_btn", onClickKickAll, this); @@ -875,27 +848,6 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings); } - std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync"); - - if (!sim_console_url.empty()) - { - std::string update_str = "set mesh_rez_enabled "; - if (getChild<LLUICtrl>("mesh_rez_enabled_check")->getValue().asBoolean()) - { - update_str += "true"; - } - else - { - update_str += "false"; - } - - LLHTTPClient::post( - sim_console_url, - LLSD(update_str), - new ConsoleUpdateResponder); - } - - // if we changed access levels, tell user about it LLViewerRegion* region = gAgent.getRegion(); if (region && (getChild<LLUICtrl>("access_combo")->getValue().asInteger() != region->getSimAccess()) ) diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index c1fef57ac9..c402de66e8 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -100,10 +100,6 @@ private: LLFloaterRegionInfo(const LLSD& seed); ~LLFloaterRegionInfo(); - - void onConsoleReplyReceived(const std::string& output); - - boost::signals2::connection mConsoleReplySignalConnection;; protected: void onTabSelected(const LLSD& param); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 84fb8bd9e7..00a0da3cde 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -84,7 +84,6 @@ #include "llviewerwindow.h" #include "llvovolume.h" #include "lluictrlfactory.h" -#include "llaccountingquotamanager.h" #include "llmeshrepository.h" // Globals @@ -826,6 +825,9 @@ void LLFloaterTools::onClose(bool app_quitting) //gMenuBarView->setItemVisible("BuildTools", FALSE); LLFloaterReg::hideInstance("media_settings"); + + // hide the advanced object weights floater + LLFloaterReg::hideInstance("object_weights"); } void click_popup_info(void*) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index afed306a28..2b6b2a84e1 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -411,7 +411,6 @@ public: cc = llsd_from_file("fake_upload_error.xml"); } - //assert_main_thread(); mThread->mPendingUploads--; dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num)); @@ -1321,6 +1320,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) std::map<LLModel*,S32> mesh_index; std::string model_name; + std::string model_metric; S32 instance_num = 0; @@ -1342,6 +1342,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) model_name = data.mBaseModel->getName(); } + if (model_metric.empty()) + { + model_metric = data.mBaseModel->getMetric(); + } + std::stringstream ostr; LLModel::Decomposition& decomp = @@ -1455,6 +1460,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) if (model_name.empty()) model_name = "mesh model"; result["name"] = model_name; + if (model_metric.empty()) model_metric = "MUT_Other"; + result["metric"] = model_metric; result["asset_resources"] = res; dump_llsd_to_file(result,make_dump_name("whole_model_",dump_num)); @@ -1463,51 +1470,57 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) void LLMeshUploadThread::generateHulls() { + bool has_valid_requests = false ; + for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter) - { - LLMeshUploadData data; - data.mBaseModel = iter->first; + { + LLMeshUploadData data; + data.mBaseModel = iter->first; - LLModelInstance& instance = *(iter->second.begin()); + LLModelInstance& instance = *(iter->second.begin()); - for (S32 i = 0; i < 5; i++) - { - data.mModel[i] = instance.mLOD[i]; - } + for (S32 i = 0; i < 5; i++) + { + data.mModel[i] = instance.mLOD[i]; + } - //queue up models for hull generation - LLModel* physics = NULL; + //queue up models for hull generation + LLModel* physics = NULL; - if (data.mModel[LLModel::LOD_PHYSICS].notNull()) - { - physics = data.mModel[LLModel::LOD_PHYSICS]; - } - else if (data.mModel[LLModel::LOD_LOW].notNull()) - { - physics = data.mModel[LLModel::LOD_LOW]; - } - else if (data.mModel[LLModel::LOD_MEDIUM].notNull()) - { - physics = data.mModel[LLModel::LOD_MEDIUM]; - } - else - { - physics = data.mModel[LLModel::LOD_HIGH]; - } + if (data.mModel[LLModel::LOD_PHYSICS].notNull()) + { + physics = data.mModel[LLModel::LOD_PHYSICS]; + } + else if (data.mModel[LLModel::LOD_LOW].notNull()) + { + physics = data.mModel[LLModel::LOD_LOW]; + } + else if (data.mModel[LLModel::LOD_MEDIUM].notNull()) + { + physics = data.mModel[LLModel::LOD_MEDIUM]; + } + else + { + physics = data.mModel[LLModel::LOD_HIGH]; + } - llassert(physics != NULL); + llassert(physics != NULL); - DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this); - if(request->isValid()) - { - gMeshRepo.mDecompThread->submitRequest(request); - } + DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this); + if(request->isValid()) + { + gMeshRepo.mDecompThread->submitRequest(request); + has_valid_requests = true ; } - + } + + if(has_valid_requests) + { while (!mPhysicsComplete) { apr_sleep(100); } + } } void LLMeshUploadThread::doWholeModelUpload() @@ -3135,32 +3148,33 @@ void LLPhysicsDecomp::doDecompositionSingleHull() llwarns << "Could not execute decomposition stage when attempting to create single hull." << llendl; make_box(mCurRequest); } + else + { + mMutex->lock(); + mCurRequest->mHull.clear(); + mCurRequest->mHull.resize(1); + mCurRequest->mHullMesh.clear(); + mMutex->unlock(); - mMutex->lock(); - mCurRequest->mHull.clear(); - mCurRequest->mHull.resize(1); - mCurRequest->mHullMesh.clear(); - mMutex->unlock(); - - std::vector<LLVector3> p; - LLCDHull hull; + std::vector<LLVector3> p; + LLCDHull hull; - // if LLConvexDecomposition is a stub, num_hulls should have been set to 0 above, and we should not reach this code - decomp->getSingleHull(&hull); + // if LLConvexDecomposition is a stub, num_hulls should have been set to 0 above, and we should not reach this code + decomp->getSingleHull(&hull); - const F32* v = hull.mVertexBase; + const F32* v = hull.mVertexBase; - for (S32 j = 0; j < hull.mNumVertices; ++j) - { - LLVector3 vert(v[0], v[1], v[2]); - p.push_back(vert); - v = (F32*) (((U8*) v) + hull.mVertexStrideBytes); - } + for (S32 j = 0; j < hull.mNumVertices; ++j) + { + LLVector3 vert(v[0], v[1], v[2]); + p.push_back(vert); + v = (F32*) (((U8*) v) + hull.mVertexStrideBytes); + } - mMutex->lock(); - mCurRequest->mHull[0] = p; - mMutex->unlock(); - + mMutex->lock(); + mCurRequest->mHull[0] = p; + mMutex->unlock(); + } #else setMeshData(mesh, false); @@ -3498,8 +3512,7 @@ void LLMeshRepository::buildPhysicsMesh(LLModel::Decomposition& decomp) bool LLMeshRepository::meshUploadEnabled() { LLViewerRegion *region = gAgent.getRegion(); - if(gSavedSettings.getBOOL("MeshEnabled") && - LLViewerParcelMgr::getInstance()->allowAgentBuild() && + if(gSavedSettings.getBOOL("MeshEnabled") && region) { return region->meshUploadEnabled(); diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index bb87601d20..12eea7844d 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -351,7 +351,7 @@ void LLPanelVolume::getState( ) getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(is_flexible); if (is_flexible || (volobjp && volobjp->canBeFlexible())) { - getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp); + getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh()); } else { diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index b87ca1eaec..2bafca70b6 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -404,7 +404,7 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue) gPipeline.releaseGLBuffers(); gPipeline.createGLBuffers(); gPipeline.resetVertexBuffers(); - if (LLPipeline::sRenderDeferred && LLRenderTarget::sUseFBO) + if (LLPipeline::sRenderDeferred == (BOOL)LLRenderTarget::sUseFBO) { LLViewerShaderMgr::instance()->setShaders(); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index dd0989d608..eb58ec294f 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -79,6 +79,7 @@ #include "llfloatermodelwizard.h" #include "llfloaternamedesc.h" #include "llfloaternotificationsconsole.h" +#include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloaterpay.h" #include "llfloaterperms.h" @@ -226,6 +227,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>); LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>); + LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>); LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>); LLFloaterPayUtil::registerFloater(); @@ -284,7 +286,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); - LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>); + LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterWindowSizeUtil::registerFloater(); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index cd71b6d42a..bb7062085c 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,7 +100,6 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" -#include "llaccountingquota.h" //#define DEBUG_UPDATE_TYPE @@ -5785,9 +5784,3 @@ public: LLHTTPRegistration<ObjectPhysicsProperties> gHTTPRegistrationObjectPhysicsProperties("/message/ObjectPhysicsProperties"); - -void LLViewerObject::updateQuota( const SelectionQuota& quota ) -{ - //update quotas - mSelectionQuota = quota; -} diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 1828a64917..f7620707cf 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -43,7 +43,7 @@ #include "v3dmath.h" #include "v3math.h" #include "llvertexbuffer.h" -#include "llaccountingquota.h" +#include "llbbox.h" #include "llbbox.h" class LLAgent; // TODO: Get rid of this. @@ -243,6 +243,9 @@ public: void buildReturnablesForChildrenVO( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion ); void constructAndAddReturnable( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion ); + void buildReturnablesForChildrenVO( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion ); + void constructAndAddReturnable( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion ); + /* // This method will scan through this object, and then query the // selection manager to see if the local agent probably has the @@ -655,9 +658,7 @@ protected: void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id); public: - void updateQuota( const SelectionQuota& quota ); - const SelectionQuota& getQuota( void ) { return mSelectionQuota; } - + private: void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string void deleteTEImages(); // correctly deletes list of images @@ -719,8 +720,6 @@ protected: F32 mPhysicsCost; F32 mLinksetPhysicsCost; - SelectionQuota mSelectionQuota; - bool mCostStale; mutable bool mPhysicsShapeUnknown; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index db5684665b..f8aaded310 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1441,15 +1441,6 @@ void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id) mPendingObjectCost.erase(object_id); } -void LLViewerObjectList::updateQuota( const LLUUID& objectId, const SelectionQuota& quota ) -{ - LLViewerObject* pVO = findObject( objectId ); - if ( pVO ) - { - pVO->updateQuota( quota ); - } -} - void LLViewerObjectList::updatePhysicsFlags(const LLViewerObject* object) { mStalePhysicsFlags.insert(object->getID()); diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 9d1b5cb56f..c5f2a2c1ee 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -36,7 +36,6 @@ // project includes #include "llviewerobject.h" -#include "llaccountingquota.h" class LLCamera; class LLNetMap; @@ -102,8 +101,6 @@ public: F32 restitution, F32 gravity_multiplier); - void updateQuota( const LLUUID& objectId, const SelectionQuota& costs ); - void shiftObjects(const LLVector3 &offset); void repartitionObjects(); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index db2dc531db..415963ff53 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1486,11 +1486,10 @@ void LLViewerRegion::unpackRegionHandshake() msg->sendReliable(host); } - void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { - capabilityNames.append("AccountingParcel"); - capabilityNames.append("AccountingSelection"); +void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) +{ capabilityNames.append("AttachmentResources"); capabilityNames.append("AvatarPickerSearch"); capabilityNames.append("ChatSessionRequest"); @@ -1530,6 +1529,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ProvisionVoiceAccountRequest"); capabilityNames.append("RemoteParcelRequest"); capabilityNames.append("RequestTextureDownload"); + capabilityNames.append("ResourceCostSelected"); capabilityNames.append("SearchStatRequest"); capabilityNames.append("SearchStatTracking"); capabilityNames.append("SendPostcard"); @@ -1555,10 +1555,6 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); - //prep# Finalize these!!!!!!!!! - //capabilityNames.append("AccountingVO"); - capabilityNames.append("AccountingParcel"); - capabilityNames.append("AccountingRegion"); // Please add new capabilities alphabetically to reduce // merge conflicts. diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 30216f02db..cbfd64cffb 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -966,7 +966,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo S32 lod = mLOD; BOOL is404 = FALSE; - + if (isSculpted()) { // if it's a mesh diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml index afb7917043..c247a12e7a 100644 --- a/indra/newview/skins/default/xui/en/floater_build_options.xml +++ b/indra/newview/skins/default/xui/en/floater_build_options.xml @@ -37,7 +37,7 @@ layout="topleft" left="10" tool_tip="Grid opacity" - name="grid_mode_label" + name="grid_opacity_label" top_pad="30" width="123"> Mode diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 1d4a1d4827..c52f48cfaf 100755 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -32,6 +32,22 @@ </text> <line_editor bottom_delta="20" follows="top|left|right" height="19" max_length_bytes="64" name="description_form" prevalidate_callback="ascii" width="290" /> + + <text bottom_delta="20" left="15" follows="left|top" height="15" name="model_category_label" text_color="White"> + What does this model represent? + </text> + <combo_box top_pad="1" follows="left|top" height="23" + name="model_category_combo" width="200"> + <combo_box.drop_down_button + label_color="White"/> + <combo_item name="Avatar shape" label="Avatar shape" value="MUT_AvatarShape"/> + <combo_item name="Avatar attachment" label="Avatar attachment" value="MUT_AvatarAttachment"/> + <combo_item name="Building Component" label="Building Component" value="MUT_BuildingComponent"/> + <combo_item name="Moving object (vehicle, animal)" label="Moving object (vehicle, animal)" value="MUT_MovingObject"/> + <combo_item name="Large, non moving etc" label="Large, non moving etc" value="MUT_LargeStationary"/> + <combo_item name="Smaller, non-moving etc" label="Smaller, non-moving etc" value="MUT_SmallStationary"/> + <combo_item name="Not really any of these" label="Not really any of these" value="MUT_Other"/> + </combo_box> <text bottom_delta="20" left="15" follows="left|top" height="15" name="lod_label"> Preview: @@ -95,32 +111,47 @@ You will not be able to complete the final upload of this model to the Second Life servers. [[VURL] Find out how] to get enabled for mesh model uploads.</text> <text - height="65" - top_delta="45" + height="26" + top_pad="5" left_delta="0" - name="weights_text" + name="weights_text_left" width="80" word_wrap="true" > Download: Physics: -Server: - -Prim equivs: </text> - <text - height="65" + height="26" top_delta="0" - left_delta="80" - name="weights" + left_pad="0" + name="weights_left" width="70" word_wrap="true" > [ST] [PH] + </text> + <text + height="26" + top_delta="0" + left_pad="0" + name="weights_text_right" + width="80" + word_wrap="true" + > +Server: +Prim equivs: + </text> + <text + height="26" + top_delta="0" + left_pad="0" + name="weights_right" + width="70" + word_wrap="true" + > [SIM] - [EQ] </text> @@ -173,6 +204,18 @@ L$ [MODEL] name="lod_panel" help_topic="upload_model_lod"> + <!-- LOD TABLE--> + <panel + follows="top|left" + name="lod table" + left="0" + top="0" + width="300" + height="163" + visible="true" + border="true" + bevel_style="none" bg_alpha_color="0 0 0 0" bg_opaque_color="0 0 0 0.3"> + <text left="10" width="240" bottom="20" height="15" follows="left|top" name="lod_table_header"> Select Level of Detail: </text> @@ -210,9 +253,22 @@ L$ [MODEL] </text> <icon height="16" width="16" left="20" follows="left|top" name="lod_status_message_icon"/> - <text left_pad="5" width="200" height="28" follows="left|top" top_pad="-15" wrap="true" name="lod_status_message_text"/> + <text left_pad="5" width="230" height="28" follows="left|top" top_pad="-15" wrap="true" name="lod_status_message_text"/> + </panel> + + <!-- LOD MESH--> + <panel + follows="top|left" + name="mesh" + left="0" + top_pad="0" + width="300" + height="237" + visible="true" + border="true" + bevel_style="none" bg_alpha_color="0 0 0 0" bg_opaque_color="0 0 0 0.3"> - <text top_pad="-3" left="10" height="15" follows="left|top"> + <text top_pad="5" left="10" height="15" follows="left|top"> Mesh </text> @@ -236,10 +292,10 @@ L$ [MODEL] <spinner follows="top|left" name="lod_triangle_limit" increment="10" left_pad="5" height="20" width="100" decimal_digits="0" enabled="true"/> <spinner left_delta="0" bottom_delta="0" increment="0.01" follows="top|left" name="lod_error_threshold" min_val="0" max_val="100" height="20" width="100" decimal_digits="3" visible="false" enabled="true"/> - <text follows="top|left" name="build_operator_text" left="45" top_pad="10" width="100" height="15"> + <text follows="top|left" name="build_operator_text" left="45" top_pad="10" width="100" height="15" text_readonly_color="LabelDisabledColor"> Build Operator: </text> - <text follows="top|left" name="queue_mode_text" left_pad="5" width="100" height="15"> + <text follows="top|left" name="queue_mode_text" left_pad="5" width="100" height="15" text_readonly_color="LabelDisabledColor"> Queue Mode: </text> <combo_box follows="top|left" name="build_operator" top_pad="5" left="45" width="100" height="20"> @@ -263,11 +319,11 @@ L$ [MODEL] </combo_item> </combo_box> - <text top_pad="10" name="border_mode_text" left="45" follows="left|top" width="100" height="15"> + <text top_pad="10" name="border_mode_text" left="45" follows="left|top" width="100" height="15" text_readonly_color="LabelDisabledColor"> Border Mode: </text> - <text left_pad="5" name="share_tolderance_text" follows="left|top" width="100" height="15"> + <text left_pad="5" name="share_tolderance_text" follows="left|top" width="100" height="15" text_readonly_color="LabelDisabledColor"> Share Tolerance: </text> @@ -280,14 +336,28 @@ L$ [MODEL] </combo_item> </combo_box> <spinner follows="left|top" name="share_tolerance" left_pad="5" width="100" decimal_digits="5" initial_value="0.00001" height="20"/> - - <text left="10" top_pad="35" follows="top|left" width="240" height="15"> + </panel> + + <!-- LOD GENERATE NORMALS--> + <panel + follows="top|left" + name="generate normals" + left="0" + top_pad="0" + width="300" + height="46" + visible="true" + border="true" + bevel_style="none" bg_alpha_color="0 0 0 0" bg_opaque_color="0 0 0 0.3"> + + <text left="10" top_pad="5" follows="top|left" width="240" height="15"> Generate Normals </text> <text left="35" top_pad="5" follows="top|left" width="100" height="15" name="crease_label"> Crease Angle: </text> <spinner follows="top|left" left_pad="5" min_val="0" max_val="180" value="75" width="60" height="20" name="crease_angle"/> + </panel> </panel> <!-- PANEL --> @@ -314,8 +384,8 @@ L$ [MODEL] <radio_item bottom="23" name="physics_use_lod" label="Use Level of Detail:"/> </radio_group> - <combo_box left="180" top="10" follows="left|top" height="18" - name="physics_lod_combo" width="110" tool_tip="LOD to use for physics shape"> + <combo_box left="150" top="10" follows="left|top" height="18" + name="physics_lod_combo" width="130" tool_tip="LOD to use for physics shape"> <combo_item name="physics_lowest"> Lowest </combo_item> @@ -448,7 +518,7 @@ L$ [MODEL] <spinner left="10" height="20" follows="top|left" width="80" top_pad="5" value="1.0" min_val="0.01" max_val="64.0" name="import_scale"/> - <text left_pad="20" height="15" name="import_dimensions" follows="top|left"> + <text left_pad="20" height="15" width="140" name="import_dimensions" follows="top|left"> [X] x [Y] x [Z] m </text> diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 3d16ccbc45..b5a5ff5342 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -108,7 +108,7 @@ height="22" top_pad="15" width="505" - name="choose_file_header_panel" + name="header_panel" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true" @@ -117,7 +117,7 @@ width="200" left="10" top="3" - name="choose_file_header_text" + name="header_text" text_color="White" height="10" font="SansSerifBig" @@ -130,7 +130,7 @@ left="15" height="310" width="505" - name="choose_file_content_panel" + name="content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> @@ -163,7 +163,7 @@ height="10" layout="topleft" left_delta="0" - name="choose_model_file_label" + name="Cache location" width="320"> Choose model file to upload </text> @@ -199,7 +199,7 @@ height="10" layout="topleft" left="10" - name="support_collada_text" + name="Cache location" width="320"> Second Life supports COLLADA (.dae) files </text> @@ -221,7 +221,6 @@ width="130" height="14" left_delta="0" - name="dimensions_label" text_color="White" word_wrap="true"> Dimensions (meters): @@ -288,7 +287,7 @@ <panel height="22" top_pad="15" - name="optimize_header_panel" + name="header_panel" width="505" bg_opaque_color="DkGray2" background_visible="true" @@ -297,7 +296,7 @@ <text width="200" left="10" - name="optimize_header_text" + name="header_text" top="3" text_color="White" height="10" @@ -312,7 +311,7 @@ height="20" font="SansSerifSmall" layout="topleft" - name="optimize_hint" + name="description" word_wrap="true" left_delta="5"> We have optimized the model for performance. Adjust it further if you wish. @@ -323,12 +322,11 @@ left="15" height="270" width="505" - name="optimize_content_panel" + name="content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> <text - name="generating_lod_label" top="20" width="300" height="12" @@ -403,12 +401,12 @@ bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> - <text name="optimize_performance_text" top="69" left="10" text_color="White" font="SansSerifSmallBold" width="120" height="16" wrap="true">Performance</text> - <text name="optimize_faster_rendering_text" top="85" left="10" width="120" word_wrap="true" font="SansSerifSmall" height="40">Faster rendering + <text top="69" left="10" text_color="White" font="SansSerifSmallBold" width="120" height="16" wrap="true">Performance</text> + <text top="85" left="10" width="120" word_wrap="true" font="SansSerifSmall" height="40">Faster rendering Less detail Lower prim weight</text> - <text name="optimize_accuracy_text" top="69" left="184" text_color="White" font="SansSerifSmallBold" width="120" height="16" wrap="true">Accuracy</text> - <text name="optimize_slower_rendering_text" top="85" left="184" width="120" word_wrap="true" font="SansSerifSmall" height="40">Slower rendering + <text top="69" left="184" text_color="White" font="SansSerifSmallBold" width="120" height="16" wrap="true">Accuracy</text> + <text top="85" left="184" width="120" word_wrap="true" font="SansSerifSmall" height="40">Slower rendering More detail Higher prim weight</text> @@ -426,24 +424,21 @@ Higher prim weight</text> top="130" width="290" /> <text - font="SansSerifSmall" - name="accuracy_slider_mark1" + font="SansSerifSmall" top_pad="0" width="5" left_delta="6" height="4">' </text> <text - font="SansSerifSmall" - name="accuracy_slider_mark2" + font="SansSerifSmall" top_delta="0" width="5" left_delta="137" height="4">' </text> <text - font="SansSerifSmall" - name="accuracy_slider_mark3" + font="SansSerifSmall" top_delta="0" width="5" left_delta="137" @@ -459,7 +454,7 @@ Higher prim weight</text> top_pad="15" width="150"> </button> - <text top="10" right="-10" width="185" text_color="White" follows="left|top" height="15" name="geometry_preview_label"> + <text top="10" right="-10" width="185" text_color="White" follows="left|top" height="15" name="lod_label"> Geometry preview </text> <panel @@ -476,16 +471,16 @@ Higher prim weight</text> </panel> <combo_box left_delta="75" top_pad="10" follows="left|top" list_position="below" height="22" name="preview_lod_combo" width="110" tool_tip="LOD to view in preview render"> - <combo_item name="preview_lod_high"> + <combo_item name="high"> High detail </combo_item> - <combo_item name="preview_lod_medium"> + <combo_item name="medium"> Medium detail </combo_item> - <combo_item name="preview_lod_low"> + <combo_item name="low"> Low detail </combo_item> - <combo_item name="preview_lod_lowest"> + <combo_item name="lowest"> Lowest detail </combo_item> </combo_box> @@ -502,7 +497,7 @@ Higher prim weight</text> <panel height="22" top_pad="15" - name="physics_header_panel" + name="header_panel" width="505" bg_opaque_color="DkGray2" background_visible="true" @@ -511,7 +506,7 @@ Higher prim weight</text> <text width="200" left="10" - name="physics_header_text" + name="header_text" top="3" height="10" font="SansSerifBig" @@ -526,7 +521,7 @@ Higher prim weight</text> height="50" font="SansSerifSmall" layout="topleft" - name="physics_hint" + name="description" word_wrap="true" left_delta="5"> We will create a shape for the outer hull of the model. Adjust the shape's detail level as needed for the intended purpose of your model. @@ -536,16 +531,16 @@ Higher prim weight</text> left="15" height="270" width="505" - name="physics_content_panel" + name="content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> - <text name="physics_performance_text" top="10" left="10" text_color="White" font="SansSerifSmallBold" width="120" halign="right" height="16" wrap="true">Performance</text> - <text name="physics_faster_rendering_text" top="26" left="10" width="120" word_wrap="true" font="SansSerifSmall" halign="right" height="40">Faster rendering + <text top="10" left="10" text_color="White" font="SansSerifSmallBold" width="120" halign="right" height="16" wrap="true">Performance</text> + <text top="26" left="10" width="120" word_wrap="true" font="SansSerifSmall" halign="right" height="40">Faster rendering Less detail Lower prim weight</text> - <text name="physics_accuracy_text" top="174" left="10" text_color="White" font="SansSerifSmallBold" width="120" halign="right" height="16" wrap="true">Accuracy</text> - <text name="physics_slower_dendering_text" top="190" left="10" width="120" word_wrap="true" font="SansSerifSmall" halign="right" height="40">Slower rendering + <text top="174" left="10" text_color="White" font="SansSerifSmallBold" width="120" halign="right" height="16" wrap="true">Accuracy</text> + <text top="190" left="10" width="120" word_wrap="true" font="SansSerifSmall" halign="right" height="40">Slower rendering More detail Higher prim weight</text> @@ -563,15 +558,15 @@ Higher prim weight</text> show_text="false" top="25" width="22" /> - <text name="physics_example_1" top="10" width="120" word_wrap="true" left_pad="10" height="50">Examples: + <text top="10" width="120" word_wrap="true" left_pad="10" height="50">Examples: Moving objects Flying objects Vehicles</text> - <text name="physics_example_2" top="95" width="120" word_wrap="true" left_delta="0" height="50">Examples: + <text top="95" width="120" word_wrap="true" left_delta="0" height="50">Examples: Small static objects Less detailed objects Simple furniture</text> - <text name="physics_example_3" top="180" width="120" word_wrap="true" left_delta="0" height="50">Examples: + <text top="180" width="120" word_wrap="true" left_delta="0" height="50">Examples: Static objects Detailed objects Buildings</text> @@ -597,7 +592,7 @@ Buildings</text> visible="false" width="150"> </button> - <text top="10" right="-10" width="185" text_color="White" follows="left|top" height="15" name="physics_preview_label"> + <text top="10" right="-10" width="185" text_color="White" follows="left|top" height="15" name="lod_label"> Physics preview </text> <panel @@ -614,16 +609,16 @@ Buildings</text> </panel> <combo_box left_delta="75" top_pad="10" follows="left|top" list_position="below" height="22" name="preview_lod_combo2" width="110" tool_tip="LOD to view in preview render"> - <combo_item name="preview_lod2_high"> + <combo_item name="high"> High detail </combo_item> - <combo_item name="preview_lod2_medium"> + <combo_item name="medium"> Medium detail </combo_item> - <combo_item name="preview_lod2_low"> + <combo_item name="low"> Low detail </combo_item> - <combo_item name="preview_lod2_lowest"> + <combo_item name="lowest"> Lowest detail </combo_item> </combo_box> @@ -640,7 +635,7 @@ Buildings</text> <panel height="22" top_pad="15" - name="review_header_panel" + name="header_panel" width="505" bg_opaque_color="DkGray2" background_visible="true" @@ -649,7 +644,7 @@ Buildings</text> <text width="200" left="10" - name="review_header_text" + name="header_text" text_color="White" top="3" height="10" @@ -663,7 +658,7 @@ Buildings</text> left="15" height="310" width="505" - name="review_content_panel" + name="content" bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> @@ -711,7 +706,7 @@ Buildings</text> <panel height="22" top_pad="15" - name="upload_header_panel" + name="header_panel" width="505" bg_opaque_color="DkGray2" background_visible="true" @@ -720,7 +715,7 @@ Buildings</text> <text width="200" left="10" - name="upload_header_text" + name="header_text" top="3" text_color="White" height="10" diff --git a/indra/newview/skins/default/xui/en/floater_object_weights.xml b/indra/newview/skins/default/xui/en/floater_object_weights.xml new file mode 100644 index 0000000000..f377386679 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_object_weights.xml @@ -0,0 +1,310 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_close="true" + can_tear_off="false" + height="315" + help_topic="objects_weight_floater" + layout="topleft" + name="object_weights" + save_rect="true" + single_instance="true" + title="ADVANCED" + width="200"> + <floater.string + name="nothing_selected" + value="--"/> + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="selected_text" + text_color="EmphasisColor" + top="10" + value="SELECTED" + width="180" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="objects" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="objects_label" + top_delta="0" + value="Objects" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="prims" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="prims_label" + top_delta="0" + value="Prims" + width="130" /> + <view_border + bevel_style="none" + follows="top|left" + height="0" + layout="topleft" + left="10" + name="selected_text_border" + top_pad="5" + width="180"/> + + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="weights_of_selected_text" + text_color="EmphasisColor" + top_pad="10" + value="WEIGHTS OF SELECTED" + width="180" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="download" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="download_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="download_label" + top_delta="0" + value="Download" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="physics" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="physics_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="physics_label" + top_delta="0" + value="Physics" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="server" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="server_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="server_label" + top_delta="0" + value="Server" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="display" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="display_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="display_label" + top_delta="0" + value="Display" + width="130" /> + <view_border + bevel_style="none" + follows="top|left" + height="0" + layout="topleft" + left="10" + name="weights_text_border" + top_pad="5" + width="180"/> + + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="land_impacts_text" + text_color="EmphasisColor" + top_pad="10" + value="LAND IMPACTS" + width="180" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="selected" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="selected_label" + top_delta="0" + value="Selected" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="rezzed_on_land" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="rezzed_on_land_label" + top_delta="0" + value="Rezzed on land" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="remaining_capacity" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="remaining_capacity" + top_delta="0" + value="Remaining capacity" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="total_capacity" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="total_capacity" + top_delta="0" + value="Total capacity" + width="130" /> + <view_border + bevel_style="none" + follows="top|left" + height="0" + layout="topleft" + left="10" + name="land_impacts_text_border" + top_pad="5" + width="180"/> + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="total_capacity" + top_pad="10" + value="[secondlife:///www.secondlife.com What is all this?...]" + width="180" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 8901583799..e794a7067d 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -742,7 +742,7 @@ top_pad="0" visible="false" width="280"> - Physics weight [PHYS_WEIGHT], Render Cost [DISP_WEIGHT]. + Physics weight [PHYS_WEIGHT], Render Cost [DISP_WEIGHT]. [secondlife:///app/openfloater/object_weights More info] </text> <!-- <text --> <!-- text_color="LtGray_50" --> diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 3f9195d092..44c84e69a1 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -133,17 +133,7 @@ tool_tip="Let people see this region and its parcels in search results" top="190" width="80" /> - <check_box - visible="FALSE" - height="20" - label="Allow Mesh Objects" - layout="topleft" - left="10" - name="mesh_rez_enabled_check" - tool_tip="Let people rez mesh objects on this region" - top="210" - width="80" /> - <spinner + <spinner decimal_digits="0" follows="left|top" height="20" |