diff options
110 files changed, 1985 insertions, 1177 deletions
| diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..9ac24be468 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[Makefile] +indent_style = tab + +[*.{yml,yaml}] +indent_size = 2 diff --git a/autobuild.xml b/autobuild.xml index 5c5919d0c4..84cf11b8e9 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2420,59 +2420,33 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>        </map>        <key>threejs</key>        <map> +        <key>copyright</key> +        <string>Copyright © 2010-2021 three.js authors</string> +        <key>license</key> +        <string>MIT</string> +        <key>license_file</key> +        <string>LICENSES/THREEJS_LICENSE.txt</string> +        <key>name</key> +        <string>threejs</string>          <key>platforms</key>          <map> -          <key>darwin64</key> -          <map> -            <key>archive</key> -            <map> -              <key>hash</key> -              <string>cfed00d8ea7265c035c2d86a234b28efb0b23756</string> -              <key>hash_algorithm</key> -              <string>sha1</string> -              <key>url</key> -              <string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-darwin64-b8f6746.tar.zst</string> -            </map> -            <key>name</key> -            <string>darwin64</string> -          </map> -          <key>linux64</key> -          <map> -            <key>archive</key> -            <map> -              <key>hash</key> -              <string>9de1295b157c9913c28be81ff933c73493ecc132</string> -              <key>hash_algorithm</key> -              <string>sha1</string> -              <key>url</key> -              <string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-linux64-b8f6746.tar.zst</string> -            </map> -          </map> -          <key>windows64</key> +          <key>common</key>            <map>              <key>archive</key>              <map>                <key>hash</key> -              <string>4141710fccbd1ea2b3b53d00e189bdfa2ee9d441</string> +              <string>982c0fa427458082ea9e3cb9603904210732b64e</string>                <key>hash_algorithm</key>                <string>sha1</string>                <key>url</key> -              <string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-b8f6746/threejs-0.132.2-windows64-b8f6746.tar.zst</string> +              <string>https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-5da28d9/threejs-0.132.2-common-8454371083.tar.zst</string>              </map>              <key>name</key> -            <string>windows64</string> +            <string>common</string>            </map>          </map> -        <key>license</key> -        <string>MIT</string> -        <key>license_file</key> -        <string>LICENSES/THREEJS_LICENSE.txt</string> -        <key>copyright</key> -        <string>Copyright © 2010-2021 three.js authors</string>          <key>version</key>          <string>0.132.2</string> -        <key>name</key> -        <string>threejs</string>        </map>        <key>tinygltf</key>        <map> diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index b186b9052e..f92811356e 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -119,6 +119,8 @@ public:      virtual void addDebugText( const std::string& text ) = 0; +    virtual std::string getDebugName() const { return getID().asString(); } +      virtual const LLUUID&   getID() const = 0;      //-------------------------------------------------------------------------      // End Interface diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index c63c7012d1..9392aa718b 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -86,6 +86,15 @@ std::string LLDate::asRFC1123() const      return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));  } +std::string LLDate::toLocalDateString (std::string fmt) const +{ +    LL_PROFILE_ZONE_SCOPED; + +    time_t locSeconds = (time_t) mSecondsSinceEpoch; +    struct tm * lt = localtime (&locSeconds); +    return toHTTPDateString(lt, fmt); +} +  std::string LLDate::toHTTPDateString (std::string fmt) const  {      LL_PROFILE_ZONE_SCOPED; diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 81f2dd0d1c..67dfa1b5d1 100644 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -80,6 +80,7 @@ public:      std::string asRFC1123() const;      void toStream(std::ostream&) const;      bool split(S32 *year, S32 *month = NULL, S32 *day = NULL, S32 *hour = NULL, S32 *min = NULL, S32 *sec = NULL) const; +    std::string toLocalDateString (std::string fmt) const;      std::string toHTTPDateString (std::string fmt) const;      static std::string toHTTPDateString (tm * gmt, std::string fmt);      /** diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h index 0eb1891754..b8be7bb81a 100644 --- a/indra/llcommon/threadpool.h +++ b/indra/llcommon/threadpool.h @@ -4,7 +4,7 @@   * @date   2021-10-21   * @brief  ThreadPool configures a WorkQueue along with a pool of threads to   *         service it. - * + *    * $LicenseInfo:firstyear=2021&license=viewerlgpl$   * Copyright (c) 2021, Linden Research, Inc.   * $/LicenseInfo$ @@ -55,7 +55,7 @@ namespace LL           * ThreadPool listens for application shutdown messages on the "LLApp"           * LLEventPump. Call close() to shut down this ThreadPool early.           */ -        virtual void close(); +        void close();          std::string getName() const { return mName; }          size_t getWidth() const { return mThreads.size(); } diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index a9e1171444..a905e9b59b 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -31,11 +31,12 @@  #include "llfolderviewitem.h"  #include "llfolderview.h"  #include "llfolderviewmodel.h" -#include "llpanel.h"  #include "llcallbacklist.h"  #include "llcriticaldamp.h"  #include "llclipboard.h"  #include "llfocusmgr.h"     // gFocusMgr +#include "llnotificationsutil.h" +#include "llpanel.h"  #include "lltrans.h"  #include "llwindow.h" @@ -105,7 +106,7 @@ LLFolderViewItem::Params::Params()      item_height("item_height"),      item_top_pad("item_top_pad"),      creation_date(), -    allow_wear("allow_wear", true), +    marketplace_item("marketplace_item", false),      allow_drop("allow_drop", true),      font_color("font_color"),      font_highlight_color("font_highlight_color"), @@ -144,7 +145,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)      mRoot(p.root),      mViewModelItem(p.listener),      mIsMouseOverTitle(false), -    mAllowWear(p.allow_wear), +    mMarketplaceItem(p.marketplace_item),      mAllowDrop(p.allow_drop),      mFontColor(p.font_color),      mFontHighlightColor(p.font_highlight_color), @@ -533,10 +534,15 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)  void LLFolderViewItem::openItem( void )  { -    if (mAllowWear || !getViewModelItem()->isItemWearable()) +    if (!mMarketplaceItem || !getViewModelItem()->isItemWearable())      {          getViewModelItem()->openItem();      } +    else if (mMarketplaceItem) +    { +        // Wearing an object from any listing, active or not, is verbotten +        LLNotificationsUtil::add("AlertMerchantListingCannotWear"); +    }  }  void LLFolderViewItem::rename(const std::string& new_name) diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 351613e387..275fd52c00 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -59,7 +59,7 @@ public:                                                      item_top_pad;          Optional<time_t>                            creation_date; -        Optional<bool>                              allow_wear; +        Optional<bool>                              marketplace_item;          Optional<bool>                              allow_drop;          Optional<LLUIColor>                         font_color; @@ -121,7 +121,7 @@ protected:                                  mIsCurSelection,                                  mDragAndDropTarget,                                  mIsMouseOverTitle, -                                mAllowWear, +                                mMarketplaceItem,                                  mAllowDrop,                                  mSingleFolderMode,                                  mDoubleClickOverride, diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 8fcb558aae..b4a3ca0844 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -46,6 +46,7 @@  #include "llfocusmgr.h"  #include "llcoord.h"  #include "llwindow.h" +#include "llemojihelper.h"  #include "llcriticaldamp.h"  #include "lluictrlfactory.h" @@ -1411,6 +1412,7 @@ void LLMenuItemBranchDownGL::openMenu( void )      }      else      { +        LLEmojiHelper::instance().hideHelper(nullptr, true);          if (branch->getTornOff())          {              LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent()); diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index eac43900f6..f09b87493c 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -28,6 +28,7 @@  #include "llmodaldialog.h" +#include "llemojihelper.h"  #include "llfocusmgr.h"  #include "v4color.h"  #include "v2math.h" @@ -35,19 +36,20 @@  #include "llwindow.h"  #include "llkeyboard.h"  #include "llmenugl.h" +  // static  std::list<LLModalDialog*> LLModalDialog::sModalStack; -LLModalDialog::LLModalDialog( const LLSD& key, BOOL modal ) +LLModalDialog::LLModalDialog(const LLSD& key, BOOL modal)      : LLFloater(key), -      mModal( modal ) +      mModal(modal)  {      if (modal)      {          setCanMinimize(FALSE);          setCanClose(FALSE);      } -    setVisible( FALSE ); +    setVisible(FALSE);      setBackgroundVisible(TRUE);      setBackgroundOpaque(TRUE);      centerOnScreen(); // default position @@ -98,7 +100,7 @@ void LLModalDialog::onOpen(const LLSD& key)  {      if (mModal)      { -        // If Modal, Hide the active modal dialog +        // If Modal, hide the active modal dialog          if (!sModalStack.empty())          {              LLModalDialog* front = sModalStack.front(); @@ -148,13 +150,18 @@ void LLModalDialog::stopModal()      }  } -  void LLModalDialog::setVisible( BOOL visible )  {      if (mModal)      { -        if( visible ) +        if (visible)          { +            // Hide all menus currently shown +            LLMenuGL::sMenuContainer->hideMenus(); + +            // Hide EmojiPicker if it is shown +            LLEmojiHelper::instance().hideHelper(nullptr, true); +              // This is a modal dialog.  It sucks up all mouse and keyboard operations.              gFocusMgr.setMouseCapture( this ); @@ -257,7 +264,6 @@ BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)      return TRUE;  } -  BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask )  {      LLFloater::handleKeyHere(key, mask ); @@ -301,7 +307,6 @@ void LLModalDialog::centerOnScreen()      centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY])));  } -  // static  void LLModalDialog::onAppFocusLost()  { @@ -333,6 +338,7 @@ void LLModalDialog::onAppFocusGained()      }  } +// static  void LLModalDialog::shutdownModals()  {      // This method is only for use during app shutdown. ~LLModalDialog() diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index e030861f20..3e49be1770 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -265,7 +265,9 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :      mShowEmojiHelper(p.show_emoji_helper),      mEnableTooltipPaste(p.enable_tooltip_paste),      mPassDelete(false), -    mKeepSelectionOnReturn(false) +    mKeepSelectionOnReturn(false), +    mSelectAllOnFocusReceived(false), +    mSelectedOnFocusReceived(false)  {      mSourceID.generate(); @@ -389,6 +391,7 @@ void LLTextEditor::selectNext(const std::string& search_text_in, BOOL case_insen      setCursorPos(loc);      mIsSelecting = TRUE; +    mSelectedOnFocusReceived = false;      mSelectionEnd = mCursorPos;      mSelectionStart = llmin((S32)getLength(), (S32)(mCursorPos + search_text.size()));  } @@ -668,6 +671,13 @@ BOOL LLTextEditor::canSelectAll() const      return TRUE;  } +//virtual +void LLTextEditor::deselect() +{ +    LLTextBase::deselect(); +    mSelectedOnFocusReceived = false; +} +  // virtual  void LLTextEditor::selectAll()  { @@ -685,6 +695,11 @@ void LLTextEditor::selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_p      endSelection();  } +void LLTextEditor::setSelectAllOnFocusReceived(bool b) +{ +    mSelectAllOnFocusReceived = b; +} +  void LLTextEditor::insertEmoji(llwchar emoji)  {      LL_INFOS() << "LLTextEditor::insertEmoji(" << wchar_utf8_preview(emoji) << ")" << LL_ENDL; @@ -762,8 +777,16 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)      // Delay cursor flashing      resetCursorBlink(); +    mSelectedOnFocusReceived = false;      if (handled && !gFocusMgr.getMouseCapture())      { +        if (!mask && mSelectAllOnFocusReceived) +        { +            mIsSelecting = false; +            mSelectionStart = getLength(); +            mSelectionEnd = 0; +            mSelectedOnFocusReceived = true; +        }          gFocusMgr.setMouseCapture( this );      }      return handled; @@ -2127,6 +2150,11 @@ void LLTextEditor::focusLostHelper()          gEditMenuHandler = NULL;      } +    if (mSelectedOnFocusReceived) +    { +        deselect(); +    } +      if (mCommitOnFocusLost)      {          onCommit(); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index e917f65fbd..8ef9673739 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -142,8 +142,10 @@ public:      virtual BOOL    canDoDelete() const;      virtual void    selectAll();      virtual BOOL    canSelectAll()  const; +    virtual void    deselect();      void            selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos); +    void            setSelectAllOnFocusReceived(bool b);      virtual bool    canLoadOrSaveToFile(); @@ -331,6 +333,8 @@ private:      bool            mEnableTooltipPaste;      bool            mPassDelete;      bool            mKeepSelectionOnReturn; // disabling of removing selected text after pressing of Enter +    bool            mSelectAllOnFocusReceived; +    bool            mSelectedOnFocusReceived;      LLUUID          mSourceID; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index d6b93b93d9..aea7367337 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -351,10 +351,9 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool      LLWindowWin32Thread();      void run() override; -    void close() override;      // closes queue, wakes thread, waits until thread closes -    void wakeAndDestroy(); +    bool wakeAndDestroy();      void glReady()      { @@ -425,6 +424,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool      // *HACK: Attempt to prevent startup crashes by deferring memory accounting      // until after some graphics setup. See SL-20177. -Cosmic,2023-09-18      bool mGLReady = false; +    bool mDeleteOnExit = false;      // best guess at available video memory in MB      std::atomic<U32> mAvailableVRAM; @@ -997,7 +997,11 @@ void LLWindowWin32::close()      mhDC = NULL;      mWindowHandle = NULL; -    mWindowThread->wakeAndDestroy(); +    if (mWindowThread->wakeAndDestroy()) +    { +        // thread will delete itselfs once done +        mWindowThread = NULL; +    }  }  BOOL LLWindowWin32::isValid() @@ -3110,10 +3114,17 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_          break;          }      } -    else +    else // (NULL == window_imp)      { -        // (NULL == window_imp) -        LL_DEBUGS("Window") << "No window implementation to handle message with, message code: " << U32(u_msg) << LL_ENDL; +        if (u_msg == WM_DESTROY) +        { +            PostQuitMessage(0);  // Posts WM_QUIT with an exit code of 0 +            return 0; +        } +        else +        { +            LL_DEBUGS("Window") << "No window implementation to handle message with, message code: " << U32(u_msg) << LL_ENDL; +        }      }      // pass unhandled messages down to Windows @@ -4572,25 +4583,11 @@ U32 LLWindowWin32::getAvailableVRAMMegabytes()  #endif // LL_WINDOWS  inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread() -    : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, true /*should be false, temporary workaround for SL-18721*/) +    : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, false)  {      LL::ThreadPool::start();  } -void LLWindowWin32::LLWindowWin32Thread::close() -{ -    if (!mQueue->isClosed()) -    { -        LL_WARNS() << "Closing window thread without using destroy_window_handler" << LL_ENDL; -        LL::ThreadPool::close(); - -        // Workaround for SL-18721 in case window closes too early and abruptly -        LLSplashScreen::show(); -        LLSplashScreen::update("..."); // will be updated later -    } -} - -  /**   * LogChange is to log changes in status while trying to avoid spamming the   * log with repeated messages, especially in a tight loop. It refuses to log @@ -4935,14 +4932,19 @@ void LLWindowWin32::LLWindowWin32Thread::run()      }      cleanupDX(); + +    if (mDeleteOnExit) +    { +        delete this; +    }  } -void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() +bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()  {      if (mQueue->isClosed())      { -        LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." << LL_ENDL; -        return; +        LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." <<LL_ENDL; +        return false;      }      // Make sure we don't leave a blank toolbar button. @@ -4981,6 +4983,15 @@ void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()               mGLReady = false;           }); +    mDeleteOnExit = true; +    SetWindowLongPtr(old_handle, GWLP_USERDATA, NULL); + +    // Let thread finish on its own and don't block main thread. +    for (auto& pair : mThreads) +    { +        pair.second.detach(); +    } +      LL_DEBUGS("Window") << "Closing window's pool queue" << LL_ENDL;      mQueue->close(); @@ -4995,49 +5006,8 @@ void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()          PostMessage(old_handle, WM_DUMMY_, wparam, 0x1337);      } -    // There are cases where window will refuse to close, -    // can't wait forever on join, check state instead -    LLTimer timeout; -    timeout.setTimerExpirySec(2.0); -    while (!getQueue().done() && !timeout.hasExpired() && mWindowHandleThrd) -    { -        ms_sleep(100); -    } - -    if (getQueue().done() || mWindowHandleThrd == NULL) -    { -        // Window is closed, started closing or is cleaning up -        // now wait for our single thread to die. -        if (mWindowHandleThrd) -        { -            LL_INFOS("Window") << "Window is closing, waiting on pool's thread to join, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL; -        } -        else -        { -            LL_DEBUGS("Window") << "Waiting on pool's thread, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL; -        } -        for (auto& pair : mThreads) -        { -            pair.second.join(); -        } -    } -    else -    { -        // Something suspended window thread, can't afford to wait forever -        // so kill thread instead -        // Ex: This can happen if user starts dragging window arround (if it -        // was visible) or a modal notification pops up -        LL_WARNS("Window") << "Window is frozen, couldn't perform clean exit" << LL_ENDL; - -        for (auto& pair : mThreads) -        { -            // very unsafe -            TerminateThread(pair.second.native_handle(), 0); -            pair.second.detach(); -            cleanupDX(); -        } -    }      LL_DEBUGS("Window") << "thread pool shutdown complete" << LL_ENDL; +    return true;  }  void LLWindowWin32::post(const std::function<void()>& func) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e97ab4c52c..55ea339ff4 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -325,6 +325,7 @@ set(viewer_SOURCE_FILES      llhudeffectpointat.cpp      llhudeffecttrail.cpp      llhudeffectblob.cpp +    llhudeffectresetskeleton.cpp      llhudicon.cpp      llhudmanager.cpp      llhudnametag.cpp @@ -981,6 +982,7 @@ set(viewer_HEADER_FILES      llhudeffectpointat.h      llhudeffecttrail.h      llhudeffectblob.h +    llhudeffectresetskeleton.h      llhudicon.h      llhudmanager.h      llhudnametag.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 85f2b2d303..667953ab54 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -91,7 +91,7 @@        <key>Type</key>        <string>S32</string>        <key>Value</key> -      <real>300.0</real> +      <real>300</real>      </map>      <key>AckCollectTime</key>      <map> @@ -379,7 +379,7 @@        <key>Value</key>        <integer>0</integer>      </map> -    <key>AutoAcceptNewInventory</key> +  <key>AutoAcceptNewInventory</key>      <map>        <key>Comment</key>        <string>Automatically accept new notecards/textures/landmarks</string> @@ -1830,6 +1830,17 @@      <key>Value</key>      <integer>0</integer>    </map> +    <key>DebugSelectionLODs</key> +    <map> +        <key>Comment</key> +        <string>Force selection to show specific LOD, -1 for off, 0 - lowest, 4 - high.</string> +        <key>Persist</key> +        <integer>0</integer> +        <key>Type</key> +        <string>S32</string> +        <key>Value</key> +        <integer>-1</integer> +    </map>    <key>AnimatedObjectsAllowLeftClick</key>    <map>      <key>Comment</key> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 6b788dd78f..99c43acd49 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -329,7 +329,7 @@      <key>KeepConversationLogTranscripts</key>      	<map>        	<key>Comment</key> -      		<string>Keep a conversation log and transcripts</string> +      		<string>Keep a conversation log and transcripts 2 - both, 1 - logs, 0 - none</string>        	<key>Persist</key>        		<integer>1</integer>        	<key>Type</key> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 6db7088812..c3643dcc62 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1453,48 +1453,72 @@ LLVector3 LLAgent::getReferenceUpVector()      return up_vector;  } -  // Radians, positive is forward into ground  //-----------------------------------------------------------------------------  // pitch()  //-----------------------------------------------------------------------------  void LLAgent::pitch(F32 angle)  { +    if (fabs(angle) <= 1e-4) +        return; + +    LLCoordFrame newCoordFrame(mFrameAgent); +    newCoordFrame.pitch(angle); + +    // don't let user pitch if rotated 180 degree around the vertical axis +    if ((newCoordFrame.getXAxis()[VX] * mFrameAgent.getXAxis()[VX] < 0) && +        (newCoordFrame.getXAxis()[VY] * mFrameAgent.getXAxis()[VY] < 0)) +        return; +      // don't let user pitch if pointed almost all the way down or up +    LLVector3 skyward = getReferenceUpVector();      // A dot B = mag(A) * mag(B) * cos(angle between A and B)      // so... cos(angle between A and B) = A dot B / mag(A) / mag(B)      //                                  = A dot B for unit vectors +    F32 agent_camera_angle_from_skyward = acos(newCoordFrame.getAtAxis() * skyward) * RAD_TO_DEG; -    LLVector3 skyward = getReferenceUpVector(); +    F32 min_angle = 1; +    F32 max_angle = 179; +    bool check_viewer_camera = false; -    // clamp pitch to limits -    if (angle >= 0.f) +    if (gAgentCamera.getCameraMode() == CAMERA_MODE_THIRD_PERSON)      { -        const F32 look_down_limit = 179.f * DEG_TO_RAD; -        F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward); -        if (angle_from_skyward + angle > look_down_limit) +        // These values of min_angle and max_angle are obtained purely empirically +        if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_REAR_VIEW) +        { +            min_angle = 10; +            check_viewer_camera = true; +        } +        else if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_GROUP_VIEW)          { -            angle = look_down_limit - angle_from_skyward; +            min_angle = 10; +            max_angle = 170; +            check_viewer_camera = true;          }      } -    else if (angle < 0.f) +    else if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) +    { +        min_angle = 0.1; +        max_angle = 179.9; +    } + +    if ((angle < 0 && agent_camera_angle_from_skyward < min_angle) || +        (angle > 0 && agent_camera_angle_from_skyward > max_angle)) +        return; + +    if (check_viewer_camera)      { -        const F32 look_up_limit = 5.f * DEG_TO_RAD;          const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin();          LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal());          LLVector3 look_dir = agent_focus_pos - viewer_camera_pos; -        F32 angle_from_skyward = angle_between(look_dir, skyward); -        if (angle_from_skyward + angle < look_up_limit) -        { -            angle = look_up_limit - angle_from_skyward; -        } +        F32 viewer_camera_angle_from_skyward = angle_between(look_dir, skyward) * RAD_TO_DEG; +        if ((angle < 0 && viewer_camera_angle_from_skyward < min_angle) || +            (angle > 0 && viewer_camera_angle_from_skyward > max_angle)) +            return;      } -    if (fabs(angle) > 1e-4) -    { -        mFrameAgent.pitch(angle); -    } +    mFrameAgent = newCoordFrame;  } diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 4a9e5efadf..a88d425724 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -112,6 +112,7 @@ private:      //--------------------------------------------------------------------  public:      void switchCameraPreset(ECameraPreset preset); +    ECameraPreset getCameraPreset() const { return mCameraPreset; }      /** Determines default camera offset depending on the current camera preset */      LLVector3 getCameraOffsetInitial();      /** Determines default focus offset depending on the current camera preset */ diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 76271571cd..f3a5eb7c73 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -839,7 +839,7 @@ void AISAPI::onUpdateReceived(const LLSD& update, COMMAND_TYPE type, const LLSD&      if ( (type == UPDATECATEGORY || type == UPDATEITEM)          && gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))      { -        dump_sequential_xml(gAgentAvatarp->getFullname() + "_ais_update", update); +        dump_sequential_xml(gAgentAvatarp->getDebugName() + "_ais_update", update);      }      AISUpdate ais_update(update, type, request_body); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 97e1c1e6ee..b01f12ee83 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2263,7 +2263,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)      }      if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))      { -        dump_sequential_xml(gAgentAvatarp->getFullname() + "_slam_request", contents); +        dump_sequential_xml(gAgentAvatarp->getDebugName() + "_slam_request", contents);      }      slam_inventory_folder(getCOF(), contents, link_waiter); @@ -3956,7 +3956,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd          LL_DEBUGS("Avatar") << "succeeded" << LL_ENDL;          if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))          { -            dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_ok", result); +            dump_sequential_xml(gAgentAvatarp->getDebugName() + "_appearance_request_ok", result);          }      } while (bRetry); @@ -3965,7 +3965,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd  /*static*/  void LLAppearanceMgr::debugAppearanceUpdateCOF(const LLSD& content)  { -    dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_error", content); +    dump_sequential_xml(gAgentAvatarp->getDebugName() + "_appearance_request_error", content);      LL_INFOS("Avatar") << "AIS COF, version received: " << content["expected"].asInteger()          << " ================================= " << LL_ENDL; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index be6ac3eab5..368a47d697 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -453,11 +453,20 @@ void idle_afk_check()  {      // check idle timers      F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32(); -    F32 afk_timeout  = gSavedSettings.getS32("AFKTimeout"); -    if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK()) +    LLCachedControl<S32> afk_timeout(gSavedSettings, "AFKTimeout", 300); +    if (afk_timeout() && (current_idle > afk_timeout()))      { -        LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL; -        gAgent.setAFK(); +        if (!gAgent.getAFK()) +        { +            LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL; +            gAgent.setAFK(); +        } +        else +        { +            // Refresh timer so that random one click or hover won't clear the status. +            // But expanding the window still should lift afk status +            gAwayTimer.reset(); +        }      }  } diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index e1d494f7c7..08e09d2d22 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -536,11 +536,12 @@ LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LL          S32 search_index;          LLSD targetList;          // The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30 -        for ( search_index = 0, targetList = mLists[0]; +        for ( search_index = 0;                !listFound && search_index < mLists.size(); -              search_index += 1, targetList = mLists[search_index] +              search_index += 1               )          { +            targetList = mLists[search_index];              if ( targetList.isMap() )              {                  if ( listNameMatches( targetList, listName) ) diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index ec9cf2c8b7..246630521d 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -231,7 +231,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U      {          LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);          if (avatar && -            avatar->getRezzedStatus() >= 2 &&                   // Mostly rezzed (maybe without baked textures downloaded) +            avatar->getRezzedStatus() >= AV_REZZED_TEXTURED &&  // Mostly rezzed (maybe without baked textures downloaded)              !avatar->isDead() &&                                // Not dead yet              !avatar->isControlAvatar() &&                       // Not part of an animated object              avatar->getObjectHost() == regionp->getHost())      // Ensure it's on the same region diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index 61fc9d00f3..29b7fff125 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -70,7 +70,7 @@ mLatestOverLimitPct(0.0f),  mShowOverLimitAgents(false),  mNotifyOutfitLoading(false),  mLastCofVersion(LLViewerInventoryCategory::VERSION_UNKNOWN), -mLastOutfitRezStatus(-1), +mLastOutfitRezStatus(AV_REZZED_UNKNOWN),  mLastSkeletonSerialNum(-1)  {      mPopUpDelayTimer.resetWithExpiry(OVER_LIMIT_UPDATE_DELAY); diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h index 97c24c3cba..73fa87b192 100644 --- a/indra/newview/llavatarrendernotifier.h +++ b/indra/newview/llavatarrendernotifier.h @@ -33,6 +33,8 @@  class LLViewerRegion; +enum ERezzedStatus : S32; +  struct LLHUDComplexity  {      LLHUDComplexity() @@ -130,7 +132,7 @@ private:      S32 mLastSkeletonSerialNum;      // Used to detect changes in voavatar's rezzed status.      // If value decreases - there were changes in outfit. -    S32 mLastOutfitRezStatus; +    enum ERezzedStatus mLastOutfitRezStatus;      object_complexity_list_t mObjectComplexityList;  }; diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index b7317272a1..173cf3237d 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -137,14 +137,14 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_          {              LLVector3 pos_box_offset = point_to_box_offset(vol_pos, unshift_extents);              F32 offset_dist = pos_box_offset.length(); -            if (offset_dist > MAX_LEGAL_OFFSET && offset_dist > 0.f) +            if (offset_dist > max_legal_offset && offset_dist > 0.f)              { -                F32 target_dist = (offset_dist - MAX_LEGAL_OFFSET); +                F32 target_dist = (offset_dist - max_legal_offset);                  new_pos_fixup = (target_dist/offset_dist)*pos_box_offset;              }              if (new_pos_fixup != mPositionConstraintFixup)              { -                LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup " +                LL_DEBUGS("ConstraintFix") << getDebugName() << " pos fix, offset_dist " << offset_dist << " pos fixup "                                             << new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL;                  LL_DEBUGS("ConstraintFix") << "vol_pos " << vol_pos << LL_ENDL;                  LL_DEBUGS("ConstraintFix") << "extents " << extents[0] << " " << extents[1] << LL_ENDL; @@ -152,11 +152,11 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_              }          } -        if (box_size/mScaleConstraintFixup > MAX_LEGAL_SIZE) +        if (box_size/mScaleConstraintFixup > max_legal_size)          { -            new_scale_fixup = mScaleConstraintFixup* MAX_LEGAL_SIZE /box_size; -            LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup " -                                       << mScaleConstraintFixup << " max legal " << MAX_LEGAL_SIZE +            new_scale_fixup = mScaleConstraintFixup*max_legal_size/box_size; +            LL_DEBUGS("ConstraintFix") << getDebugName() << " scale fix, box_size " << box_size << " fixup " +                                       << mScaleConstraintFixup << " max legal " << max_legal_size                                         << " -> new scale " << new_scale_fixup << LL_ENDL;          }      } @@ -239,7 +239,7 @@ void LLControlAvatar::matchVolumeTransform()              const LLMeshSkinInfo* skin_info = mRootVolp->getSkinInfo();              if (skin_info)              { -                LL_DEBUGS("BindShape") << getFullname() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL; +                LL_DEBUGS("BindShape") << getDebugName() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL;                  bind_rot = LLSkinningUtil::getUnscaledQuaternion(LLMatrix4(skin_info->mBindShapeMatrix));              }  #endif diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index dd4ca845a0..8c3d2219bc 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -647,7 +647,7 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD&      {          mConversations.clear();          notifyObservers(); -        cache(); +        saveToFile(getFileName());          deleteBackupLogs();      }  } diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index f3b924a306..9bc012d6f0 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -33,6 +33,7 @@  #include "llagentui.h"  #include "llbase64.h"  #include "llcallbacklist.h" +#include "lldate.h"  #include "llenvironment.h"  #include "llimagejpeg.h"  #include "llmediactrl.h" @@ -83,7 +84,7 @@ LLFloater360Capture::~LLFloater360Capture()      // Normally LLFloater360Capture tells the Simulator send everything      // and now reverts to the regular "keyhole" frustum of interest      // list updates. -    if (!LLApp::isExiting() && +    if (!LLApp::isExiting() &&           gSavedSettings.getBOOL("360CaptureUseInterestListCap") &&          mStartILMode != gAgent.getInterestListMode())      { @@ -578,7 +579,7 @@ void LLFloater360Capture::capture360Images()          LLViewerStats::instance().getRecording().resume();          LLAppViewer::instance()->resumeMainloopTimeout(); - +                  // update main loop timeout state          LLAppViewer::instance()->pingMainloopTimeout("LLFloater360Capture::capture360Images");      } @@ -862,15 +863,7 @@ const std::string LLFloater360Capture::generate_proposed_filename()      filename << "_";      // add in the current HH-MM-SS (with leading 0's) so users can easily save many shots in same folder -    std::time_t cur_epoch = std::time(nullptr); -    std::tm* tm_time = std::localtime(&cur_epoch); -    filename << std::setfill('0') << std::setw(4) << (tm_time->tm_year + 1900); -    filename << std::setfill('0') << std::setw(2) << (tm_time->tm_mon + 1); -    filename << std::setfill('0') << std::setw(2) << tm_time->tm_mday; -    filename << "_"; -    filename << std::setfill('0') << std::setw(2) << tm_time->tm_hour; -    filename << std::setfill('0') << std::setw(2) << tm_time->tm_min; -    filename << std::setfill('0') << std::setw(2) << tm_time->tm_sec; +    filename << LLDate::now().toLocalDateString("%Y%m%d_%H%M%S");      // the unusual way we save the output image (originates in the      // embedded browser and not the C++ code) means that the system diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index bdcaf2dc22..71a7875931 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -422,7 +422,13 @@ bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification,      LLSD newList = notification["payload"]["list"]; -    if ( response.has("listname") && response["listname"].isString() ) +    S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +    if (option != 1) // Must also match RenameAutoReplaceList +    { +        // user cancelled +        return false; +    } +    else if (response.has("listname") && response["listname"].isString() )      {          std::string newName = response["listname"].asString();          LLAutoReplaceSettings::setListName(newList, newName); @@ -508,12 +514,53 @@ bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notifica      return false;  } +bool LLFloaterAutoReplaceSettings::callbackRemoveList(const LLSD& notification, const LLSD& response) +{ +    std::string listName = notification["payload"]["list"]; + +    S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +    switch (option) +    { +    case 1: +        if (mSettings.removeReplacementList(listName)) +        { +            LL_INFOS("AutoReplace") << "deleted list '" << listName << "'" << LL_ENDL; +            mReplacementsList->deleteSelectedItems();   // remove from the scrolling list +            mSelectedListName.clear(); +            updateListNames(); +            updateListNamesControls(); +            updateReplacementsList(); +        } +        break; +    case 0: +        break; + +    default: +        LL_ERRS("AutoReplace") << "invalid selected option " << option << LL_ENDL; +    } + +    return false; +} +  void LLFloaterAutoReplaceSettings::onDeleteList()  {      std::string listName = mListNames->getSelectedValue().asString();      if ( ! listName.empty() )      { -        if ( mSettings.removeReplacementList(listName) ) +        const LLSD* mappings = mSettings.getListEntries(mSelectedListName); +        if (mappings->size() > 0) +        { +            LLSD payload; +            payload["list"] = listName; + +            LLSD args; +            args["MAP_SIZE"] = llformat("%d",mappings->size()); +            args["LIST_NAME"] = listName; + +            LLNotificationsUtil::add("RemoveAutoReplaceList", args, payload, +                boost::bind(&LLFloaterAutoReplaceSettings::callbackRemoveList, this, _1, _2)); +        } +        else if ( mSettings.removeReplacementList(listName) )          {              LL_INFOS("AutoReplace")<<"deleted list '"<<listName<<"'"<<LL_ENDL;              mReplacementsList->deleteSelectedItems();   // remove from the scrolling list diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h index 7f1953d485..8b752a6f5a 100644 --- a/indra/newview/llfloaterautoreplacesettings.h +++ b/indra/newview/llfloaterautoreplacesettings.h @@ -107,6 +107,8 @@ private:      bool callbackNewListName(const LLSD& notification, const LLSD& response);      /// called from the RenameAutoReplaceList notification dialog      bool callbackListNameConflict(const LLSD& notification, const LLSD& response); +    /// called from the RemoveAutoReplaceList notification dialog +    bool callbackRemoveList(const LLSD& notification, const LLSD& response);      bool selectedListIsFirst();      bool selectedListIsLast(); diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 1fb0a72d3e..5c80d9cdc9 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -118,8 +118,8 @@ std::string STATUS[] =  //-----------------------------------------------------------------------------  // LLFloaterBvhPreview()  //----------------------------------------------------------------------------- -LLFloaterBvhPreview::LLFloaterBvhPreview(const std::string& filename) : -    LLFloaterNameDesc(filename) +LLFloaterBvhPreview::LLFloaterBvhPreview(const LLSD& args) : +    LLFloaterNameDesc(args)  {      mLastMouseX = 0;      mLastMouseY = 0; @@ -1013,7 +1013,8 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)                      LLFloaterPerms::getNextOwnerPerms("Uploads"),                      LLFloaterPerms::getGroupPerms("Uploads"),                      LLFloaterPerms::getEveryonePerms("Uploads"), -                    expected_upload_cost)); +                    expected_upload_cost, +                    floaterp->mDestinationFolderId));                  upload_new_resource(assetUploadInfo);              } diff --git a/indra/newview/llfloaterbvhpreview.h b/indra/newview/llfloaterbvhpreview.h index 9de74c39cd..4dd28389a5 100644 --- a/indra/newview/llfloaterbvhpreview.h +++ b/indra/newview/llfloaterbvhpreview.h @@ -70,7 +70,7 @@ protected:  class LLFloaterBvhPreview : public LLFloaterNameDesc  {  public: -    LLFloaterBvhPreview(const std::string& filename); +    LLFloaterBvhPreview(const LLSD& args);      virtual ~LLFloaterBvhPreview();      BOOL postBuild(); diff --git a/indra/newview/llfloatereditenvironmentbase.h b/indra/newview/llfloatereditenvironmentbase.h index 1b7771fe94..0b7d5ca39b 100644 --- a/indra/newview/llfloatereditenvironmentbase.h +++ b/indra/newview/llfloatereditenvironmentbase.h @@ -133,7 +133,8 @@ protected:      LLSettingsEditPanel() :          LLPanel(),          mIsDirty(false), -        mOnDirtyChanged() +        mOnDirtyChanged(), +        mCanEdit(false)      {}  private: diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 7851c5403b..9fa3dd0c47 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -71,8 +71,8 @@ const S32 PREVIEW_TEXTURE_HEIGHT = 320;  //-----------------------------------------------------------------------------  // LLFloaterImagePreview()  //----------------------------------------------------------------------------- -LLFloaterImagePreview::LLFloaterImagePreview(const std::string& filename) : -    LLFloaterNameDesc(filename), +LLFloaterImagePreview::LLFloaterImagePreview(const LLSD& args) : +    LLFloaterNameDesc(args),      mAvatarPreview(NULL),      mSculptedPreview(NULL), diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index 9e764e4972..47228d7676 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -110,7 +110,7 @@ protected:  class LLFloaterImagePreview : public LLFloaterNameDesc  {  public: -    LLFloaterImagePreview(const std::string& filename); +    LLFloaterImagePreview(const LLSD& args);      virtual ~LLFloaterImagePreview();      virtual BOOL postBuild(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 0ef7353eac..ab5766f260 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -349,14 +349,14 @@ void LLFloaterModelPreview::initModelPreview()  }  //static -bool LLFloaterModelPreview::showModelPreview() +void LLFloaterModelPreview::showModelPreview(const LLUUID& dest_folder)  {      LLFloaterModelPreview* fmp = (LLFloaterModelPreview*)LLFloaterReg::getInstance("upload_model");      if (fmp && !fmp->isModelLoading())      { +        fmp->setUploadDestination(dest_folder);          fmp->loadHighLodModel();      } -    return true;  }  void LLFloaterModelPreview::onUploadOptionChecked(LLUICtrl* ctrl) @@ -505,7 +505,7 @@ void LLFloaterModelPreview::onClickCalculateBtn()      gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,                            childGetValue("upload_textures").asBoolean(),                            upload_skinweights, upload_joint_positions, lock_scale_if_joint_position, -                          mUploadModelUrl, false, +                          mUploadModelUrl, mDestinationFolderId, false,                            getWholeModelFeeObserverHandle());      toggleCalculateButton(false); @@ -1655,7 +1655,7 @@ void LLFloaterModelPreview::onUpload(void* user_data)      gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale,                            mp->childGetValue("upload_textures").asBoolean(),                            upload_skinweights, upload_joint_positions, lock_scale_if_joint_position, -                          mp->mUploadModelUrl, +                          mp->mUploadModelUrl, mp->mDestinationFolderId,                            true, LLHandle<LLWholeModelFeeObserver>(), mp->getWholeModelUploadObserverHandle());  } @@ -1765,9 +1765,15 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod)      if (index == LLModelPreview::MESH_OPTIMIZER_AUTO          || index == LLModelPreview::MESH_OPTIMIZER_SLOPPY          || index == LLModelPreview::MESH_OPTIMIZER_PRECISE) -    { //rebuild LoD to update triangle counts +    { +        // rebuild LoD to update triangle counts          onLODParamCommit(lod, true);      } +    if (index == LLModelPreview::USE_LOD_ABOVE) +    { +        // refresh to pick triangle counts +        mModelPreview->mDirty = true; +    }  }  void LLFloaterModelPreview::resetDisplayOptions() diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 20e645532b..018014ba04 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -73,7 +73,8 @@ public:      /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);      void initModelPreview(); -    static bool showModelPreview(); +    void setUploadDestination(const LLUUID& dest_folder) { mDestinationFolderId = dest_folder; } +    static void showModelPreview(const LLUUID& dest_folder = LLUUID::null);      BOOL handleMouseDown(S32 x, S32 y, MASK mask);      BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -164,9 +165,6 @@ protected:      static void onPhysicsBrowse(LLUICtrl* ctrl, void* userdata);      static void onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata); -    static void onPhysicsOptimize(LLUICtrl* ctrl, void* userdata); -    static void onPhysicsDecomposeBack(LLUICtrl* ctrl, void* userdata); -    static void onPhysicsSimplifyBack(LLUICtrl* ctrl, void* userdata);      void            draw(); @@ -225,6 +223,7 @@ private:      void createSmoothComboBox(LLComboBox* combo_box, float min, float max); +    LLUUID mDestinationFolderId;      LLButton* mUploadBtn;      LLButton* mCalculateBtn;      LLViewerTextEditor* mUploadLogText; diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index f93af9c312..48138a258a 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -1,25 +1,25 @@ -/** +/**    * @file llfloatergesture.cpp   * @brief LLFloaterMyEnvironment class implementation   *   * $LicenseInfo:firstyear=2002&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2019, Linden Research, Inc. - * + *    * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - * + *    * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - * + *    * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - * + *    * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ @@ -38,7 +38,9 @@  #include "llcheckboxctrl.h"  #include "llviewerinventory.h"  #include "llenvironment.h" +#include "llnotificationsutil.h"  #include "llparcel.h" +#include "lltrans.h"  #include "llviewerparcelmgr.h"  //========================================================================= @@ -223,6 +225,35 @@ void LLFloaterMyEnvironment::onFilterEdit(const std::string& search_string)      mInventoryList->setFilterSubString(search_string);  } +void LLFloaterMyEnvironment::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, uuid_vec_t item_ids) +{ +    S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +    if (option == 0) +    { +        const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); +        for (const LLUUID& itemid : item_ids) +        { +            LLInventoryItem* inv_item = gInventory.getItem(itemid); + +            if (inv_item && inv_item->getInventoryType() == LLInventoryType::IT_SETTINGS) +            { +                LLInventoryModel::update_list_t update; +                LLInventoryModel::LLCategoryUpdate old_folder(inv_item->getParentUUID(), -1); +                update.push_back(old_folder); +                LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1); +                update.push_back(new_folder); +                gInventory.accountForUpdate(update); + +                LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item); +                new_item->setParent(trash_id); +                new_item->updateParentOnServer(FALSE); +                gInventory.updateItem(new_item); +            } +        } +        gInventory.notifyObservers(); +    } +} +  void LLFloaterMyEnvironment::onDeleteSelected()  {      uuid_vec_t selected; @@ -231,27 +262,16 @@ void LLFloaterMyEnvironment::onDeleteSelected()      if (selected.empty())          return; -    const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); -    for (const LLUUID& itemid: selected) -    { -        LLInventoryItem* inv_item = gInventory.getItem(itemid); - -        if (inv_item && inv_item->getInventoryType() == LLInventoryType::IT_SETTINGS) +    LLSD args; +    args["QUESTION"] = LLTrans::getString(selected.size() > 1 ? "DeleteItems" : "DeleteItem"); +    LLNotificationsUtil::add( +        "DeleteItems", +        args, +        LLSD(), +        [this, selected](const LLSD& notification, const LLSD& response)          { -            LLInventoryModel::update_list_t update; -            LLInventoryModel::LLCategoryUpdate old_folder(inv_item->getParentUUID(), -1); -            update.push_back(old_folder); -            LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1); -            update.push_back(new_folder); -            gInventory.accountForUpdate(update); - -            LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item); -            new_item->setParent(trash_id); -            new_item->updateParentOnServer(FALSE); -            gInventory.updateItem(new_item); -        } -    } -    gInventory.notifyObservers(); +            onItemsRemovalConfirmation(notification, response, selected); +        });  } @@ -278,7 +298,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context)          std::string name = itemp->getName();          U32 flags(0); - +                  if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))              flags |= LLSettingsBase::FLAG_NOMOD;          if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) @@ -317,14 +337,14 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)          return false;      if (context == PARAMETER_EDIT) -    { -        return (selected.size() == 1) && isSettingSelected(selected.front()); +    {  +        return (selected.size() == 1) && isSettingId(selected.front());      }      else if (context == PARAMETER_COPY)      {          for (std::vector<LLUUID>::iterator it = selected.begin(); it != selected.end(); it++)          { -            if(!isSettingSelected(*it)) +            if(!isSettingId(*it))              {                  return false;              } @@ -340,7 +360,7 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)          LLClipboard::instance().pasteFromClipboard(ids);          for (std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)          { -            if (!isSettingSelected(*it)) +            if (!isSettingId(*it))              {                  return false;              } @@ -349,7 +369,7 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)      }      else if (context == PARAMETER_COPYUUID)      { -        return (selected.size() == 1) && isSettingSelected(selected.front()); +        return (selected.size() == 1) && isSettingId(selected.front());      }      return false; @@ -364,17 +384,43 @@ bool LLFloaterMyEnvironment::canApply(const std::string &context)          return false;      if (context == PARAMETER_REGION) -    { -        return LLEnvironment::instance().canAgentUpdateRegionEnvironment(); +    {  +        return isSettingId(selected.front()) && LLEnvironment::instance().canAgentUpdateRegionEnvironment();      }      else if (context == PARAMETER_PARCEL) +    {  +        return isSettingId(selected.front()) && LLEnvironment::instance().canAgentUpdateParcelEnvironment(); +    } +    else if (context == PARAMETER_LOCAL)      { -        return LLEnvironment::instance().canAgentUpdateParcelEnvironment(); +        return isSettingId(selected.front());      } -    else + +    return false; +} + +bool can_delete(const LLUUID& id) +{ +    const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); +    if (id == trash_id || gInventory.isObjectDescendentOf(id, trash_id)) +    { +        return false; +    } + +    LLViewerInventoryCategory* cat = gInventory.getCategory(id); +    if (cat)      { -        return (context == PARAMETER_LOCAL); +        if (!get_is_category_removable(&gInventory, id)) +        { +            return false; +        } +    } +    else if (!get_is_item_removable(&gInventory, id, false)) +    { +        return false;      } + +    return true;  }  //------------------------------------------------------------------------- @@ -387,7 +433,14 @@ void LLFloaterMyEnvironment::refreshButtonStates()      getChild<LLUICtrl>(BUTTON_GEAR)->setEnabled(settings_ok);      getChild<LLUICtrl>(BUTTON_NEWSETTINGS)->setEnabled(true); -    getChild<LLUICtrl>(BUTTON_DELETE)->setEnabled(settings_ok && !selected.empty()); + +    bool enable_delete = false; +    if(settings_ok && !selected.empty()) +    { +        enable_delete = can_delete(selected.front()); +    } + +    getChild<LLUICtrl>(BUTTON_DELETE)->setEnabled(enable_delete);  }  //------------------------------------------------------------------------- @@ -436,7 +489,7 @@ LLUUID LLFloaterMyEnvironment::findItemByAssetId(LLUUID asset_id, bool copyable_      return LLUUID::null;  } -bool LLFloaterMyEnvironment::isSettingSelected(LLUUID item_id) +bool LLFloaterMyEnvironment::isSettingId(const LLUUID& item_id)  {      LLInventoryItem* itemp = gInventory.getItem(item_id); diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h index 54e23c4f6e..4f1cdf6a3e 100644 --- a/indra/newview/llfloatermyenvironment.h +++ b/indra/newview/llfloatermyenvironment.h @@ -60,6 +60,7 @@ private:      void                            onFilterCheckChange();      void                            onFilterEdit(const std::string& search_string);      void                            onSelectionChange(); +    void                            onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, uuid_vec_t item_ids);      void                            onDeleteSelected();      void                            onDoCreate(const LLSD &data);      void                            onDoApply(const std::string &context); @@ -69,7 +70,7 @@ private:      void                            getSelectedIds(uuid_vec_t& ids) const;      void                            refreshButtonStates(); -    bool                            isSettingSelected(LLUUID item_id); +    static bool                     isSettingId(const LLUUID &item_id);      static LLUUID                   findItemByAssetId(LLUUID asset_id, bool copyable_only, bool ignore_library);  }; diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index b47deb838b..ffb21f34c9 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -62,11 +62,20 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;  //-----------------------------------------------------------------------------  // LLFloaterNameDesc()  //----------------------------------------------------------------------------- -LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename ) -    : LLFloater(filename), -      mIsAudio(FALSE) +LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& args) +    : LLFloater(args) +    , mIsAudio(FALSE) +    , mIsText(FALSE)  { -    mFilenameAndPath = filename.asString(); +    if (args.isString()) +    { +        mFilenameAndPath = args.asString(); +    } +    else +    { +        mFilenameAndPath = args["filename"].asString(); +        mDestinationFolderId = args["dest"].asUUID(); +    }      mFilename = gDirUtilp->getBaseFileName(mFilenameAndPath, false);  } @@ -203,7 +212,8 @@ void LLFloaterNameDesc::onBtnOK( )              LLFloaterPerms::getNextOwnerPerms("Uploads"),              LLFloaterPerms::getGroupPerms("Uploads"),              LLFloaterPerms::getEveryonePerms("Uploads"), -            expected_upload_cost)); +            expected_upload_cost, +            mDestinationFolderId));          upload_new_resource(uploadInfo, callback, nruserdata);      } @@ -230,8 +240,8 @@ void LLFloaterNameDesc::onBtnCancel()  // LLFloaterSoundPreview()  //----------------------------------------------------------------------------- -LLFloaterSoundPreview::LLFloaterSoundPreview(const LLSD& filename ) -    : LLFloaterNameDesc(filename) +LLFloaterSoundPreview::LLFloaterSoundPreview(const LLSD& args ) +    : LLFloaterNameDesc(args)  {      mIsAudio = TRUE;  } @@ -251,8 +261,8 @@ BOOL LLFloaterSoundPreview::postBuild()  // LLFloaterAnimPreview()  //----------------------------------------------------------------------------- -LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& filename ) -    : LLFloaterNameDesc(filename) +LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& args ) +    : LLFloaterNameDesc(args)  {  } @@ -270,8 +280,8 @@ BOOL LLFloaterAnimPreview::postBuild()  // LLFloaterScriptPreview()  //----------------------------------------------------------------------------- -LLFloaterScriptPreview::LLFloaterScriptPreview(const LLSD& filename ) -    : LLFloaterNameDesc(filename) +LLFloaterScriptPreview::LLFloaterScriptPreview(const LLSD& args ) +    : LLFloaterNameDesc(args)  {      mIsText = TRUE;  } diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h index 148da6912a..f2dc8cfaa7 100644 --- a/indra/newview/llfloaternamedesc.h +++ b/indra/newview/llfloaternamedesc.h @@ -39,7 +39,7 @@ class LLRadioGroup;  class LLFloaterNameDesc : public LLFloater  {  public: -    LLFloaterNameDesc(const LLSD& filename); +    LLFloaterNameDesc(const LLSD& args);      virtual ~LLFloaterNameDesc();      virtual BOOL postBuild(); @@ -58,26 +58,27 @@ protected:      std::string     mFilenameAndPath;      std::string     mFilename; +    LLUUID          mDestinationFolderId;  };  class LLFloaterSoundPreview : public LLFloaterNameDesc  {  public: -    LLFloaterSoundPreview(const LLSD& filename ); +    LLFloaterSoundPreview(const LLSD& args );      virtual BOOL postBuild();  };  class LLFloaterAnimPreview : public LLFloaterNameDesc  {  public: -    LLFloaterAnimPreview(const LLSD& filename ); +    LLFloaterAnimPreview(const LLSD& args );      virtual BOOL postBuild();  };  class LLFloaterScriptPreview : public LLFloaterNameDesc  {  public: -    LLFloaterScriptPreview(const LLSD& filename ); +    LLFloaterScriptPreview(const LLSD& args );      virtual BOOL postBuild();  }; diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp index 090b0657d1..8e102ab3b2 100644 --- a/indra/newview/llfloaterobjectweights.cpp +++ b/indra/newview/llfloaterobjectweights.cpp @@ -36,6 +36,14 @@  #include "llviewerparcelmgr.h"  #include "llviewerregion.h" +static const std::string lod_strings[4] = +{ +    "lowest_lod", +    "low_lod", +    "medium_lod", +    "high_lod", +}; +  // virtual  bool LLCrossParcelFunctor::apply(LLViewerObject* obj)  { @@ -75,7 +83,10 @@ LLFloaterObjectWeights::LLFloaterObjectWeights(const LLSD& key)      mSelectedOnLand(NULL),      mRezzedOnLand(NULL),      mRemainingCapacity(NULL), -    mTotalCapacity(NULL) +    mTotalCapacity(NULL), +    mLodLevel(nullptr), +    mTrianglesShown(nullptr), +    mPixelArea(nullptr)  {  } @@ -99,6 +110,10 @@ BOOL LLFloaterObjectWeights::postBuild()      mRemainingCapacity = getChild<LLTextBox>("remaining_capacity");      mTotalCapacity = getChild<LLTextBox>("total_capacity"); +    mLodLevel = getChild<LLTextBox>("lod_level"); +    mTrianglesShown = getChild<LLTextBox>("triangles_shown"); +    mPixelArea = getChild<LLTextBox>("pixel_area"); +      return TRUE;  } @@ -135,6 +150,69 @@ void LLFloaterObjectWeights::setErrorStatus(S32 status, const std::string& reaso      toggleWeightsLoadingIndicators(false);  } +void LLFloaterObjectWeights::draw() +{ +    // Normally it's a bad idea to set text and visibility inside draw +    // since it can cause rect updates go to different, already drawn elements, +    // but floater is very simple and these elements are supposed to be isolated +    LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); +    if (selection->isEmpty()) +    { +        const std::string text = getString("nothing_selected"); +        mLodLevel->setText(text); +        mTrianglesShown->setText(text); +        mPixelArea->setText(text); + +        toggleRenderLoadingIndicators(false); +    } +    else +    { +        S32 object_lod = -1; +        bool multiple_lods = false; +        S32 total_tris = 0; +        S32 pixel_area = 0; +        for (LLObjectSelection::valid_root_iterator iter = selection->valid_root_begin(); +            iter != selection->valid_root_end(); ++iter) +        { +            LLViewerObject* object = (*iter)->getObject(); +            S32 lod = object->getLOD(); +            if (object_lod < 0) +            { +                object_lod = lod; +            } +            else if (object_lod != lod) +            { +                multiple_lods = true; +            } + +            if (object->isRootEdit()) +            { +                total_tris += object->recursiveGetTriangleCount(); +                pixel_area += object->getPixelArea(); +            } +        } + +        if (multiple_lods) +        { +            mLodLevel->setText(getString("multiple_lods")); +            toggleRenderLoadingIndicators(false); +        } +        else if (object_lod < 0) +        { +            // nodes are waiting for data +            toggleRenderLoadingIndicators(true); +        } +        else +        { +            mLodLevel->setText(getString(lod_strings[object_lod])); +            toggleRenderLoadingIndicators(false); +        } +        mTrianglesShown->setText(llformat("%d", total_tris)); +        mPixelArea->setText(llformat("%d", pixel_area)); +    } +    LLFloater::draw(); +} +  void LLFloaterObjectWeights::updateLandImpacts(const LLParcel* parcel)  {      if (!parcel || LLSelectMgr::getInstance()->getSelection()->isEmpty()) @@ -252,6 +330,17 @@ void LLFloaterObjectWeights::toggleLandImpactsLoadingIndicators(bool visible)      mTotalCapacity->setVisible(!visible);  } +void LLFloaterObjectWeights::toggleRenderLoadingIndicators(bool visible) +{ +    childSetVisible("lod_level_loading_indicator", visible); +    childSetVisible("triangles_shown_loading_indicator", visible); +    childSetVisible("pixel_area_loading_indicator", visible); + +    mLodLevel->setVisible(!visible); +    mTrianglesShown->setVisible(!visible); +    mPixelArea->setVisible(!visible); +} +  void LLFloaterObjectWeights::updateIfNothingSelected()  {      const std::string text = getString("nothing_selected"); @@ -269,6 +358,11 @@ void LLFloaterObjectWeights::updateIfNothingSelected()      mRemainingCapacity->setText(text);      mTotalCapacity->setText(text); +    mLodLevel->setText(text); +    mTrianglesShown->setText(text); +    mPixelArea->setText(text); +      toggleWeightsLoadingIndicators(false);      toggleLandImpactsLoadingIndicators(false); +    toggleRenderLoadingIndicators(false);  } diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 10e790f5aa..5d67a12f13 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -58,21 +58,24 @@ public:      LLFloaterObjectWeights(const LLSD& key);      ~LLFloaterObjectWeights(); -    /*virtual*/ BOOL postBuild(); +     BOOL postBuild() override; -    /*virtual*/ void onOpen(const LLSD& key); +    void onOpen(const LLSD& key) override; -    /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost); -    /*virtual*/ void setErrorStatus(S32 status, const std::string& reason); +    void onWeightsUpdate(const SelectionCost& selection_cost) override; +    void setErrorStatus(S32 status, const std::string& reason) override; + +    void draw() override;      void updateLandImpacts(const LLParcel* parcel); -    void refresh(); +    void refresh() override;  private: -    /*virtual*/ void generateTransactionID(); +    void generateTransactionID() override;      void toggleWeightsLoadingIndicators(bool visible);      void toggleLandImpactsLoadingIndicators(bool visible); +    void toggleRenderLoadingIndicators(bool visible);      void updateIfNothingSelected(); @@ -88,6 +91,10 @@ private:      LLTextBox       *mRezzedOnLand;      LLTextBox       *mRemainingCapacity;      LLTextBox       *mTotalCapacity; + +    LLTextBox       *mLodLevel; +    LLTextBox       *mTrianglesShown; +    LLTextBox       *mPixelArea;  };  #endif //LL_LLFLOATEROBJECTWEIGHTS_H diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d731f1c592..481c13846a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1913,7 +1913,21 @@ void LLFloaterPreference::selectChatPanel()  void LLFloaterPreference::changed()  { -    getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0); +    if (LLConversationLog::instance().getIsLoggingEnabled()) +    { +        getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0); +    } +    else +    { +        // onClearLog clears list, then notifies changed() and only then clears file, +        // so check presence of conversations before checking file, file will cleared later. +        llstat st; +        bool has_logs = LLConversationLog::instance().getConversations().size() > 0 +                        && LLFile::stat(LLConversationLog::instance().getFileName(), &st) == 0 +                        && S_ISREG(st.st_mode) +                        && st.st_size > 0; +        getChild<LLButton>("clear_log")->setEnabled(has_logs); +    }      // set 'enable' property for 'Delete transcripts...' button      updateDeleteTranscriptsButton(); diff --git a/indra/newview/llhudeffectresetskeleton.cpp b/indra/newview/llhudeffectresetskeleton.cpp new file mode 100644 index 0000000000..aa5532f0fc --- /dev/null +++ b/indra/newview/llhudeffectresetskeleton.cpp @@ -0,0 +1,210 @@ +/** + * @file llhudeffectresetskeleton.cpp + * @brief LLHUDEffectResetSkeleton class implementation + * + * $LicenseInfo:firstyear=2024&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2024, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llhudeffectresetskeleton.h" + +#include "llagent.h" +#include "llviewerobjectlist.h" +#include "llvoavatar.h" +#include "message.h" + +// packet layout +const S32 TARGET_OBJECT = 0; // This is to allow for targetting owned animesh +const S32 RESET_ANIMATIONS = 16; //This can also be a flags if needed +const S32 PKT_SIZE = 17; + +//----------------------------------------------------------------------------- +// LLHUDEffectResetSkeleton() +//----------------------------------------------------------------------------- +LLHUDEffectResetSkeleton::LLHUDEffectResetSkeleton(const U8 type) : +    LLHUDEffect(type) +{ +} + +//----------------------------------------------------------------------------- +// ~LLHUDEffectResetSkeleton() +//----------------------------------------------------------------------------- +LLHUDEffectResetSkeleton::~LLHUDEffectResetSkeleton() +{ +} + +//----------------------------------------------------------------------------- +// packData() +//----------------------------------------------------------------------------- +void LLHUDEffectResetSkeleton::packData(LLMessageSystem *mesgsys) +{ +    // Pack the default data +    LLHUDEffect::packData(mesgsys); + +    // Pack the type-specific data.  Uses a fun packed binary format.  Whee! +    U8 packed_data[PKT_SIZE]; +    memset(packed_data, 0, PKT_SIZE); + +    // pack both target object and position +    // position interpreted as offset if target object is non-null +    if (mTargetObject) +    { +        htolememcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); +    } +    else +    { +        htolememcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); +    } + +    U8 resetAnimations = (U8)mResetAnimations; +    htolememcpy(&(packed_data[RESET_ANIMATIONS]), &resetAnimations, MVT_U8, 1); + +    mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, PKT_SIZE); +} + +//----------------------------------------------------------------------------- +// unpackData() +//----------------------------------------------------------------------------- +void LLHUDEffectResetSkeleton::unpackData(LLMessageSystem *mesgsys, S32 blocknum) +{ +    LLVector3d new_target; +    U8 packed_data[PKT_SIZE]; + + +    LLHUDEffect::unpackData(mesgsys, blocknum); + +    LLUUID source_id; +    mesgsys->getUUIDFast(_PREHASH_Effect, _PREHASH_AgentID, source_id, blocknum); + +    LLViewerObject *objp = gObjectList.findObject(source_id); +    if (objp && objp->isAvatar()) +    { +        setSourceObject(objp); +    } +    else +    { +        //LL_WARNS() << "Could not find source avatar for ResetSkeleton effect" << LL_ENDL; +        return; +    } + +    S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); +    if (size != PKT_SIZE) +    { +        LL_WARNS() << "ResetSkeleton effect with bad size " << size << LL_ENDL; +        return; +    } + +    mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); + +    LLUUID target_id; +    htolememcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); + +    // The purpose for having a target ID is if we want to reset animesh, or +    // other things in the future. +    // I implemented this, but due to issues regarding various permission +    // checks, I scrapped it for now. --Chaser Zaks +    // See https://github.com/secondlife/viewer/pull/1212 for additional info + +    if (target_id.isNull()) +    { +        target_id = source_id; +    } + +    objp = gObjectList.findObject(target_id); + +    if (objp) +    { +        setTargetObject(objp); +    } + +    U8 resetAnimations = 0; +    htolememcpy(&resetAnimations, &(packed_data[RESET_ANIMATIONS]), MVT_U8, 1); + +    // Pre-emptively assume this is going to be flags in the future. +    // It isn't needed now, but this will assure that only bit 1 is set +    mResetAnimations = resetAnimations & 1; + +    update(); +} + +//----------------------------------------------------------------------------- +// setTargetObjectAndOffset() +//----------------------------------------------------------------------------- +void LLHUDEffectResetSkeleton::setTargetObject(LLViewerObject *objp) +{ +    mTargetObject = objp; +} + + +//----------------------------------------------------------------------------- +// markDead() +//----------------------------------------------------------------------------- +void LLHUDEffectResetSkeleton::markDead() +{ +    LLHUDEffect::markDead(); +} + +void LLHUDEffectResetSkeleton::setSourceObject(LLViewerObject* objectp) +{ +    // restrict source objects to avatars +    if (objectp && objectp->isAvatar()) +    { +        LLHUDEffect::setSourceObject(objectp); +    } +} + +//----------------------------------------------------------------------------- +// update() +//----------------------------------------------------------------------------- +void LLHUDEffectResetSkeleton::update() +{ +    // If the target object is dead, set the target object to NULL +    if (mTargetObject.isNull() || mTargetObject->isDead()) +    { +        markDead(); +        return; +    } + +    if (mSourceObject.isNull() || mSourceObject->isDead()) +    { +        markDead(); +        return; +    } + +    if (mTargetObject->isAvatar()) +    { +        // Only the owner of a avatar can reset their skeleton like this +        if (mSourceObject->getID() == mTargetObject->getID()) +        { +            LLVOAvatar* avatar = mTargetObject->asAvatar(); +            avatar->resetSkeleton(mResetAnimations); +        } +    } +    else +    { +        LL_WARNS() << mSourceObject->getID() << " attempted to reset skeleton on " +                << mTargetObject->getID() << ", but it is not a avatar!" << LL_ENDL; +    } + +    markDead(); +} diff --git a/indra/newview/llhudeffectresetskeleton.h b/indra/newview/llhudeffectresetskeleton.h new file mode 100644 index 0000000000..39a6137054 --- /dev/null +++ b/indra/newview/llhudeffectresetskeleton.h @@ -0,0 +1,59 @@ +/** + * @file llhudeffectresetskeleton.h + * @brief LLHUDEffectResetSkeleton class definition + * + * $LicenseInfo:firstyear=2024&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2024, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLHUDEFFECTRESETSKELETON_H +#define LL_LLHUDEFFECTRESETSKELETON_H + +#include "llhudeffect.h" + +class LLViewerObject; +class LLVOAvatar; + + +class LLHUDEffectResetSkeleton final : public LLHUDEffect +{ +public: +    friend class LLHUDObject; + +    /*virtual*/ void markDead(); +    /*virtual*/ void setSourceObject(LLViewerObject* objectp); + +    void setTargetObject(LLViewerObject *objp); +    void setResetAnimations(bool enable){ mResetAnimations = enable; }; + +protected: +    LLHUDEffectResetSkeleton(const U8 type); +    ~LLHUDEffectResetSkeleton(); + +    /*virtual*/ void packData(LLMessageSystem *mesgsys); +    /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum); + +    void update(); +private: +    bool                        mResetAnimations; +}; + +#endif // LL_LLHUDEFFECTRESETSKELETON_H diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index e922e8230c..0547b8086c 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -36,6 +36,7 @@  #include "llhudeffecttrail.h"  #include "llhudeffectlookat.h"  #include "llhudeffectpointat.h" +#include "llhudeffectresetskeleton.h"  #include "llhudnametag.h"  #include "llvoicevisualizer.h" @@ -241,6 +242,9 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type)      case LL_HUD_EFFECT_BLOB:          hud_objectp = new LLHUDEffectBlob(type);          break; +    case LL_HUD_EFFECT_RESET_SKELETON: +        hud_objectp = new LLHUDEffectResetSkeleton(type); +        break;      default:          LL_WARNS() << "Unknown type of hud effect:" << (U32) type << LL_ENDL;      } diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 13953d2329..6dedc96776 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -96,7 +96,8 @@ public:          LL_HUD_EFFECT_POINTAT,          LL_HUD_EFFECT_VOICE_VISUALIZER, // Ventrella          LL_HUD_NAME_TAG, -        LL_HUD_EFFECT_BLOB +        LL_HUD_EFFECT_BLOB, +        LL_HUD_EFFECT_RESET_SKELETON      };  protected:      static void sortObjects(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 187dbdd3a2..80ff3c7739 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1578,6 +1578,8 @@ bool LLIMModel::logToFile(const std::string& file_name, const std::string& from,      }      else      { +        // will check KeepConversationLogTranscripts on its own +        LLConversationLog::instance().cache();          return false;      }  } diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp index add9a22f15..f4197e475a 100644 --- a/indra/newview/llinspecttexture.cpp +++ b/indra/newview/llinspecttexture.cpp @@ -115,7 +115,6 @@ public:  protected:      LLPointer<LLViewerFetchedTexture> m_Image; -    S32         mImageBoostLevel = LLGLTexture::BOOST_NONE;      std::string mLoadingText;  }; @@ -128,11 +127,7 @@ LLTexturePreviewView::LLTexturePreviewView(const LLView::Params& p)  LLTexturePreviewView::~LLTexturePreviewView()  { -    if (m_Image) -    { -        m_Image->setBoostLevel(mImageBoostLevel); -        m_Image = nullptr; -    } +    m_Image = nullptr;  }  void LLTexturePreviewView::draw() @@ -153,19 +148,19 @@ void LLTexturePreviewView::draw()          bool isLoading = (!m_Image->isFullyLoaded()) && (m_Image->getDiscardLevel() > 0);          if (isLoading)              LLFontGL::getFontSansSerif()->renderUTF8(mLoadingText, 0, llfloor(rctClient.mLeft + 3),  llfloor(rctClient.mTop - 25), LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); -        m_Image->addTextureStats((isLoading) ? MAX_IMAGE_AREA : (F32)(rctClient.getWidth() * rctClient.getHeight())); + +        m_Image->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);      }  }  void LLTexturePreviewView::setImageFromAssetId(const LLUUID& idAsset)  { -    m_Image = LLViewerTextureManager::getFetchedTexture(idAsset, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); +    m_Image = LLViewerTextureManager::getFetchedTexture(idAsset, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_THUMBNAIL);      if (m_Image)      { -        mImageBoostLevel = m_Image->getBoostLevel(); -        m_Image->setBoostLevel(LLGLTexture::BOOST_PREVIEW);          m_Image->forceToSaveRawImage(0); -        if ( (!m_Image->isFullyLoaded()) && (!m_Image->hasFetcher()) ) +        m_Image->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE); +        if ((!m_Image->isFullyLoaded()) && (!m_Image->hasFetcher()))          {              if (m_Image->isInFastCacheList())              { @@ -179,7 +174,7 @@ void LLTexturePreviewView::setImageFromAssetId(const LLUUID& idAsset)  void LLTexturePreviewView::setImageFromItemId(const LLUUID& idItem)  {      const LLViewerInventoryItem* pItem = gInventory.getItem(idItem); -    setImageFromAssetId( (pItem) ? pItem->getAssetUUID() : LLUUID::null ); +    setImageFromAssetId( (pItem) ? pItem->getAssetUUID() : LLUUID::null);  }  // ============================================================================ diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fbb4ac8801..b4a3054d07 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4263,6 +4263,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items          }          disabled_items.push_back(std::string("New Folder")); +        disabled_items.push_back(std::string("upload_options"));          disabled_items.push_back(std::string("upload_def"));          disabled_items.push_back(std::string("create_new"));      } @@ -4286,6 +4287,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items      if (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK)      {          disabled_items.push_back(std::string("New Folder")); +        disabled_items.push_back(std::string("upload_options"));          disabled_items.push_back(std::string("upload_def"));          disabled_items.push_back(std::string("create_new"));      } @@ -4351,6 +4353,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items                  }                  if (!isMarketplaceListingsFolder())                  { +                    items.push_back(std::string("upload_options"));                      items.push_back(std::string("upload_def"));                      items.push_back(std::string("create_new"));                      items.push_back(std::string("New Script")); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c8aa235506..909dea050e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -51,6 +51,7 @@  #include "lldirpicker.h"  #include "lldonotdisturbnotificationstorage.h"  #include "llfloatermarketplacelistings.h" +#include "llfloatermodelpreview.h"  #include "llfloatersidepanelcontainer.h"  #include "llfocusmgr.h"  #include "llfolderview.h" @@ -62,6 +63,7 @@  #include "llinventorymodel.h"  #include "llinventorypanel.h"  #include "lllineeditor.h" +#include "llmaterialeditor.h"  #include "llmarketplacenotifications.h"  #include "llmarketplacefunctions.h"  #include "llmenugl.h" @@ -86,6 +88,7 @@  #include "llviewermessage.h"  #include "llviewerfoldertype.h"  #include "llviewerobjectlist.h" +#include "llviewermenufile.h"  #include "llviewerregion.h"  #include "llviewerwindow.h"  #include "llvoavatarself.h" @@ -843,12 +846,6 @@ bool get_is_category_and_children_removable(LLInventoryModel* model, const LLUUI          return false;      } -    const LLUUID mp_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); -    if (mp_id.notNull() && gInventory.isObjectDescendentOf(folder_id, mp_id)) -    { -        return false; -    } -      LLInventoryModel::cat_array_t cat_array;      LLInventoryModel::item_array_t item_array;      model->collectDescendents( @@ -3191,7 +3188,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root                  for (LLInventoryModel::item_array_t::value_type& item : items)                  { -                    if (get_is_item_worn(item)) +                    if (!item->getIsLinkType() && get_is_item_worn(item))                      {                          has_worn = true;                          LLWearableType::EType type = item->getWearableType(); @@ -3211,7 +3208,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root                  }              }              LLViewerInventoryItem* item = gInventory.getItem(obj_id); -            if (item && get_is_item_worn(item)) +            if (item && !item->getIsLinkType() && get_is_item_worn(item))              {                  has_worn = true;                  LLWearableType::EType type = item->getWearableType(); @@ -3554,6 +3551,54 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root)      }  } +void LLInventoryAction::fileUploadLocation(const LLUUID& dest_id, const std::string& action) +{ +    if (action == "def_model") +    { +        gSavedPerAccountSettings.setString("ModelUploadFolder", dest_id.asString()); +    } +    else if (action == "def_texture") +    { +        gSavedPerAccountSettings.setString("TextureUploadFolder", dest_id.asString()); +    } +    else if (action == "def_sound") +    { +        gSavedPerAccountSettings.setString("SoundUploadFolder", dest_id.asString()); +    } +    else if (action == "def_animation") +    { +        gSavedPerAccountSettings.setString("AnimationUploadFolder", dest_id.asString()); +    } +    else if (action == "def_pbr_material") +    { +        gSavedPerAccountSettings.setString("PBRUploadFolder", dest_id.asString()); +    } +    else if (action == "upload_texture") +    { +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, dest_id), LLFilePicker::FFLOAD_IMAGE, false); +    } +    else if (action == "upload_sound") +    { +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, dest_id), LLFilePicker::FFLOAD_WAV, false); +    } +    else if (action == "upload_animation") +    { +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, dest_id), LLFilePicker::FFLOAD_ANIM, false); +    } +    else if (action == "upload_model") +    { +        LLFloaterModelPreview::showModelPreview(dest_id); +    } +    else if (action == "upload_pbr_material") +    { +        LLMaterialEditor::importMaterial(dest_id); +    } +    else if (action == "upload_bulk") +    { +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, dest_id), LLFilePicker::FFLOAD_ALL, true); +    } +} +  void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root)  {      S32 option = LLNotificationsUtil::getSelectedOption(notification, response); diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 5cb996ad54..f8403f890c 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -583,6 +583,7 @@ struct LLInventoryAction      static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);      static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root);      static void removeItemFromDND(LLFolderView* root); +    static void fileUploadLocation(const LLUUID& dest_id, const std::string& action);      static void saveMultipleTextures(const std::vector<std::string>& filenames, std::set<LLFolderViewItem*> selected_items, LLInventoryModel* model); diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 329c0d751a..708e6be73e 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1988,7 +1988,7 @@ void LLInventoryGallery::deleteSelection()              for (LLInventoryModel::item_array_t::value_type& item : items)              { -                if (get_is_item_worn(item)) +                if (!item->getIsLinkType() && get_is_item_worn(item))                  {                      has_worn = true;                      LLWearableType::EType type = item->getWearableType(); @@ -2009,7 +2009,7 @@ void LLInventoryGallery::deleteSelection()          }          LLViewerInventoryItem* item = gInventory.getItem(id); -        if (item && get_is_item_worn(item)) +        if (item && !item->getIsLinkType() && get_is_item_worn(item))          {              has_worn = true;              LLWearableType::EType type = item->getWearableType();             diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 4b47346473..77bdb4d1f5 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -344,22 +344,7 @@ void LLInventoryGalleryContextMenu::onRename(const LLSD& notification, const LLS  void LLInventoryGalleryContextMenu::fileUploadLocation(const LLSD& userdata)  {      const std::string param = userdata.asString(); -    if (param == "model") -    { -        gSavedPerAccountSettings.setString("ModelUploadFolder", mUUIDs.front().asString()); -    } -    else if (param == "texture") -    { -        gSavedPerAccountSettings.setString("TextureUploadFolder", mUUIDs.front().asString()); -    } -    else if (param == "sound") -    { -        gSavedPerAccountSettings.setString("SoundUploadFolder", mUUIDs.front().asString()); -    } -    else if (param == "animation") -    { -        gSavedPerAccountSettings.setString("AnimationUploadFolder", mUUIDs.front().asString()); -    } +    LLInventoryAction::fileUploadLocation(mUUIDs.front(), param);  }  bool LLInventoryGalleryContextMenu::canSetUploadLocation(const LLSD& userdata) @@ -525,6 +510,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men                  {                      items.push_back(std::string("New Folder"));                  } +                items.push_back(std::string("upload_options"));                  items.push_back(std::string("upload_def"));              } @@ -714,6 +700,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men              }              disabled_items.push_back(std::string("New Folder")); +            disabled_items.push_back(std::string("upload_options"));              disabled_items.push_back(std::string("upload_def"));          }      } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4ac43ea6b2..f1471e81c7 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1727,26 +1727,8 @@ bool LLInventoryPanel::beginIMSession()  void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)  {      const std::string param = userdata.asString(); -    if (param == "model") -    { -        gSavedPerAccountSettings.setString("ModelUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); -    } -    else if (param == "texture") -    { -        gSavedPerAccountSettings.setString("TextureUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); -    } -    else if (param == "sound") -    { -        gSavedPerAccountSettings.setString("SoundUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); -    } -    else if (param == "animation") -    { -        gSavedPerAccountSettings.setString("AnimationUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); -    } -    else if (param == "pbr_material") -    { -        gSavedPerAccountSettings.setString("PBRUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); -    } +    const LLUUID dest = LLFolderBridge::sSelf.get()->getUUID(); +    LLInventoryAction::fileUploadLocation(dest, param);  }  void LLInventoryPanel::openSingleViewInventory(LLUUID folder_id) diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index b7811dfb43..f3b2339893 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1398,7 +1398,7 @@ bool LLMaterialEditor::saveIfNeeded()          }          std::string res_desc = buildMaterialDescription(); -        createInventoryItem(buffer, mMaterialName, res_desc, local_permissions); +        createInventoryItem(buffer, mMaterialName, res_desc, local_permissions, mUploadFolder);          // We do not update floater with uploaded asset yet, so just close it.          closeFloater(); @@ -1568,12 +1568,12 @@ private:      std::string mNewName;  }; -void LLMaterialEditor::createInventoryItem(const std::string &buffer, const std::string &name, const std::string &desc, const LLPermissions& permissions) +void LLMaterialEditor::createInventoryItem(const std::string &buffer, const std::string &name, const std::string &desc, const LLPermissions& permissions, const LLUUID& upload_folder)  {      // gen a new uuid for this asset      LLTransactionID tid;      tid.generate();     // timestamp-based randomization + uniquification -    LLUUID parent = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_MATERIAL); +    LLUUID parent = upload_folder.isNull() ? gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_MATERIAL) : upload_folder;      const U8 subtype = NO_INV_SUBTYPE;  // TODO maybe use AT_SETTINGS and LLSettingsType::ST_MATERIAL ?      LLPointer<LLObjectsMaterialItemCallback> cb = new LLObjectsMaterialItemCallback(permissions, buffer, name); @@ -1887,7 +1887,11 @@ static void pack_textures(      }  } -void LLMaterialEditor::uploadMaterialFromModel(const std::string& filename, tinygltf::Model& model_in, S32 index) +void LLMaterialEditor::uploadMaterialFromModel( +    const std::string& filename, +    tinygltf::Model& model_in, +    S32 index, +    const LLUUID& dest)  {      if (index < 0 || !LLMaterialEditor::capabilitiesAvailable())      { @@ -1910,12 +1914,13 @@ void LLMaterialEditor::uploadMaterialFromModel(const std::string& filename, tiny      // This uses 'filename' to make sure multiple bulk uploads work      // instead of fighting for a single instance.      LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor", LLSD().with("filename", filename).with("index", LLSD::Integer(index))); +    me->mUploadFolder = dest;      me->loadMaterial(model_in, filename, index, false);      me->saveIfNeeded();  } -void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 index) +void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 index, const LLUUID& dest_folder)  {      LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; @@ -1961,6 +1966,7 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind      }      LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); +    me->mUploadFolder = dest_folder;      if (index >= 0)      { @@ -2411,17 +2417,15 @@ void LLMaterialEditor::onSaveObjectsMaterialAsMsgCallback(const LLSD& notificati          return;      } -    createInventoryItem(str.str(), new_name, std::string(), permissions); +    createInventoryItem(str.str(), new_name, std::string(), permissions, LLUUID::null);  } -const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type); -  void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::string &filename, S32 index, bool open_floater)  {      if (index == model_in.materials.size())      {          // bulk upload all the things -        upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL); +        upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, mUploadFolder);          return;      } @@ -2828,10 +2832,10 @@ void LLMaterialEditor::setFromGltfMetaData(const std::string& filename, const ti      }  } -void LLMaterialEditor::importMaterial() +void LLMaterialEditor::importMaterial(const LLUUID dest_folder)  {      LLFilePickerReplyThread::startPicker( -        [](const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter) +        [dest_folder](const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)              {                  if (LLAppViewer::instance()->quitRequested())                  { @@ -2839,7 +2843,7 @@ void LLMaterialEditor::importMaterial()                  }                  if (filenames.size() > 0)                  { -                    LLMaterialEditor::loadMaterialFromFile(filenames[0], -1); +                    LLMaterialEditor::loadMaterialFromFile(filenames[0], -1, dest_folder);                  }              },          LLFilePicker::FFLOAD_MATERIAL, @@ -3521,6 +3525,7 @@ void LLMaterialEditor::saveTexture(LLImageJ2C* img, const std::string& name, con          LLFloaterPerms::getGroupPerms("Uploads"),          LLFloaterPerms::getEveryonePerms("Uploads"),          expected_upload_cost, +        mUploadFolder,          false,          cb,          failed_upload)); diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index dda65476af..68b957a489 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -94,7 +94,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener      void setFromGltfMetaData(const std::string& filename, const  tinygltf::Model& model, S32 index);      // open a file dialog and select a gltf/glb file for import -    static void importMaterial(); +    static void importMaterial(const LLUUID dest_folder = LLUUID::null);      // for live preview, apply current material to currently selected object      void applyToSelection(); @@ -105,8 +105,11 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener      void loadAsset() override;      // @index if -1 and file contains more than one material,      // will promt to select specific one -    static void uploadMaterialFromModel(const std::string& filename, tinygltf::Model& model, S32 index); -    static void loadMaterialFromFile(const std::string& filename, S32 index = -1); +    static void uploadMaterialFromModel(const std::string& filename, +                                        tinygltf::Model& model, +                                        S32 index, +                                        const LLUUID& dest_folder_id = LLUUID::null); +    static void loadMaterialFromFile(const std::string& filename, S32 index = -1, const LLUUID& dest_folder = LLUUID::null);      void onSelectionChanged(); // live overrides selection changes @@ -134,8 +137,6 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener      void onClickSave(); -    void getGLTFModel(tinygltf::Model& model); -      std::string getEncodedAsset();      bool decodeAsset(const std::vector<char>& buffer); @@ -239,7 +240,7 @@ private:      static void saveObjectsMaterialAs(const LLGLTFMaterial *render_material, const LLLocalGLTFMaterial *local_material, const LLPermissions& permissions, const LLUUID& object_id /* = LLUUID::null */, const LLUUID& item /* = LLUUID::null */);      static bool updateInventoryItem(const std::string &buffer, const LLUUID &item_id, const LLUUID &task_id); -    static void createInventoryItem(const std::string &buffer, const std::string &name, const std::string &desc, const LLPermissions& permissions); +    static void createInventoryItem(const std::string &buffer, const std::string &name, const std::string &desc, const LLPermissions& permissions, const LLUUID& upload_folder);      void setFromGLTFMaterial(LLGLTFMaterial* mat);      bool setFromSelection(); @@ -249,6 +250,7 @@ private:      friend class LLMaterialFilePicker;      LLUUID mAssetID; +    LLUUID mUploadFolder;      LLTextureCtrl* mBaseColorTextureCtrl;      LLTextureCtrl* mMetallicTextureCtrl; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f6441f8404..66cad13739 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2094,7 +2094,7 @@ EMeshProcessingResult LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_  LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures,                                         bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position, -                                       const std::string & upload_url, bool do_upload, +                                       const std::string & upload_url, LLUUID destination_folder_id, bool do_upload,                                         LLHandle<LLWholeModelFeeObserver> fee_observer,                                         LLHandle<LLWholeModelUploadObserver> upload_observer)    : LLThread("mesh upload"), @@ -2102,6 +2102,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,      mDiscarded(false),      mDoUpload(do_upload),      mWholeModelUploadURL(upload_url), +    mDestinationFolderId(destination_folder_id),      mFeeObserverHandle(fee_observer),      mUploadObserverHandle(upload_observer)  { @@ -2224,8 +2225,16 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)      LLSD result;      LLSD res; -    result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); -    result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); +    if (mDestinationFolderId.isNull()) +    { +        result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); +        result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); +    } +    else +    { +        result["folder_id"] = mDestinationFolderId; +        result["texture_folder_id"] = mDestinationFolderId; +    }      result["asset_type"] = "mesh";      result["inventory_type"] = "object";      result["description"] = "(No Description)"; @@ -4338,12 +4347,12 @@ bool LLMeshRepoThread::hasHeader(const LLUUID& mesh_id)  void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,                                     bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position, -                                   std::string upload_url, bool do_upload, +                                   std::string upload_url, const LLUUID& destination_folder_id, bool do_upload,                                     LLHandle<LLWholeModelFeeObserver> fee_observer, LLHandle<LLWholeModelUploadObserver> upload_observer)  {      LLMeshUploadThread* thread = new LLMeshUploadThread(data, scale, upload_textures,                                                          upload_skin, upload_joints, lock_scale_if_joint_position, -                                                        upload_url, do_upload, fee_observer, upload_observer); +                                                        upload_url, destination_folder_id, do_upload, fee_observer, upload_observer);      mUploadWaitList.push_back(thread);  } diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index b31d726004..e77a4a6af7 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -501,10 +501,13 @@ public:      LLHost          mHost;      std::string     mWholeModelFeeCapability;      std::string     mWholeModelUploadURL; +    LLUUID          mDestinationFolderId;      LLMeshUploadThread(instance_list& data, LLVector3& scale, bool upload_textures,                         bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position, -                       const std::string & upload_url, bool do_upload = true, +                       const std::string & upload_url, +                       const LLUUID destination_folder_id = LLUUID::null, +                       bool do_upload = true,                         LLHandle<LLWholeModelFeeObserver> fee_observer = (LLHandle<LLWholeModelFeeObserver>()),                         LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>()));      ~LLMeshUploadThread(); @@ -663,7 +666,9 @@ public:      void uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,                       bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position, -                     std::string upload_url, bool do_upload = true, +                     std::string upload_url, +                     const LLUUID& destination_folder_id = LLUUID::null, +                     bool do_upload = true,                       LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()),                       LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>())); diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 736971276e..ac41558721 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2285,7 +2285,7 @@ void LLModelPreview::updateStatusMessages()          if (lod != lod_high)          { -            if (total_submeshes[lod] && total_submeshes[lod] != total_submeshes[lod_high]) +            if (total_submeshes[lod] && total_submeshes[lod] > total_submeshes[lod_high])              { //number of submeshes is different                  message = "mesh_status_submesh_mismatch";                  upload_status[lod] = 2; diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index 1b8947caee..913db0e198 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -1,24 +1,24 @@ -/** +/**    * @file llpanelgroupcreate.cpp   *   * $LicenseInfo:firstyear=2019&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2019, Linden Research, Inc. - * + *    * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - * + *    * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - * + *    * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - * + *    * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ @@ -85,6 +85,7 @@ BOOL LLPanelGroupCreate::postBuild()      mInsignia = getChild<LLTextureCtrl>("insignia", TRUE);      mInsignia->setAllowLocalTexture(FALSE); +    mInsignia->setBakeTextureEnabled(FALSE);      mInsignia->setCanApplyImmediately(FALSE);      return TRUE; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 9c6f16ee9e..73fb6012e4 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -197,6 +197,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)      {          mInsignia->setCommitCallback(onCommitAny, this);          mInsignia->setAllowLocalTexture(FALSE); +        mInsignia->setBakeTextureEnabled(FALSE);      }      mFounderName = getChild<LLTextBox>("founder_name"); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 141a1515d5..f2a469bed4 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -307,20 +307,27 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const  BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name)  {      LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); -    if(object) +    if(!object)      { -        LLViewerInventoryItem* item = NULL; -        item = (LLViewerInventoryItem*)object->getInventoryObject(mUUID); -        if(item && (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), -                                        GP_OBJECT_MANIPULATE, GOD_LIKE))) -        { -            LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); -            new_item->rename(new_name); -            object->updateInventory( -                new_item, -                TASK_INVENTORY_ITEM_KEY, -                false); -        } +        return false; +    } +    if (!object->permModify()) +    { +        LLNotificationsUtil::add("CantModifyContentInNoModTask"); +        return false; +    } + +    LLViewerInventoryItem* item = NULL; +    item = (LLViewerInventoryItem*)object->getInventoryObject(mUUID); +    if (item && (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), +        GP_OBJECT_MANIPULATE, GOD_LIKE))) +    { +        LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); +        new_item->rename(new_name); +        object->updateInventory( +            new_item, +            TASK_INVENTORY_ITEM_KEY, +            false);      }      return TRUE;  } @@ -387,10 +394,7 @@ BOOL LLTaskInvFVBridge::removeItem()              }              else              { -                LLSD payload; -                payload["task_id"] = mPanel->getTaskUUID(); -                payload["inventory_ids"].append(mUUID); -                LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); +                LLNotificationsUtil::add("CantModifyContentInNoModTask");                  return FALSE;              }          } @@ -413,15 +417,7 @@ void   LLTaskInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch      if (!object->permModify())      { -        LLSD payload; -        payload["task_id"] = mPanel->getTaskUUID(); -        for (S32 i = 0; i < (S32)batch.size(); i++) -        { -            LLTaskInvFVBridge* itemp = (LLTaskInvFVBridge*)batch[i]; -            payload["inventory_ids"].append(itemp->getUUID()); -        } -        LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); - +        LLNotificationsUtil::add("CantModifyContentInNoModTask");      }      else      { @@ -1378,7 +1374,23 @@ BOOL LLPanelObjectInventory::postBuild()  void LLPanelObjectInventory::doToSelected(const LLSD& userdata)  { -    LLInventoryAction::doToSelected(&gInventory, mFolders, userdata.asString()); +    std::string action = userdata.asString(); +    if ("rename" == action || "delete" == action) +    { +        LLViewerObject* objectp = gObjectList.findObject(mTaskUUID); +        if (objectp && !objectp->permModify()) +        { +            LLNotificationsUtil::add("CantModifyContentInNoModTask"); +        } +        else +        { +            LLInventoryAction::doToSelected(&gInventory, mFolders, action); +        } +    } +    else +    { +        LLInventoryAction::doToSelected(&gInventory, mFolders, action); +    }  }  void LLPanelObjectInventory::clearContents() diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 172c7d0828..a8734ac1e4 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -347,7 +347,10 @@ void PeopleContextMenu::eject()              avatar = (LLVOAvatar*) object;          }      } -    if (!avatar) return; + +    if (!avatar) +        return; +      LLSD payload;      payload["avatar_id"] = avatar->getID();      std::string fullname = avatar->getFullname(); diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 90cfcc6d8a..ec25a9086e 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -176,7 +176,7 @@ BOOL LLPanelPermissions::postBuild()      childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this); -    childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSaleInfo, this); +    childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSalePrice, this);      childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this);      childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this); @@ -781,7 +781,9 @@ void LLPanelPermissions::refresh()      if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))      { -        getChildView("checkbox for sale")->setEnabled(can_transfer || (!can_transfer && num_for_sale)); +        bool change_sale_allowed = can_transfer || (!can_transfer && num_for_sale); +        getChildView("checkbox for sale")->setEnabled(change_sale_allowed); +        getChildView("Edit Cost")->setEnabled(change_sale_allowed && !is_for_sale_mixed);          // Set the checkbox to tentative if the prices of each object selected          // are not the same.          getChild<LLUICtrl>("checkbox for sale")->setTentative(              is_for_sale_mixed); @@ -1223,6 +1225,16 @@ void LLPanelPermissions::onCommitSaleType(LLUICtrl*, void* data)      self->setAllSaleInfo();  } +void LLPanelPermissions::onCommitSalePrice(LLUICtrl *, void *data) +{ +    LLPanelPermissions *self = (LLPanelPermissions *) data; +    LLCheckBoxCtrl *checkPurchase = self->getChild<LLCheckBoxCtrl>("checkbox for sale"); +    if (checkPurchase && checkPurchase->get()) +    { +        self->setAllSaleInfo(); +    } +} +  void LLPanelPermissions::setAllSaleInfo()  {      LL_INFOS() << "LLPanelPermissions::setAllSaleInfo()" << LL_ENDL; diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index 790ac9920d..5bc2db9826 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -77,6 +77,7 @@ protected:      static void onCommitSaleInfo(LLUICtrl* ctrl, void* data);      static void onCommitSaleType(LLUICtrl* ctrl, void* data); +    static void onCommitSalePrice(LLUICtrl *ctrl, void *data);      void setAllSaleInfo();      static void onCommitClickAction(LLUICtrl* ctrl, void*); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 0f0af37485..4c78f7e3f5 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -974,7 +974,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)      setDescriptionText(avatar_data->about_text); -    mSecondLifePic->setValue(avatar_data->image_id); +        mSecondLifePic->setValue(avatar_data->image_id);      if (getSelfProfile())      { @@ -1122,10 +1122,10 @@ void LLPanelProfileSecondLife::fillAgeData(const LLAvatarData* avatar_data)      }      else      { -        std::string register_date = getString("age_format"); -        LLSD args_age; +    std::string register_date = getString("age_format"); +    LLSD args_age;          args_age["[AGE]"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now()); -        LLStringUtil::format(register_date, args_age); +    LLStringUtil::format(register_date, args_age);          userAgeCtrl->setValue(register_date);      } @@ -1568,12 +1568,12 @@ void LLPanelProfileSecondLife::onShowInSearchCallback()      if (value == mAllowPublish)          return; -    mAllowPublish = value; +        mAllowPublish = value;      saveAgentUserInfoCoro("allow_publish", value); -} +    }  void LLPanelProfileSecondLife::onHideAgeCallback() -{ +    {      bool value = mHideAgeCombo->getValue().asInteger();      if (value == mHideAge)          return; @@ -1722,35 +1722,35 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id)      if (mSecondLifePic->getImageAssetId() == id)          return; -    std::function<void(bool)> callback = [id](bool result) -    { -        if (result) +        std::function<void(bool)> callback = [id](bool result)          { -            LLAvatarIconIDCache::getInstance()->add(gAgentID, id); +            if (result) +            { +                LLAvatarIconIDCache::getInstance()->add(gAgentID, id);              // Should trigger callbacks in icon controls (or request Legacy) -            LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID); -        } -    }; +                LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID); +            } +        };      if (!saveAgentUserInfoCoro("sl_image_id", id, callback))          return;      mSecondLifePic->setValue(id); -    LLFloater *floater = mFloaterProfileTextureHandle.get(); -    if (floater) -    { -        LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater); -        if (id == LLUUID::null) -        { -            texture_view->resetAsset(); -        } -        else +        LLFloater *floater = mFloaterProfileTextureHandle.get(); +        if (floater)          { +            LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater); +        if (id == LLUUID::null) +            { +                texture_view->resetAsset(); +            } +            else +            {              texture_view->loadAsset(id); +            }          }      } -}  //////////////////////////////////////////////////////////////////////////  // LLPanelProfileWeb @@ -2018,7 +2018,8 @@ void LLPanelProfileFirstLife::onChangePhoto()                      onCommitPhoto(asset_id);                  }              }); -            texture_floaterp->setLocalTextureEnabled(FALSE); +            texture_floaterp->setLocalTextureEnabled(false); +            texture_floaterp->setBakeTextureEnabled(false);              texture_floaterp->setCanApply(false, true, false);              parent_floater->addDependentFloater(mFloaterTexturePickerHandle); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 885f4d993e..cbc52aeec6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -250,6 +250,23 @@ LLSelectMgr::LLSelectMgr()      mForceSelection = FALSE;      mShowSelection = FALSE; + +    LLControlVariable* ctrl = gSavedSettings.getControl("DebugSelectionLODs").get(); +    if (ctrl) +    { +        mSlectionLodModChangedConnection = ctrl->getSignal()->connect([this](LLControlVariable*, const LLSD&, const LLSD&) +        { +            for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); +                iter != mSelectedObjects->end(); ++iter) +            { +                LLViewerObject* object = (*iter)->getObject(); +                if (object) +                { +                    object->updateLOD(); +                } +            } +        }); +    }  } @@ -259,6 +276,7 @@ LLSelectMgr::LLSelectMgr()  LLSelectMgr::~LLSelectMgr()  {      clearSelections(); +    mSlectionLodModChangedConnection.disconnect();  }  void LLSelectMgr::clearSelections() diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 1ce53fe149..e3ecdf1013 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -932,6 +932,7 @@ private:      BOOL                    mForceSelection;      std::vector<LLAnimPauseRequest> mPauseRequests; +    boost::signals2::connection mSlectionLodModChangedConnection;  };  // *DEPRECATED: For callbacks or observers, use diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 4506088fd3..c278f9ae65 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -56,6 +56,8 @@  #include "llviewerregion.h" +const char* const DEFAULT_DESC = "(No Description)"; +  class PropertiesChangedCallback : public LLInventoryCallback  {  public: @@ -128,6 +130,7 @@ LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p)      , mUpdatePendingId(-1)      , mIsDirty(false) /*Not ready*/      , mParentFloater(NULL) +    , mLabelItemDesc(NULL)  {      gInventory.addObserver(this);      gIdleCallbacks.addFunction(&LLSidepanelItemInfo::onIdle, (void*)this); @@ -158,10 +161,11 @@ BOOL LLSidepanelItemInfo::postBuild()      mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon");      mLabelOwnerName = getChild<LLTextBox>("LabelOwnerName");      mLabelCreatorName = getChild<LLTextBox>("LabelCreatorName"); +    mLabelItemDesc = getChild<LLTextEditor>("LabelItemDesc");      getChild<LLLineEditor>("LabelItemName")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);      getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this)); -    getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this)); +    mLabelItemDesc->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));      // Thumnail edition      mChangeThumbnailBtn->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onEditThumbnail, this));      // acquired date @@ -342,10 +346,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)      getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards      getChild<LLUICtrl>("LabelItemName")->setValue(item->getName());      getChildView("LabelItemDescTitle")->setEnabled(TRUE); -    getChildView("LabelItemDesc")->setEnabled(is_modifiable); -    getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription());      getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID()); +    // Asset upload substitutes empty description with a (No Description) placeholder +    std::string desc = item->getDescription(); +    mLabelItemDesc->setSelectAllOnFocusReceived(desc == DEFAULT_DESC); +    mLabelItemDesc->setValue(desc); +    mLabelItemDesc->setEnabled(is_modifiable); +      LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);      mItemTypeIcon->setImage(icon_img); @@ -927,17 +935,22 @@ void LLSidepanelItemInfo::onCommitDescription()      LLViewerInventoryItem* item = findItem();      if(!item) return; -    LLTextEditor* labelItemDesc = getChild<LLTextEditor>("LabelItemDesc"); -    if(!labelItemDesc) +    if(!mLabelItemDesc) +    { +        return; +    } +    if (!gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE))      {          return;      } -    if((item->getDescription() != labelItemDesc->getText()) && -       (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE))) +    std::string old_desc = item->getDescription(); +    std::string new_desc = mLabelItemDesc->getText(); +    if(old_desc != new_desc)      { +        mLabelItemDesc->setSelectAllOnFocusReceived(false);          LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); -        new_item->setDescription(labelItemDesc->getText()); +        new_item->setDescription(new_desc);          onCommitChanges(new_item);      }  } diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 45709b82f3..3868b75af9 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -46,6 +46,7 @@ class LLObjectInventoryObserver;  class LLViewerObject;  class LLPermissions;  class LLTextBox; +class LLTextEditor;  class LLSidepanelItemInfo : public LLPanel, public LLInventoryObserver  { @@ -105,6 +106,7 @@ private:      LLIconCtrl* mItemTypeIcon;      LLTextBox* mLabelOwnerName;      LLTextBox* mLabelCreatorName; +    LLTextEditor* mLabelItemDesc;      //      // UI Elements diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index 438b04ff39..f71e861f17 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -110,8 +110,8 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin          // needed for handling of any legacy bad data.          if (!avatar->getJoint(skin->mJointNames[j]))          { -            LL_DEBUGS("Avatar") << avatar->getFullname() << " mesh rigged to invalid joint " << skin->mJointNames[j] << LL_ENDL; -            LL_WARNS_ONCE("Avatar") << avatar->getFullname() << " mesh rigged to invalid joint" << skin->mJointNames[j] << LL_ENDL; +            LL_DEBUGS("Avatar") << avatar->getDebugName() << " mesh rigged to invalid joint " << skin->mJointNames[j] << LL_ENDL; +            LL_WARNS_ONCE("Avatar") << avatar->getDebugName() << " mesh rigged to invalid joint" << skin->mJointNames[j] << LL_ENDL;              skin->mJointNames[j] = "mPelvis";              skin->mJointNumsInitialized = false; // force update after names change.          } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index ef0f58ff7a..1310826d06 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1028,7 +1028,7 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name)              tid, LLAssetType::AT_TEXTURE, res_name, res_desc, 0,              folder_type, inv_type,              PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), -            expected_upload_cost, !outfit_snapshot)); +            expected_upload_cost, LLUUID::null, !outfit_snapshot));          upload_new_resource(assetUploadInfo); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 77c28bd3f4..110aa61999 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2509,12 +2509,13 @@ LLTextureFetch::~LLTextureFetch()  }  S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, -                                   S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) +                                   S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http, S32& worker_discard)  {      LL_PROFILE_ZONE_SCOPED; +    worker_discard = -1;      if (mDebugPause)      { -        return -1; +        return FETCH_REQUEST_CREATION_FAILED;      }      if (f_type == FTT_SERVER_BAKE) @@ -2530,7 +2531,7 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L                                << host << " != " << worker->mHost << LL_ENDL;              removeRequest(worker, true);              worker = NULL; -            return -1; +            return FETCH_REQUEST_ABORTED;          }      } @@ -2583,13 +2584,14 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L      {          if (worker->wasAborted())          { -            return -1; // need to wait for previous aborted request to complete +            return FETCH_REQUEST_ABORTED; // need to wait for previous aborted request to complete          } +        worker_discard = desired_discard;          worker->lockWorkMutex();                                        // +Mw          if (worker->mState == LLTextureFetchWorker::DONE && worker->mDesiredSize == llmax(desired_size, TEXTURE_CACHE_ENTRY_SIZE) && worker->mDesiredDiscard == desired_discard) {              worker->unlockWorkMutex();                                  // -Mw -            return -1; // similar request has failed or is in a transitional state +            return FETCH_REQUEST_EXISTS; // similar request has failed or is in a transitional state          }          worker->mActiveCount++;          worker->mNeedsAux = needs_aux; @@ -2623,11 +2625,12 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L          worker->mNeedsAux = needs_aux;          worker->setCanUseHTTP(can_use_http) ;          worker->unlockWorkMutex();                                      // -Mw +        worker_discard = desired_discard;      }      LL_DEBUGS(LOG_TXT) << "REQUESTED: " << id << " f_type " << fttype_to_string(f_type)                         << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL; -    return desired_discard; +    return FETCH_REQUEST_OK;  }  // Threads:  T*  // diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index b72ecc2a65..a2e038704d 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -76,9 +76,14 @@ public:      // Threads:  Tmain      void shutDownImageDecodeThread(); +    static constexpr S32 FETCH_REQUEST_OK = 0; +    static constexpr S32 FETCH_REQUEST_CREATION_FAILED = -1; +    static constexpr S32 FETCH_REQUEST_ABORTED = -2; +    static constexpr S32 FETCH_REQUEST_EXISTS = -3;      // Threads:  T* (but Tmain mostly) +    // returns discard on success, fail code otherwise      S32 createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, -                       S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http); +                      S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http, S32& worker_disacrd);      // Requests that a fetch operation be deleted from the queue.      // If @cancel is true, also stops any I/O operations pending. diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp index 8291b0b061..a151463f86 100644 --- a/indra/newview/llthumbnailctrl.cpp +++ b/indra/newview/llthumbnailctrl.cpp @@ -111,7 +111,9 @@ void LLThumbnailCtrl::draw()          gl_draw_scaled_image( draw_rect.mLeft, draw_rect.mBottom, draw_rect.getWidth(), draw_rect.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha); -        mTexturep->setKnownDrawSize(draw_rect.getWidth(), draw_rect.getHeight()); +        // Thumbnails are usually 256x256 or smaller, either report that or +        // some high value to get image with higher priority +        mTexturep->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);      }      else if( mImagep.notNull() )      { @@ -238,12 +240,8 @@ void LLThumbnailCtrl::initImage()          {              // Should it support baked textures?              mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_THUMBNAIL); -              mTexturep->forceToSaveRawImage(0); - -            S32 desired_draw_width = MAX_IMAGE_SIZE; -            S32 desired_draw_height = MAX_IMAGE_SIZE; -            mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height); +            mTexturep->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);          }      }      else if (tvalue.isString()) diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 2e00b2c382..217bb8d7ef 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -421,7 +421,7 @@ void LLToast::setVisible(BOOL show)          if(mHideBtn)              mHideBtn->setVisible(show);      } -    LLFloater::setVisible(show); +    LLModalDialog::setVisible(show);      if (mPanel          && !mPanel->isDead()          && mWrapperPanel diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 078db565f5..daf635cc57 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -62,7 +62,8 @@ LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId,          LLAssetType::EType assetType, std::string name, std::string description,          S32 compressionInfo, LLFolderType::EType destinationType,          LLInventoryType::EType inventoryType, U32 nextOWnerPerms, -        U32 groupPerms, U32 everyonePerms, S32 expectedCost, bool showInventory) : +        U32 groupPerms, U32 everyonePerms, S32 expectedCost, +        const LLUUID& destFolderId, bool showInventory) :      mTransactionId(transactId),      mAssetType(assetType),      mName(name), @@ -75,7 +76,7 @@ LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId,      mEveryonePerms(everyonePerms),      mExpectedUploadCost(expectedCost),      mShowInventory(showInventory), -    mFolderId(LLUUID::null), +    mFolderId(destFolderId),      mItemId(LLUUID::null),      mAssetId(LLAssetID::null)  { } @@ -84,7 +85,8 @@ LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId,  LLResourceUploadInfo::LLResourceUploadInfo(std::string name,          std::string description, S32 compressionInfo,          LLFolderType::EType destinationType, LLInventoryType::EType inventoryType, -        U32 nextOWnerPerms, U32 groupPerms, U32 everyonePerms, S32 expectedCost, bool showInventory) : +        U32 nextOWnerPerms, U32 groupPerms, U32 everyonePerms, S32 expectedCost, +        const LLUUID& destFolderId, bool showInventory) :      mName(name),      mDescription(description),      mCompressionInfo(compressionInfo), @@ -97,7 +99,7 @@ LLResourceUploadInfo::LLResourceUploadInfo(std::string name,      mShowInventory(showInventory),      mTransactionId(),      mAssetType(LLAssetType::AT_NONE), -    mFolderId(LLUUID::null), +    mFolderId(destFolderId),      mItemId(LLUUID::null),      mAssetId(LLAssetID::null)  { @@ -299,9 +301,12 @@ void LLResourceUploadInfo::assignDefaults()          mDescription = "(No Description)";      } -    mFolderId = gInventory.findUserDefinedCategoryUUIDForType( -        (mDestinationFolderType == LLFolderType::FT_NONE) ? -        (LLFolderType::EType)mAssetType : mDestinationFolderType); +    if (mFolderId.isNull()) +    { +        mFolderId = gInventory.findUserDefinedCategoryUUIDForType( +            (mDestinationFolderType == LLFolderType::FT_NONE) ? +            (LLFolderType::EType)mAssetType : mDestinationFolderType); +    }  }  std::string LLResourceUploadInfo::getDisplayName() const @@ -358,10 +363,12 @@ LLNewFileResourceUploadInfo::LLNewFileResourceUploadInfo(      U32 groupPerms,      U32 everyonePerms,      S32 expectedCost, +    const LLUUID& destFolderId,      bool show_inventory) :      LLResourceUploadInfo(name, description, compressionInfo,      destinationType, inventoryType, -    nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory), +    nextOWnerPerms, groupPerms, everyonePerms, expectedCost, +    destFolderId, show_inventory),      mFileName(fileName)  {  } @@ -566,12 +573,13 @@ LLNewBufferedResourceUploadInfo::LLNewBufferedResourceUploadInfo(      U32 groupPerms,      U32 everyonePerms,      S32 expectedCost, +    const LLUUID& destFolderId,      bool show_inventory,      uploadFinish_f finish,      uploadFailure_f failure)      : LLResourceUploadInfo(name, description, compressionInfo,          destinationType, inventoryType, -        nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory) +        nextOWnerPerms, groupPerms, everyonePerms, expectedCost, destFolderId, show_inventory)      , mBuffer(buffer)      , mFinishFn(finish)      , mFailureFn(failure) diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index 5a07fbf802..dbe2c7e7ea 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -54,6 +54,7 @@ public:          U32 groupPerms,          U32 everyonePerms,          S32 expectedCost, +        const LLUUID &destFolderId = LLUUID::null,          bool showInventory = true);      virtual ~LLResourceUploadInfo() @@ -104,6 +105,7 @@ protected:          U32 groupPerms,          U32 everyonePerms,          S32 expectedCost, +        const LLUUID& destFolderId = LLUUID::null,          bool showInventory = true);      LLResourceUploadInfo( @@ -155,6 +157,7 @@ public:          U32 groupPerms,          U32 everyonePerms,          S32 expectedCost, +        const LLUUID &destFolderId = LLUUID::null,          bool show_inventory = true);      virtual LLSD        prepareUpload(); @@ -191,6 +194,7 @@ public:          U32 groupPerms,          U32 everyonePerms,          S32 expectedCost, +        const LLUUID& destFolderId, // use null for default          bool show_inventory,          uploadFinish_f finish,          uploadFailure_f failure); @@ -217,6 +221,7 @@ public:      typedef std::function<void(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response)> taskUploadFinish_f;      typedef std::function<bool(LLUUID itemId, LLUUID taskId, LLSD response, std::string reason)> uploadFailed_f; +    // destFolderId is the folder to put the new item in, leave null for default      LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType::EType assetType, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed);      LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LLImageFormatted> image, invnUploadFinish_f finish);      LLBufferedAssetUploadInfo(LLUUID taskId, LLUUID itemId, LLAssetType::EType assetType, std::string buffer, taskUploadFinish_f finish, uploadFailed_f failed); diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 3a3f0b3d95..e5a8226720 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -413,10 +413,10 @@ void LLViewerJoystick::init(bool autoenable)                  {                      LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;                      // Failed to gather devices, init first suitable one -                    mLastDeviceUUID = LLSD(); -                    void *preffered_device = NULL; -                    initDevice(preffered_device); -                } +                mLastDeviceUUID = LLSD(); +                void *preffered_device = NULL; +                initDevice(preffered_device); +            }              }              if (mDriverState == JDS_INITIALIZING) @@ -510,10 +510,10 @@ void LLViewerJoystick::initDevice(LLSD &guid)          {              LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;              // Failed to gather devices from window, init first suitable one -            void *preffered_device = NULL; -            mLastDeviceUUID = LLSD(); -            initDevice(preffered_device); -        } +        void *preffered_device = NULL; +        mLastDeviceUUID = LLSD(); +        initDevice(preffered_device); +    }      }      if (mDriverState == JDS_INITIALIZING) @@ -881,6 +881,10 @@ void LLViewerJoystick::moveObjects(bool reset)          {              gAgent.clearAFK();          } +        else +        { +            gAwayTriggerTimer.reset(); +        }          if (sDelta[0] || sDelta[1] || sDelta[2])          { @@ -1055,6 +1059,10 @@ void LLViewerJoystick::moveAvatar(bool reset)          {              gAgent.clearAFK();          } +        else +        { +            gAwayTriggerTimer.reset(); +        }          setCameraNeedsUpdate(true);      } @@ -1267,9 +1275,16 @@ void LLViewerJoystick::moveFlycam(bool reset)      }      // Clear AFK state if moved beyond the deadzone -    if (!is_zero && gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME) +    if (!is_zero)      { -        gAgent.clearAFK(); +        if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME) +        { +            gAgent.clearAFK(); +        } +        else +        { +            gAwayTriggerTimer.reset(); +        }      }      sFlycamPosition += LLVector3(sDelta) * sFlycamRotation; @@ -1331,6 +1346,10 @@ bool LLViewerJoystick::toggleFlycam()      {          gAgent.clearAFK();      } +    else +    { +        gAwayTriggerTimer.reset(); +    }      mOverrideCamera = !mOverrideCamera;      if (mOverrideCamera) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f7f8db6841..39cd72c6b2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -84,6 +84,7 @@  #include "lltoolface.h"  #include "llhints.h"  #include "llhudeffecttrail.h" +#include "llhudeffectresetskeleton.h"  #include "llhudmanager.h"  #include "llimview.h"  #include "llinventorybridge.h" @@ -1732,7 +1733,6 @@ class LLAdvancedAppearanceToXML : public view_listener_t  {      bool handleEvent(const LLSD& userdata)      { -        std::string emptyname;          LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();          LLVOAvatar *avatar = NULL;          if (obj) @@ -1759,7 +1759,7 @@ class LLAdvancedAppearanceToXML : public view_listener_t          }          if (avatar)          { -            avatar->dumpArchetypeXML(emptyname); +            avatar->dumpArchetypeXML(LLStringUtil::null);          }          return true;      } @@ -5510,6 +5510,38 @@ class LLToolsEnablePathfindingRebakeRegion : public view_listener_t      }  }; +class LLToolsCheckSelectionLODMode : public view_listener_t +{ +    bool handleEvent(const LLSD& userdata) +    { +        std::string param = userdata.asString(); +        static LLCachedControl<S32> debug_selection_lods(gSavedSettings, "DebugSelectionLODs", 0); +        if ("default" == param) +        { +            return debug_selection_lods() < 0; +        } +        else if ("high" == param) +        { +            return debug_selection_lods() == 3; +        } +        else if ("medium" == param) +        { +            return debug_selection_lods() == 2; +        } +        else if ("low" == param) +        { +            return debug_selection_lods() == 1; +        } +        else if ("lowest" == param) +        { +            return debug_selection_lods() == 0; +        } + +        return false; +    } +}; + +  // Round the position of all root objects to the grid  class LLToolsSnapObjectXY : public view_listener_t  { @@ -6531,7 +6563,17 @@ class LLAvatarResetSkeleton: public view_listener_t          }          if(avatar)          { -            avatar->resetSkeleton(false); +            if(avatar->getID() == gAgentID) +            { +                LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true); +                effectp->setSourceObject(gAgentAvatarp); +                effectp->setTargetObject((LLViewerObject*)avatar); +                effectp->setResetAnimations(false); +            } +            else +            { +                avatar->resetSkeleton(false); +            }          }          return true;      } @@ -6558,7 +6600,17 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t          LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());          if (avatar)          { -            avatar->resetSkeleton(true); +            if(avatar->getID() == gAgentID) +            { +                LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true); +                effectp->setSourceObject(gAgentAvatarp); +                effectp->setTargetObject((LLViewerObject*)avatar); +                effectp->setResetAnimations(true); +            } +            else +            { +                avatar->resetSkeleton(true); +            }          }          return true;      } @@ -6571,11 +6623,24 @@ class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t          LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());          if (avatar)          { -            avatar->resetSkeleton(true); +            if(avatar->getID() == gAgentID) +            { +                LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true); +                effectp->setSourceObject(gAgentAvatarp); +                effectp->setTargetObject((LLViewerObject*)avatar); +                effectp->setResetAnimations(true); +            } +            else +            { +                avatar->resetSkeleton(true); +            }          }          else          { -            gAgentAvatarp->resetSkeleton(true); +            LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true); +            effectp->setSourceObject(gAgentAvatarp); +            effectp->setTargetObject(gAgentAvatarp); +            effectp->setResetAnimations(true);          }          return true;      } @@ -7367,21 +7432,21 @@ class LLAttachmentDetach : public view_listener_t                  }                  LLViewerObject* parent = (LLViewerObject*)objectp->getParent(); -                while (parent) -                { -                    if (parent->isAvatar()) -                    { -                        break; -                    } +        while (parent) +        { +            if(parent->isAvatar()) +            { +                break; +            }                      objectp = parent; -                    parent = (LLViewerObject*)parent->getParent(); -                } +            parent = (LLViewerObject*)parent->getParent(); +        }                  // std::set to avoid dupplicate 'roots' from linksets                  mRemoveSet.insert(objectp->getAttachmentItemID()); -                return true; -            } +            return true; +        }              bool mAvatarsInSelection;              uuid_set_t mRemoveSet;          } func; @@ -8286,6 +8351,36 @@ class LLToolsSelectBySurrounding : public view_listener_t      }  }; +class LLToolsSelectionLODMode : public view_listener_t +{ +    bool handleEvent(const LLSD& userdata) +    { +        std::string param = userdata.asString(); +        if ("default" == param) +        { +            gSavedSettings.setS32("DebugSelectionLODs", -1); +        } +        else if ("high" == param) +        { +            gSavedSettings.setS32("DebugSelectionLODs", 3); +        } +        else if ("medium" == param) +        { +            gSavedSettings.setS32("DebugSelectionLODs", 2); +        } +        else if ("low" == param) +        { +            gSavedSettings.setS32("DebugSelectionLODs", 1); +        } +        else if ("lowest" == param) +        { +            gSavedSettings.setS32("DebugSelectionLODs", 0); +        } + +        return true; +    } +}; +  class LLToolsShowHiddenSelection : public view_listener_t  {      bool handleEvent(const LLSD& userdata) @@ -9530,6 +9625,7 @@ void initialize_menus()      view_listener_t::addMenu(new LLToolsSelectInvisibleObjects(), "Tools.SelectInvisibleObjects");      view_listener_t::addMenu(new LLToolsSelectReflectionProbes(), "Tools.SelectReflectionProbes");      view_listener_t::addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); +    view_listener_t::addMenu(new LLToolsSelectionLODMode(), "Tools.SelectionLODMode");      view_listener_t::addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection");      view_listener_t::addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius");      view_listener_t::addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts"); @@ -9561,6 +9657,7 @@ void initialize_menus()      view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView");      view_listener_t::addMenu(new LLToolsDoPathfindingRebakeRegion(), "Tools.DoPathfindingRebakeRegion");      view_listener_t::addMenu(new LLToolsEnablePathfindingRebakeRegion(), "Tools.EnablePathfindingRebakeRegion"); +    view_listener_t::addMenu(new LLToolsCheckSelectionLODMode(), "Tools.ToolsCheckSelectionLODMode");      // Help menu      // most items use the ShowFloater method diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 2fd75498d2..c312cadafe 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -478,13 +478,19 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad      return true;  } -const void upload_single_file(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type) +void upload_single_file( +    const std::vector<std::string>& filenames, +    LLFilePicker::ELoadFilter type, +    const LLUUID& dest)  {      std::string filename = filenames[0];      if (!check_file_extension(filename, type)) return;      if (!filename.empty())      { +        LLSD args; +        args["filename"] = filename; +        args["dest"] = dest;          if (type == LLFilePicker::FFLOAD_WAV)          {              // pre-qualify wavs to make sure the format is acceptable @@ -499,12 +505,12 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP              }              else              { -                LLFloaterReg::showInstance("upload_sound", LLSD(filename)); +                LLFloaterReg::showInstance("upload_sound", args);              }          }          if (type == LLFilePicker::FFLOAD_IMAGE)          { -            LLFloaterReg::showInstance("upload_image", LLSD(filename)); +            LLFloaterReg::showInstance("upload_image", args);          }          if (type == LLFilePicker::FFLOAD_ANIM)          { @@ -512,18 +518,22 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP              LLStringUtil::toLower(filename_lc);              if (filename_lc.rfind(".anim") != std::string::npos)              { -                LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename)); +                LLFloaterReg::showInstance("upload_anim_anim", args);              }              else              { -                LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename)); +                LLFloaterReg::showInstance("upload_anim_bvh", args);              }          }      }      return;  } -void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification, const LLSD& response) +void do_bulk_upload( +    std::vector<std::string> filenames, +    const LLSD& notification, +    const LLSD& response, +    const LLUUID& dest)  {      S32 option = LLNotificationsUtil::getSelectedOption(notification, response);      if (option != 0) @@ -558,7 +568,8 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification                  LLFloaterPerms::getNextOwnerPerms("Uploads"),                  LLFloaterPerms::getGroupPerms("Uploads"),                  LLFloaterPerms::getEveryonePerms("Uploads"), -                expected_upload_cost)); +                expected_upload_cost, +                dest));              upload_new_resource(uploadInfo);          } @@ -576,7 +587,7 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification                      // Todo:                      // 1. Decouple bulk upload from material editor                      // 2. Take into account possiblity of identical textures -                    LLMaterialEditor::uploadMaterialFromModel(filename, model, i); +                    LLMaterialEditor::uploadMaterialFromModel(filename, model, i, dest);                  }              }          } @@ -657,7 +668,10 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3      return file_count > 0;  } -const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type) +void upload_bulk( +    const std::vector<std::string>& filenames, +    LLFilePicker::ELoadFilter type, +    const LLUUID& dest)  {      // TODO:      // Check user balance for entire cost @@ -688,7 +702,7 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::          LLSD args;          args["COST"] = expected_upload_cost;          args["COUNT"] = expected_upload_count; -        LLNotificationsUtil::add("BulkUploadCostConfirmation",  args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2)); +        LLNotificationsUtil::add("BulkUploadCostConfirmation",  args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2, dest));          if (filtered_filenames.size() > expected_upload_count)          { @@ -721,7 +735,7 @@ class LLFileUploadImage : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_IMAGE, false); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_IMAGE, false);          return true;      }  }; @@ -752,7 +766,7 @@ class LLFileUploadSound : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_WAV, false); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_WAV, false);          return true;      }  }; @@ -765,7 +779,7 @@ class LLFileUploadAnim : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_ANIM, false); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_ANIM, false);          return true;      }  }; @@ -778,7 +792,7 @@ class LLFileUploadBulk : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2), LLFilePicker::FFLOAD_ALL, true); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_ALL, true);          return true;      }  }; @@ -1066,7 +1080,7 @@ LLUUID upload_new_resource(          name, desc, compression_info,          destination_folder_type, inv_type,          next_owner_perms, group_perms, everyone_perms, -        expected_upload_cost, show_inventory)); +        expected_upload_cost, LLUUID::null, show_inventory));      upload_new_resource(uploadInfo, callback, userdata);      return LLUUID::null; diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 1acb701d50..f58b7b42c1 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -72,6 +72,16 @@ void assign_defaults_and_show_upload_message(      const std::string& display_name,      std::string& description); +void upload_single_file( +    const std::vector<std::string>& filenames, +    LLFilePicker::ELoadFilter type, +    const LLUUID& dest); + +void upload_bulk( +    const std::vector<std::string>& filenames, +    LLFilePicker::ELoadFilter type, +    const LLUUID& dest); +  //consider moving all file pickers below to more suitable place  class LLFilePickerThread : public LLThread  { //multi-threaded file picker (runs system specific file picker in background and calls "notify" from main thread) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 506ffce1ce..0c0b20ff59 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1032,6 +1032,7 @@ void LLViewerFetchedTexture::init(bool firstinit)      mOrigHeight = 0;      mHasAux = FALSE;      mNeedsAux = FALSE; +    mLastWorkerDiscardLevel = -1;      mRequestedDiscardLevel = -1;      mRequestedDownloadPriority = 0.f;      mFullyLoaded = FALSE; @@ -1193,12 +1194,11 @@ void LLViewerFetchedTexture::loadFromFastCache()              if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)              { -                S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; -                S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; -                if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)) +                if (mRawImage && (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS))                  { -                    // scale oversized icon, no need to give more work to gl -                    mRawImage->scale(expected_width, expected_height); +                    // Scale oversized thumbnail +                    // thumbnails aren't supposed to go over DEFAULT_THUMBNAIL_DIMENSIONS +                    mRawImage->scale(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS);                  }              } @@ -1941,13 +1941,10 @@ bool LLViewerFetchedTexture::updateFetch()                  if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)                  { -                    S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; -                    S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; -                    if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)) +                    if (mRawImage && (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS))                      { -                        // scale oversized icon, no need to give more work to gl -                        // since we got mRawImage from thread worker and image may be in use (ex: writing cache), make a copy -                        mRawImage = mRawImage->scaled(expected_width, expected_height); +                        // Scale oversized thumbnail +                        mRawImage = mRawImage->scaled(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS);                      }                  } @@ -2088,18 +2085,26 @@ bool LLViewerFetchedTexture::updateFetch()          }          // bypass texturefetch directly by pulling from LLTextureCache -        S32 fetch_request_discard = -1; -        fetch_request_discard = LLAppViewer::getTextureFetch()->createRequest(mFTType, mUrl, getID(), getTargetHost(), decode_priority, -                                                                              w, h, c, desired_discard, needsAux(), mCanUseHTTP); - -        if (fetch_request_discard >= 0) +        S32 worker_discard = -1; +        S32 result = LLAppViewer::getTextureFetch()->createRequest(mFTType, mUrl, getID(), getTargetHost(), decode_priority, +                                                                              w, h, c, desired_discard, needsAux(), mCanUseHTTP, worker_discard); + + +        if ((result >= 0) // Worker created +            // scaled and standard images share requests, they just process the result differently +            // if mLastWorkerDiscardLevel doen't match worker, worker was requested by a different +            // image and current one needs to schedule an update +            || (result == LLTextureFetch::FETCH_REQUEST_EXISTS +                && mLastWorkerDiscardLevel != worker_discard) +            )          {              LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - request created");              mHasFetcher = TRUE;              mIsFetching = TRUE; +            mLastWorkerDiscardLevel = worker_discard;              // in some cases createRequest can modify discard, as an example              // bake textures are always at discard 0 -            mRequestedDiscardLevel = llmin(desired_discard, fetch_request_discard); +            mRequestedDiscardLevel = llmin(desired_discard, worker_discard);              mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority,                                                         mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP);          } @@ -2797,11 +2802,9 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im          }          else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)          { -            S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; -            S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; -            if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height) +            if (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)              { -                mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents()); +                mCachedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, imageraw->getComponents());                  mCachedRawImage->copyScaled(imageraw);              }              else @@ -2919,11 +2922,9 @@ void LLViewerFetchedTexture::saveRawImage()      }      else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)      { -        S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS; -        S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS; -        if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height) +        if (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)          { -            mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents()); +            mSavedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, mRawImage->getComponents());              mSavedRawImage->copyScaled(mRawImage);          }          else diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 8c44f6e6c0..e6d8c46622 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -453,6 +453,7 @@ protected:      BOOL mKnownDrawSizeChanged ;      std::string mUrl; +    S32 mLastWorkerDiscardLevel;      S32 mRequestedDiscardLevel;      F32 mRequestedDownloadPriority;      S32 mFetchState; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index af6695b521..071214715b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -66,6 +66,7 @@  #include "llchatentry.h"  #include "indra_constants.h"  #include "llassetstorage.h" +#include "lldate.h"  #include "llerrorcontrol.h"  #include "llfontgl.h"  #include "llmousehandler.h" @@ -1425,10 +1426,16 @@ void LLViewerWindow::handleMouseMove(LLWindow *window,  LLCoordGL pos, MASK mask      mWindow->showCursorFromMouseMove(); -    if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME -        && !gDisconnected) +    if (!gDisconnected)      { -        gAgent.clearAFK(); +        if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME) +        { +            gAgent.clearAFK(); +        } +        else +        { +            gAwayTriggerTimer.reset(); +        }      }  } @@ -1545,6 +1552,10 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key,  MASK mask, BOOL repeated)      {          gAgent.clearAFK();      } +    else +    { +        gAwayTriggerTimer.reset(); +    }      // *NOTE: We want to interpret KEY_RETURN later when it arrives as      // a Unicode char, not as a keydown.  Otherwise when client frame @@ -2997,7 +3008,8 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)      {          if ((focusedFloaterName == "nearby_chat") || (focusedFloaterName == "im_container") || (focusedFloaterName == "impanel"))          { -            if (gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) +            LLCachedControl<bool> key_move(gSavedSettings, "ArrowKeysAlwaysMove"); +            if (key_move())              {                  // let Control-Up and Control-Down through for chat line history,                  if (!(key == KEY_UP && mask == MASK_CONTROL) @@ -3011,10 +3023,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)                      case KEY_RIGHT:                      case KEY_UP:                      case KEY_DOWN: -                    case KEY_PAGE_UP: -                    case KEY_PAGE_DOWN: -                    case KEY_HOME: -                    case KEY_END: +                    case KEY_PAGE_UP: //jump +                    case KEY_PAGE_DOWN: // down +                    case KEY_HOME: // toggle fly                          // when chatbar is empty or ArrowKeysAlwaysMove set,                          // pass arrow keys on to avatar...                          return FALSE; @@ -4775,22 +4786,19 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save      }      // Look for an unused file name -    BOOL is_snapshot_name_loc_set = isSnapshotLocSet(); +    auto is_snapshot_name_loc_set = isSnapshotLocSet();      std::string filepath; -    S32 i = 1; -    S32 err = 0; -    std::string extension("." + image->getExtension()); +    auto i = 1; +    auto err = 0; +    auto extension("." + image->getExtension()); +    auto now = LLDate::now();      do      {          filepath = sSnapshotDir;          filepath += gDirUtilp->getDirDelimiter();          filepath += sSnapshotBaseName; - -        if (is_snapshot_name_loc_set) -        { -            filepath += llformat("_%.3d",i); -        } - +        filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S"); +        filepath += llformat("%.2d", i);          filepath += extension;          llstat stat_info; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a430ae63d1..8c560b0198 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -574,7 +574,7 @@ private:      // joint states to be animated      //-------------------------------------------------------------------------      LLPointer<LLJointState> mPelvisState; -    LLCharacter*        mCharacter; +    LLCharacter* mCharacter;  };  /** @@ -677,15 +677,15 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,      mVisuallyMuteSetting(AV_RENDER_NORMALLY),      mMutedAVColor(LLColor4::white /* used for "uninitialize" */),      mFirstFullyVisible(TRUE), -    mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY),      mFullyLoaded(FALSE),      mPreviousFullyLoaded(FALSE),      mFullyLoadedInitialized(FALSE), +    mFullyLoadedFrameCounter(0),      mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),      mLoadedCallbacksPaused(FALSE),      mLoadedCallbackTextures(0),      mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)), -    mLastRezzedStatus(-1), +    mLastRezzedStatus(AV_REZZED_UNKNOWN),      mIsEditingAppearance(FALSE),      mUseLocalAppearance(FALSE),      mLastUpdateRequestCOFVersion(-1), @@ -772,11 +772,9 @@ std::string LLVOAvatar::avString() const      {          return getFullname();      } -    else -    { -        std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus()); -        return " Avatar '" + getFullname() + "' " + viz_string + " "; -    } + +    std::string status = LLVOAvatar::rezStatusToString(getRezzedStatus()); +    return " Avatar '" + getDebugName() + "' " + status + " ";  }  void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment) @@ -799,10 +797,10 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c      if (gSavedSettings.getBOOL("DebugAvatarRezTime"))      {          LLSD args; -        args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); -        args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); +        args["EXISTENCE"] = llformat("%d", (U32)mDebugExistenceTimer.getElapsedTimeF32()); +        args["TIME"] = llformat("%d", (U32)mRuthDebugTimer.getElapsedTimeF32());          args["NAME"] = getFullname(); -        LLNotificationsUtil::add(notification_name,args); +        LLNotificationsUtil::add(notification_name, args);      }  } @@ -813,14 +811,14 @@ LLVOAvatar::~LLVOAvatar()  {      if (!mFullyLoaded)      { -        debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); +        debugAvatarRezTime("AvatarRezLeftCloudNotification", "left after ruth seconds as cloud");      }      else      { -        debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); +        debugAvatarRezTime("AvatarRezLeftNotification", "left sometime after declouding");      } -    if(mTuned) +    if (mTuned)      {          LLPerfStats::tunedAvatars--;          mTuned = false; @@ -917,14 +915,34 @@ BOOL LLVOAvatar::hasGray() const      return !getIsCloud() && !isFullyTextured();  } -S32 LLVOAvatar::getRezzedStatus() const +ERezzedStatus LLVOAvatar::getRezzedStatus() const  { -    if (getIsCloud()) return 0; -    bool textured = isFullyTextured(); -    if (textured && allBakedTexturesCompletelyDownloaded()) return 3; -    if (textured) return 2; -    llassert(hasGray()); -    return 1; // gray +    if (getIsCloud()) +        return AV_REZZED_CLOUD; +    if (!isFullyTextured()) +        return AV_REZZED_GRAY; +    if (!allBakedTexturesCompletelyDownloaded()) +        return AV_REZZED_TEXTURED; // "downloading" +    return AV_REZZED_FULL; +} + +// static +std::string LLVOAvatar::rezStatusToString(ERezzedStatus rez_status) +{ +    switch (rez_status) +    { +    case AV_REZZED_CLOUD: +        return "cloud"; +    case AV_REZZED_GRAY: +        return "gray"; +    case AV_REZZED_TEXTURED: +        return "downloading"; +    case AV_REZZED_FULL: +        return "full"; +    default: +        ; +    } +    return "unknown";  }  void LLVOAvatar::deleteLayerSetCaches(bool clearAll) @@ -953,15 +971,10 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)  {      BOOL res = TRUE;      grey_avatars = 0; -    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); -         iter != LLCharacter::sInstances.end(); ++iter) +    for (LLCharacter* character : LLCharacter::sInstances)      { -        LLVOAvatar* inst = (LLVOAvatar*) *iter; -        if( inst->isDead() ) -        { -            continue; -        } -        else if( !inst->isFullyBaked() ) +        LLVOAvatar* inst = (LLVOAvatar*)character; +        if (!inst->isDead() && !inst->isFullyBaked())          {              res = FALSE;              if (inst->mHasGrey) @@ -974,33 +987,6 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)  }  // static -void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts) -{ -    counts.clear(); -    counts.resize(4); -    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); -         iter != LLCharacter::sInstances.end(); ++iter) -    { -        LLVOAvatar* inst = (LLVOAvatar*) *iter; -        if (inst) -        { -            S32 rez_status = inst->getRezzedStatus(); -            counts[rez_status]++; -        } -    } -} - -// static -std::string LLVOAvatar::rezStatusToString(S32 rez_status) -{ -    if (rez_status==0) return "cloud"; -    if (rez_status==1) return "gray"; -    if (rez_status==2) return "downloading"; -    if (rez_status==3) return "full"; -    return "unknown"; -} - -// static  void LLVOAvatar::dumpBakedStatus()  {      LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal(); @@ -2587,7 +2573,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)          mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0);      } -    LLScopedContextString str("avatar_idle_update " + getFullname()); +    LLScopedContextString str("avatar_idle_update " + getDebugName());      checkTextureLoading() ; @@ -2679,7 +2665,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)          // no need for high frequency          compl_upd_freq = 100;      } -    else if (mLastRezzedStatus <= 0) //cloud or  init +    else if (mLastRezzedStatus <= AV_REZZED_CLOUD) // cloud or initial      {          compl_upd_freq = 60;      } @@ -2687,11 +2673,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)      {          compl_upd_freq = 5;      } -    else if (mLastRezzedStatus == 1) //'grey', not fully loaded +    else if (mLastRezzedStatus == AV_REZZED_GRAY) // 'gray', not fully loaded      {          compl_upd_freq = 40;      } -    else if (isInMuteList()) //cheap, buffers value from search +    else if (isInMuteList()) // cheap, buffers value from search      {          compl_upd_freq = 100;      } @@ -2813,7 +2799,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)      LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;      if (LLVOAvatar::sJointDebug)      { -        LL_INFOS() << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL; +        LL_INFOS() << getDebugName() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL;      }      LLJoint::sNumUpdates = 0; @@ -3055,17 +3041,17 @@ F32 LLVOAvatar::calcMorphAmount()  void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)  {      // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync -    if ( voice_enabled -        && mLastRezzedStatus > 0 // no point updating lip-sync for clouds +    if (voice_enabled +        && mLastRezzedStatus > AV_REZZED_CLOUD // no point updating lip-sync for clouds          && (LLVoiceClient::getInstance()->lipSyncEnabled()) -        && LLVoiceClient::getInstance()->getIsSpeaking( mID ) ) +        && LLVoiceClient::getInstance()->getIsSpeaking(mID))      {          F32 ooh_morph_amount = 0.0f;          F32 aah_morph_amount = 0.0f;          mVoiceVisualizer->lipSyncOohAah( ooh_morph_amount, aah_morph_amount ); -        if( mOohMorph ) +        if (mOohMorph)          {              F32 ooh_weight = mOohMorph->getMinWeight()                  + ooh_morph_amount * (mOohMorph->getMaxWeight() - mOohMorph->getMinWeight()); @@ -3073,7 +3059,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)              mOohMorph->setWeight( ooh_weight);          } -        if( mAahMorph ) +        if (mAahMorph)          {              F32 aah_weight = mAahMorph->getMinWeight()                  + aah_morph_amount * (mAahMorph->getMaxWeight() - mAahMorph->getMinWeight()); @@ -4165,16 +4151,16 @@ void LLVOAvatar::computeUpdatePeriod()              // impostor camera near clip plane              mUpdatePeriod = 1;          } -        else if ( shouldImpostor(4.0) ) +        else if (shouldImpostor(4.0))          { //background avatars are REALLY slow updating impostors              mUpdatePeriod = UPDATE_RATE_SLOW;          } -        else if (mLastRezzedStatus <= 0) +        else if (mLastRezzedStatus <= AV_REZZED_CLOUD)          {              // Don't update cloud avatars too often              mUpdatePeriod = UPDATE_RATE_SLOW;          } -        else if ( shouldImpostor(3.0) ) +        else if (shouldImpostor(3.0))          { //back 25% of max visible avatars are slow updating impostors              mUpdatePeriod = UPDATE_RATE_MED;          } @@ -4614,7 +4600,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)          is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects      } -    LLScopedContextString str("updateCharacter " + getFullname() + " is_control_avatar " +    LLScopedContextString str("updateCharacter " + getDebugName() + " is_control_avatar "                                + boost::lexical_cast<std::string>(is_control_avatar)                                + " is_attachment " + boost::lexical_cast<std::string>(is_attachment)); @@ -6033,8 +6019,11 @@ void LLVOAvatar::resetAnimations()      flushAllMotions();  } -// Override selectively based on avatar sex and whether we're using new -// animations. +//----------------------------------------------------------------------------- +// remapMotionID() +// Override selectively based on avatar sex and whether we're using new animations. +//----------------------------------------------------------------------------- +// virtual  LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)  {      static LLCachedControl<bool> use_new_walk_run(gSavedSettings, "UseNewWalkRun"); @@ -6084,7 +6073,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)      }      return result; -  }  //----------------------------------------------------------------------------- @@ -6092,6 +6080,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)  // id is the asset if of the animation to start  // time_offset is the offset into the animation at which to start playing  //----------------------------------------------------------------------------- +// virtual  BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)  {      LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; @@ -6114,6 +6103,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)  //-----------------------------------------------------------------------------  // stopMotion()  //----------------------------------------------------------------------------- +// virtual  BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)  {      LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; @@ -6153,6 +6143,7 @@ void LLVOAvatar::stopMotionFromSource(const LLUUID& source_id)  //-----------------------------------------------------------------------------  // addDebugText()  //----------------------------------------------------------------------------- +// virtual  void LLVOAvatar::addDebugText(const std::string& text)  {      mDebugText.append(1, '\n'); @@ -6160,8 +6151,22 @@ void LLVOAvatar::addDebugText(const std::string& text)  }  //----------------------------------------------------------------------------- +// getDebugName() +//----------------------------------------------------------------------------- +// virtual +std::string LLVOAvatar::getDebugName() const +{ +#if LL_RELEASE_WITH_DEBUG_INFO +    return getFullname(); +#else +    return getID().asString(); +#endif // LL_RELEASE_WITH_DEBUG_INFO +} + +//-----------------------------------------------------------------------------  // getID()  //----------------------------------------------------------------------------- +// virtual  const LLUUID& LLVOAvatar::getID() const  {      return mID; @@ -6171,6 +6176,7 @@ const LLUUID& LLVOAvatar::getID() const  // getJoint()  //-----------------------------------------------------------------------------  // RN: avatar joints are multi-rooted to include screen-based attachments +// virtual  LLJoint *LLVOAvatar::getJoint( const std::string &name )  {      joint_map_t::iterator iter = mJointMap.find(name); @@ -6286,7 +6292,7 @@ bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const  void LLVOAvatar::clearAttachmentOverrides()  { -    LLScopedContextString str("clearAttachmentOverrides " + getFullname()); +    LLScopedContextString str("clearAttachmentOverrides " + getDebugName());      for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)      { @@ -6318,7 +6324,7 @@ void LLVOAvatar::clearAttachmentOverrides()  //-----------------------------------------------------------------------------  void LLVOAvatar::rebuildAttachmentOverrides()  { -    LLScopedContextString str("rebuildAttachmentOverrides " + getFullname()); +    LLScopedContextString str("rebuildAttachmentOverrides " + getDebugName());      LL_DEBUGS("AnimatedObjects") << "rebuilding" << LL_ENDL;      dumpStack("AnimatedObjectsStack"); @@ -6369,7 +6375,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()  // -----------------------------------------------------------------------------  void LLVOAvatar::updateAttachmentOverrides()  { -    LLScopedContextString str("updateAttachmentOverrides " + getFullname()); +    LLScopedContextString str("updateAttachmentOverrides " + getDebugName());      LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL;      dumpStack("AnimatedObjectsStack"); @@ -6447,11 +6453,11 @@ void LLVOAvatar::updateAttachmentOverrides()              }          }          pelvis_fixups = mPelvisFixups; -        //dumpArchetypeXML(getFullname() + "_paranoid_updated"); +        //dumpArchetypeXML(getDebugName() + "_paranoid_updated");          // Rebuild and compare          rebuildAttachmentOverrides(); -        //dumpArchetypeXML(getFullname() + "_paranoid_rebuilt"); +        //dumpArchetypeXML(getDebugName() + "_paranoid_rebuilt");          bool mismatched = false;          for (S32 joint_num = 0; joint_num < LL_CHARACTER_MAX_ANIMATED_JOINTS; joint_num++)          { @@ -6501,7 +6507,7 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL          return;      } -    LLScopedContextString str("addAttachmentOverridesForObject " + getFullname()); +    LLScopedContextString str("addAttachmentOverridesForObject " + getDebugName());      if (getOverallAppearance() != AOA_NORMAL)      { @@ -6683,21 +6689,21 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const      {          std::stringstream ss;          std::copy(pos_names.begin(), pos_names.end(), std::ostream_iterator<std::string>(ss, ",")); -        LL_INFOS() << getFullname() << " attachment positions defined for joints: " << ss.str() << "\n" << LL_ENDL; +        LL_INFOS() << avString() << " attachment positions defined for joints: " << ss.str() << "\n" << LL_ENDL;      }      else      { -        LL_DEBUGS("Avatar") << getFullname() << " no attachment positions defined for any joints" << "\n" << LL_ENDL; +        LL_DEBUGS("Avatar") << avString() << " no attachment positions defined for any joints" << "\n" << LL_ENDL;      }      if (scale_names.size())      {          std::stringstream ss;          std::copy(scale_names.begin(), scale_names.end(), std::ostream_iterator<std::string>(ss, ",")); -        LL_INFOS() << getFullname() << " attachment scales defined for joints: " << ss.str() << "\n" << LL_ENDL; +        LL_INFOS() << getDebugName() << " attachment scales defined for joints: " << ss.str() << "\n" << LL_ENDL;      }      else      { -        LL_INFOS() << getFullname() << " no attachment scales defined for any joints" << "\n" << LL_ENDL; +        LL_INFOS() << getDebugName() << " no attachment scales defined for any joints" << "\n" << LL_ENDL;      }      if (!verbose) @@ -8056,10 +8062,10 @@ bool LLVOAvatar::getIsCloud() const              );  } -void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) +void LLVOAvatar::updateRezzedStatusTimers(ERezzedStatus rez_status)  { -    // State machine for rezzed status. Statuses are -1 on startup, 0 -    // = cloud, 1 = gray, 2 = downloading, 3 = full. +    // State machine for rezzed status. +    // Statuses are -1 on startup, 0 = cloud, 1 = gray, 2 = downloading, 3 = full.      // Purpose is to collect time data for each it takes avatar to reach      // various loading landmarks: gray, textured (partial), textured fully. @@ -8067,10 +8073,10 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)      {          LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL; -        if (mLastRezzedStatus == -1 && rez_status != -1) +        if (mLastRezzedStatus == AV_REZZED_UNKNOWN && rez_status != AV_REZZED_UNKNOWN)          {              // First time initialization, start all timers. -            for (S32 i = 1; i < 4; i++) +            for (ERezzedStatus i = AV_REZZED_GRAY; i <= AV_REZZED_FULL; ++(S32&)i)              {                  startPhase("load_" + LLVOAvatar::rezStatusToString(i));                  startPhase("first_load_" + LLVOAvatar::rezStatusToString(i)); @@ -8079,7 +8085,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)          if (rez_status < mLastRezzedStatus)          {              // load level has decreased. start phase timers for higher load levels. -            for (S32 i = rez_status+1; i <= mLastRezzedStatus; i++) +            for (ERezzedStatus i = next(rez_status); i <= mLastRezzedStatus; ++(S32&)i)              {                  startPhase("load_" + LLVOAvatar::rezStatusToString(i));              } @@ -8087,12 +8093,12 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)          else if (rez_status > mLastRezzedStatus)          {              // load level has increased. stop phase timers for lower and equal load levels. -            for (S32 i = llmax(mLastRezzedStatus+1,1); i <= rez_status; i++) +            for (ERezzedStatus i = llmax(next(mLastRezzedStatus), AV_REZZED_GRAY); i <= rez_status; ++(S32&)i)              {                  stopPhase("load_" + LLVOAvatar::rezStatusToString(i));                  stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false);              } -            if (rez_status == 3) +            if (rez_status == AV_REZZED_FULL)              {                  // "fully loaded", mark any pending appearance change complete.                  selfStopPhase("update_appearance_from_cof"); @@ -8102,6 +8108,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)                  updateVisualComplexity();              }          } +          mLastRezzedStatus = rez_status;      }  } @@ -8232,18 +8239,18 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse  // returns true if the value has changed.  BOOL LLVOAvatar::updateIsFullyLoaded()  { -    S32 rez_status = getRezzedStatus(); +    ERezzedStatus rez_status = getRezzedStatus();      bool loading = getIsCloud();      if (mFirstFullyVisible && !mIsControlAvatar)      { -        loading = ((rez_status < 2) +        loading = ((rez_status < AV_REZZED_TEXTURED)                     // Wait at least 60s for unfinished textures to finish on first load,                     // don't wait forever, it might fail. Even if it will eventually load by                     // itself and update mLoadedCallbackTextures (or fail and clean the list),                     // avatars are more time-sensitive than textures and can't wait that long.                     || (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC)                     || !mPendingAttachment.empty() -                   || (rez_status < 3 && !isFullyBaked()) +                   || (rez_status < AV_REZZED_FULL && !isFullyBaked())                     || hasPendingAttachedMeshes()                    );      } @@ -8283,56 +8290,53 @@ void LLVOAvatar::updateRuthTimer(bool loading)  BOOL LLVOAvatar::processFullyLoadedChange(bool loading)  { -    // We wait a little bit before giving the 'all clear', to let things to -    // settle down (models to snap into place, textures to get first packets). -    // And if viewer isn't aware of some parts yet, this gives them a chance -    // to arrive. -    const F32 LOADED_DELAY = 1.f; -      if (loading)      {          mFullyLoadedTimer.reset(); +        mFullyLoaded = false;      } - -    if (mFirstFullyVisible) +    else if (!mFullyLoaded)      { -        if (!isSelf() && loading) +        // We wait a little bit before giving the 'all clear', to let things to settle down: +        // models to snap into place, textures to get first packets, LODs to load. +        const F32 LOADED_DELAY = 1.f; + +        F32 delay = LOADED_DELAY; +        if (mFirstFullyVisible && !isSelf() && loading)          { -                // Note that textures can causes 60s delay on thier own -                // so this delay might end up on top of textures' delay -                mFirstUseDelaySeconds = llclamp( -                    mFirstAppearanceMessageTimer.getElapsedTimeF32(), -                    FIRST_APPEARANCE_CLOUD_MIN_DELAY, -                    FIRST_APPEARANCE_CLOUD_MAX_DELAY); +            delay = mFirstAppearanceMessageTimer.getElapsedTimeF32(); +            // Note that textures can causes 60s delay on thier own +            // so this delay might end up on top of textures' delay +            delay = llclamp( +                mFirstAppearanceMessageTimer.getElapsedTimeF32(), +                FIRST_APPEARANCE_CLOUD_MIN_DELAY, +                FIRST_APPEARANCE_CLOUD_MAX_DELAY); -                if (shouldImpostor()) -                { -                    // Impostors are less of a priority, -                    // let them stay cloud longer -                    mFirstUseDelaySeconds *= 1.25; -                } +            if (shouldImpostor()) +            { +                // Impostors are less of a priority, +                // let them stay cloud longer +                delay *= 1.25; +            }          } -        mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds); -    } -    else -    { -        mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY); -    } -    if (!mPreviousFullyLoaded && !loading && mFullyLoaded) -    { -        debugAvatarRezTime("AvatarRezNotification","fully loaded"); +        mFullyLoaded = mFullyLoadedTimer.getElapsedTimeF32() > delay; + +        if (!mPreviousFullyLoaded && !loading && mFullyLoaded) +        { +            debugAvatarRezTime("AvatarRezNotification", "fully loaded"); +        }      }      // did our loading state "change" from last call?      // FIXME runway - why are we updating every 30 calls even if nothing has changed?      // This causes updateLOD() to run every 30 frames, among other things. +    BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded);      const S32 UPDATE_RATE = 30;      BOOL changed = -        ((mFullyLoaded != mPreviousFullyLoaded) ||         // if the value is different from the previous call -         (!mFullyLoadedInitialized) ||                     // if we've never been called before -         (mFullyLoadedFrameCounter % UPDATE_RATE == 0));   // every now and then issue a change -    BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded); +        (fully_loaded_changed ||         // if the value is different from the previous call +        !mFullyLoadedInitialized ||                     // if we've never been called before +        (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change      mPreviousFullyLoaded = mFullyLoaded;      mFullyLoadedInitialized = TRUE; @@ -8350,6 +8354,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)          mNeedsImpostorUpdate = TRUE;          mLastImpostorUpdateReason = 6;      } +      return changed;  } @@ -9222,12 +9227,12 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)  void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,      const LLAppearanceMessageContents& contents)  { -    std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml"); +    std::string outfilename = get_sequential_numbered_file_name(dump_prefix, ".xml");      const std::vector<F32>& params_for_dump = contents.mParamWeights;      const LLTEContents& tec = contents.mTEContents;      LLAPRFile outfile; -    std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); +    std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, outfilename);      outfile.open(fullpath, LL_APR_WB );      apr_file_t* file = outfile.getFileHandle();      if (!file) @@ -9344,8 +9349,8 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe      }      else      { -        LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL; -    } +            LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL; +        }      LLVisualParam* appearance_version_param = getVisualParam(11000);      if (appearance_version_param) @@ -9400,7 +9405,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )      static LLCachedControl<bool> enable_verbose_dumps(gSavedSettings, "DebugAvatarAppearanceMessage");      static LLCachedControl<bool> block_avatar_appearance_messages(gSavedSettings, "BlockAvatarAppearanceMessages"); -    std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_"; +    std::string dump_prefix = getDebugName() + (isSelf() ? "_s_" : "_o_");      if (block_avatar_appearance_messages)      {          LL_WARNS() << "Blocking AvatarAppearance message" << LL_ENDL; @@ -10032,17 +10037,13 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara      std::string outprefix(prefix);      if (outprefix.empty())      { -        outprefix = getFullname() + (isSelf()?"_s":"_o"); +        outprefix = getDebugName() + (isSelf() ? "_s" : "_o");      } -    if (outprefix.empty()) -    { -        outprefix = std::string("new_archetype"); -    } -    std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml"); +    std::string outfilename = get_sequential_numbered_file_name(outprefix, ".xml");      LLAPRFile outfile;      LLWearableType *wr_inst = LLWearableType::getInstance(); -    std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); +    std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, outfilename);      if (APR_SUCCESS == outfile.open(fullpath, LL_APR_WB ))      {          apr_file_t* file = outfile.getFileHandle(); @@ -10541,7 +10542,7 @@ void LLVOAvatar::updateRiggingInfo()  {      LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; -    LL_DEBUGS("RigSpammish") << getFullname() << " updating rig tab" << LL_ENDL; +    LL_DEBUGS("RigSpammish") << getDebugName() << " updating rig tab" << LL_ENDL;      std::vector<LLVOVolume*> volumes; @@ -10579,7 +10580,7 @@ void LLVOAvatar::updateRiggingInfo()      }      //LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL; -    LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL; +    LL_DEBUGS("RigSpammish") << getDebugName() << " after update rig tab:" << LL_ENDL;      S32 joint_count, box_count;      showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);      LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index c14784cc6d..bf899dc7d6 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -80,6 +80,15 @@ const F32 MAX_AVATAR_LOD_FACTOR = 1.0f;  extern U32 gFrameCount; +enum ERezzedStatus : S32 +{ +    AV_REZZED_UNKNOWN = -1, +    AV_REZZED_CLOUD = 0, +    AV_REZZED_GRAY = 1, +    AV_REZZED_TEXTURED = 2, // "downloading" +    AV_REZZED_FULL = 3 +}; +  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  // LLVOAvatar  // @@ -231,6 +240,7 @@ public:      virtual void            onActiveOverrideMeshesChanged();      /*virtual*/ const LLUUID&   getID() const; +    /*virtual*/ std::string     getDebugName() const;      /*virtual*/ void            addDebugText(const std::string& text);      /*virtual*/ F32             getTimeDilation();      /*virtual*/ void            getGround(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm); @@ -327,22 +337,24 @@ public:      // avatar render cost -    U32             getVisualComplexity()           { return mVisualComplexity;             }; +    U32             getVisualComplexity()           { return mVisualComplexity; };      // surface area calculation -    F32             getAttachmentSurfaceArea()      { return mAttachmentSurfaceArea;        }; +    F32             getAttachmentSurfaceArea()      { return mAttachmentSurfaceArea; }; -    U32             getReportedVisualComplexity()                   { return mReportedVisualComplexity;             };  // Numbers as reported by the SL server -    void            setReportedVisualComplexity(U32 value)          { mReportedVisualComplexity = value;            }; +    U32             getReportedVisualComplexity()   { return mReportedVisualComplexity; };  // Numbers as reported by the SL server +    void            setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; }; -    S32             getUpdatePeriod()               { return mUpdatePeriod;         }; -    const LLColor4 &  getMutedAVColor()             { return mMutedAVColor;         }; +    S32             getUpdatePeriod()               { return mUpdatePeriod; }; +    const LLColor4 &  getMutedAVColor()             { return mMutedAVColor; };      static void     updateImpostorRendering(U32 newMaxNonImpostorsValue);      void            idleUpdateBelowWater();      static void updateNearbyAvatarCount(); +    static ERezzedStatus next(ERezzedStatus status) { return (ERezzedStatus)++(S32&)status; } +      LLVector3 idleCalcNameTagPosition(const LLVector3 &root_pos_last);      //-------------------------------------------------------------------- @@ -398,11 +410,10 @@ public:      virtual bool    getIsCloud() const;      BOOL            isFullyTextured() const;      BOOL            hasGray() const; -    S32             getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded. -    void            updateRezzedStatusTimers(S32 status); - -    S32             mLastRezzedStatus; +    ERezzedStatus   getRezzedStatus() const; +    void            updateRezzedStatusTimers(ERezzedStatus status); +    ERezzedStatus   mLastRezzedStatus;      void            startPhase(const std::string& phase_name);      void            stopPhase(const std::string& phase_name, bool err_check = true); @@ -422,7 +433,6 @@ protected:  private:      BOOL            mFirstFullyVisible; -    F32             mFirstUseDelaySeconds;      LLFrameTimer    mFirstAppearanceMessageTimer;      BOOL            mFullyLoaded; @@ -708,8 +718,7 @@ public:      BOOL            isFullyBaked();      static BOOL     areAllNearbyInstancesBaked(S32& grey_avatars); -    static void     getNearbyRezzedStats(std::vector<S32>& counts); -    static std::string rezStatusToString(S32 status); +    static std::string rezStatusToString(ERezzedStatus status);      //--------------------------------------------------------------------      // Baked textures @@ -727,7 +736,7 @@ protected:      LLViewerTexLayerSet*  getTexLayerSet(const U32 index) const { return dynamic_cast<LLViewerTexLayerSet*>(mBakedTextureDatas[index].mTexLayerSet);    } -    LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; +    LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList;      BOOL mLoadedCallbacksPaused;      S32 mLoadedCallbackTextures; // count of 'loaded' baked textures, filled from mCallbackTextureList      LLFrameTimer mLastTexCallbackAddedTime; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 38742c9c64..0da9e546a5 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2233,12 +2233,17 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)      // Status of all nearby avs including ourself.      msg["nearby"] = LLSD::emptyArray(); -    std::vector<S32> rez_counts; -    LLVOAvatar::getNearbyRezzedStats(rez_counts); -    for (S32 rez_stat = 0; rez_stat < rez_counts.size(); ++rez_stat) + +    S32 status_counts[AV_REZZED_FULL - AV_REZZED_CLOUD + 1] = { 0 }; +    for (LLCharacter* character : LLCharacter::sInstances) +    { +        ERezzedStatus status = ((LLVOAvatar*)character)->getRezzedStatus(); +        ++status_counts[status - AV_REZZED_CLOUD]; +    } +    for (ERezzedStatus status = AV_REZZED_CLOUD; status <= AV_REZZED_FULL; ++(S32&)status)      { -        std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat); -        msg["nearby"][rez_status_name] = rez_counts[rez_stat]; +        std::string status_name = LLVOAvatar::rezStatusToString(status); +        msg["nearby"][status_name] = status_counts[status - AV_REZZED_CLOUD];      }      //  std::vector<std::string> bucket_fields("timer_name","is_self","grid_x","grid_y","is_using_server_bake"); diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp index 82a8d48f30..5dafaca031 100644 --- a/indra/newview/llvoicecallhandler.cpp +++ b/indra/newview/llvoicecallhandler.cpp @@ -38,6 +38,11 @@ public:      {      } +    virtual bool canHandleUntrusted(const LLSD ¶ms, const LLSD &query_map, LLMediaCtrl *web, const std::string &nav_type) +    { +        return (nav_type == NAV_TYPE_CLICKED || nav_type == NAV_TYPE_EXTERNAL); +    } +      bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web)      {          //Make sure we have some parameters diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 7ca73a24bf..c1e6becf8d 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -383,6 +383,12 @@ void LLVoiceChannel::resume()          {              if (sSuspendedVoiceChannel)              { +                if (sSuspendedVoiceChannel->callStarted()) +                { +                    // should have channel data already, restart +                    sSuspendedVoiceChannel->setState(STATE_READY); +                } +                // won't do anything if call is already started                  sSuspendedVoiceChannel->activate();              }              else diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ea6fb2e55b..b4ea06f8b7 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1425,7 +1425,7 @@ BOOL LLVOVolume::calcLOD()              const LLVector3* box = avatar->getLastAnimExtents();              LLVector3 diag = box[1] - box[0];              radius = diag.magVec() * 0.5f; -            LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL; +            LL_DEBUGS("DynamicBox") << avatar->getDebugName() << " diag " << diag << " radius " << radius << LL_ENDL;          }          else          { @@ -1436,7 +1436,7 @@ BOOL LLVOVolume::calcLOD()              const LLVector3* box = avatar->getLastAnimExtents();              LLVector3 diag = box[1] - box[0];              radius = diag.magVec(); // preserve old BinRadius behavior - 2x off -            LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL; +            LL_DEBUGS("DynamicBox") << avatar->getDebugName() << " diag " << diag << " radius " << radius << LL_ENDL;          }          if (distance <= 0.f || radius <= 0.f)          { @@ -1503,11 +1503,16 @@ BOOL LLVOVolume::calcLOD()      mLODAdjustedDistance = distance; +    static LLCachedControl<S32> debug_selection_lods(gSavedSettings, "DebugSelectionLODs", 0);      if (isHUDAttachment())      {          // HUDs always show at highest detail          cur_detail = 3;      } +    else if (isSelected() && debug_selection_lods() >= 0) +    { +        cur_detail = llmin(debug_selection_lods(), 3); +    }      else      {          cur_detail = computeLODDetail(ll_round(distance, 0.01f), ll_round(radius, 0.01f), lod_factor); diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml deleted file mode 100644 index 6c3214a76d..0000000000 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ /dev/null @@ -1,421 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - legacy_header_height="18" - height="340" - layout="topleft" - name="item properties" - help_topic="item_properties" - save_rect="true" - title="INVENTORY ITEM PROPERTIES" - width="350"> -    <floater.string -     name="unknown"> -        (unknown) -    </floater.string> -    <floater.string -     name="public"> -        (public) -    </floater.string> -    <floater.string -     name="you_can"> -        You can: -    </floater.string> -    <floater.string -     name="owner_can"> -        Owner can: -    </floater.string> -    <floater.string -     name="acquiredDate"> -        [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] -    </floater.string> -    <icon -     follows="top|right" -     height="18" -     image_name="Lock" -     layout="topleft" -     left="276" -     mouse_opaque="true" -     name="IconLocked" -     top="4" -     width="18" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left="10" -     name="LabelItemNameTitle" -     top="25" -     width="78"> -        Name: -    </text> -    <line_editor -     border_style="line" -     border_thickness="1" -     follows="left|top|right" -     height="16" -     layout="topleft" -     left_delta="78" -     max_length_bytes="63" -     name="LabelItemName" -     top_delta="0" -     width="252" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left="10" -     name="LabelItemDescTitle" -     top="45" -     width="78"> -        Description: -    </text> -    <line_editor -     border_style="line" -     border_thickness="1" -     follows="left|top|right" -     height="16" -     layout="topleft" -     left_delta="78" -     max_length_bytes="127" -     name="LabelItemDesc" -     top_delta="0" -     width="252" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="16" -     layout="topleft" -     left="10" -     name="LabelCreatorTitle" -     top="65" -     width="78"> -        Creator: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="16" -     layout="topleft" -     left_delta="78" -     name="LabelCreatorName" -     top_delta="0" -     translate="false" -     use_ellipses="true"  -     width="170"> -        TestString PleaseIgnore -    </text> -    <button -     follows="top|right" -     height="16" -     label="Profile..." -     layout="topleft" -     left_delta="174" -     name="BtnCreator" -     top_delta="0" -     width="78" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="16" -     layout="topleft" -     left="10" -     name="LabelOwnerTitle" -     top="85" -     width="78"> -        Owner: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="16" -     layout="topleft" -     left_delta="78" -     name="LabelOwnerName" -     top_delta="0" -     translate="false" -     use_ellipses="true" -     width="170"> -      TestString PleaseIgnore -    </text> -    <button -     follows="top|right" -     height="16" -     label="Profile..." -     layout="topleft" -     left_delta="174" -     name="BtnOwner" -     top_delta="0" -     width="78" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="16" -     layout="topleft" -     left="10" -     name="LabelAcquiredTitle" -     top="105" -     width="78"> -        Acquired: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="16" -     layout="topleft" -     left_delta="78" -     name="LabelAcquiredDate" -     top_delta="0" -     width="252"> -        Wed May 24 12:50:46 2006 -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left="10" -     name="OwnerLabel" -     top="125" -     width="78"> -        You: -    </text> -    <check_box -     height="16" -     label="Edit" -     layout="topleft" -     left_pad="5" -     name="CheckOwnerModify" -     top_delta="0" -     width="78" /> -    <check_box -     height="16" -     label="Copy" -     layout="topleft" -     left_delta="0" -     name="CheckOwnerCopy" -     top_pad="5" -     width="88" /> -    <check_box -     height="16" -     label="Resell" -     layout="topleft" -     left_delta="0" -     name="CheckOwnerTransfer" -     top_pad="5" -     width="106" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left="10" -     name="AnyoneLabel" -     top_pad="5" -     width="78"> -        Anyone: -    </text> -    <check_box -     height="16" -     label="Copy" -     layout="topleft" -     left_pad="5" -     name="CheckEveryoneCopy" -     top_delta="0" -     width="130" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left="10" -     name="GroupLabel" -     top_pad="5" -     width="78"> -        Group: -    </text> -    <check_box -     height="16" -     label="Share" -     layout="topleft" -     left_pad="5" -     name="CheckShareWithGroup" -     top_delta="5" -     width="106" /> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="25" -     layout="topleft" -     left="10" -     name="NextOwnerLabel" -     top_pad="5" -     width="78" -     word_wrap="true"> -        Next owner: -    </text> -    <check_box -     height="16" -     label="Edit" -     layout="topleft" -     left_pad="5" -     name="CheckNextOwnerModify" -     top_delta="0" -     width="78" /> -    <check_box -     height="16" -     label="Copy" -     layout="topleft" -     left_delta="0" -     name="CheckNextOwnerCopy" -     top_pad="5" -     width="88" /> -    <check_box -     height="16" -     label="Resell" -     layout="topleft" -     left_delta="0" -     name="CheckNextOwnerTransfer" -     top_pad="5" -     width="106" /> -    <check_box -     height="16" -     label="For Sale" -     layout="topleft" -     left="10" -     name="CheckPurchase" -     top_pad="5" -     width="78" /> -     <combo_box -     height="19" -     left_pad="5" -     layout="topleft" -     follows="left|top" -     name="ComboBoxSaleType" -     width="110"> -       <combo_box.item -         name="Copy" -         label="Copy" -         value="2" /> -       <combo_box.item -         name="Contents" -         label="Contents" -         value="3" /> -       <combo_box.item -         name="Original" -         label="Original" -         value="1" /> -    </combo_box> -    <spinner -        follows="left|top" -        decimal_digits="0" -        increment="1" -        name="Edit Cost" -        label="Price:" -        label_width="100" -        left="10" -        width="192" -        min_val="1" -        height="19" -        max_val="999999999" -        top_pad="5"/> -    <text -        type="string" -        length="1" -        height="15" -        follows="left|top" -        layout="topleft" -        left_delta="82" -        name="CurrencySymbol" -        top_delta="1" -        width="18"> -      L$ -    </text> - -    <!--line_editor -     border_style="line" -     border_thickness="1" -     follows="left|top|right" -     height="16" -     layout="topleft" -     left_pad="5" -     max_length_bytes="25" -     name="EditPrice" -     top_delta="0" -     width="242" /--> - -    <!--text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left="10" -     name="BaseMaskDebug" -     top="155" -     width="330"> -        B: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left_delta="60" -     name="OwnerMaskDebug" -     top_delta="0" -     width="270"> -        O: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left_delta="60" -     name="GroupMaskDebug" -     top_delta="0" -     width="210"> -        G: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left_delta="60" -     name="EveryoneMaskDebug" -     top_delta="0" -     width="150"> -        E: -    </text> -    <text -     type="string" -     length="1" -     follows="left|top" -     height="10" -     layout="topleft" -     left_delta="60" -     name="NextMaskDebug" -     top_delta="0" -     width="90"> -        N: -    </text--> - -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_object_weights.xml b/indra/newview/skins/default/xui/en/floater_object_weights.xml index 5e4b017590..709fbdd27e 100644 --- a/indra/newview/skins/default/xui/en/floater_object_weights.xml +++ b/indra/newview/skins/default/xui/en/floater_object_weights.xml @@ -2,7 +2,7 @@  <floater   can_close="true"   can_tear_off="false" - height="289" + height="372"   help_topic="object_weights"   layout="topleft"   name="object_weights" @@ -13,6 +13,21 @@      <floater.string       name="nothing_selected"       value="--"/> +    <floater.string +     name="lowest_lod" +     value="Lowest"/> +    <floater.string +     name="low_lod" +     value="Low"/> +    <floater.string +     name="medium_lod" +     value="Medium"/> +    <floater.string +     name="high_lod" +     value="High"/> +    <floater.string +     name="multiple_lods" +     value="Multiple"/>      <text       follows="left|top" @@ -320,4 +335,97 @@       top_delta="0"       value="Total capacity"       width="130" /> + + +    <text +     follows="left|top" +     height="16" +     layout="topleft" +     left="10" +     name="rendering_info_text" +     text_color="EmphasisColor" +     top_pad="10" +     value="RENDERING INFO" +     width="180" /> +    <text +     follows="left|top" +     halign="right" +     height="16" +     layout="topleft" +     left="10" +     name="lod_level" +     top_pad="3" +     value="--" +     width="40" /> +    <loading_indicator +     follows="left|top" +     height="16" +     layout="topleft" +     left="34" +     name="lod_level_loading_indicator" +     top_delta="0" +     width="16" /> +    <text +     follows="left|top" +     height="16" +     layout="topleft" +     left_pad="10" +     name="lod_level_label" +     top_delta="0" +     value="LOD (Level of detail)" +     width="130" /> +    <text +     follows="left|top" +     halign="right" +     height="16" +     layout="topleft" +     left="10" +     name="triangles_shown" +     top_pad="3" +     value="--" +     width="40" /> +    <loading_indicator +     follows="left|top" +     height="16" +     layout="topleft" +     left="34" +     name="triangles_shown_loading_indicator" +     top_delta="0" +     width="16" /> +    <text +     follows="left|top" +     height="16" +     layout="topleft" +     left_pad="10" +     name="triangles_shown_label" +     top_delta="0" +     value="Triangles Shown" +     width="130" /> +    <text +     follows="left|top" +     halign="right" +     height="16" +     layout="topleft" +     left="10" +     name="pixel_area" +     top_pad="3" +     value="--" +     width="40" /> +    <loading_indicator +     follows="left|top" +     height="16" +     layout="topleft" +     left="34" +     name="pixel_area_loading_indicator" +     top_delta="0" +     width="16" /> +    <text +     follows="left|top" +     height="16" +     layout="topleft" +     left_pad="10" +     name="pixel_area_label" +     top_delta="0" +     value="Pixel Area" +     width="130" />  </floater> diff --git a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml index 51809793d3..724a7ed4b0 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml @@ -22,7 +22,7 @@  		increment="0.025"  		initial_value="0.5"  		label="Voice Chat" -		label_width="50" +		label_width="56"  		layout="topleft"  		left="15"  		top="50" diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml index c11f1c88cb..ef9e26d8be 100644 --- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml @@ -487,6 +487,136 @@         function="Inventory.CanSetUploadLocation" />      </menu_item_call>    </menu> +  <menu +   label="Upload to folder" +   layout="topleft" +   name="upload_options"> +    <menu_item_call +     label="Image..." +     layout="topleft" +     name="Upload Image"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_texture" /> +       <menu_item_call.on_enable +        function="File.EnableUpload" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Upload Image,texture" /> +    </menu_item_call> +    <menu_item_call +     label="Sound (L$[COST])..." +     layout="topleft" +     name="Upload Sound"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_sound" /> +       <menu_item_call.on_enable +        function="File.EnableUpload" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Upload Sound,sound" /> +    </menu_item_call> +    <menu_item_call +     label="Animation (L$[COST])..." +     layout="topleft" +     name="Upload Animation"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_animation" /> +       <menu_item_call.on_enable +        function="File.EnableUpload" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Upload Animation,animation" /> +    </menu_item_call> +    <menu_item_call +     label="Model..." +     layout="topleft" +     name="Upload Model"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_model" /> +       <menu_item_call.on_enable +        function="File.EnableUploadModel" /> +       <menu_item_call.on_visible +        function="File.VisibleUploadModel"/> +    </menu_item_call> +    <menu_item_call +     label="Material..." +     layout="topleft" +     name="Upload Material"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_pbr_material" /> +       <menu_item_call.on_enable +        function="File.EnableUploadMaterial" /> +    </menu_item_call> +    <menu_item_call +     label="Bulk..." +     layout="topleft" +     name="Bulk Upload"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_bulk" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Bulk Upload,texture" /> +    </menu_item_call> +  </menu> +  <menu +   label="Use as default for" +   layout="topleft" +   name="upload_def"> +    <menu_item_call +     label="Image uploads" +     layout="topleft" +     name="Image uploads"> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +        parameter="def_texture" /> +      <menu_item_call.on_visible +       function="Inventory.CanSetUploadLocation" /> +    </menu_item_call> +    <menu_item_call +     label="Sound uploads" +     layout="topleft" +     name="Sound uploads"> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_sound" /> +      <menu_item_call.on_visible +       function="Inventory.CanSetUploadLocation" /> +    </menu_item_call> +    <menu_item_call +     label="Animation uploads" +     layout="topleft" +     name="Animation uploads"> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_animation" /> +      <menu_item_call.on_visible +       function="Inventory.CanSetUploadLocation" /> +    </menu_item_call> +    <menu_item_call +     label="Model uploads" +     layout="topleft" +     name="Model uploads"> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_model" /> +      <menu_item_call.on_visible +       function="Inventory.CanSetUploadLocation" /> +    </menu_item_call> +    <menu_item_call +     label="PBR material uploads" +     layout="topleft" +     name="PBR uploads"> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_pbr_material" /> +    </menu_item_call> +  </menu>  	<menu_item_separator  	 layout="topleft"  	 name="Marketplace Separator" /> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index d8aac71dd5..60e73ebb10 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -952,6 +952,83 @@       parameter="ungroup_folder_items" />    </menu_item_call>    <menu +   label="Upload to folder" +   layout="topleft" +   name="upload_options"> +    <menu_item_call +     label="Image..." +     layout="topleft" +     name="Upload Image"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_texture" /> +       <menu_item_call.on_enable +        function="File.EnableUpload" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Upload Image,texture" /> +    </menu_item_call> +    <menu_item_call +     label="Sound (L$[COST])..." +     layout="topleft" +     name="Upload Sound"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_sound" /> +       <menu_item_call.on_enable +        function="File.EnableUpload" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Upload Sound,sound" /> +    </menu_item_call> +    <menu_item_call +     label="Animation (L$[COST])..." +     layout="topleft" +     name="Upload Animation"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_animation" /> +       <menu_item_call.on_enable +        function="File.EnableUpload" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Upload Animation,animation" /> +    </menu_item_call> +    <menu_item_call +     label="Model..." +     layout="topleft" +     name="Upload Model"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_model" /> +       <menu_item_call.on_enable +        function="File.EnableUploadModel" /> +       <menu_item_call.on_visible +        function="File.VisibleUploadModel"/> +    </menu_item_call> +    <menu_item_call +     label="Material..." +     layout="topleft" +     name="Upload Material"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_pbr_material" /> +       <menu_item_call.on_enable +        function="File.EnableUploadMaterial" /> +    </menu_item_call> +    <menu_item_call +     label="Bulk..." +     layout="topleft" +     name="Bulk Upload"> +       <menu_item_call.on_click +        function="Inventory.FileUploadLocation" +        parameter="upload_bulk" /> +       <menu_item_call.on_visible +        function="Upload.CalculateCosts" +        parameter="Bulk Upload,texture" /> +    </menu_item_call> +  </menu> +  <menu     label="Use as default for"     layout="topleft"     name="upload_def"> @@ -961,39 +1038,39 @@       name="Image uploads">        <menu_item_call.on_click         function="Inventory.FileUploadLocation" -        parameter="texture" /> +       parameter="def_texture" />      </menu_item_call>      <menu_item_call       label="Sound uploads"       layout="topleft"       name="Sound uploads"> -    <menu_item_call.on_click -     function="Inventory.FileUploadLocation" -     parameter="sound" /> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_sound" />      </menu_item_call>      <menu_item_call       label="Animation uploads"       layout="topleft"       name="Animation uploads"> -    <menu_item_call.on_click -     function="Inventory.FileUploadLocation" -     parameter="animation" /> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_animation" />      </menu_item_call>      <menu_item_call       label="Model uploads"       layout="topleft"       name="Model uploads"> -    <menu_item_call.on_click -     function="Inventory.FileUploadLocation" -     parameter="model" /> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_model" />      </menu_item_call>      <menu_item_call       label="PBR material uploads"       layout="topleft"       name="PBR uploads"> -        <menu_item_call.on_click -         function="Inventory.FileUploadLocation" -         parameter="pbr_material" /> +      <menu_item_call.on_click +       function="Inventory.FileUploadLocation" +       parameter="def_pbr_material" />      </menu_item_call>    </menu>  	<menu_item_separator diff --git a/indra/newview/skins/default/xui/en/menu_settings_gear.xml b/indra/newview/skins/default/xui/en/menu_settings_gear.xml index 57f4aa8655..96cbac4478 100644 --- a/indra/newview/skins/default/xui/en/menu_settings_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_settings_gear.xml @@ -24,6 +24,9 @@          <menu_item_call.on_click                   function="MyEnvironments.DoApply"                  parameter="local" /> +      <menu_item_call.on_enable +              function="MyEnvironments.CanApply" +              parameter="local"/>      </menu_item_call>      <menu_item_call              name="Settings Apply Parcel" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 5b0ebf1110..6e92d91320 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1598,7 +1598,65 @@ function="World.EnvPreset"               function="ToggleControl"               parameter="RenderDisablePostProcessing" />            </menu_item_check> -           + + +          <menu +           create_jump_keys="true" +           label="Selection level of detail" +           name="Selection level of detail" +           tear_off="true"> + +              <menu_item_check +                label="Default" +                name="Default lod setting"> +                  <menu_item_check.on_check +                   function="Tools.ToolsCheckSelectionLODMode" +                   parameter="default" /> +                  <menu_item_check.on_click +                   function="Tools.SelectionLODMode" +                   parameter="default" /> +              </menu_item_check> +              <menu_item_check +                label="High" +                name="High lod setting"> +                  <menu_item_check.on_check +                   function="Tools.ToolsCheckSelectionLODMode" +                   parameter="high" /> +                  <menu_item_check.on_click +                   function="Tools.SelectionLODMode" +                   parameter="high" /> +              </menu_item_check> +              <menu_item_check +                label="Medium" +                name="Medium lod setting"> +                  <menu_item_check.on_check +                   function="Tools.ToolsCheckSelectionLODMode" +                   parameter="medium" /> +                  <menu_item_check.on_click +                   function="Tools.SelectionLODMode" +                   parameter="medium" /> +              </menu_item_check> +              <menu_item_check +                label="Low" +                name="Low lod setting"> +                  <menu_item_check.on_check +                   function="Tools.ToolsCheckSelectionLODMode" +                   parameter="low" /> +                  <menu_item_check.on_click +                   function="Tools.SelectionLODMode" +                   parameter="low" /> +              </menu_item_check> +              <menu_item_check +                label="Lowest" +                name="Lowest lod setting"> +                  <menu_item_check.on_check +                   function="Tools.ToolsCheckSelectionLODMode" +                   parameter="lowest" /> +                  <menu_item_check.on_click +                   function="Tools.SelectionLODMode" +                   parameter="lowest" /> +              </menu_item_check> +          </menu>          <menu_item_separator/>                  <menu_item_check diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 7d237c6edd..ffd7b41d66 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3100,9 +3100,13 @@ Would you be my friend?        <input name="listname" type="text"/>        <button         default="true" -       index="0" +       index="1"         name="SetName"         text="OK"/> +      <button +       index="0" +       name="Cancel" +       text="Cancel"/>      </form>    </notification> @@ -3131,6 +3135,29 @@ Would you be my friend?    <notification     icon="alertmodal.tga" +   label="Rename Auto-Replace List" +   name="RemoveAutoReplaceList" +   type="alertmodal"> +'[LIST_NAME]' contains [MAP_SIZE] entries. +     +Are you sure you want to delete this list? +      <tag>confirm</tag> +    <form name="form"> +      <button +       default="true" +       index="1" +       name="DeleteList" +       text="Delete"/> +      <button +       default="false" +       index="0" +       name="Cancel" +       text="Cancel"/> +    </form> +  </notification> + +    <notification +   icon="alertmodal.tga"     name="InvalidAutoReplaceEntry"     type="alertmodal">      The keyword must be a single word, and the replacement may not be empty. @@ -4501,13 +4528,12 @@ You already have blocked this name.    <notification     icon="alert.tga" -   name="RemoveItemWarn" +   name="CantModifyContentInNoModTask"     type="alert"> -Though permitted, deleting contents may damage the object. Do you want to delete that item? -    <tag>confirm</tag> +You don't have permission to modify content of this object +      <tag>confirm</tag>      <usetemplate -     name="okcancelbuttons" -     notext="Cancel" +     name="okbutton"       yestext="OK"/>    </notification> diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml index a8a306bea9..9586957694 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml @@ -21,5 +21,5 @@      border="false"      bevel_style="none"      show_item_link_overlays="true"> -    <item allow_wear="false"/> +    <item marketplace_item="true"/>   </inventory_panel> diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml index 0c665fb07e..5f64a5d47a 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml @@ -20,5 +20,5 @@      border="false"      bevel_style="none"      show_item_link_overlays="true"> -    <item allow_wear="false"/> +    <item marketplace_item="true"/>  </inventory_panel> diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml index 0be405c5b8..ab4d836ba9 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml @@ -19,5 +19,5 @@      border="false"      bevel_style="none"      show_item_link_overlays="true"> -    <item allow_wear="false"/> +    <item marketplace_item="true"/>  </inventory_panel> diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml index 58122db7f4..303601e65b 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml @@ -20,5 +20,5 @@      border="false"      bevel_style="none"      show_item_link_overlays="true"> -    <item allow_wear="false"/> +    <item marketplace_item="true"/>  </inventory_panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index 0412466b4f..4aafceb112 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -113,7 +113,7 @@     control_name="ArrowKeysAlwaysMove"     follows="left|top"     height="20" -   label="Arrow keys always move me" +   label="Arrow keys always move me while in chat"     layout="topleft"     left_delta="5"     name="arrow_keys_move_avatar_check" diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml index bd68434aab..34b48574d5 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml @@ -248,29 +248,13 @@          </layout_panel>          <layout_panel -                name="moon_layout" -                border="false" +                border="true"                  bevel_style="in" +                name="moon_layout"                  auto_resize="true"                  user_resize="false"                  visible="true"                  height="400"> -            <layout_stack  -                    name="moon_stack" -                    left="5" -                    top="5" -                    right="-5" -                    bottom="-5" -                    follows="left|top|right|bottom" -                    orientation="vertical"> -                <layout_panel -                        border="true" -                        bevel_style="in" -                        auto_resize="true" -                        user_resize="false" -                        visible="true" -                        name="moon_layout" -                        height="220">                      <text                              name="moon_label"                              follows="left|top" @@ -423,9 +407,7 @@                          name="moonbeacon"                           top_pad="5"                          left_delta="-8"/> -                             -                </layout_panel> -            </layout_stack> +          </layout_panel>      </layout_stack>  </panel>                 diff --git a/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml index f8837c40a7..844a556af1 100644 --- a/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/ja/panel_settings_sky_sunmoon.xml @@ -44,8 +44,6 @@  			<check_box label="ビーコンを表示" name="sunbeacon"/>  		</layout_panel>  		<layout_panel name="moon_layout"> -			<layout_stack name="moon_stack"> -				<layout_panel name="moon_layout">  					<text name="moon_label">  						月  					</text> @@ -74,8 +72,6 @@  					</text>  					<slider name="moon_brightness"/>  					<check_box label="ビーコンを表示" name="moonbeacon"/> -				</layout_panel> -			</layout_stack>  		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml index f807148617..7f9dee2369 100644 --- a/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/pl/panel_settings_sky_sunmoon.xml @@ -35,8 +35,6 @@  			<check_box label="Pokaż emiter" name="sunbeacon" />  		</layout_panel>  		<layout_panel name="moon_layout"> -			<layout_stack name="moon_stack"> -				<layout_panel name="moon_layout">  					<text name="moon_label">  						Księżyc  					</text> @@ -59,8 +57,6 @@  						Jasność:  					</text>  					<check_box label="Pokaż emiter" name="moonbeacon" /> -				</layout_panel> -			</layout_stack>  		</layout_panel>  	</layout_stack>  </panel>                 diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index 278de5f31c..8dfba05d15 100644 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -43,23 +43,6 @@ namespace LLStatViewer      LLTrace::SampleStatHandle<>     FPS_SAMPLE("fpssample");  } -void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts) -{ -    counts.resize(3); -    counts[0] = 0; -    counts[1] = 0; -    counts[2] = 1; -} - -// static -std::string LLVOAvatar::rezStatusToString(S32 rez_status) -{ -    if (rez_status==0) return "cloud"; -    if (rez_status==1) return "gray"; -    if (rez_status==2) return "textured"; -    return "unknown"; -} -  // static  LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name)  { | 
