From 38a565f71a54aaa66300a0ab593e366731aac769 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Tue, 9 Oct 2012 12:30:38 -0700 Subject: Initial pass at getting a list of viewer objects with non-null material IDs. --- indra/llprimitive/lltextureentry.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 34eff17519..b04fa809d2 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -29,6 +29,7 @@ #include "lluuid.h" #include "llmediaentry.h" #include "lltextureentry.h" +#include "llmaterialid.h" #include "llsdutil_math.h" #include "v4color.h" @@ -83,6 +84,8 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) mBump = rhs.mBump; mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; + mMaterialID = rhs.mMaterialID; + if (rhs.mMediaEntry != NULL) { // Make a copy mMediaEntry = new LLMediaEntry(*rhs.mMediaEntry); @@ -103,6 +106,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) mBump = rhs.mBump; mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; + mMaterialID = rhs.mMaterialID; if (mMediaEntry != NULL) { delete mMediaEntry; } @@ -130,6 +134,7 @@ void LLTextureEntry::init(const LLUUID& tex_id, F32 scale_s, F32 scale_t, F32 of mBump = bump; mMediaFlags = 0x0; mGlow = 0; + mMaterialID.clear(); setColor(LLColor4(1.f, 1.f, 1.f, 1.f)); if (mMediaEntry != NULL) { @@ -159,6 +164,7 @@ bool LLTextureEntry::operator!=(const LLTextureEntry &rhs) const if (mBump != rhs.mBump) return (true); if (mMediaFlags != rhs.mMediaFlags) return (true); if (mGlow != rhs.mGlow) return (true); + if (mMaterialID != rhs.mMaterialID) return (true); return(false); } @@ -174,6 +180,7 @@ bool LLTextureEntry::operator==(const LLTextureEntry &rhs) const if (mBump != rhs.mBump) return (false); if (mMediaFlags != rhs.mMediaFlags) return false; if (mGlow != rhs.mGlow) return false; + if (mMaterialID != rhs.mMaterialID) return (false); return(true); } @@ -523,6 +530,16 @@ S32 LLTextureEntry::setGlow(F32 glow) return TEM_CHANGE_NONE; } +S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) +{ + if (mMaterialID != pMaterialID) + { + mMaterialID = pMaterialID; + return TEM_CHANGE_TEXTURE; + } + return TEM_CHANGE_NONE; +} + void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry) { mMediaFlags |= MF_HAS_MEDIA; -- cgit v1.2.3 From 5f03e197f4cfb43de93dc42b16b54beafccd376a Mon Sep 17 00:00:00 2001 From: Geenz Date: Fri, 25 Jan 2013 17:54:38 -0500 Subject: Trying to set materials up for rendering! Yay! --- indra/llprimitive/lltextureentry.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index b04fa809d2..23b15b697c 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -540,6 +540,16 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) return TEM_CHANGE_NONE; } +S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) +{ + if (mMaterial != pMaterialParams) + { + mMaterial = pMaterialParams; + return TEM_CHANGE_TEXTURE; + } + return TEM_CHANGE_NONE; +} + void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry) { mMediaFlags |= MF_HAS_MEDIA; -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/llprimitive/lltextureentry.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/llprimitive/lltextureentry.cpp (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From f189ba4a3d927fe0ecfb83b36b60a47c88525fdd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 3 Apr 2013 16:56:59 -0500 Subject: NORSPEC-71 Lots more UI hookups Written with and Reviewed By Graham --- indra/llprimitive/lltextureentry.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 23b15b697c..691216e035 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -535,6 +535,10 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) if (mMaterialID != pMaterialID) { mMaterialID = pMaterialID; + if (mMaterialID.isNull()) + { + setMaterialParams(NULL); + } return TEM_CHANGE_TEXTURE; } return TEM_CHANGE_NONE; -- cgit v1.2.3 From 5aa3f3c808976c3b709bd8141d4338e910c49691 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Thu, 9 May 2013 15:41:07 -0700 Subject: NORSPEC-164 fix TE copy ctor and operator= to include material pointer in addition to ID --- indra/llprimitive/lltextureentry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 691216e035..53816266eb 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -85,7 +85,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; mMaterialID = rhs.mMaterialID; - + mMaterial = rhs.mMaterial; if (rhs.mMediaEntry != NULL) { // Make a copy mMediaEntry = new LLMediaEntry(*rhs.mMediaEntry); @@ -107,6 +107,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; mMaterialID = rhs.mMaterialID; + mMaterial = rhs.mMaterial; if (mMediaEntry != NULL) { delete mMediaEntry; } -- cgit v1.2.3 From 269b8b7de53f368791fbffde8a6f8d47d9cbbcdc Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 10 May 2013 10:50:50 +0200 Subject: NORSPEC-102 Rapid materials updates are not smooth to viewer which is editing the object --- indra/llprimitive/lltextureentry.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 691216e035..6e5d27bb94 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -61,18 +61,24 @@ LLTextureEntry* LLTextureEntry::newTextureEntry() //=============================================================== LLTextureEntry::LLTextureEntry() : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { init(LLUUID::null,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } LLTextureEntry::LLTextureEntry(const LLUUID& tex_id) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { init(tex_id,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { mID = rhs.mID; mScaleS = rhs.mScaleS; @@ -532,8 +538,16 @@ S32 LLTextureEntry::setGlow(F32 glow) S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) { - if (mMaterialID != pMaterialID) + if ( (mMaterialID != pMaterialID) || (mMaterialUpdatePending && !mSelected) ) { + if (mSelected) + { + mMaterialUpdatePending = true; + mMaterialID = pMaterialID; + return TEM_CHANGE_NONE; + } + + mMaterialUpdatePending = false; mMaterialID = pMaterialID; if (mMaterialID.isNull()) { @@ -548,6 +562,10 @@ S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { if (mMaterial != pMaterialParams) { + if (mSelected) + { + mMaterialUpdatePending = true; + } mMaterial = pMaterialParams; return TEM_CHANGE_TEXTURE; } -- cgit v1.2.3 From f356d7eb9fd730f5f6f5a29fb0706e20876ad3bd Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Sat, 11 May 2013 19:58:56 -0700 Subject: Fix many issues with selection misapplication and rendering not matching applied materials --- indra/llprimitive/lltextureentry.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 53816266eb..1d581da897 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -67,12 +67,16 @@ LLTextureEntry::LLTextureEntry() LLTextureEntry::LLTextureEntry(const LLUUID& tex_id) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { init(tex_id,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { mID = rhs.mID; mScaleS = rhs.mScaleS; @@ -536,23 +540,20 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) if (mMaterialID != pMaterialID) { mMaterialID = pMaterialID; - if (mMaterialID.isNull()) - { - setMaterialParams(NULL); - } - return TEM_CHANGE_TEXTURE; + } - return TEM_CHANGE_NONE; + if (mMaterialID.isNull()) + { + setMaterialParams(NULL); + } + return TEM_CHANGE_TEXTURE; } S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { - if (mMaterial != pMaterialParams) - { - mMaterial = pMaterialParams; - return TEM_CHANGE_TEXTURE; - } - return TEM_CHANGE_NONE; + + mMaterial = pMaterialParams; + return TEM_CHANGE_TEXTURE; } void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry) -- cgit v1.2.3 From 5ac9d9cb05f22099bea8c9312f5e0b234430022a Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 12 May 2013 16:10:31 +0200 Subject: LLMaterialMgr::get() doesn't handle a callback request for LLMaterialID::null --- indra/llprimitive/lltextureentry.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 8365c9d7b6..597f078490 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -550,12 +550,9 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) mMaterialUpdatePending = false; mMaterialID = pMaterialID; + return TEM_CHANGE_TEXTURE; } - if (mMaterialID.isNull()) - { - setMaterialParams(NULL); - } - return TEM_CHANGE_TEXTURE; + return TEM_CHANGE_NONE; } S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) -- cgit v1.2.3 From d9e8ee7cfd323872145c23e4032989f9b7770f55 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Mon, 13 May 2013 13:02:53 -0700 Subject: NORSPEC-178 NORSPEC-179 NORSPEC-180 made enable/disable handling more consistent and increased max range on repeats per meter --- indra/llprimitive/lltextureentry.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 597f078490..ca57f1edbd 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -539,28 +539,21 @@ S32 LLTextureEntry::setGlow(F32 glow) S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) { - if ( (mMaterialID != pMaterialID) || (mMaterialUpdatePending && !mSelected) ) + if (mMaterialID != pMaterialID) { - if (mSelected) + mMaterialID = pMaterialID; + + } + if (mMaterialID.isNull()) { - mMaterialUpdatePending = true; - mMaterialID = pMaterialID; - return TEM_CHANGE_NONE; + setMaterialParams(NULL); } - - mMaterialUpdatePending = false; - mMaterialID = pMaterialID; return TEM_CHANGE_TEXTURE; } - return TEM_CHANGE_NONE; -} S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { - if (mSelected) - { - mMaterialUpdatePending = true; - } + mMaterial = pMaterialParams; return TEM_CHANGE_TEXTURE; } -- cgit v1.2.3 From ad09e2111cd980117ae937b79155ef6c24e4567c Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 14 May 2013 21:14:46 +0200 Subject: NORSPEC-102 & Co Reloaded --- indra/llprimitive/lltextureentry.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index ca57f1edbd..597f078490 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -539,21 +539,28 @@ S32 LLTextureEntry::setGlow(F32 glow) S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) { - if (mMaterialID != pMaterialID) + if ( (mMaterialID != pMaterialID) || (mMaterialUpdatePending && !mSelected) ) { - mMaterialID = pMaterialID; - - } - if (mMaterialID.isNull()) + if (mSelected) { - setMaterialParams(NULL); + mMaterialUpdatePending = true; + mMaterialID = pMaterialID; + return TEM_CHANGE_NONE; } + + mMaterialUpdatePending = false; + mMaterialID = pMaterialID; return TEM_CHANGE_TEXTURE; } + return TEM_CHANGE_NONE; +} S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { - + if (mSelected) + { + mMaterialUpdatePending = true; + } mMaterial = pMaterialParams; return TEM_CHANGE_TEXTURE; } -- cgit v1.2.3 From f782e0192009b249edcb30ca2a5418ec7c1ddfa4 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Sat, 15 Jun 2013 05:18:50 -0700 Subject: NORSPEC-267 fix UI feedback for materials edits not appearing for observers when obj was selected by them --- indra/llprimitive/lltextureentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 597f078490..0db75a0e82 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -545,7 +545,7 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) { mMaterialUpdatePending = true; mMaterialID = pMaterialID; - return TEM_CHANGE_NONE; + return TEM_CHANGE_TEXTURE; } mMaterialUpdatePending = false; -- cgit v1.2.3