Exemplo n.º 1
0
void LLPanelObjectTools::onClickSetBySelection(void* data)
{
	LLPanelObjectTools* panelp = (LLPanelObjectTools*) data;
	if (!panelp) return;

	const BOOL non_root_ok = TRUE; 
	LLSelectNode* node = gSelectMgr->getSelection()->getFirstRootNode(NULL, non_root_ok);
	if (!node) return;

	LLString owner_name;
	LLUUID owner_id;
	gSelectMgr->selectGetOwner(owner_id, owner_name);

	panelp->mTargetAvatar = owner_id;
	LLString name = "Object " + node->mName + " owned by " + owner_name;
	panelp->childSetValue("target_avatar_name", name);
}
void LLPanelObjectTools::onClickSetBySelection(void* data)
{
	LLPanelObjectTools* panelp = (LLPanelObjectTools*) data;
	if (!panelp) return;

	const BOOL non_root_ok = TRUE; 
	LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
	if (!node) return;

	std::string owner_name;
	LLUUID owner_id;
	LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);

	panelp->mTargetAvatar = owner_id;
	LLStringUtil::format_map_t args;
	args["[OBJECT]"] = node->mName;
	args["[OWNER]"] = owner_name;
	std::string name = LLTrans::getString("GodToolsObjectOwnedBy", args);
	panelp->childSetValue("target_avatar_name", name);
}