diff --git a/autobuild.xml b/autobuild.xml index 17bdb74e0b74427026fda8097870f9265fea7cd9..55b8a7f4355274bf8faebee1ab559500d6217c22 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1110,9 +1110,9 @@ <key>archive</key> <map> <key>hash</key> - <string>06f13505e99259c3b8d1d1e8fe90b1c7</string> + <string>9a37d0201667a971887604f171394966</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260468/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120622.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260580/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120625.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -1122,9 +1122,9 @@ <key>archive</key> <map> <key>hash</key> - <string>737fcb1848fc230620a7d40706a96d34</string> + <string>5600a7849a6bc00cfe08baa5bc251efd</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260468/arch/Linux/installer/llphysicsextensions-0.1-linux-20120623.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260580/arch/Linux/installer/llphysicsextensions-0.1-linux-20120626.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -1134,9 +1134,9 @@ <key>archive</key> <map> <key>hash</key> - <string>de32260c76aa70a3342757851dba6032</string> + <string>bfcfb9bc885e46a1b97f8f91cf5d5fd1</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260468/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120622.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/260580/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120625.tar.bz2</string> </map> <key>name</key> <string>windows</string> diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llcommon/llcursortypes.cpp index c0676f8c1314937c28c6b71c80298de1f6cb7e68..ec60097195b64b3e00b5fe37e215c3a7a934e170 100644 --- a/indra/llcommon/llcursortypes.cpp +++ b/indra/llcommon/llcursortypes.cpp @@ -71,7 +71,9 @@ ECursorType getCursorFromString(const std::string& cursor_string) cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN; cursor_string_table["UI_CURSOR_TOOLPATHFINDING"] = UI_CURSOR_TOOLPATHFINDING; cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTART"] = UI_CURSOR_TOOLPATHFINDING_PATH_START; + cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTARTADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD; cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHEND"] = UI_CURSOR_TOOLPATHFINDING_PATH_END; + cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHENDADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD; cursor_string_table["UI_CURSOR_TOOLNO"] = UI_CURSOR_TOOLNO; } diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h index f47a328f7735c750ccdbcca8160a1a8cc8153bd4..cb6d6636a0f9307d4e6764338fd9260c0053e76f 100644 --- a/indra/llcommon/llcursortypes.h +++ b/indra/llcommon/llcursortypes.h @@ -67,7 +67,9 @@ enum ECursorType { UI_CURSOR_TOOLOPEN, UI_CURSOR_TOOLPATHFINDING, UI_CURSOR_TOOLPATHFINDING_PATH_START, + UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD, UI_CURSOR_TOOLPATHFINDING_PATH_END, + UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD, UI_CURSOR_TOOLNO, UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor) }; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 5f637bc6f122a36746b321a8ee1cefe82fff539d..be0f8bc7af33e24c47138f5f75280a0f7848a370 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1699,8 +1699,10 @@ void LLWindowWin32::initCursors() mCursor[ UI_CURSOR_TOOLBUY ] = LoadCursor(module, TEXT("TOOLBUY")); mCursor[ UI_CURSOR_TOOLOPEN ] = LoadCursor(module, TEXT("TOOLOPEN")); mCursor[ UI_CURSOR_TOOLPATHFINDING ] = LoadCursor(module, TEXT("TOOLPATHFINDING")); + mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTARTADD")); mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_START ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTART")); mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHEND")); + mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHENDADD")); mCursor[ UI_CURSOR_TOOLNO ] = LoadCursor(module, TEXT("TOOLNO")); // Color cursors diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6358464fb0818339e1c4b91e4a5cc6dd146f287f..ac0b0c0351c753ec078b583f7db1a1968f672247 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1342,7 +1342,9 @@ if (WINDOWS) res/lltoolpan.cur res/lltoolpathfinding.cur res/lltoolpathfindingpathend.cur + res/lltoolpathfindingpathendadd.cur res/lltoolpathfindingpathstart.cur + res/lltoolpathfindingpathstartadd.cur res/lltoolpipette.cur res/lltoolrotate.cur res/lltoolscale.cur diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index caf9fe382b93cf04656430a2242e7751eb077f6c..5245b7887182caabc21858f11ba3628b2e9ffe22 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -36,7 +36,9 @@ #include "llpathfindingcharacter.h" #include "llpathfindingcharacterlist.h" #include "llpathfindingmanager.h" +#include "llpathfindingobject.h" #include "llpathfindingobjectlist.h" +#include "llpathinglib.h" #include "llsd.h" #include "lluicolortable.h" #include "llviewerobject.h" @@ -63,7 +65,7 @@ BOOL LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule) { - mShowPhysicsCapsuleCheckBox->set(pIsShowPhysicsCapsule); + mShowPhysicsCapsuleCheckBox->set(pIsShowPhysicsCapsule && (LLPathingLib::getInstance() != NULL)); } BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const @@ -84,7 +86,7 @@ LLHandle<LLFloaterPathfindingCharacters> LLFloaterPathfindingCharacters::getInst { if ( sInstanceHandle.isDead() ) { - LLFloaterPathfindingCharacters *floaterInstance = LLFloaterReg::getTypedInstance<LLFloaterPathfindingCharacters>("pathfinding_characters"); + LLFloaterPathfindingCharacters *floaterInstance = LLFloaterReg::findTypedInstance<LLFloaterPathfindingCharacters>("pathfinding_characters"); if (floaterInstance != NULL) { sInstanceHandle = floaterInstance->mSelfHandle; @@ -115,6 +117,7 @@ BOOL LLFloaterPathfindingCharacters::postBuild() mShowPhysicsCapsuleCheckBox = findChild<LLCheckBoxCtrl>("show_physics_capsule"); llassert(mShowPhysicsCapsuleCheckBox != NULL); mShowPhysicsCapsuleCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingCharacters::onShowPhysicsCapsuleClicked, this)); + mShowPhysicsCapsuleCheckBox->setEnabled(LLPathingLib::getInstance() != NULL); return LLFloaterPathfindingObjects::postBuild(); } @@ -171,13 +174,23 @@ LLPathfindingObjectListPtr LLFloaterPathfindingCharacters::getEmptyObjectList() void LLFloaterPathfindingCharacters::onShowPhysicsCapsuleClicked() { - if (mSelectedCharacterId.notNull() && isShowPhysicsCapsule()) + if (LLPathingLib::getInstance() == NULL) { - showCapsule(); + if (isShowPhysicsCapsule()) + { + setShowPhysicsCapsule(FALSE); + } } else { - hideCapsule(); + if (mSelectedCharacterId.notNull() && isShowPhysicsCapsule()) + { + showCapsule(); + } + else + { + hideCapsule(); + } } } @@ -222,7 +235,7 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListData(const LLPathfi void LLFloaterPathfindingCharacters::updateStateOnDisplayControls() { int numSelectedItems = getNumSelectedObjects();; - bool isEditEnabled = (numSelectedItems == 1); + bool isEditEnabled = ((numSelectedItems == 1) && (LLPathingLib::getInstance() != NULL)); mShowPhysicsCapsuleCheckBox->setEnabled(isEditEnabled); if (!isEditEnabled) @@ -256,6 +269,19 @@ void LLFloaterPathfindingCharacters::showCapsule() const { if (mSelectedCharacterId.notNull() && isShowPhysicsCapsule()) { + LLPathfindingObjectPtr objectPtr = getFirstSelectedObject(); + llassert(objectPtr != NULL); + if (objectPtr != NULL) + { + const LLPathfindingCharacter *character = dynamic_cast<const LLPathfindingCharacter *>(objectPtr.get()); + llassert(mSelectedCharacterId == character->getUUID()); + if (LLPathingLib::getInstance() != NULL) + { + LLPathingLib::getInstance()->createPhysicsCapsuleRep(character->getLength(), character->getRadius(), + character->isHorizontal(), character->getUUID()); + } + } + gPipeline.hideObject(mSelectedCharacterId); } } @@ -266,6 +292,10 @@ void LLFloaterPathfindingCharacters::hideCapsule() const { gPipeline.restoreHiddenObject(mSelectedCharacterId); } + if (LLPathingLib::getInstance() != NULL) + { + LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals(); + } } bool LLFloaterPathfindingCharacters::getCapsuleRenderData(LLVector3& pPosition, LLQuaternion& rot) const diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 810650621dbaef74d97cf4e5e4be1b7f9b5a1a68..2cf7f3aeb1984699d563b70b943e30b6bc428f9e 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -285,7 +285,7 @@ LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::getInstanceHa { if (sInstanceHandle.isDead()) { - LLFloaterPathfindingConsole *floaterInstance = LLFloaterReg::getTypedInstance<LLFloaterPathfindingConsole>("pathfinding_console"); + LLFloaterPathfindingConsole *floaterInstance = LLFloaterReg::findTypedInstance<LLFloaterPathfindingConsole>("pathfinding_console"); if (floaterInstance != NULL) { sInstanceHandle = floaterInstance->mSelfHandle; diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index cd6d0851b9716f54676095467a9b296bc86c0f1b..9bfbc582bdb37b391489a78a27a886701c68de07 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -41,6 +41,8 @@ #include "llcheckboxctrl.h" #include "llenvmanager.h" #include "llfloater.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llpathfindingmanager.h" #include "llresmgr.h" #include "llscrolllistctrl.h" @@ -281,13 +283,14 @@ void LLFloaterPathfindingObjects::handleNewObjectList(LLPathfindingManager::requ void LLFloaterPathfindingObjects::handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList) { + // We current assume that handleUpdateObjectList is called only when objects are being SET llassert(pRequestId <= mMessagingRequestId); if (pRequestId == mMessagingRequestId) { switch (pRequestStatus) { case LLPathfindingManager::kRequestStarted : - setMessagingState(kMessagingGetRequestSent); + setMessagingState(kMessagingSetRequestSent); break; case LLPathfindingManager::kRequestCompleted : if (mObjectList == NULL) @@ -581,14 +584,42 @@ void LLFloaterPathfindingObjects::onTakeCopyClicked() void LLFloaterPathfindingObjects::onReturnClicked() { - handle_object_return(); - requestGetObjects(); + LLNotification::Params params("PathfindingReturnMultipleItems"); + params.functor.function(boost::bind(&LLFloaterPathfindingObjects::handleReturnItemsResponse, this, _1, _2)); + + LLSD substitutions; + int numItems = getNumSelectedObjects(); + substitutions["NUM_ITEMS"] = static_cast<LLSD::Integer>(numItems); + params.substitutions = substitutions; + + if (numItems == 1) + { + LLNotifications::getInstance()->forceResponse(params, 0); + } + else if (numItems > 1) + { + LLNotifications::getInstance()->add(params); + } } void LLFloaterPathfindingObjects::onDeleteClicked() { - handle_object_delete(); - requestGetObjects(); + LLNotification::Params params("PathfindingDeleteMultipleItems"); + params.functor.function(boost::bind(&LLFloaterPathfindingObjects::handleDeleteItemsResponse, this, _1, _2)); + + LLSD substitutions; + int numItems = getNumSelectedObjects(); + substitutions["NUM_ITEMS"] = static_cast<LLSD::Integer>(numItems); + params.substitutions = substitutions; + + if (numItems == 1) + { + LLNotifications::getInstance()->forceResponse(params, 0); + } + else if (numItems > 1) + { + LLNotifications::getInstance()->add(params); + } } void LLFloaterPathfindingObjects::onTeleportClicked() @@ -768,6 +799,24 @@ void LLFloaterPathfindingObjects::selectScrollListItemsInWorld() } } +void LLFloaterPathfindingObjects::handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + handle_object_return(); + requestGetObjects(); + } +} + +void LLFloaterPathfindingObjects::handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + handle_object_delete(); + requestGetObjects(); + } +} + LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const { LLPathfindingObjectPtr objectPtr; diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index 6d5d6d24b223fcb68099b5e0d32832cf090e450d..84b0f3f3feebaf943fc7664a5ac701d86fb309d5 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -132,6 +132,9 @@ class LLFloaterPathfindingObjects : public LLFloater void updateStateOnActionControls(); void selectScrollListItemsInWorld(); + void handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse); + void handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse); + LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const; LLScrollListCtrl *mObjectsScrollList; diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp index 98e9141043e385fc18a4bdfb268b40349b1b461a..c9f3555e9cf968de4b7a1ecaf9a9ef36f518208b 100644 --- a/indra/newview/llpathfindingcharacter.cpp +++ b/indra/newview/llpathfindingcharacter.cpp @@ -31,7 +31,6 @@ #include "llpathfindingobject.h" #include "llsd.h" -#include "llpathinglib.h" #define CHARACTER_CPU_TIME_FIELD "cpu_time" #define CHARACTER_HORIZONTAL_FIELD "horizontal" @@ -94,8 +93,4 @@ void LLPathfindingCharacter::parseCharacterData(const LLSD &pCharacterData) llassert(pCharacterData.has(CHARACTER_RADIUS_FIELD)); llassert(pCharacterData.get(CHARACTER_RADIUS_FIELD).isReal()); mRadius = pCharacterData.get(CHARACTER_RADIUS_FIELD).asReal(); - - //Create the rep inside the pathing library - LLVector3 empty(0,0,0); - LLPathingLib::getInstance()->createPhysicsCapsuleRep( mLength, mRadius, mIsHorizontal, empty, getUUID() ); } diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index ac1fb15be91f31e92633ddb590d53bf55f693abd..9b0ed14e355ea7b3e441677d571fd163662063a6 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -33,7 +33,6 @@ #include "llpathfindingobject.h" #include "llpathfindingobjectlist.h" #include "llsd.h" -#include "llpathinglib.h" //--------------------------------------------------------------------------- // LLPathfindingCharacterList @@ -47,11 +46,6 @@ LLPathfindingCharacterList::LLPathfindingCharacterList() LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) : LLPathfindingObjectList() { - if (LLPathingLib::getInstance() != NULL) - { - LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); - } - parseCharacterListData(pCharacterListData); } diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index a01874296d64c4dc08c9a74d39a7e4bf1f996103..bafcf5794416ec533efe43a4b3be19fcdc58db2f 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -311,6 +311,11 @@ void LLPathfindingManager::quitSystem() } } +bool LLPathfindingManager::isPathfindingViewEnabled() const +{ + return (LLPathingLib::getInstance() != NULL); +} + bool LLPathfindingManager::isPathfindingEnabledForCurrentRegion() const { return isPathfindingEnabledForRegion(getCurrentRegion()); diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index 5fa2b94def142186ef2a193e88670a116863bdc5..9aa3065d89d82cf785d11b6ef928a2ffbbd32473 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -67,6 +67,7 @@ class LLPathfindingManager : public LLSingleton<LLPathfindingManager> void initSystem(); void quitSystem(); + bool isPathfindingViewEnabled() const; bool isPathfindingEnabledForCurrentRegion() const; bool isPathfindingEnabledForRegion(LLViewerRegion *pRegion) const; diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index 82426920d8c5342f7007cc795b3f597fa9488aa7..6cf90addab1a34e65475531573cd5bbf3df51d09 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -70,14 +70,9 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask) { if (isAnyPathToolModKeys(pMask)) { - if (isPointAModKeys(pMask)) - { - gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START); - } - else if (isPointBModKeys(pMask)) - { - gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END); - } + gViewerWindow->setCursor(isPointAModKeys(pMask) + ? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD + : UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD); computeFinalPoints(pX, pY, pMask); mIsLeftMouseButtonHeld = true; setMouseCapture(TRUE); @@ -167,14 +162,9 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) if (!mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask)) { - if (isPointAModKeys(pMask)) - { - gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START); - } - else if (isPointBModKeys(pMask)) - { - gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END); - } + gViewerWindow->setCursor(isPointAModKeys(pMask) + ? (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_START) + : (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_END)); computeTempPoints(pX, pY, pMask); returnVal = TRUE; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 47cafeb3f8b4a25abbdf87fc7ff1e860974ac87f..bcec9c6edab32bbaf1913802b958c92e498dd0c3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4886,6 +4886,14 @@ class LLToolsEnablePathfinding : public view_listener_t } }; +class LLToolsEnablePathfindingView : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return (LLPathfindingManager::getInstance() != NULL) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isPathfindingViewEnabled(); + } +}; + // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -8281,6 +8289,7 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); + view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/res/lltoolpathfinding.cur b/indra/newview/res/lltoolpathfinding.cur index 40c5a40905c8a270e2692688cce66dc81ff6673a..2aba2daa45a671f069ed52348822f53219d73755 100644 Binary files a/indra/newview/res/lltoolpathfinding.cur and b/indra/newview/res/lltoolpathfinding.cur differ diff --git a/indra/newview/res/lltoolpathfindingpathend.cur b/indra/newview/res/lltoolpathfindingpathend.cur index df8d56d205fed56059e5fe17bce77e9d5e22cec2..e951a6956ba90a7fd4739479e48d3a54b570ebc3 100644 Binary files a/indra/newview/res/lltoolpathfindingpathend.cur and b/indra/newview/res/lltoolpathfindingpathend.cur differ diff --git a/indra/newview/res/lltoolpathfindingpathendadd.cur b/indra/newview/res/lltoolpathfindingpathendadd.cur new file mode 100644 index 0000000000000000000000000000000000000000..0bf3201b2360c9d91bfd88b669b5c92262c6a358 Binary files /dev/null and b/indra/newview/res/lltoolpathfindingpathendadd.cur differ diff --git a/indra/newview/res/lltoolpathfindingpathstart.cur b/indra/newview/res/lltoolpathfindingpathstart.cur index 5c38bb6c008ee2dd0f7dcec7ada9fa3e0cbef30e..fecc716990c052122bde6af4bf193a0cc57c58bf 100644 Binary files a/indra/newview/res/lltoolpathfindingpathstart.cur and b/indra/newview/res/lltoolpathfindingpathstart.cur differ diff --git a/indra/newview/res/lltoolpathfindingpathstartadd.cur b/indra/newview/res/lltoolpathfindingpathstartadd.cur new file mode 100644 index 0000000000000000000000000000000000000000..45e23e5161f7d0370af0b3d4f917535c24a3c751 Binary files /dev/null and b/indra/newview/res/lltoolpathfindingpathstartadd.cur differ diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index 0b469c8d810adef1755a2e8b5313d018a7fd04d9..df75f3f697f7fd2adc591037ca33c56d38d4d920 100644 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -124,7 +124,9 @@ TOOLOPEN CURSOR "toolopen.cur" TOOLSIT CURSOR "toolsit.cur" TOOLPATHFINDING CURSOR "lltoolpathfinding.cur" TOOLPATHFINDINGPATHSTART CURSOR "lltoolpathfindingpathstart.cur" -TOOLPATHFINDINGPATHEND CURSOR "lltoolpathfindingpathend.cur" +TOOLPATHFINDINGPATHSTARTADD CURSOR "lltoolpathfindingpathstartadd.cur" +TOOLPATHFINDINGPATHEND CURSOR "lltoolpathfindingpathend.cur" +TOOLPATHFINDINGPATHENDADD CURSOR "lltoolpathfindingpathendadd.cur" TOOLNO CURSOR "llno.cur" ///////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml index a267902b94f856db1df4b4ca02259a306b4996d5..c1f1f60c1b88ba36fea896e0e4a3f1773a0a5725 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml @@ -179,14 +179,24 @@ <button follows="left|bottom" height="22" + label="Teleport me to it" + layout="topleft" + name="teleport_me_to_object" + tool_tip="Enabled only when one character is selected." + top_pad="-22" + left_pad="26" + width="159"/> + <button + follows="right|bottom" + height="22" label="Return" layout="topleft" name="return_objects" top_pad="-22" - left_pad="6" + left_pad="26" width="94"/> <button - follows="left|bottom" + follows="right|bottom" height="22" label="Delete" layout="topleft" @@ -194,15 +204,5 @@ top_pad="-22" left_pad="6" width="94"/> - <button - follows="left|bottom" - height="22" - label="Teleport me to it" - layout="topleft" - name="teleport_me_to_object" - tool_tip="Enabled only when one character is selected." - top_pad="-22" - left_pad="6" - width="159"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml index 3e718743dc4dd5f56938268a609462d8959998bf..833e5489bacdf097953a0f5ef7d4467db42a41e7 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml @@ -322,14 +322,23 @@ <button follows="left|bottom" height="21" + label="Teleport me to it" + layout="topleft" + name="teleport_me_to_object" + top_pad="-21" + left_pad="206" + width="160"/> + <button + follows="right|bottom" + height="21" label="Return" layout="topleft" name="return_objects" top_pad="-21" - left_pad="6" + left_pad="220" width="95"/> <button - follows="left|bottom" + follows="right|bottom" height="21" label="Delete" layout="topleft" @@ -337,15 +346,6 @@ top_pad="-21" left_pad="6" width="95"/> - <button - follows="left|bottom" - height="21" - label="Teleport me to it" - layout="topleft" - name="teleport_me_to_object" - top_pad="-21" - left_pad="6" - width="160"/> </panel> <view_border bevel_style="none" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1682996c74894d689a91c9543aff9506ef8d92a6..f9a4acb1e33e80f16acc89fd5c38a28260b9d83f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -967,7 +967,7 @@ function="Floater.ToggleOrBringToFront" parameter="pathfinding_console" /> <menu_item_call.on_enable - function="Tools.EnablePathfinding" /> + function="Tools.EnablePathfindingView" /> </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 9b072f3bf8c5205e70dd8cacc6d8d8a6de97ad9c..b09fb7bbe8991e0f94a8f19d738c69ae0a5f7876 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7869,5 +7869,31 @@ Disabling future updates for this file. Attempted to add an invalid or unreadable image file [FNAME] which could not be opened or decoded. Attempt cancelled. </notification> - + + <notification + icon="alertmodal.tga" + name="PathfindingReturnMultipleItems" + type="alertmodal"> + You are returning [NUM_ITEMS] items. Are you sure you want to continue? + <tag>confirm</tag> + <usetemplate + ignoretext="Are you sure you want to return multiple items?" + name="okcancelignore" + notext="No" + yestext="Yes"/> + </notification> + + <notification + icon="alertmodal.tga" + name="PathfindingDeleteMultipleItems" + type="alertmodal"> + You are deleting [NUM_ITEMS] items. Are you sure you want to continue? + <tag>confirm</tag> + <usetemplate + ignoretext="Are you sure you want to delete multiple items?" + name="okcancelignore" + notext="No" + yestext="Yes"/> + </notification> + </notifications>