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


C++ LLViewerInventoryItem::getName方法代码示例

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


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

示例1: onCommitName

// static
void LLFloaterProperties::onCommitName()
{
	//llinfos << "LLFloaterProperties::onCommitName()" << llendl;
	LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
	if(!item)
	{
		return;
	}
	LLLineEditor* labelItemName = getChild<LLLineEditor>("LabelItemName");

	if(labelItemName&&
	   (item->getName() != labelItemName->getText()) && 
	   (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE)) )
	{
		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
		new_item->rename(labelItemName->getText());
		if(mObjectID.isNull())
		{
			new_item->updateServer(FALSE);
			gInventory.updateItem(new_item);
			gInventory.notifyObservers();
		}
		else
		{
			LLViewerObject* object = gObjectList.findObject(mObjectID);
			if(object)
			{
				object->updateInventory(
					new_item,
					TASK_INVENTORY_ITEM_KEY,
					false);
			}
		}
	}
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:36,代码来源:llfloaterproperties.cpp

示例2: changed

void LLGestureMgr::changed(U32 mask) 
{ 
	LLInventoryFetchItemsObserver::changed(mask);

	if (mask & LLInventoryObserver::GESTURE)
	{
		// If there was a gesture label changed, update all the names in the 
		// active gestures and then notify observers
		if (mask & LLInventoryObserver::LABEL)
		{
			for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it)
			{
				if(it->second)
				{
					LLViewerInventoryItem* item = gInventory.getItem(it->first);
					if(item)
					{
						it->second->mName = item->getName();
					}
				}
			}
			notifyObservers();
		}
		// If there was a gesture added or removed notify observers
		// STRUCTURE denotes that the inventory item has been moved
		// In the case of deleting gesture, it is moved to the trash
		else if(mask & LLInventoryObserver::ADD ||
				mask & LLInventoryObserver::REMOVE ||
				mask & LLInventoryObserver::STRUCTURE)
		{
			notifyObservers();
		}
	}
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:34,代码来源:llgesturemgr.cpp

示例3: done

	virtual void done()
	{
		gInventory.removeObserver(this);

		// Link to all fetched items in COF.
		LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
		for (uuid_vec_t::iterator it = mIDs.begin();
			 it != mIDs.end();
			 ++it)
		{
			LLUUID id = *it;
			LLViewerInventoryItem *item = gInventory.getItem(*it);
			if (!item)
			{
				llwarns << "fetch failed!" << llendl;
				continue;
			}

			link_inventory_item(gAgent.getID(),
								item->getLinkedUUID(),
								LLAppearanceMgr::instance().getCOF(),
								item->getName(),
								item->getDescription(),
								LLAssetType::AT_LINK,
								link_waiter);
		}
	}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:27,代码来源:llagentwearablesfetch.cpp

示例4: if

void LLFloaterAO::updateLayout2(LLFloaterAO* floater)
{
	if(floater)
	{
		if(LLStartUp::getStartupState() == STATE_STARTED)
		{
			LLUUID itemidimport = (LLUUID)gSavedPerAccountSettings.getString("PhoenixAOConfigNotecardID");
			LLViewerInventoryItem* itemimport = gInventory.getItem(itemidimport);
			if(itemimport)
			{
				floater->childSetValue("ao_nc_text","Currently set to: "+itemimport->getName());
			}
			else if(itemidimport.isNull())
			{
				floater->childSetValue("ao_nc_text","Currently not set");
			}
			else
			{
				floater->childSetValue("ao_nc_text","Currently set to a item not on this account");
			}
		}
		else
		{
			floater->childSetValue("ao_nc_text","Not logged in");
		}
		LLFloaterAO::init();
	}
	else 
	{
		sInstance = new LLFloaterAO();
		updateLayout2(sInstance);
	}
}
开发者ID:N3X15,项目名称:Luna-Viewer,代码行数:33,代码来源:floaterao.cpp

示例5: onBtnEdit

void LLFloaterLandmark::onBtnEdit()
{
	// There isn't one, so make a new preview
	LLViewerInventoryItem* itemp = gInventory.getItem(mImageAssetID);
	if(itemp)
	{
		open_landmark(itemp, itemp->getName(), TRUE);
	}
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:9,代码来源:llfloaterlandmark.cpp

示例6: onBtnEdit

// static
void LLFloaterLandmark::onBtnEdit(void* userdata)
{
	LLFloaterLandmark* self = (LLFloaterLandmark*) userdata;
	// There isn't one, so make a new preview
	LLViewerInventoryItem* itemp = gInventory.getItem(self->mImageAssetID);
	if(itemp)
	{
		open_landmark(itemp, itemp->getName(), TRUE);
	}
}
开发者ID:Logear,项目名称:PartyHatViewer,代码行数:11,代码来源:llfloaterlandmark.cpp

示例7: copyToClipboard

void LLPanelWearing::copyToClipboard()
{
	std::string text;
	std::vector<LLSD> data;
	mCOFItemsList->getValues(data);

	for(std::vector<LLSD>::const_iterator iter = data.begin(); iter != data.end();)
	{
		LLSD uuid = (*iter);
		LLViewerInventoryItem* item = gInventory.getItem(uuid);

		iter++;
		if (item != NULL)
		{
			// Append a newline to all but the last line
			text += iter != data.end() ? item->getName() + "\n" : item->getName();
		}
	}

	LLClipboard::instance().copyToClipboard(utf8str_to_wstring(text),0,text.size());
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:21,代码来源:llpanelwearing.cpp

示例8: giveInventoryItem_Event

void giveInventoryItem_Event(LLUUID &to_agent, LLUUID &item_id, LLUUID &im_session_id)
{
    LLViewerInventoryItem *item = gInventory.getItem(item_id);
    if(!item)
    {
        std::string dongs = llformat("Could not find item %s.",item_id.asString());
        LuaError(dongs.c_str());
        return;
    }
    std::string name;
    gAgent.buildFullname(name);
    LLUUID transaction_id;
    transaction_id.generate();
    const S32 BUCKET_SIZE = sizeof(U8) + UUID_BYTES;
    U8 bucket[BUCKET_SIZE];
    bucket[0] = (U8)item->getType();
    memcpy(&bucket[1], &(item->getUUID().mData), UUID_BYTES);		/* Flawfinder: ignore */
    pack_instant_message(
        gMessageSystem,
        gAgent.getID(),
        FALSE,
        gAgent.getSessionID(),
        to_agent,
        name,
        item->getName(),
        IM_ONLINE,
        IM_INVENTORY_OFFERED,
        transaction_id,
        0,
        LLUUID::null,
        gAgent.getPositionAgent(),
        NO_TIMESTAMP,
        bucket,
        BUCKET_SIZE);
    gAgent.sendReliableMessage();
    // No VEffects.
    gFloaterTools->dirty();

    LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY);

    // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat.
    if (im_session_id != LLUUID::null)
    {
        LLSD args;
        gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
    }
}
开发者ID:Xara,项目名称:Luna-Viewer,代码行数:47,代码来源:LuaInventory_f.cpp

示例9: fire

void CreateGestureCallback::fire(const LLUUID& inv_item)
{
	if (inv_item.isNull())
		return;

	gGestureManager.activateGesture(inv_item);
	
	LLViewerInventoryItem* item = gInventory.getItem(inv_item);
	if (!item) return;
    gInventory.updateItem(item);
    gInventory.notifyObservers();

	if(!LLPreview::show(inv_item,FALSE))
	{
		LLPreviewGesture* preview = LLPreviewGesture::show(std::string("Gesture: ") + item->getName(), inv_item,  LLUUID::null);
		// Force to be entirely onscreen.
		gFloaterView->adjustToFitScreen(preview, FALSE);
	}
}
开发者ID:Kiera,项目名称:Sausages,代码行数:19,代码来源:llviewerinventory.cpp

示例10: loadWindlightNotecard

// static
void LLWLParamManager::loadWindlightNotecard(LLVFS *vfs, const LLUUID& asset_id, LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status)
{
	LLUUID inventory_id(*((LLUUID*)user_data));
	std::string name = "WindLight Setting.wl";
	LLViewerInventoryItem *item = gInventory.getItem(inventory_id);
	if(item)
	{
		inventory_id = item->getUUID();
		name = item->getName();
	}
	if(LL_ERR_NOERR == status)
	{
		LLVFile file(vfs, asset_id, asset_type, LLVFile::READ);
		S32 file_length = file.getSize();
		std::vector<char> buffer(file_length + 1);
		file.read((U8*)&buffer[0], file_length);
		buffer[file_length] = 0;
		LLNotecard notecard(LLNotecard::MAX_SIZE);
		LLMemoryStream str((U8*)&buffer[0], file_length + 1);
		notecard.importStream(str);
		std::string settings = notecard.getText();
		LLMemoryStream settings_str((U8*)settings.c_str(), settings.length());
		bool is_animator_running = sInstance->mAnimator.mIsRunning;
		bool animator_linden_time = sInstance->mAnimator.mUseLindenTime;
		sInstance->mAnimator.mIsRunning = false;
		sInstance->mAnimator.mUseLindenTime = false;
		bool is_real_setting = sInstance->loadPresetXML(name, settings_str, true, true);
		if(!is_real_setting)
		{
			sInstance->mAnimator.mIsRunning = is_animator_running;
			sInstance->mAnimator.mUseLindenTime = animator_linden_time;
			LLSD subs;
			subs["NAME"] = name;
			LLNotifications::getInstance()->add("KittyInvalidWindlightNotecard", subs);
		}
		else
		{
			// We can do this because we know mCurParams 
			sInstance->mParamList[name].mInventoryID = inventory_id;
		}
	}
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:43,代码来源:llwlparammanager.cpp

示例11: done

void LLGestureMgr::done()
{
	bool notify = false;
	for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it)
	{
		if(it->second && it->second->mName.empty())
		{
			LLViewerInventoryItem* item = gInventory.getItem(it->first);
			if(item)
			{
				it->second->mName = item->getName();
				notify = true;
			}
		}
	}
	if(notify)
	{
		notifyObservers();
	}
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:20,代码来源:llgesturemgr.cpp

示例12: loadWindlightNotecard

// static
void LLWLParamManager::loadWindlightNotecard(LLVFS *vfs, const LLUUID& asset_id, LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status)
{
	LLUUID inventory_id(*((LLUUID*)user_data));
	std::string name = "WindLight Setting.wl";
	LLViewerInventoryItem *item = gInventory.getItem(inventory_id);
	if(item)
	{
		inventory_id = item->getUUID();
		name = item->getName();
	}
	if(LL_ERR_NOERR == status)
	{
		LLVFile file(vfs, asset_id, asset_type, LLVFile::READ);
		S32 file_length = file.getSize();
		std::vector<char> buffer(file_length + 1);
		file.read((U8*)&buffer[0], file_length);
		buffer[file_length] = 0;
		LLNotecard notecard(LLNotecard::MAX_SIZE);
		LLMemoryStream str((U8*)&buffer[0], file_length + 1);
		notecard.importStream(str);
		std::string settings = notecard.getText();
		LLMemoryStream settings_str((U8*)settings.c_str(), settings.length());
		
		LLWLParamKey key((" Notecard: " + name), LLEnvKey::SCOPE_LOCAL);
		bool is_real_setting = getInstance()->loadPresetXML(key, settings_str);
		if(!is_real_setting)
		{
			LLSD subs;
			subs["NAME"] = name;
			LLNotifications::getInstance()->add("KittyInvalidWindlightNotecard", subs);
		}
		else
		{
			// We can do this because we know mCurParams
			getInstance()->mParamList[key].mInventoryID = inventory_id;
			LLEnvManagerNew::instance().setUseSkyPreset(key.name);
		}
	}
}
开发者ID:AlericInglewood,项目名称:SingularityViewer,代码行数:40,代码来源:llwlparammanager.cpp

示例13: postBuild


//.........这里部分代码省略.........
	childSetValue("EmeraldUseOTR", LLSD((S32)gSavedSettings.getU32("EmeraldUseOTR"))); // [$PLOTR$]
	getChild<LLButton>("otr_help_btn")->setClickedCallback(onClickOtrHelp, this);      // [/$PLOTR$]

	initHelpBtn("EmeraldHelp_TeleportLogin",	"EmeraldHelp_TeleportLogin");
	initHelpBtn("EmeraldHelp_Voice",			"EmeraldHelp_Voice");
	initHelpBtn("EmeraldHelp_Shields",			"EmeraldHelp_Shields");
	initHelpBtn("EmeraldHelp_IM",				"EmeraldHelp_IM");
	initHelpBtn("EmeraldHelp_Chat",				"EmeraldHelp_Chat");
	initHelpBtn("EmeraldHelp_Misc",				"EmeraldHelp_Misc");
	initHelpBtn("EmeraldHelp_CmdLine",			"EmeraldHelp_CmdLine");
	initHelpBtn("EmeraldHelp_Avatar",			"EmeraldHelp_Avatar");
	initHelpBtn("EmeraldHelp_Build",			"EmeraldHelp_Build");
	initHelpBtn("EmeraldHelp_IRC",				"EmeraldHelp_IRC");
	initHelpBtn("EmeraldHelp_UtilityStream",	"EmeraldHelp_UtilityStream");
	initHelpBtn("EmeraldHelp_Inventory",		"EmeraldHelp_Inventory");
	initHelpBtn("EmeraldHelp_Effects",			"EmeraldHelp_Effects");
	initHelpBtn("EmeraldHelp_SpellCheck",		"EmeraldHelp_SpellCheck");

	LLView *target_view = getChild<LLView>("im_give_drop_target_rect");
	if(target_view)
	{
		if (mObjectDropTarget)//shouldn't happen
		{
			delete mObjectDropTarget;
		}
		mObjectDropTarget = new JCInvDropTarget("drop target", target_view->getRect(), IMAutoResponseItemDrop);//, mAvatarID);
		addChild(mObjectDropTarget);
	}
	target_view = getChild<LLView>("build_item_add_disp_rect");
	if(target_view)
	{
		if (mBuildObjectDropTarget) delete mBuildObjectDropTarget;
		mBuildObjectDropTarget = new JCInvDropTarget("build drop target", target_view->getRect(),BuildAutoResponseItemDrop);
		addChild(mBuildObjectDropTarget);
	}

	if(LLStartUp::getStartupState() == STATE_STARTED)
	{
		LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("EmeraldInstantMessageResponseItemData");
		LLViewerInventoryItem* item = gInventory.getItem(itemid);
		if(item)
		{
			childSetValue("im_give_disp_rect_txt","Currently set to: "+item->getName());
		}else if(itemid.isNull())
		{
			childSetValue("im_give_disp_rect_txt","Currently not set");
		}else
		{
			childSetValue("im_give_disp_rect_txt","Currently set to a item not on this account");
		}
		itemid = (LLUUID)gSavedSettings.getString("EmeraldBuildPrefs_Item");
		item = gInventory.getItem(itemid);
		if(item)
		{
			childSetValue("build_item_add_disp_rect_txt","Currently set to: "+item->getName());
		}else if(itemid.isNull())
		{
			childSetValue("build_item_add_disp_rect_txt","Currently not set");
		}else
		{
			childSetValue("build_item_add_disp_rect_txt","Currently set to a item not on this account");
		}
	}else
	{
		childSetValue("im_give_disp_rect_txt","Not logged in");
		childSetValue("build_item_add_disp_rect_txt","Not logged in");
	}

	LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("EmeraldInstantMessageResponse") );
	LLWStringUtil::replaceChar(auto_response, '^', '\n');
	LLWStringUtil::replaceChar(auto_response, '%', ' ');
	childSetText("im_response", wstring_to_utf8str(auto_response));
	childSetValue("EmeraldInstantMessageResponseFriends", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageResponseFriends"));
	childSetValue("EmeraldInstantMessageResponseMuted", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageResponseMuted"));
	childSetValue("EmeraldInstantMessageResponseAnyone", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageResponseAnyone"));
	childSetValue("EmeraldInstantMessageShowResponded", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageShowResponded"));
	childSetValue("EmeraldInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageShowOnTyping"));
	childSetValue("EmeraldInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageResponseRepeat" ));
	childSetValue("EmeraldInstantMessageResponseItem", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageResponseItem"));
	childSetValue("EmeraldInstantMessageAnnounceIncoming", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageAnnounceIncoming"));
	childSetValue("EmeraldInstantMessageAnnounceStealFocus", gSavedPerAccountSettings.getBOOL("EmeraldInstantMessageAnnounceStealFocus"));
	childSetValue("EmeraldShadowsON", gSavedSettings.getBOOL("EmeraldShadowsToggle"));

	childSetAction("set_mirror", onClickSetMirror, this);
	childSetCommitCallback("mirror_location", onCommitApplyControl);

	childSetAction("set_includeHDD", onClickSetHDDInclude, this);
	childSetCommitCallback("include_location", onCommitApplyControl);

	//EmeraldLSLExternalEditor
	childSetAction("set_xed", onClickSetXed, this);
	childSetCommitCallback("xed_location", onCommitApplyControl);
	childSetValue("xed_location", gSavedSettings.getString("EmeraldLSLExternalEditor"));

	getChild<LLCheckBoxCtrl>("telerequest_toggle")->setCommitCallback(onConditionalPreferencesChanged);
	getChild<LLCheckBoxCtrl>("mldct_toggle")->setCommitCallback(onConditionalPreferencesChanged);

	refresh();
	return TRUE;
}
开发者ID:zwagoth,项目名称:Emerald-SVN-History,代码行数:101,代码来源:llpanelemerald.cpp

示例14: uploadComplete

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

	LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(item_id);
	if(!item)
	{
		llwarns << "Inventory item for " << mVFileID
			<< " is no longer in agent inventory." << llendl;
		return;
	}

	// Update viewer inventory item
	LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
	new_item->setAssetUUID(content["new_asset"].asUUID());
	gInventory.updateItem(new_item);
	gInventory.notifyObservers();

	llinfos << "Inventory item " << item->getName() << " saved into "
		<< content["new_asset"].asString() << llendl;

	LLInventoryType::EType inventory_type = new_item->getInventoryType();
	switch(inventory_type)
	{
		case LLInventoryType::IT_NOTECARD:
			{

				// Update the UI with the new asset.
				LLPreviewNotecard* nc;
				nc = (LLPreviewNotecard*)LLPreview::find(new_item->getUUID());
				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->refreshFromInventory();
				}
			}
			break;
		case LLInventoryType::IT_LSL:
			{
				// Find our window and close it if requested.
				LLPreviewLSL* preview = (LLPreviewLSL*)LLPreview::find(item_id);
				if (preview)
				{
					// Bytecode save completed
					if (content["compiled"])
					{
						preview->callbackLSLCompileSucceeded();
					}
					else
					{
						preview->callbackLSLCompileFailed(content["errors"]);
					}
				}
			}
			break;

		case LLInventoryType::IT_GESTURE:
			{
				// If this gesture is active, then we need to update the in-memory
				// active map with the new pointer.				
				if (gGestureManager.isGestureActive(item_id))
				{
					LLUUID asset_id = new_item->getAssetUUID();
					gGestureManager.replaceGesture(item_id, asset_id);
					gInventory.notifyObservers();
				}				

				//gesture will have a new asset_id
				LLPreviewGesture* previewp = (LLPreviewGesture*)LLPreview::find(item_id);
				if(previewp)
				{
					previewp->onUpdateSucceeded();	
				}			
				
			}
			break;
		case LLInventoryType::IT_WEARABLE:
		default:
			break;
	}
}
开发者ID:balp,项目名称:imprudence,代码行数:94,代码来源:llassetuploadresponders.cpp

示例15: tick

BOOL JCLSLBridge::tick()
{
	if(LLStartUp::getStartupState() >= STATE_INVENTORY_SEND)
	{
		switch(sBridgeStatus)
		{
		case UNINITIALIZED:
			{
				/*
				We're going to just completely disable this in code, it's shit - CW
				
				if(!gSavedSettings.getBOOL("Meta7BuildBridge"))
				{
				*/
					sBridgeStatus = FAILED;
					break;
				//}

				//cmdline_printchat("initializing");//<< llendl;
				LLUUID item_id = findInventoryByName(vBridgeName);
				if(gInventory.isEverythingFetched())// || (item_id.notNull() && isworn(item_id)))
				{
					//cmdline_printchat("inv is fetched");//<< llendl;
					
					if(item_id.notNull())
					{
						//cmdline_printchat("id="+item_id.asString());
						LLViewerInventoryItem* bridge = gInventory.getItem(item_id);
						if(bridge)
						{
							//cmdline_printchat("bridge is ready to attach");//<< llendl;
							if(isworn(bridge->getUUID()))
							{
								//cmdline_printchat("bridge is already worn");//<< llendl;
								sBridgeStatus = RECHAN;
							}else if(bridge->isComplete())
							{
								//cmdline_printchat("bridge is complete, attaching");//<< llendl;
								LLMessageSystem* msg = gMessageSystem;
								msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv);
								msg->nextBlockFast(_PREHASH_AgentData);
								msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
								msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
								msg->nextBlockFast(_PREHASH_ObjectData);
								msg->addUUIDFast(_PREHASH_ItemID, bridge->getUUID());
								msg->addUUIDFast(_PREHASH_OwnerID, bridge->getPermissions().getOwner());
								msg->addU8Fast(_PREHASH_AttachmentPt, 128);
								pack_permissions_slam(msg, bridge->getFlags(), bridge->getPermissions());
								msg->addStringFast(_PREHASH_Name, bridge->getName());
								msg->addStringFast(_PREHASH_Description, bridge->getDescription());
								msg->sendReliable(gAgent.getRegionHost());
								sBridgeStatus = RECHAN;
							}
						}
					}else
					{
						//cmdline_printchat("no bridge");//<< llendl;
						//sBridgeStatus = BUILDING;
						std::string directory = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"bridge.xml");
						if(!LLFile::isfile(directory.c_str()))
						{
							//cmdline_printchat("file not there o.o");//<< llendl;
							sBridgeStatus = FAILED;
						}else
						{
							//cmdline_printchat("bridge.xml located. importing..");//<< llendl;
							gImportTracker.importer(directory,&setBridgeObject);
							sBridgeStatus = BUILDING;
						}
					}
				}
			}
			break;
		case RENAMING:
			{
				////cmdline_printchat("renaming");
				LLMessageSystem* msg = gMessageSystem;
				msg->newMessageFast(_PREHASH_ObjectAttach);
				msg->nextBlockFast(_PREHASH_AgentData);
				msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
				msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
				msg->addU8Fast(_PREHASH_AttachmentPoint, vCatType);
				
				msg->nextBlockFast(_PREHASH_ObjectData);
				msg->addU32Fast(_PREHASH_ObjectLocalID, sBridgeObject->getLocalID());
				msg->addQuatFast(_PREHASH_Rotation, LLQuaternion(0.0f, 0.0f, 0.0f, 1.0f));
				
				msg->sendReliable(gAgent.getRegion()->getHost());
				sBridgeStatus = FOLDERING;
			}
			break;
		case FOLDERING:
			{
				////cmdline_printchat("foldering");
				LLUUID vcatid;
				vcatid = gInventory.findCategoryByName(vBridgeOpCat);
				if(vcatid.isNull())
				{
					////cmdline_printchat("creating folder");
					vcatid = gInventory.createNewCategory(gAgent.getInventoryRootID(), LLAssetType::AT_NONE, vBridgeOpCat);
//.........这里部分代码省略.........
开发者ID:Xara,项目名称:Meta7-Viewer,代码行数:101,代码来源:jc_lslviewerbridge.cpp


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