Scott Lawrence avatar Scott Lawrence committed b1dbb1a Merge

merge changes for DRTVWR-197

Comments (0)

Files changed (36)

 indra/newview/mozilla-theme
 indra/newview/mozilla-universal-darwin.tgz
 indra/newview/res/ll_icon.*
-indra/newview/res-sdl
+indra/newview/res-sdl/ll_icon.*
 indra/newview/vivox-runtime
 indra/server-linux-*
 indra/temp
 1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
 9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
 ae5c83dd61d2d37c45f1d5b8bf2b036d87599f1b DRTVWR-198
+507bdfbd6bf844a511c1ffeda4baa80016ed1346 DRTVWR-197
 e9732c739c8a72a590216951505ea9c76a526a84 DRTVWR-193
 33a2fc7a910ae29ff8b4850316ed7fbff9f64d33 DRTVWR-195
 421126293dcbde918e0da027ca0ab9deb5b4fbf2 DRTVWR-192

indra/llmessage/llavatarnamecache.cpp

 	signal(agent_id, av_name);
 }
 
-void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
+LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
 {
+	callback_connection_t connection;
+
 	if (sRunning)
 	{
 		// ...only do immediate lookups when cache is running
 				{
 					// ...name already exists in cache, fire callback now
 					fireSignal(agent_id, slot, av_name);
-					return;
+					return connection;
 				}
 			}
 		}
 				LLAvatarName av_name;
 				buildLegacyName(full_name, &av_name);
 				fireSignal(agent_id, slot, av_name);
-				return;
+				return connection;
 			}
 		}
 	}
 	{
 		// ...new callback for this id
 		callback_signal_t* signal = new callback_signal_t();
-		signal->connect(slot);
+		connection = signal->connect(slot);
 		sSignalMap[agent_id] = signal;
 	}
 	else
 	{
 		// ...existing callback, bind additional slot
 		callback_signal_t* signal = sig_it->second;
-		signal->connect(slot);
+		connection = signal->connect(slot);
 	}
+
+	return connection;
 }
 
 

indra/llmessage/llavatarnamecache.h

 		void (const LLUUID& agent_id, const LLAvatarName& av_name)>
 			callback_signal_t;
 	typedef callback_signal_t::slot_type callback_slot_t;
+	typedef boost::signals2::connection callback_connection_t;
 
 	// Fetches name information and calls callback.
 	// If name information is in cache, callback will be called immediately.
-	void get(const LLUUID& agent_id, callback_slot_t slot);
+	callback_connection_t get(const LLUUID& agent_id, callback_slot_t slot);
 
 	// Allow display names to be explicitly disabled for testing.
 	void setUseDisplayNames(bool use);

indra/llui/tests/llurlentry_stub.cpp

 	return false;
 }
 
-void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
+LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
 {
-	return;
+	callback_connection_t connection;
+	return connection;
 }
 
 bool LLAvatarNameCache::useDisplayNames()

indra/llwindow/llwindowmacosx.cpp

 {
 	switch (id)
 	{
-		case UI_CURSOR_ARROW:			return "UI_CURSOR_ARROW";
-		case UI_CURSOR_WAIT:			return "UI_CURSOR_WAIT";
-		case UI_CURSOR_HAND:			return "UI_CURSOR_HAND";
-		case UI_CURSOR_IBEAM:			return "UI_CURSOR_IBEAM";
-		case UI_CURSOR_CROSS:			return "UI_CURSOR_CROSS";
-		case UI_CURSOR_SIZENWSE:		return "UI_CURSOR_SIZENWSE";
-		case UI_CURSOR_SIZENESW:		return "UI_CURSOR_SIZENESW";
-		case UI_CURSOR_SIZEWE:			return "UI_CURSOR_SIZEWE";
-		case UI_CURSOR_SIZENS:			return "UI_CURSOR_SIZENS";
-		case UI_CURSOR_NO:				return "UI_CURSOR_NO";
-		case UI_CURSOR_WORKING:			return "UI_CURSOR_WORKING";
-		case UI_CURSOR_TOOLGRAB:		return "UI_CURSOR_TOOLGRAB";
-		case UI_CURSOR_TOOLLAND:		return "UI_CURSOR_TOOLLAND";
-		case UI_CURSOR_TOOLFOCUS:		return "UI_CURSOR_TOOLFOCUS";
-		case UI_CURSOR_TOOLCREATE:		return "UI_CURSOR_TOOLCREATE";
-		case UI_CURSOR_ARROWDRAG:		return "UI_CURSOR_ARROWDRAG";
-		case UI_CURSOR_ARROWCOPY:		return "UI_CURSOR_ARROWCOPY";
-		case UI_CURSOR_ARROWDRAGMULTI:	return "UI_CURSOR_ARROWDRAGMULTI";
-		case UI_CURSOR_ARROWCOPYMULTI:	return "UI_CURSOR_ARROWCOPYMULTI";
-		case UI_CURSOR_NOLOCKED:		return "UI_CURSOR_NOLOCKED";
-		case UI_CURSOR_ARROWLOCKED:		return "UI_CURSOR_ARROWLOCKED";
-		case UI_CURSOR_GRABLOCKED:		return "UI_CURSOR_GRABLOCKED";
-		case UI_CURSOR_TOOLTRANSLATE:	return "UI_CURSOR_TOOLTRANSLATE";
-		case UI_CURSOR_TOOLROTATE:		return "UI_CURSOR_TOOLROTATE";
-		case UI_CURSOR_TOOLSCALE:		return "UI_CURSOR_TOOLSCALE";
-		case UI_CURSOR_TOOLCAMERA:		return "UI_CURSOR_TOOLCAMERA";
-		case UI_CURSOR_TOOLPAN:			return "UI_CURSOR_TOOLPAN";
-		case UI_CURSOR_TOOLZOOMIN:		return "UI_CURSOR_TOOLZOOMIN";
-		case UI_CURSOR_TOOLPICKOBJECT3:	return "UI_CURSOR_TOOLPICKOBJECT3";
-		case UI_CURSOR_TOOLPLAY:		return "UI_CURSOR_TOOLPLAY";
-		case UI_CURSOR_TOOLPAUSE:		return "UI_CURSOR_TOOLPAUSE";
-		case UI_CURSOR_TOOLMEDIAOPEN:	return "UI_CURSOR_TOOLMEDIAOPEN";
-		case UI_CURSOR_PIPETTE:			return "UI_CURSOR_PIPETTE";
-		case UI_CURSOR_TOOLSIT:			return "UI_CURSOR_TOOLSIT";
-		case UI_CURSOR_TOOLBUY:			return "UI_CURSOR_TOOLBUY";
-		case UI_CURSOR_TOOLOPEN:		return "UI_CURSOR_TOOLOPEN";
+		case UI_CURSOR_ARROW:							return "UI_CURSOR_ARROW";
+		case UI_CURSOR_WAIT:							return "UI_CURSOR_WAIT";
+		case UI_CURSOR_HAND:							return "UI_CURSOR_HAND";
+		case UI_CURSOR_IBEAM:							return "UI_CURSOR_IBEAM";
+		case UI_CURSOR_CROSS:							return "UI_CURSOR_CROSS";
+		case UI_CURSOR_SIZENWSE:						return "UI_CURSOR_SIZENWSE";
+		case UI_CURSOR_SIZENESW:						return "UI_CURSOR_SIZENESW";
+		case UI_CURSOR_SIZEWE:							return "UI_CURSOR_SIZEWE";
+		case UI_CURSOR_SIZENS:							return "UI_CURSOR_SIZENS";
+		case UI_CURSOR_NO:								return "UI_CURSOR_NO";
+		case UI_CURSOR_WORKING:							return "UI_CURSOR_WORKING";
+		case UI_CURSOR_TOOLGRAB:						return "UI_CURSOR_TOOLGRAB";
+		case UI_CURSOR_TOOLLAND:						return "UI_CURSOR_TOOLLAND";
+		case UI_CURSOR_TOOLFOCUS:						return "UI_CURSOR_TOOLFOCUS";
+		case UI_CURSOR_TOOLCREATE:						return "UI_CURSOR_TOOLCREATE";
+		case UI_CURSOR_ARROWDRAG:						return "UI_CURSOR_ARROWDRAG";
+		case UI_CURSOR_ARROWCOPY:						return "UI_CURSOR_ARROWCOPY";
+		case UI_CURSOR_ARROWDRAGMULTI:					return "UI_CURSOR_ARROWDRAGMULTI";
+		case UI_CURSOR_ARROWCOPYMULTI:					return "UI_CURSOR_ARROWCOPYMULTI";
+		case UI_CURSOR_NOLOCKED:						return "UI_CURSOR_NOLOCKED";
+		case UI_CURSOR_ARROWLOCKED:						return "UI_CURSOR_ARROWLOCKED";
+		case UI_CURSOR_GRABLOCKED:						return "UI_CURSOR_GRABLOCKED";
+		case UI_CURSOR_TOOLTRANSLATE:					return "UI_CURSOR_TOOLTRANSLATE";
+		case UI_CURSOR_TOOLROTATE:						return "UI_CURSOR_TOOLROTATE";
+		case UI_CURSOR_TOOLSCALE:						return "UI_CURSOR_TOOLSCALE";
+		case UI_CURSOR_TOOLCAMERA:						return "UI_CURSOR_TOOLCAMERA";
+		case UI_CURSOR_TOOLPAN:							return "UI_CURSOR_TOOLPAN";
+		case UI_CURSOR_TOOLZOOMIN:						return "UI_CURSOR_TOOLZOOMIN";
+		case UI_CURSOR_TOOLPICKOBJECT3:					return "UI_CURSOR_TOOLPICKOBJECT3";
+		case UI_CURSOR_TOOLPLAY:						return "UI_CURSOR_TOOLPLAY";
+		case UI_CURSOR_TOOLPAUSE:						return "UI_CURSOR_TOOLPAUSE";
+		case UI_CURSOR_TOOLMEDIAOPEN:					return "UI_CURSOR_TOOLMEDIAOPEN";
+		case UI_CURSOR_PIPETTE:							return "UI_CURSOR_PIPETTE";
+		case UI_CURSOR_TOOLSIT:							return "UI_CURSOR_TOOLSIT";
+		case UI_CURSOR_TOOLBUY:							return "UI_CURSOR_TOOLBUY";
+		case UI_CURSOR_TOOLOPEN:						return "UI_CURSOR_TOOLOPEN";
+		case UI_CURSOR_TOOLPATHFINDING:					return "UI_CURSOR_PATHFINDING";
+		case UI_CURSOR_TOOLPATHFINDING_PATH_START:		return "UI_CURSOR_PATHFINDING_START";
+		case UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD:	return "UI_CURSOR_PATHFINDING_START_ADD";
+		case UI_CURSOR_TOOLPATHFINDING_PATH_END:		return "UI_CURSOR_PATHFINDING_END";
+		case UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD:	return "UI_CURSOR_PATHFINDING_END_ADD";
+		case UI_CURSOR_TOOLNO:							return "UI_CURSOR_NO";
 	}
 
 	llerrs << "cursorIDToName: unknown cursor id" << id << llendl;
 	case UI_CURSOR_TOOLSIT:
 	case UI_CURSOR_TOOLBUY:
 	case UI_CURSOR_TOOLOPEN:
+	case UI_CURSOR_TOOLPATHFINDING:
+	case UI_CURSOR_TOOLPATHFINDING_PATH_START:
+	case UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD:
+	case UI_CURSOR_TOOLPATHFINDING_PATH_END:
+	case UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD:
+	case UI_CURSOR_TOOLNO:
 		result = setImageCursor(gCursors[mNextCursor]);
 		break;
 
 	initPixmapCursor(UI_CURSOR_TOOLSIT, 20, 15);
 	initPixmapCursor(UI_CURSOR_TOOLBUY, 20, 15);
 	initPixmapCursor(UI_CURSOR_TOOLOPEN, 20, 15);
+	initPixmapCursor(UI_CURSOR_TOOLPATHFINDING, 16, 16);
+	initPixmapCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START, 16, 16);
+	initPixmapCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD, 16, 16);
+	initPixmapCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END, 16, 16);
+	initPixmapCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD, 16, 16);
+	initPixmapCursor(UI_CURSOR_TOOLNO, 8, 8);
 
 	initPixmapCursor(UI_CURSOR_SIZENWSE, 10, 10);
 	initPixmapCursor(UI_CURSOR_SIZENESW, 10, 10);

indra/llwindow/llwindowsdl.cpp

 	mSDLCursors[UI_CURSOR_TOOLSIT] = makeSDLCursorFromBMP("toolsit.BMP",20,15);
 	mSDLCursors[UI_CURSOR_TOOLBUY] = makeSDLCursorFromBMP("toolbuy.BMP",20,15);
 	mSDLCursors[UI_CURSOR_TOOLOPEN] = makeSDLCursorFromBMP("toolopen.BMP",20,15);
+	mSDLCursors[UI_CURSOR_TOOLPATHFINDING] = makeSDLCursorFromBMP("lltoolpathfinding.BMP", 16, 16);
+	mSDLCursors[UI_CURSOR_TOOLPATHFINDING_PATH_START] = makeSDLCursorFromBMP("lltoolpathfindingpathstart.BMP", 16, 16);
+	mSDLCursors[UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD] = makeSDLCursorFromBMP("lltoolpathfindingpathstartadd.BMP", 16, 16);
+	mSDLCursors[UI_CURSOR_TOOLPATHFINDING_PATH_END] = makeSDLCursorFromBMP("lltoolpathfindingpathend.BMP", 16, 16);
+	mSDLCursors[UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD] = makeSDLCursorFromBMP("lltoolpathfindingpathendadd.BMP", 16, 16);
+	mSDLCursors[UI_CURSOR_TOOLNO] = makeSDLCursorFromBMP("llno.BMP",8,8);
 
 	if (getenv("LL_ATI_MOUSE_CURSOR_BUG") != NULL) {
 		llinfos << "Disabling cursor updating due to LL_ATI_MOUSE_CURSOR_BUG" << llendl;
Add a comment to this file

indra/newview/cursors_mac/UI_CURSOR_PATHFINDING.tif

Added
New image
Add a comment to this file

indra/newview/cursors_mac/UI_CURSOR_PATHFINDING_END.tif

Added
New image
Add a comment to this file

indra/newview/cursors_mac/UI_CURSOR_PATHFINDING_END_ADD.tif

Added
New image
Add a comment to this file

indra/newview/cursors_mac/UI_CURSOR_PATHFINDING_START.tif

Added
New image
Add a comment to this file

indra/newview/cursors_mac/UI_CURSOR_PATHFINDING_START_ADD.tif

Added
New image

indra/newview/llfloaterpathfindingcharacters.cpp

 	LLPathfindingManager::getInstance()->requestGetCharacters(getNewRequestId(), boost::bind(&LLFloaterPathfindingCharacters::handleNewObjectList, this, _1, _2, _3));
 }
 
-LLSD LLFloaterPathfindingCharacters::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr)
+void LLFloaterPathfindingCharacters::buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr)
 {
 	llassert(pObjectListPtr != NULL);
 	llassert(!pObjectListPtr->isEmpty());
 
-	LLSD scrollListData = LLSD::emptyArray();
-
 	for (LLPathfindingObjectList::const_iterator objectIter = pObjectListPtr->begin();	objectIter != pObjectListPtr->end(); ++objectIter)
 	{
-		const LLPathfindingCharacter *characterPtr = dynamic_cast<const LLPathfindingCharacter *>(objectIter->second.get());
-		LLSD element = buildCharacterScrollListData(characterPtr);
-		scrollListData.append(element);
+		const LLPathfindingObjectPtr objectPtr = objectIter->second;
+		const LLPathfindingCharacter *characterPtr = dynamic_cast<const LLPathfindingCharacter *>(objectPtr.get());
+		llassert(characterPtr != NULL);
 
-		if (characterPtr->hasOwner() && !characterPtr->hasOwnerName())
-		{
-			rebuildScrollListAfterAvatarNameLoads(characterPtr->getUUID());
-		}
+		LLSD scrollListItemData = buildCharacterScrollListItemData(characterPtr);
+		addObjectToScrollList(objectPtr, scrollListItemData);
 	}
-
-	return scrollListData;
 }
 
 void LLFloaterPathfindingCharacters::updateControlsOnScrollListChange()
 	return 0;
 }
 
+S32 LLFloaterPathfindingCharacters::getOwnerNameColumnIndex() const
+{
+	return 2;
+}
+
+std::string LLFloaterPathfindingCharacters::getOwnerName(const LLPathfindingObject *pObject) const
+{
+	return (pObject->hasOwner()
+		? (pObject->hasOwnerName()
+		? (pObject->isGroupOwned()
+		? (pObject->getOwnerName() + " " + getString("character_owner_group"))
+		: pObject->getOwnerName())
+		: getString("character_owner_loading"))
+		: getString("character_owner_unknown"));
+}
+
 const LLColor4 &LLFloaterPathfindingCharacters::getBeaconColor() const
 {
 	return mBeaconColor;
 	}
 }
 
-LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListData(const LLPathfindingCharacter *pCharacterPtr) const
+LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListItemData(const LLPathfindingCharacter *pCharacterPtr) const
 {
-	LLSD columns;
+	LLSD columns = LLSD::emptyArray();
 
 	columns[0]["column"] = "name";
 	columns[0]["value"] = pCharacterPtr->getName();
 	columns[1]["value"] = pCharacterPtr->getDescription();
 
 	columns[2]["column"] = "owner";
-	columns[2]["value"] = (pCharacterPtr->hasOwner()
-			? (pCharacterPtr->hasOwnerName()
-			? (pCharacterPtr->isGroupOwned()
-			? (pCharacterPtr->getOwnerName() + " " + getString("character_owner_group"))
-			: pCharacterPtr->getOwnerName())
-			: getString("character_owner_loading"))
-			: getString("character_owner_unknown"));
+	columns[2]["value"] = getOwnerName(pCharacterPtr);
 
 	S32 cpuTime = llround(pCharacterPtr->getCPUTime());
 	std::string cpuTimeString = llformat("%d", cpuTime);
 	columns[4]["column"] = "altitude";
 	columns[4]["value"] = llformat("%1.0f m", pCharacterPtr->getLocation()[2]);
 
-	LLSD element;
-	element["id"] = pCharacterPtr->getUUID().asString();
-	element["column"] = columns;
-
-	return element;
+	return columns;
 }
 
 void LLFloaterPathfindingCharacters::updateStateOnDisplayControls()

indra/newview/llfloaterpathfindingcharacters.h

 
 	virtual void                       requestGetObjects();
 
-	virtual LLSD                       convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr);
+	virtual void                       buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr);
 
 	virtual void                       updateControlsOnScrollListChange();
 
 	virtual S32                        getNameColumnIndex() const;
+	virtual S32                        getOwnerNameColumnIndex() const;
+	virtual std::string                getOwnerName(const LLPathfindingObject *pObject) const;
 	virtual const LLColor4             &getBeaconColor() const;
 
 	virtual LLPathfindingObjectListPtr getEmptyObjectList() const;
 private:
 	void onShowPhysicsCapsuleClicked();
 
-	LLSD buildCharacterScrollListData(const LLPathfindingCharacter *pCharacterPtr) const;
+	LLSD buildCharacterScrollListItemData(const LLPathfindingCharacter *pCharacterPtr) const;
 
 	void updateStateOnDisplayControls();
 	void showSelectedCharacterCapsules();

indra/newview/llfloaterpathfindinglinksets.cpp

 	LLPathfindingManager::getInstance()->requestGetLinksets(getNewRequestId(), boost::bind(&LLFloaterPathfindingLinksets::handleNewObjectList, this, _1, _2, _3));
 }
 
-LLSD LLFloaterPathfindingLinksets::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr)
+void LLFloaterPathfindingLinksets::buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr)
 {
 	llassert(pObjectListPtr != NULL);
 	llassert(!pObjectListPtr->isEmpty());
 	bool isFilteringDescription = !descriptionFilter.empty();
 	bool isFilteringLinksetUse = (linksetUseFilter != LLPathfindingLinkset::kUnknown);
 
-	LLSD scrollListData = LLSD::emptyArray();
 	const LLVector3& avatarPosition = gAgent.getPositionAgent();
 
 	if (isFilteringName || isFilteringDescription || isFilteringLinksetUse)
 		LLStringUtil::toUpper(descriptionFilter);
 		for (LLPathfindingObjectList::const_iterator objectIter = pObjectListPtr->begin();	objectIter != pObjectListPtr->end(); ++objectIter)
 		{
-			const LLPathfindingLinkset *linksetPtr = dynamic_cast<const LLPathfindingLinkset *>(objectIter->second.get());
+			const LLPathfindingObjectPtr objectPtr = objectIter->second;
+			const LLPathfindingLinkset *linksetPtr = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+			llassert(linksetPtr != NULL);
+
 			std::string linksetName = (linksetPtr->isTerrain() ? getString("linkset_terrain_name") : linksetPtr->getName());
 			std::string linksetDescription = linksetPtr->getDescription();
 			LLStringUtil::toUpper(linksetName);
 			LLStringUtil::toUpper(linksetDescription);
+
 			if ((!isFilteringName || (linksetName.find(nameFilter) != std::string::npos)) &&
 				(!isFilteringDescription || (linksetDescription.find(descriptionFilter) != std::string::npos)) &&
 				(!isFilteringLinksetUse || (linksetPtr->getLinksetUse() == linksetUseFilter)))
 			{
-				LLSD element = buildLinksetScrollListData(linksetPtr, avatarPosition);
-				scrollListData.append(element);
-
-				if (linksetPtr->hasOwner() && !linksetPtr->hasOwnerName())
-				{
-					rebuildScrollListAfterAvatarNameLoads(linksetPtr->getUUID());
-				}
+				LLSD scrollListItemData = buildLinksetScrollListItemData(linksetPtr, avatarPosition);
+				addObjectToScrollList(objectPtr, scrollListItemData);
 			}
 		}
 	}
 	{
 		for (LLPathfindingObjectList::const_iterator objectIter = pObjectListPtr->begin();	objectIter != pObjectListPtr->end(); ++objectIter)
 		{
-			const LLPathfindingLinkset *linksetPtr = dynamic_cast<const LLPathfindingLinkset *>(objectIter->second.get());
-			LLSD element = buildLinksetScrollListData(linksetPtr, avatarPosition);
-			scrollListData.append(element);
+			const LLPathfindingObjectPtr objectPtr = objectIter->second;
+			const LLPathfindingLinkset *linksetPtr = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+			llassert(linksetPtr != NULL);
 
-			if (linksetPtr->hasOwner() && !linksetPtr->hasOwnerName())
-			{
-				rebuildScrollListAfterAvatarNameLoads(linksetPtr->getUUID());
-			}
+			LLSD scrollListItemData = buildLinksetScrollListItemData(linksetPtr, avatarPosition);
+			addObjectToScrollList(objectPtr, scrollListItemData);
 		}
 	}
-
-	return scrollListData;
 }
 
 void LLFloaterPathfindingLinksets::updateControlsOnScrollListChange()
 	return 0;
 }
 
+S32 LLFloaterPathfindingLinksets::getOwnerNameColumnIndex() const
+{
+	return 2;
+}
+
+std::string LLFloaterPathfindingLinksets::getOwnerName(const LLPathfindingObject *pObject) const
+{
+	return (pObject->hasOwner()
+		? (pObject->hasOwnerName()
+		? (pObject->isGroupOwned()
+		? (pObject->getOwnerName() + " " + getString("linkset_owner_group"))
+		: pObject->getOwnerName())
+		: getString("linkset_owner_loading"))
+		: getString("linkset_owner_unknown"));
+}
+
 const LLColor4 &LLFloaterPathfindingLinksets::getBeaconColor() const
 {
 	return mBeaconColor;
 	}
 }
 
-LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListData(const LLPathfindingLinkset *pLinksetPtr, const LLVector3 &pAvatarPosition) const
+LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListItemData(const LLPathfindingLinkset *pLinksetPtr, const LLVector3 &pAvatarPosition) const
 {
 	llassert(pLinksetPtr != NULL);
-	LLSD columns;
+	LLSD columns = LLSD::emptyArray();
 
 	if (pLinksetPtr->isTerrain())
 	{
 		columns[2]["column"] = "owner";
 		columns[2]["value"] = getString("linkset_terrain_owner");
 
-		columns[3]["column"] = "land_impact";
-		columns[3]["value"] = getString("linkset_terrain_land_impact");
+		columns[3]["column"] = "scripted";
+		columns[3]["value"] = getString("linkset_terrain_scripted");
 
-		columns[4]["column"] = "dist_from_you";
-		columns[4]["value"] = getString("linkset_terrain_dist_from_you");
+		columns[4]["column"] = "land_impact";
+		columns[4]["value"] = getString("linkset_terrain_land_impact");
+
+		columns[5]["column"] = "dist_from_you";
+		columns[5]["value"] = getString("linkset_terrain_dist_from_you");
 	}
 	else
 	{
 		columns[1]["value"] = pLinksetPtr->getDescription();
 
 		columns[2]["column"] = "owner";
-		columns[2]["value"] = (pLinksetPtr->hasOwner()
-			? (pLinksetPtr->hasOwnerName()
-			? (pLinksetPtr->isGroupOwned()
-			? (pLinksetPtr->getOwnerName() + " " + getString("linkset_owner_group"))
-			: pLinksetPtr->getOwnerName())
-			: getString("linkset_owner_loading"))
-			: getString("linkset_owner_unknown"));
+		columns[2]["value"] = getOwnerName(pLinksetPtr);
 
-		columns[3]["column"] = "land_impact";
-		columns[3]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
+		columns[3]["column"] = "scripted";
+		columns[3]["value"] = (pLinksetPtr->hasIsScripted()
+			? (pLinksetPtr->isScripted()
+			? getString("linkset_is_scripted")
+			: getString("linkset_is_not_scripted"))
+			: getString("linkset_is_unknown_scripted"));
 
-		columns[4]["column"] = "dist_from_you";
-		columns[4]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation()));
+		columns[4]["column"] = "land_impact";
+		columns[4]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
+
+		columns[5]["column"] = "dist_from_you";
+		columns[5]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation()));
 	}
 
-	columns[5]["column"] = "linkset_use";
+	columns[6]["column"] = "linkset_use";
 	std::string linksetUse = getLinksetUseString(pLinksetPtr->getLinksetUse());
 	if (pLinksetPtr->isTerrain())
 	{
 	{
 		linksetUse += (" " + getString("linkset_is_restricted_non_volume_state"));
 	}
-	columns[5]["value"] = linksetUse;
+	columns[6]["value"] = linksetUse;
 
-	columns[6]["column"] = "a_percent";
-	columns[6]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA());
+	columns[7]["column"] = "a_percent";
+	columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA());
 
-	columns[7]["column"] = "b_percent";
-	columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB());
+	columns[8]["column"] = "b_percent";
+	columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB());
 
-	columns[8]["column"] = "c_percent";
-	columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC());
+	columns[9]["column"] = "c_percent";
+	columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC());
 
-	columns[9]["column"] = "d_percent";
-	columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD());
+	columns[10]["column"] = "d_percent";
+	columns[10]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD());
 
-	LLSD element;
-	element["id"] = pLinksetPtr->getUUID().asString();
-	element["column"] = columns;
-
-	return element;
+	return columns;
 }
 
 LLSD LLFloaterPathfindingLinksets::buildLinksetUseScrollListData(const std::string &pLabel, S32 pValue) const
 	return isShowWarning;
 }
 
+bool LLFloaterPathfindingLinksets::isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
+{
+	bool isShowWarning = false;
+
+	if (pLinksetUse != LLPathfindingLinkset::kUnknown)
+	{
+		LLPathfindingObjectListPtr selectedObjects = getSelectedObjects();
+		if ((selectedObjects != NULL) && !selectedObjects->isEmpty())
+		{
+			const LLPathfindingLinksetList *linksetList = dynamic_cast<const LLPathfindingLinksetList *>(selectedObjects.get());
+			isShowWarning = linksetList->isShowPhantomToggleWarning(pLinksetUse);
+		}
+	}
+
+	return isShowWarning;
+}
+
 bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
 {
 	bool isShowWarning = false;
 {
 	LLPathfindingLinkset::ELinksetUse linksetUse = getEditLinksetUse();
 
+	bool showPhantomToggleWarning = isShowPhantomToggleWarning(linksetUse);
 	bool showUnmodifiablePhantomWarning = isShowUnmodifiablePhantomWarning(linksetUse);
 	bool showCannotBeVolumeWarning = isShowCannotBeVolumeWarning(linksetUse);
 
-	if (showUnmodifiablePhantomWarning || showCannotBeVolumeWarning)
+	if (showPhantomToggleWarning || showUnmodifiablePhantomWarning || showCannotBeVolumeWarning)
 	{
 		LLPathfindingLinkset::ELinksetUse restrictedLinksetUse = LLPathfindingLinkset::getLinksetUseWithToggledPhantom(linksetUse);
 		LLSD substitutions;
 		substitutions["REQUESTED_TYPE"] = getLinksetUseString(linksetUse);
 		substitutions["RESTRICTED_TYPE"] = getLinksetUseString(restrictedLinksetUse);
 
-		std::string notificationName;
-		if (showUnmodifiablePhantomWarning && showCannotBeVolumeWarning)
+		// Build one of the following notifications names
+		//   - PathfindingLinksets_WarnOnPhantom
+		//   - PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted
+		//   - PathfindingLinksets_WarnOnPhantom_MismatchOnVolume
+		//   - PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume
+		//   - PathfindingLinksets_MismatchOnRestricted
+		//   - PathfindingLinksets_MismatchOnVolume
+		//   - PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume
+
+		std::string notificationName = "PathfindingLinksets";
+
+		if (showPhantomToggleWarning)
 		{
-			notificationName = "PathfindingLinksets_SetLinksetUseMismatchOnRestrictedAndVolume";
+			notificationName += "_WarnOnPhantom";
 		}
-		else if (showUnmodifiablePhantomWarning)
+		if (showUnmodifiablePhantomWarning)
 		{
-			notificationName = "PathfindingLinksets_SetLinksetUseMismatchOnRestricted";
+			notificationName += "_MismatchOnRestricted";
 		}
-		else
+		if (showCannotBeVolumeWarning)
 		{
-			notificationName = "PathfindingLinksets_SetLinksetUseMismatchOnVolume";
+			notificationName += "_MismatchOnVolume";
 		}
+
 		LLNotificationsUtil::add(notificationName, substitutions, LLSD(), boost::bind(&LLFloaterPathfindingLinksets::handleApplyEdit, this, _1, _2));
 	}
 	else

indra/newview/llfloaterpathfindinglinksets.h

 
 	virtual void                       requestGetObjects();
 
-	virtual LLSD                       convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr);
+	virtual void                       buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr);
 
 	virtual void                       updateControlsOnScrollListChange();
 
 	virtual S32                        getNameColumnIndex() const;
+	virtual S32                        getOwnerNameColumnIndex() const;
+	virtual std::string                getOwnerName(const LLPathfindingObject *pObject) const;
 	virtual const LLColor4             &getBeaconColor() const;
 
 	virtual LLPathfindingObjectListPtr getEmptyObjectList() const;
 	void clearFilters();
 
 	void updateEditFieldValues();
-	LLSD buildLinksetScrollListData(const LLPathfindingLinkset *pLinksetPtr, const LLVector3 &pAvatarPosition) const;
+	LLSD buildLinksetScrollListItemData(const LLPathfindingLinkset *pLinksetPtr, const LLVector3 &pAvatarPosition) const;
 	LLSD buildLinksetUseScrollListData(const std::string &pLabel, S32 pValue) const;
 
 	bool isShowUnmodifiablePhantomWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
+	bool isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
 	bool isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
 
 	void updateStateOnEditFields();

indra/newview/llfloaterpathfindingobjects.cpp

 
 #include "llfloaterpathfindingobjects.h"
 
+#include <string>
+#include <map>
 #include <vector>
 
 #include <boost/bind.hpp>
 
 void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting)
 {
-	
 	if (mGodLevelChangeSlot.connected())
 	{
 		mGodLevelChangeSlot.disconnect();
 	{
 		mObjectsSelection.clear();
 	}
+
+	if (pIsAppQuitting)
+	{
+		clearAllObjects();
+	}
 }
 
 void LLFloaterPathfindingObjects::draw()
 	mReturnButton(NULL),
 	mDeleteButton(NULL),
 	mTeleportButton(NULL),
-	mLoadingAvatarNames(),
 	mDefaultBeaconColor(),
 	mDefaultBeaconTextColor(),
 	mErrorTextColor(),
 	mWarningTextColor(),
 	mMessagingState(kMessagingUnknown),
 	mMessagingRequestId(0U),
+	mMissingNameObjectsScrollListItems(),
 	mObjectList(),
 	mObjectsSelection(),
 	mHasObjectsToBeSelected(false),
 
 LLFloaterPathfindingObjects::~LLFloaterPathfindingObjects()
 {
+	clearAllObjects();
 }
 
 BOOL LLFloaterPathfindingObjects::postBuild()
 
 	S32 origScrollPosition = mObjectsScrollList->getScrollPos();
 	mObjectsScrollList->deleteAllItems();
+	mMissingNameObjectsScrollListItems.clear();
 
 	if ((mObjectList != NULL) && !mObjectList->isEmpty())
 	{
-		LLSD scrollListData = convertObjectsIntoScrollListData(mObjectList);
-		llassert(scrollListData.isArray());
+		buildObjectsScrollList(mObjectList);
 
-		LLScrollListCell::Params cellParams;
-		cellParams.font = LLFontGL::getFontSansSerif();
-
-		for (LLSD::array_const_iterator rowElementIter = scrollListData.beginArray(); rowElementIter != scrollListData.endArray(); ++rowElementIter)
+		mObjectsScrollList->selectMultiple(mObjectsToBeSelected);
+		if (mHasObjectsToBeSelected)
 		{
-			const LLSD &rowElement = *rowElementIter;
-
-			LLScrollListItem::Params rowParams;
-			llassert(rowElement.has("id"));
-			llassert(rowElement.get("id").isString());
-			rowParams.value = rowElement.get("id");
-
-			llassert(rowElement.has("column"));
-			llassert(rowElement.get("column").isArray());
-			const LLSD &columnElement = rowElement.get("column");
-			for (LLSD::array_const_iterator cellIter = columnElement.beginArray(); cellIter != columnElement.endArray(); ++cellIter)
-			{
-				const LLSD &cellElement = *cellIter;
-
-				llassert(cellElement.has("column"));
-				llassert(cellElement.get("column").isString());
-				cellParams.column = cellElement.get("column").asString();
-
-				llassert(cellElement.has("value"));
-				llassert(cellElement.get("value").isString());
-				cellParams.value = cellElement.get("value").asString();
-
-				rowParams.columns.add(cellParams);
-			}
-
-			mObjectsScrollList->addRow(rowParams);
+			mObjectsScrollList->scrollToShowSelected();
 		}
-	}
-
-	mObjectsScrollList->selectMultiple(mObjectsToBeSelected);
-	if (mHasObjectsToBeSelected)
-	{
-		mObjectsScrollList->scrollToShowSelected();
-	}
-	else
-	{
-		mObjectsScrollList->setScrollPos(origScrollPosition);
+		else
+		{
+			mObjectsScrollList->setScrollPos(origScrollPosition);
+		}
 	}
 
 	mObjectsToBeSelected.clear();
 	updateControlsOnScrollListChange();
 }
 
-LLSD LLFloaterPathfindingObjects::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr)
+void LLFloaterPathfindingObjects::buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr)
 {
 	llassert(0);
-	LLSD nullObjs = LLSD::emptyArray();
-	return nullObjs;
 }
 
-void LLFloaterPathfindingObjects::rebuildScrollListAfterAvatarNameLoads(const LLUUID &pAvatarId)
+void LLFloaterPathfindingObjects::addObjectToScrollList(const LLPathfindingObjectPtr pObjectPtr, const LLSD &pScrollListItemData)
 {
-	std::set<LLUUID>::const_iterator iter = mLoadingAvatarNames.find(pAvatarId);
-	if (iter == mLoadingAvatarNames.end())
+	LLScrollListCell::Params cellParams;
+	cellParams.font = LLFontGL::getFontSansSerif();
+
+	LLScrollListItem::Params rowParams;
+	rowParams.value = pObjectPtr->getUUID().asString();
+
+	llassert(pScrollListItemData.isArray());
+	for (LLSD::array_const_iterator cellIter = pScrollListItemData.beginArray();
+		cellIter != pScrollListItemData.endArray(); ++cellIter)
 	{
-		mLoadingAvatarNames.insert(pAvatarId);
-		LLAvatarNameCache::get(pAvatarId, boost::bind(&LLFloaterPathfindingObjects::handleAvatarNameLoads, this, _1, _2));
+		const LLSD &cellElement = *cellIter;
+
+		llassert(cellElement.has("column"));
+		llassert(cellElement.get("column").isString());
+		cellParams.column = cellElement.get("column").asString();
+
+		llassert(cellElement.has("value"));
+		llassert(cellElement.get("value").isString());
+		cellParams.value = cellElement.get("value").asString();
+
+		rowParams.columns.add(cellParams);
+	}
+
+	LLScrollListItem *scrollListItem = mObjectsScrollList->addRow(rowParams);
+
+	if (pObjectPtr->hasOwner() && !pObjectPtr->hasOwnerName())
+	{
+		mMissingNameObjectsScrollListItems.insert(std::make_pair<std::string, LLScrollListItem *>(pObjectPtr->getUUID().asString(), scrollListItem));
+		pObjectPtr->registerOwnerNameListener(boost::bind(&LLFloaterPathfindingObjects::handleObjectNameResponse, this, _1));
 	}
 }
 
 	return 0;
 }
 
+S32 LLFloaterPathfindingObjects::getOwnerNameColumnIndex() const
+{
+	return 2;
+}
+
+std::string LLFloaterPathfindingObjects::getOwnerName(const LLPathfindingObject *pObject) const
+{
+	llassert(0);
+	std::string returnVal;
+	return returnVal;
+}
+
 const LLColor4 &LLFloaterPathfindingObjects::getBeaconColor() const
 {
 	return mDefaultBeaconColor;
 {
 	selectNoneObjects();
 	mObjectsScrollList->deleteAllItems();
+	mMissingNameObjectsScrollListItems.clear();
 	mObjectList.reset();
 }
 
 	requestGetObjects();
 }
 
-void LLFloaterPathfindingObjects::handleAvatarNameLoads(const LLUUID &pAvatarId, const LLAvatarName &pAvatarName)
+void LLFloaterPathfindingObjects::handleObjectNameResponse(const LLPathfindingObject *pObject)
 {
-	llassert(mLoadingAvatarNames.find(pAvatarId) != mLoadingAvatarNames.end());
-	mLoadingAvatarNames.erase(pAvatarId);
-	if (mLoadingAvatarNames.empty())
+	llassert(pObject != NULL);
+	const std::string uuid = pObject->getUUID().asString();
+	scroll_list_item_map::iterator scrollListItemIter = mMissingNameObjectsScrollListItems.find(uuid);
+	if (scrollListItemIter != mMissingNameObjectsScrollListItems.end())
 	{
-		rebuildObjectsScrollList();
+		LLScrollListItem *scrollListItem = scrollListItemIter->second;
+		llassert(scrollListItem != NULL);
+
+		LLScrollListCell *scrollListCell = scrollListItem->getColumn(getOwnerNameColumnIndex());
+		LLSD ownerName = getOwnerName(pObject);
+
+		scrollListCell->setValue(ownerName);
+
+		mMissingNameObjectsScrollListItems.erase(scrollListItemIter);
 	}
 }
 

indra/newview/llfloaterpathfindingobjects.h

 #ifndef LL_LLFLOATERPATHFINDINGOBJECTS_H
 #define LL_LLFLOATERPATHFINDINGOBJECTS_H
 
-#include <set>
+#include <string>
+#include <map>
 
 #include <boost/signals2.hpp>
 
 	void                               handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList);
 
 	void                               rebuildObjectsScrollList();
-	virtual LLSD                       convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr);
-
-	void                               rebuildScrollListAfterAvatarNameLoads(const LLUUID &pAvatarId);
+	virtual void                       buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr);
+	void                               addObjectToScrollList(const LLPathfindingObjectPtr pObjectPr, const LLSD &pScrollListItemData);
 
 	virtual void                       updateControlsOnScrollListChange();
 	virtual void                       updateControlsOnInWorldSelectionChange();
 
 	virtual S32                        getNameColumnIndex() const;
+	virtual S32                        getOwnerNameColumnIndex() const;
+	virtual std::string                getOwnerName(const LLPathfindingObject *pObject) const;
 	virtual const LLColor4             &getBeaconColor() const;
 	virtual const LLColor4             &getBeaconTextColor() const;
 	virtual S32                        getBeaconWidth() const;
 	void                   onRegionBoundaryCrossed();
 	void                   onGodLevelChange(U8 pGodLevel);
 
-	void                   handleAvatarNameLoads(const LLUUID &pAvatarId, const LLAvatarName &pAvatarName);
+	void                   handleObjectNameResponse(const LLPathfindingObject *pObject);
 
 	void                   updateMessagingStatus();
 	void                   updateStateOnListControls();
 	LLButton                           *mDeleteButton;
 	LLButton                           *mTeleportButton;
 
-	std::set<LLUUID>                   mLoadingAvatarNames;
-
 	LLColor4                           mDefaultBeaconColor;
 	LLColor4                           mDefaultBeaconTextColor;
 	LLColor4                           mErrorTextColor;
 	EMessagingState                    mMessagingState;
 	LLPathfindingManager::request_id_t mMessagingRequestId;
 
+	typedef std::map<std::string, LLScrollListItem *> scroll_list_item_map;
+	scroll_list_item_map               mMissingNameObjectsScrollListItems;
+
 	LLPathfindingObjectListPtr         mObjectList;
 
 	LLObjectSelectionHandle            mObjectsSelection;

indra/newview/llfloatertools.cpp

 		if(tools_floater)
 		{
 			tools_floater->updateLandImpacts();
-			tools_floater->dirty();
 		}
 	}
 };

indra/newview/llpathfindinglinkset.cpp

 #define LINKSET_MODIFIABLE_FIELD    "modifiable"
 #define LINKSET_CATEGORY_FIELD      "navmesh_category"
 #define LINKSET_CAN_BE_VOLUME       "can_be_volume"
+#define LINKSET_IS_SCRIPTED_FIELD   "is_scripted"
 #define LINKSET_PHANTOM_FIELD       "phantom"
 #define LINKSET_WALKABILITY_A_FIELD "A"
 #define LINKSET_WALKABILITY_B_FIELD "B"
 	mLandImpact(0U),
 	mIsModifiable(FALSE),
 	mCanBeVolume(FALSE),
+	mIsScripted(FALSE),
+	mHasIsScripted(TRUE),
 	mLinksetUse(kUnknown),
 	mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
 	mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
 	mLandImpact(0U),
 	mIsModifiable(TRUE),
 	mCanBeVolume(TRUE),
+	mIsScripted(FALSE),
+	mHasIsScripted(FALSE),
 	mLinksetUse(kUnknown),
 	mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
 	mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
 	mLandImpact(pOther.mLandImpact),
 	mIsModifiable(pOther.mIsModifiable),
 	mCanBeVolume(pOther.mCanBeVolume),
+	mIsScripted(pOther.mIsScripted),
+	mHasIsScripted(pOther.mHasIsScripted),
 	mLinksetUse(pOther.mLinksetUse),
 	mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA),
 	mWalkabilityCoefficientB(pOther.mWalkabilityCoefficientB),
 	mLandImpact = pOther.mLandImpact;
 	mIsModifiable = pOther.mIsModifiable;
 	mCanBeVolume = pOther.mCanBeVolume;
+	mIsScripted = pOther.mIsScripted;
+	mHasIsScripted = pOther.mHasIsScripted;
 	mLinksetUse = pOther.mLinksetUse;
 	mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA;
 	mWalkabilityCoefficientB = pOther.mWalkabilityCoefficientB;
 	return (!isModifiable() && (isPhantom() != isPhantom(pLinksetUse)));
 }
 
+bool LLPathfindingLinkset::isShowPhantomToggleWarning(ELinksetUse pLinksetUse) const
+{
+	return (isModifiable() && (isPhantom() != isPhantom(pLinksetUse)));
+}
+
 bool LLPathfindingLinkset::isShowCannotBeVolumeWarning(ELinksetUse pLinksetUse) const
 {
 	return (!canBeVolume() && ((pLinksetUse == kMaterialVolume) || (pLinksetUse == kExclusionVolume)));
 	llassert(pLinksetData.has(LINKSET_MODIFIABLE_FIELD));
 	llassert(pLinksetData.get(LINKSET_MODIFIABLE_FIELD).isBoolean());
 	mIsModifiable = pLinksetData.get(LINKSET_MODIFIABLE_FIELD).asBoolean();
+
+	mHasIsScripted = pLinksetData.has(LINKSET_IS_SCRIPTED_FIELD);
+	if (mHasIsScripted)
+	{
+		llassert(pLinksetData.get(LINKSET_IS_SCRIPTED_FIELD).isBoolean());
+		mIsScripted = pLinksetData.get(LINKSET_IS_SCRIPTED_FIELD).asBoolean();
+	}
 }
 
 void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData)

indra/newview/llpathfindinglinkset.h

 
 	inline ELinksetUse getLinksetUse() const               {return mLinksetUse;};
 
+	inline BOOL        isScripted() const                  {return mIsScripted;};
+	inline BOOL        hasIsScripted() const               {return mHasIsScripted;};
+
 	inline S32         getWalkabilityCoefficientA() const  {return mWalkabilityCoefficientA;};
 	inline S32         getWalkabilityCoefficientB() const  {return mWalkabilityCoefficientB;};
 	inline S32         getWalkabilityCoefficientC() const  {return mWalkabilityCoefficientC;};
 	inline S32         getWalkabilityCoefficientD() const  {return mWalkabilityCoefficientD;};
 
 	bool               isShowUnmodifiablePhantomWarning(ELinksetUse pLinksetUse) const;
+	bool               isShowPhantomToggleWarning(ELinksetUse pLinksetUse) const;
 	bool               isShowCannotBeVolumeWarning(ELinksetUse pLinksetUse) const;
 	LLSD               encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const;
 
 	U32          mLandImpact;
 	BOOL         mIsModifiable;
 	BOOL         mCanBeVolume;
+	BOOL         mIsScripted;
+	BOOL         mHasIsScripted;
 	ELinksetUse  mLinksetUse;
 	S32          mWalkabilityCoefficientA;
 	S32          mWalkabilityCoefficientB;

indra/newview/llpathfindinglinksetlist.cpp

 	return isShowWarning;
 }
 
+bool LLPathfindingLinksetList::isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
+{
+	bool isShowWarning = false;
+
+	for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
+	{
+		const LLPathfindingObjectPtr objectPtr = objectIter->second;
+		const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+		isShowWarning = linkset->isShowPhantomToggleWarning(pLinksetUse);
+	}
+
+	return isShowWarning;
+}
+
 bool LLPathfindingLinksetList::isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
 {
 	bool isShowWarning = false;

indra/newview/llpathfindinglinksetlist.h

 	LLSD encodeTerrainFields(LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const;
 
 	bool isShowUnmodifiablePhantomWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
+	bool isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
 	bool isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
 
 	void determinePossibleStates(BOOL &pCanBeWalkable, BOOL &pCanBeStaticObstacle, BOOL &pCanBeDynamicObstacle,

indra/newview/llpathfindingobject.cpp

 	mOwnerUUID(),
 	mHasOwnerName(false),
 	mOwnerName(),
+	mAvatarNameCacheConnection(),
 	mIsGroupOwned(false),
-	mLocation()
+	mLocation(),
+	mOwnerNameSignal()
 {
 }
 
 	mOwnerUUID(),
 	mHasOwnerName(false),
 	mOwnerName(),
+	mAvatarNameCacheConnection(),
 	mIsGroupOwned(false),
-	mLocation()
+	mLocation(),
+	mOwnerNameSignal()
 {
 	parseObjectData(pObjectData);
 }
 	mOwnerUUID(pOther.mOwnerUUID),
 	mHasOwnerName(false),
 	mOwnerName(),
+	mAvatarNameCacheConnection(),
 	mIsGroupOwned(pOther.mIsGroupOwned),
-	mLocation(pOther.mLocation)
+	mLocation(pOther.mLocation),
+	mOwnerNameSignal()
 {
 	fetchOwnerName();
 }
 
 LLPathfindingObject::~LLPathfindingObject()
 {
+	disconnectAvatarNameCacheConnection();
 }
 
 LLPathfindingObject &LLPathfindingObject::operator =(const LLPathfindingObject& pOther)
 	return ownerName;
 }
 
+LLPathfindingObject::name_connection_t LLPathfindingObject::registerOwnerNameListener(name_callback_t pOwnerNameCallback)
+{
+	llassert(hasOwner());
+
+	name_connection_t connection;
+	if (hasOwnerName())
+	{
+		pOwnerNameCallback(this);
+	}
+	else
+	{
+		connection = mOwnerNameSignal.connect(pOwnerNameCallback);
+	}
+
+	return connection;
+}
+
 void LLPathfindingObject::parseObjectData(const LLSD &pObjectData)
 {
 	llassert(pObjectData.has(PATHFINDING_OBJECT_NAME_FIELD));
 		mHasOwnerName = LLAvatarNameCache::get(mOwnerUUID, &mOwnerName);
 		if (!mHasOwnerName)
 		{
-			LLAvatarNameCache::get(mOwnerUUID, boost::bind(&LLPathfindingObject::handleAvatarNameFetch, this, _1, _2));
+			mAvatarNameCacheConnection = LLAvatarNameCache::get(mOwnerUUID, boost::bind(&LLPathfindingObject::handleAvatarNameFetch, this, _1, _2));
 		}
 	}
 }
 void LLPathfindingObject::handleAvatarNameFetch(const LLUUID &pOwnerUUID, const LLAvatarName &pAvatarName)
 {
 	llassert(mOwnerUUID == pOwnerUUID);
+
 	mOwnerName = pAvatarName;
 	mHasOwnerName = true;
+
+	disconnectAvatarNameCacheConnection();
+
+	mOwnerNameSignal(this);
 }
+
+void LLPathfindingObject::disconnectAvatarNameCacheConnection()
+{
+	if (mAvatarNameCacheConnection.connected())
+	{
+		mAvatarNameCacheConnection.disconnect();
+	}
+}

indra/newview/llpathfindingobject.h

 #include <string>
 
 #include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
+#include <boost/signals2.hpp>
 
 #include "llavatarname.h"
+#include "llavatarnamecache.h"
 #include "lluuid.h"
 #include "v3math.h"
 
 	inline BOOL               isGroupOwned() const   {return mIsGroupOwned;};
 	inline const LLVector3&   getLocation() const    {return mLocation;};
 
+	typedef boost::function<void (const LLPathfindingObject *)>         name_callback_t;
+	typedef boost::signals2::signal<void (const LLPathfindingObject *)> name_signal_t;
+	typedef boost::signals2::connection                                 name_connection_t;
+
+	name_connection_t registerOwnerNameListener(name_callback_t pOwnerNameCallback);
+
 protected:
 
 private:
 
 	void fetchOwnerName();
 	void handleAvatarNameFetch(const LLUUID &pOwnerUUID, const LLAvatarName &pAvatarName);
+	void disconnectAvatarNameCacheConnection();
 
-	LLUUID       mUUID;
-	std::string  mName;
-	std::string  mDescription;
-	LLUUID       mOwnerUUID;
-	bool         mHasOwnerName;
-	LLAvatarName mOwnerName;
-	BOOL         mIsGroupOwned;
-	LLVector3    mLocation;
+	LLUUID                                   mUUID;
+	std::string                              mName;
+	std::string                              mDescription;
+	LLUUID                                   mOwnerUUID;
+	bool                                     mHasOwnerName;
+	LLAvatarName                             mOwnerName;
+	LLAvatarNameCache::callback_connection_t mAvatarNameCacheConnection;
+	BOOL                                     mIsGroupOwned;
+	LLVector3                                mLocation;
+	name_signal_t                            mOwnerNameSignal;
 };
 
 #endif // LL_LLPATHFINDINGOBJECT_H

indra/newview/llpathfindingobjectlist.cpp

 
 LLPathfindingObjectList::~LLPathfindingObjectList()
 {
+	clear();
 }
 
 bool LLPathfindingObjectList::isEmpty() const
 	return mObjectMap.empty();
 }
 
+void LLPathfindingObjectList::clear()
+{
+	for (LLPathfindingObjectMap::iterator objectIter = mObjectMap.begin(); objectIter != mObjectMap.end(); ++objectIter)
+	{
+		objectIter->second.reset();
+	}
+	mObjectMap.clear();
+}
+
 void LLPathfindingObjectList::update(LLPathfindingObjectPtr pUpdateObjectPtr)
 {
 	if (pUpdateObjectPtr != NULL)

indra/newview/llpathfindingobjectlist.h

 
 	bool isEmpty() const;
 
+	void clear();
+
 	void update(LLPathfindingObjectPtr pUpdateObjectPtr);
 	void update(LLPathfindingObjectListPtr pUpdateObjectListPtr);
 
 	const_iterator begin() const;
 	const_iterator end() const;
 
-
 protected:
 	LLPathfindingObjectMap &getObjectMap();
 

indra/newview/llviewerobject.cpp

 	{
 		if (new_angv != old_angv)
 		{
-			resetRot();
+			resetRotTime();
 		}
 
 		// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
 	}
 }
 
+void LLViewerObject::resetRotTime()
+{
+	mRotTime = 0.0f;
+}
+
 void LLViewerObject::resetRot()
 {
-	mRotTime = 0.0f;
+	resetRotTime();
 
 	// Reset the accumulated angular velocity rotation
 	mAngularVelocityRot.loadIdentity(); 

indra/newview/llviewerobject.h

 	virtual BOOL		updateLOD();
 	virtual BOOL		setDrawableParent(LLDrawable* parentp);
 	F32					getRotTime() { return mRotTime; }
+private:
+	void				resetRotTime();
+public:
 	void				resetRot();
 	void				applyAngularVelocity(F32 dt);
 
 	LLViewerRegion* getRegion() const				{ return mRegionp; }
 
 	BOOL isSelected() const							{ return mUserSelected; }
-	virtual void setSelected(BOOL sel)				{ mUserSelected = sel; mRotTime = 0.f;}
+	virtual void setSelected(BOOL sel)				{ mUserSelected = sel; resetRot();}
 
 	const LLUUID &getID() const						{ return mID; }
 	U32 getLocalID() const							{ return mLocalID; }
Add a comment to this file

indra/newview/res-sdl/lltoolpathfinding.BMP

Added
New image
Add a comment to this file

indra/newview/res-sdl/lltoolpathfindingpathend.BMP

Added
New image
Add a comment to this file

indra/newview/res-sdl/lltoolpathfindingpathendadd.BMP

Added
New image
Add a comment to this file

indra/newview/res-sdl/lltoolpathfindingpathstart.BMP

Added
New image
Add a comment to this file

indra/newview/res-sdl/lltoolpathfindingpathstartadd.BMP

Added
New image

indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml

     can_resize="true"
     can_tear_off="false"
     height="395"
-    width="1015"
+    width="1075"
     min_height="395"
-    min_width="1015"
+    min_width="1075"
     layout="topleft"
     name="floater_pathfinding_linksets"
     help_topic="floater_pathfinding_linksets"
   <floater.string name="linkset_terrain_name">[Terrain]</floater.string>
   <floater.string name="linkset_terrain_description">--</floater.string>
   <floater.string name="linkset_terrain_owner">--</floater.string>
+  <floater.string name="linkset_terrain_scripted">--</floater.string>
   <floater.string name="linkset_terrain_land_impact">--</floater.string>
   <floater.string name="linkset_terrain_dist_from_you">--</floater.string>
   <floater.string name="linkset_owner_loading">[Loading]</floater.string>
   <floater.string name="linkset_owner_unknown">[Unknown]</floater.string>
   <floater.string name="linkset_owner_group">[group]</floater.string>
+  <floater.string name="linkset_is_scripted">Yes</floater.string>
+  <floater.string name="linkset_is_not_scripted">No</floater.string>
+  <floater.string name="linkset_is_unknown_scripted">Unknown</floater.string>
   <floater.string name="linkset_use_walkable">Walkable</floater.string>
   <floater.string name="linkset_use_static_obstacle">Static obstacle</floater.string>
   <floater.string name="linkset_use_dynamic_obstacle">Movable obstacle</floater.string>
       follows="left|top|right|bottom"
       layout="topleft"
       height="226"
-      width="999">
+      width="1059">
     <text
         height="13"
         word_wrap="false"
         layout="topleft"
         name="apply_filters"
         top_pad="-21"
-        left_pad="31"
+        left_pad="91"
         width="73"/>
     <button
         follows="right|top"
         tab_stop="false"
         multi_select="true"
         name="objects_scroll_list"
-        width="980">
+        width="1040">
       <scroll_list.columns
           label="Name (root prim)"
           name="name"
           name="owner"
           width="141" />
       <scroll_list.columns
+          label="Scripted"
+          name="scripted"
+          width="60" />
+      <scroll_list.columns
           label="Impact"
           name="land_impact"
           width="55" />
         layout="topleft"
         name="messaging_status"
         top_pad="17"
-        width="619">
+        width="679">
       Linksets:
     </text>
     <button
       name="horiz_separator"
       top_pad="0"
       left="18"
-      width="979"/>
+      width="1039"/>
   <panel
       border="false"
       bevel_style="none"
       layout="topleft"
       left="0"
       height="67"
-      width="950">
+      width="1010">
     <text
         height="13"
         word_wrap="false"
         layout="topleft"
         name="teleport_me_to_object"
         top_pad="-21"
-        left_pad="206"
+        left_pad="239"
         width="160"/>
     <button
         follows="right|bottom"
         layout="topleft"
         name="return_objects"
         top_pad="-21"
-        left_pad="220"
+        left_pad="252"
         width="95"/>
     <button
         follows="right|bottom"
       name="horiz_separator"
       top_pad="0"
       left="18"
-      width="979"/>
+      width="1039"/>
   <panel
       border="false"
       bevel_style="none"
       layout="topleft"
       left="0"
       height="75"
-      width="950">
+      width="1010">
     <text
         height="13"
         word_wrap="false"
         layout="topleft"
         left="18"
         top_pad="8"
-        width="912">
+        width="972">
       Edit attributes of selected linksets and press the button to apply changes
     </text>
     <combo_box

indra/newview/skins/default/xui/en/notifications.xml

 
   <notification
    icon="alertmodal.tga"
-   name="PathfindingLinksets_SetLinksetUseMismatchOnRestricted"
-   type="alertmodal">
-    Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset.  These linksets will be set to be '[RESTRICTED_TYPE]' instead.
+   name="PathfindingLinksets_WarnOnPhantom"
+   type="alertmodal">
+Some selected linksets will have the Phantom flag toggled.
+
+Do you wish to continue?
+    <tag>confirm</tag>
+    <usetemplate
+     ignoretext="Some selected linksets phantom flag will be toggled."
+     name="okcancelignore"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
+
+  <notification
+   icon="alertmodal.tga"
+   name="PathfindingLinksets_MismatchOnRestricted"
+   type="alertmodal">
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset.  These linksets will be set to be '[RESTRICTED_TYPE]' instead.
+
+Do you wish to continue?
     <tag>confirm</tag>
     <usetemplate
      ignoretext="Some selected linksets cannot be set because of permission restrictions on the linkset."
 
   <notification
    icon="alertmodal.tga"
-   name="PathfindingLinksets_SetLinksetUseMismatchOnVolume"
-   type="alertmodal">
-    Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex.
+   name="PathfindingLinksets_MismatchOnVolume"
+   type="alertmodal">
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex.
+
+Do you wish to continue?
     <tag>confirm</tag>
     <usetemplate
      ignoretext="Some selected linksets cannot be set because the shape is non-convex"
 
   <notification
    icon="alertmodal.tga"
-   name="PathfindingLinksets_SetLinksetUseMismatchOnRestrictedAndVolume"
-   type="alertmodal">
-    Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset.  These linksets will be set to be '[RESTRICTED_TYPE]' instead.
- Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex. These linksets&apos; use types will not change.
+   name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted"
+   type="alertmodal">
+Some selected linksets will have the Phantom flag toggled.
+
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset.  These linksets will be set to be '[RESTRICTED_TYPE]' instead.
+
+Do you wish to continue?
+    <tag>confirm</tag>
+    <usetemplate
+     ignoretext="Some selected linksets phantom flag will be toggled and others cannot be set because of permission restrictions on the linkset."
+     name="okcancelignore"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
+
+  <notification
+   icon="alertmodal.tga"
+   name="PathfindingLinksets_WarnOnPhantom_MismatchOnVolume"
+   type="alertmodal">
+Some selected linksets will have the Phantom flag toggled.
+
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex.
+
+Do you wish to continue?
+    <tag>confirm</tag>
+    <usetemplate
+     ignoretext="Some selected linksets phantom flag will be toggled and others cannot be set because the shape is non-convex"
+     name="okcancelignore"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
+
+  <notification
+   icon="alertmodal.tga"
+   name="PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume"
+   type="alertmodal">
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset.  These linksets will be set to be '[RESTRICTED_TYPE]' instead.
+
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex. These linksets&apos; use types will not change.
+
+Do you wish to continue?
     <tag>confirm</tag>
     <usetemplate
      ignoretext="Some selected linksets cannot be set because of permission restrictions on the linkset and because the shape is non-convex."
 
   <notification
    icon="alertmodal.tga"
+   name="PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume"
+   type="alertmodal">
+Some selected linksets will have the Phantom flag toggled.
+
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because of permission restrictions on the linkset.  These linksets will be set to be '[RESTRICTED_TYPE]' instead.
+
+Some selected linksets cannot be set to be '[REQUESTED_TYPE]' because the shape is non-convex. These linksets&apos; use types will not change.
+
+Do you wish to continue?
+    <tag>confirm</tag>
+    <usetemplate
+     ignoretext="Some selected linksets phantom flag will be toggled and others cannot be set because of permission restrictions on the linkset and because the shape is non-convex."
+     name="okcancelignore"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
+
+  <notification
+   icon="alertmodal.tga"
    name="PathfindingLinksets_ChangeToFlexiblePath"
    type="alertmodal">
     The selected object affects the navmesh.  Changing it to a Flexible Path will remove it from the navmesh.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.