diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2011-06-06 15:35:52 -0700 | 
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2011-06-06 15:35:52 -0700 | 
| commit | c24a5a3fb5e24ffe3faddb5c71e884d9a1513db0 (patch) | |
| tree | f86db3b8b82c734a60dc15cb3d0e79f990803adb | |
| parent | 73bbcfb07bdb0ea5828a2e214b87c4fabe805eaa (diff) | |
| parent | 325c2b216907b84b02b425103b011a556222b474 (diff) | |
automated merge
| -rw-r--r-- | indra/llui/llresmgr.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llmeshrepository.cpp | 265 | ||||
| -rw-r--r-- | indra/newview/llmeshrepository.h | 5 | ||||
| -rw-r--r-- | indra/newview/llviewermenufile.cpp | 72 | ||||
| -rw-r--r-- | indra/newview/llviewermenufile.h | 17 | ||||
| -rw-r--r-- | indra/newview/llviewerregion.cpp | 3 | 
7 files changed, 4 insertions, 362 deletions
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 39385786bc..820e7cb26a 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -337,7 +337,7 @@ LLLocale::LLLocale(const std::string& locale_string)  	char* new_locale_string = setlocale( LC_ALL, locale_string.c_str());  	if ( new_locale_string == NULL)  	{ -		llwarns << "Failed to set locale " << locale_string << llendl; +		LL_WARNS_ONCE("LLLocale") << "Failed to set locale " << locale_string << LL_ENDL;  		setlocale(LC_ALL, SYSTEM_LOCALE.c_str());  	}  	//else diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index f21d60dd03..675edd7643 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1399,7 +1399,7 @@ bool LLModelLoader::doLoadModel()  			if(model->getStatus() != LLModel::NO_ERRORS)  			{  				setLoadState(ERROR_PARSING + model->getStatus()) ; -				return true ; //abort +				return false; //abort  			}  			if (model.notNull() && validate_model(model)) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 7ac06f46d1..ff9f0e1663 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -508,6 +508,7 @@ public:  		llinfos << "completed" << llendl;
  		mThread->mPendingUploads--;
  		dumpLLSDToFile(content,make_dump_name("whole_model_fee_response_",dump_num));
 +		llinfos << "LLWholeModelFeeResponder content: " << content << llendl;
  		if (isGoodStatus(status))
  		{
  			mThread->mWholeModelUploadURL = content["uploader"].asString(); 
 @@ -1303,8 +1304,6 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,  	mOrigin = gAgent.getPositionAgent();
  	mHost = gAgent.getRegionHost();
 -	mUploadObjectAssetCapability = gAgent.getRegion()->getCapability("UploadObjectAsset");
 -	mNewInventoryCapability = gAgent.getRegion()->getCapability("NewFileAgentInventoryVariablePrice");
  	mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
  	mOrigin += gAgent.getAtAxis() * scale.magVec();
 @@ -1394,14 +1393,7 @@ BOOL LLMeshUploadThread::isDiscarded()  void LLMeshUploadThread::run()
  {
 -	//if (gSavedSettings.getBOOL("MeshUseWholeModelUpload"))
 -	{
 -		doWholeModelUpload();
 -	}
 -	/*else
 -	{
 -		doIterativeUpload();
 -	}*/
 +	doWholeModelUpload();
  }
  void dumpLLSDToFile(const LLSD& content, std::string filename)
 @@ -1671,163 +1663,6 @@ void LLMeshUploadThread::doWholeModelUpload()  	mFinished = true;
  }
 -void LLMeshUploadThread::doIterativeUpload()
 -{
 -	if(isDiscarded())
 -	{
 -		mFinished = true;
 -		return ;
 -	}
 -	
 -	mCurlRequest = new LLCurlRequest();	
 -
 -	std::set<LLViewerTexture* > textures;
 -
 -	//populate upload queue with relevant models
 -	for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter)
 -	{
 -		LLMeshUploadData data;
 -		data.mBaseModel = iter->first;
 -
 -		LLModelInstance& instance = *(iter->second.begin());
 -
 -		for (S32 i = 0; i < 5; i++)
 -		{
 -			data.mModel[i] = instance.mLOD[i];
 -		}
 -
 -		uploadModel(data);
 -
 -		if (mUploadTextures)
 -		{
 -			for (std::vector<LLImportMaterial>::iterator material_iter = instance.mMaterial.begin();
 -				material_iter != instance.mMaterial.end(); ++material_iter)
 -			{
 -
 -				if (textures.find(material_iter->mDiffuseMap.get()) == textures.end())
 -				{
 -					textures.insert(material_iter->mDiffuseMap.get());
 -					
 -					LLTextureUploadData data(material_iter->mDiffuseMap.get(), material_iter->mDiffuseMapLabel);
 -					uploadTexture(data);
 -				}
 -			}
 -		}
 -
 -		//queue up models for hull generation
 -		LLModel* physics = data.mModel[LLModel::LOD_PHYSICS];
 -		if (physics == NULL)
 -		{ //no physics model available, use high lod
 -			physics = data.mModel[LLModel::LOD_HIGH];
 -		}
 -		
 -		DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this);
 -		gMeshRepo.mDecompThread->submitRequest(request);
 -	}
 -
 -	while (!mPhysicsComplete)
 -	{
 -		apr_sleep(100);
 -	}
 -
 -	//upload textures
 -	bool done = false;
 -	do
 -	{
 -		if (!mTextureQ.empty())
 -		{
 -			sendCostRequest(mTextureQ.front());
 -			mTextureQ.pop();
 -		}
 -
 -		if (!mConfirmedTextureQ.empty())
 -		{
 -			doUploadTexture(mConfirmedTextureQ.front());
 -			mConfirmedTextureQ.pop();
 -		}
 -
 -		mCurlRequest->process();
 -
 -		done = mTextureQ.empty() && mConfirmedTextureQ.empty();
 -	}
 -	while (!done || mCurlRequest->getQueued() > 0);
 -
 -	LLSD object_asset;
 -	object_asset["objects"] = LLSD::emptyArray();
 -
 -	done = false;
 -	do 
 -	{
 -		static S32 count = 0;
 -		static F32 last_hundred = gFrameTimeSeconds;
 -		if (gFrameTimeSeconds - last_hundred > 1.f)
 -		{
 -			last_hundred = gFrameTimeSeconds;
 -			count = 0;
 -		}
 -
 -		//how many requests to push before calling process
 -		const S32 PUSH_PER_PROCESS = 32;
 -
 -		S32 tcount = llmin(count+PUSH_PER_PROCESS, 100);
 -
 -		while (!mUploadQ.empty() && count < tcount)
 -		{ //send any pending upload requests
 -			mMutex->lock();
 -			LLMeshUploadData data = mUploadQ.front();
 -			mUploadQ.pop();
 -			mMutex->unlock();
 -			sendCostRequest(data);
 -			count++;
 -		}
 -
 -		tcount = llmin(count+PUSH_PER_PROCESS, 100);
 -		
 -		while (!mConfirmedQ.empty() && count < tcount)
 -		{ //process any meshes that have been confirmed for upload
 -			LLMeshUploadData& data = mConfirmedQ.front();
 -			doUploadModel(data);
 -			mConfirmedQ.pop();
 -			count++;
 -		}
 -	
 -		tcount = llmin(count+PUSH_PER_PROCESS, 100);
 -
 -		while (!mInstanceQ.empty() && count < tcount && !isDiscarded())
 -		{ //create any objects waiting for upload
 -			count++;
 -			object_asset["objects"].append(createObject(mInstanceQ.front()));
 -			mInstanceQ.pop();
 -		}
 -			
 -		mCurlRequest->process();
 -			
 -		done = isDiscarded() || (mInstanceQ.empty() && mConfirmedQ.empty() && mUploadQ.empty());
 -	}
 -	while (!done || mCurlRequest->getQueued() > 0);
 -
 -	delete mCurlRequest;
 -	mCurlRequest = NULL;
 -
 -	// now upload the object asset
 -	std::string url = mUploadObjectAssetCapability;
 -
 -	if (object_asset["objects"][0].has("permissions"))
 -	{ //copy permissions from first available object to be used for coalesced object
 -		object_asset["permissions"] = object_asset["objects"][0]["permissions"];
 -	}
 -
 -	if(!isDiscarded())
 -	{
 -		mPendingUploads++;
 -		LLHTTPClient::post(url, object_asset, new LLModelObjectUploadResponder(this,object_asset));
 -	}
 -	else
 -	{
 -		mFinished = true;
 -	}
 -}
 -
  void LLMeshUploadThread::uploadModel(LLMeshUploadData& data)
  { //called from arbitrary thread
  	{
 @@ -2938,102 +2773,6 @@ S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod)  }
 -void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data)
 -{
 -	if(isDiscarded())
 -	{
 -		return ;
 -	}
 -
 -	//write model file to memory buffer
 -	std::stringstream ostr;
 -
 -	LLModel::Decomposition& decomp =
 -		data.mModel[LLModel::LOD_PHYSICS].notNull() ? 
 -		data.mModel[LLModel::LOD_PHYSICS]->mPhysics : 
 -		data.mBaseModel->mPhysics;
 -
 -	LLSD header = LLModel::writeModel(
 -		ostr,
 -		data.mModel[LLModel::LOD_PHYSICS],
 -		data.mModel[LLModel::LOD_HIGH],
 -		data.mModel[LLModel::LOD_MEDIUM],
 -		data.mModel[LLModel::LOD_LOW],
 -		data.mModel[LLModel::LOD_IMPOSTOR], 
 -		decomp,
 -		mUploadSkin,
 -		mUploadJoints,
 -		true);
 -
 -	std::string desc = data.mBaseModel->mLabel;
 -	
 -	// Grab the total vertex count of the model
 -	// along with other information for the "asset_resources" map
 -	// to send to the server.
 -	LLSD asset_resources = LLSD::emptyMap();
 -
 -
 -	std::string url = mNewInventoryCapability; 
 -
 -	if (!url.empty())
 -	{
 -		LLSD body = generate_new_resource_upload_capability_body(
 -			LLAssetType::AT_MESH,
 -			desc,
 -			desc,
 -			LLFolderType::FT_MESH,
 -			LLInventoryType::IT_MESH,
 -			LLFloaterPerms::getNextOwnerPerms(),
 -			LLFloaterPerms::getGroupPerms(),
 -			LLFloaterPerms::getEveryonePerms());
 -
 -		body["asset_resources"] = asset_resources;
 -
 -		mPendingConfirmations++;
 -		LLCurlRequest::headers_t headers;
 -
 -		data.mPostData = body;
 -
 -		mCurlRequest->post(url, headers, body, new LLMeshCostResponder(data, this));
 -	}	
 -}
 -
 -void LLMeshUploadThread::sendCostRequest(LLTextureUploadData& data)
 -{
 -	if(isDiscarded())
 -	{
 -		return ;
 -	}
 -
 -	if (data.mTexture && data.mTexture->getDiscardLevel() >= 0)
 -	{
 -		LLSD asset_resources = LLSD::emptyMap();
 -
 -		std::string url = mNewInventoryCapability; 
 -
 -		if (!url.empty())
 -		{
 -			LLSD body = generate_new_resource_upload_capability_body(
 -				LLAssetType::AT_TEXTURE,
 -				data.mLabel,
 -				data.mLabel,
 -				LLFolderType::FT_TEXTURE,
 -				LLInventoryType::IT_TEXTURE,
 -				LLFloaterPerms::getNextOwnerPerms(),
 -				LLFloaterPerms::getGroupPerms(),
 -				LLFloaterPerms::getEveryonePerms());
 -
 -			body["asset_resources"] = asset_resources;
 -
 -			mPendingConfirmations++;
 -			LLCurlRequest::headers_t headers;
 -			
 -			data.mPostData = body;
 -			mCurlRequest->post(url, headers, body, new LLTextureCostResponder(data, this));
 -		}	
 -	}
 -}
 -
  void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data)
  {
 diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index ba64387dbb..d5b06cc66f 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -393,8 +393,6 @@ public:  	BOOL            mDiscarded ;  	LLHost			mHost; -	std::string		mUploadObjectAssetCapability; -	std::string		mNewInventoryCapability;  	std::string		mWholeModelFeeCapability;  	std::string		mWholeModelUploadURL; @@ -413,12 +411,10 @@ public:  	void uploadTexture(LLTextureUploadData& data);  	void doUploadTexture(LLTextureUploadData& data); -	void sendCostRequest(LLTextureUploadData& data);  	void priceResult(LLTextureUploadData& data, const LLSD& content);  	void onTextureUploaded(LLTextureUploadData& data);  	void uploadModel(LLMeshUploadData& data); -	void sendCostRequest(LLMeshUploadData& data);  	void doUploadModel(LLMeshUploadData& data);  	void onModelUploaded(LLMeshUploadData& data);  	void createObjects(LLMeshUploadData& data); @@ -432,7 +428,6 @@ public:  	BOOL isDiscarded();  	void doWholeModelUpload(); -	void doIterativeUpload();  	void wholeModelToLLSD(LLSD& dest, bool include_textures); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index b2080a5b82..b9293b3b31 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -1201,78 +1201,6 @@ void upload_new_resource(  	}  } -BOOL upload_new_variable_price_resource( -	const LLTransactionID &tid,  -	LLAssetType::EType asset_type, -	std::string name, -	std::string desc,  -	LLFolderType::EType destination_folder_type, -	LLInventoryType::EType inv_type, -	U32 next_owner_perms, -	U32 group_perms, -	U32 everyone_perms, -	const std::string& display_name, -	const LLSD& asset_resources) -{ -	LLAssetID uuid =  -		upload_new_resource_prep( -			tid, -			asset_type, -			inv_type, -			name, -			display_name, -			desc); - -	llinfos << "*** Uploading: " << llendl; -	llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl; -	llinfos << "UUID: " << uuid << llendl; -	llinfos << "Name: " << name << llendl; -	llinfos << "Desc: " << desc << llendl; -	lldebugs << "Folder: " -		<< gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? (LLFolderType::EType)asset_type : destination_folder_type) << llendl; -	lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; - -	std::string url = gAgent.getRegion()->getCapability( -		"NewFileAgentInventoryVariablePrice"); - -	if ( !url.empty() ) -	{ -		lldebugs -			<< "New Agent Inventory variable price upload" << llendl; -		 -		// Each of the two capabilities has similar data, so -		// let's reuse that code - -		LLSD body; - -		body = generate_new_resource_upload_capability_body( -			asset_type, -			name, -			desc, -			destination_folder_type, -			inv_type, -			next_owner_perms, -			group_perms, -			everyone_perms); - -		body["asset_resources"] = asset_resources; - -		LLHTTPClient::post( -			url, -			body, -			new LLNewAgentInventoryVariablePriceResponder( -				uuid, -				asset_type, -				body)); - -		return TRUE; -	} -	else -	{ -		return FALSE; -	} -} -  LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid)  {  	if ( gDisconnected ) diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 1597821504..3136358b83 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -68,23 +68,6 @@ void upload_new_resource(  	S32 expected_upload_cost,  	void *userdata); -// TODO* : Move all uploads to use this new function -// since at some point, that upload path will be deprecated and no longer -// used - -// We make a new function here to ensure that previous code is not broken -BOOL upload_new_variable_price_resource( -	const LLTransactionID& tid,  -	LLAssetType::EType type, -	std::string name, -	std::string desc,  -	LLFolderType::EType destination_folder_type, -	LLInventoryType::EType inv_type, -	U32 next_owner_perms, -	U32 group_perms, -	U32 everyone_perms, -	const std::string& display_name, -	const LLSD& asset_resources);  LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid);  void increase_new_upload_stats(LLAssetType::EType asset_type); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 3bffddc56f..80207d6568 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1525,9 +1525,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)  	capabilityNames.append("LandResources");  	capabilityNames.append("MapLayer");  	capabilityNames.append("MapLayerGod"); -	capabilityNames.append("NewAccountingEnabled");  	capabilityNames.append("NewFileAgentInventory"); -	capabilityNames.append("NewFileAgentInventoryVariablePrice");  	capabilityNames.append("ObjectAdd");  	capabilityNames.append("ParcelPropertiesUpdate");  	capabilityNames.append("ParcelMediaURLFilterList"); @@ -1559,7 +1557,6 @@ void LLViewerRegion::setSeedCapability(const std::string& url)  	capabilityNames.append("UpdateNotecardTaskInventory");  	capabilityNames.append("UpdateScriptTask");  	capabilityNames.append("UploadBakedTexture"); -	capabilityNames.append("UploadObjectAsset");  	capabilityNames.append("ViewerMetrics");  	capabilityNames.append("ViewerStartAuction");  	capabilityNames.append("ViewerStats");  | 
