当前位置: 首页>>代码示例>>C++>>正文


C++ LLPreviewNotecard::setAssetId方法代码示例

本文整理汇总了C++中LLPreviewNotecard::setAssetId方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPreviewNotecard::setAssetId方法的具体用法?C++ LLPreviewNotecard::setAssetId怎么用?C++ LLPreviewNotecard::setAssetId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLPreviewNotecard的用法示例。


在下文中一共展示了LLPreviewNotecard::setAssetId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: uploadComplete

//virtual 
void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
{
	llinfos << "LLUpdateTaskInventoryResponder::result from capabilities" << llendl;
	LLUUID item_id = mPostData["item_id"];
	LLUUID task_id = mPostData["task_id"];

	dialog_refresh_all();
	
	switch(mAssetType)
	{
		case LLAssetType::AT_NOTECARD:
			{
				// Update the UI with the new asset.
				LLPreviewNotecard* nc;
				nc = (LLPreviewNotecard*)LLPreview::find(item_id);
				if(nc)
				{
					// *HACK: we have to delete the asset in the VFS so
					// that the viewer will redownload it. This is only
					// really necessary if the asset had to be modified by
					// the uploader, so this can be optimized away in some
					// cases. A better design is to have a new uuid if the
					// script actually changed the asset.
					if(nc->hasEmbeddedInventory())
					{
						gVFS->removeFile(
							content["new_asset"].asUUID(),
							LLAssetType::AT_NOTECARD);
					}

					nc->setAssetId(content["new_asset"].asUUID());
					nc->refreshFromInventory();
				}
			}
			break;
		case LLAssetType::AT_LSL_TEXT:
			{
				if(mQueueId.notNull())
				{
					LLFloaterCompileQueue* queue = 
						(LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId);
					if(NULL != queue)
					{
						queue->removeItemByItemID(item_id);
					}
				}
				else
				{
					LLLiveLSLEditor* preview = LLLiveLSLEditor::find(item_id, task_id);
					if (preview)
					{
						// Bytecode save completed
						if (content["compiled"])
						{
							preview->callbackLSLCompileSucceeded(
								task_id,
								item_id,
								mPostData["is_script_running"]);
						}
						else
						{
							preview->callbackLSLCompileFailed(content["errors"]);
						}
					}
				}
			}
			break;
	default:
		break;
	}
}
开发者ID:balp,项目名称:imprudence,代码行数:72,代码来源:llassetuploadresponders.cpp


注:本文中的LLPreviewNotecard::setAssetId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。