summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/lllslconstants.h4
-rw-r--r--indra/llinventory/llinventory.h6
-rw-r--r--indra/llinventory/llpermissions.cpp1
-rw-r--r--indra/llmessage/llcachename.cpp34
-rw-r--r--indra/llmessage/llcachename.h2
-rw-r--r--indra/llui/llfloater.cpp19
-rw-r--r--indra/llui/llmenugl.cpp10
-rw-r--r--indra/llui/llscrollbar.cpp32
-rw-r--r--indra/lscript/lscript_compile/indra.l6
-rw-r--r--indra/lscript/lscript_library/lscript_library.cpp2
-rw-r--r--indra/newview/app_settings/keywords.ini4
-rw-r--r--indra/newview/app_settings/viewerart.xml2
-rw-r--r--indra/newview/linux_tools/client-readme.txt28
-rw-r--r--indra/newview/llagent.cpp16
-rw-r--r--indra/newview/llagent.h1
-rw-r--r--indra/newview/llface.cpp27
-rw-r--r--indra/newview/llfloatertos.cpp37
-rw-r--r--indra/newview/llfloaterworldmap.cpp8
-rw-r--r--indra/newview/llfloaterworldmap.h12
-rw-r--r--indra/newview/llfolderview.cpp11
-rw-r--r--indra/newview/llfolderview.h1
-rw-r--r--indra/newview/llpreviewnotecard.cpp1
-rw-r--r--indra/newview/llpreviewscript.cpp12
-rw-r--r--indra/newview/llspatialpartition.cpp41
-rw-r--r--indra/newview/lltexturectrl.cpp103
-rw-r--r--indra/newview/llviewermenu.cpp16
-rw-r--r--indra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/llviewerobjectlist.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/llvoavatar.cpp11
-rw-r--r--indra/newview/llvovolume.cpp195
-rw-r--r--indra/newview/llvovolume.h1
-rw-r--r--indra/newview/pipeline.h1
33 files changed, 426 insertions, 231 deletions
diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h
index 5c9017e43b..bd14e8ce04 100644
--- a/indra/llcommon/lllslconstants.h
+++ b/indra/llcommon/lllslconstants.h
@@ -136,4 +136,8 @@ const S32 LIST_STAT_SUM_SQUARES = 7;
const S32 LIST_STAT_NUM_COUNT = 8;
const S32 LIST_STAT_GEO_MEAN = 9;
+const S32 STRING_TRIM_HEAD = 0x01;
+const S32 STRING_TRIM_TAIL = 0x02;
+const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
+
#endif
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 8a6fdfd0ad..e19604c9f0 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -364,6 +364,12 @@ struct SetItemOwnerAndGroup
LLPermissions perm = item->getPermissions();
bool is_atomic = (LLAssetType::AT_OBJECT == item->getType()) ? false : true;
perm.setOwnerAndGroup(mAuthorityID, mOwnerID, mGroupID, is_atomic);
+ // If no owner id is set, this is equivalent to a deed action.
+ // Clear 'share with group'.
+ if (mOwnerID.isNull())
+ {
+ perm.setMaskGroup(PERM_NONE);
+ }
item->setPermissions(perm);
}
};
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index ac106eb09c..e55163f30d 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -264,6 +264,7 @@ BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
mOwner.setNull();
}
mMaskBase = mMaskNextOwner;
+ mMaskGroup = PERM_NONE;
mGroup = group;
mIsGroupOwned = true;
fixFairUse();
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 6841dda9a4..339fdda9ef 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -257,6 +257,40 @@ void LLCacheName::addObserver(LLCacheNameCallback callback)
impl.mObservers.push_back(callback);
}
+void LLCacheName::removeObserver(LLCacheNameCallback callback)
+{
+ Observers::iterator it = impl.mObservers.begin();
+ Observers::iterator end = impl.mObservers.end();
+
+ for ( ; it != end; ++it)
+ {
+ const LLCacheNameCallback& cb = (*it);
+ if (cb == callback)
+ {
+ impl.mObservers.erase(it);
+ return;
+ }
+ }
+}
+
+void LLCacheName::cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data)
+{
+ ReplyQueue::iterator it = impl.mReplyQueue.begin();
+ ReplyQueue::iterator end = impl.mReplyQueue.end();
+
+ for(; it != end; ++it)
+ {
+ const PendingReply& reply = (*it);
+
+ if ((callback == reply.mCallback)
+ && (id == reply.mID)
+ && (user_data == reply.mData) )
+ {
+ impl.mReplyQueue.erase(it);
+ return;
+ }
+ }
+}
void LLCacheName::importFile(FILE* fp)
{
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index ec9c467d8b..af49903c88 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -41,6 +41,8 @@ public:
void addObserver(LLCacheNameCallback callback);
void removeObserver(LLCacheNameCallback callback);
+ void cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL);
+
// storing cache on disk; for viewer, in name.cache
void importFile(FILE* fp);
void exportFile(FILE* fp);
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 3b855a6360..0922de70af 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -489,6 +489,15 @@ void LLFloater::setVisible( BOOL visible )
void LLFloater::open() /* Flawfinder: ignore */
{
+ if (mSoundFlags != SILENT
+ // don't play open sound for hosted (tabbed) windows
+ && !getHost()
+ && !sHostp
+ && (!getVisible() || isMinimized()))
+ {
+ make_ui_sound("UISndWindowOpen");
+ }
+
//RN: for now, we don't allow rehosting from one multifloater to another
// just need to fix the bugs
LLMultiFloater* hostp = getHost();
@@ -509,14 +518,6 @@ void LLFloater::open() /* Flawfinder: ignore */
setVisibleAndFrontmost(mAutoFocus);
}
- if (mSoundFlags != SILENT)
- {
- if (!getVisible() || isMinimized())
- {
- make_ui_sound("UISndWindowOpen");
- }
- }
-
onOpen();
}
@@ -535,6 +536,7 @@ void LLFloater::close(bool app_quitting)
if (mSoundFlags != SILENT
&& getVisible()
+ && !getHost()
&& !app_quitting)
{
make_ui_sound("UISndWindowClose");
@@ -2458,7 +2460,6 @@ void LLMultiFloater::open() /* Flawfinder: ignore */
if (mTabContainer->getTabCount() > 0)
{
LLFloater::open(); /* Flawfinder: ignore */
- resizeToContents();
}
else
{
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index a7c9cf0f92..d46a866e2b 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1647,7 +1647,8 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
{
BOOL menu_open = mBranch->getVisible();
- if (getHighlight() && getMenu()->getVisible())
+ // don't do keyboard navigation of top-level menus unless in keyboard mode, or menu expanded
+ if (getHighlight() && getMenu()->getVisible() && (isActive() || LLMenuGL::getKeyboardMode()))
{
if (key == KEY_LEFT)
{
@@ -4144,9 +4145,9 @@ void LLMenuBarGL::checkMenuTrigger()
BOOL LLMenuBarGL::jumpKeysActive()
{
- // require item to be highlighted to activate key triggers
- // as menu bars are always visible
- return getHighlightedItem() && LLMenuGL::jumpKeysActive();
+ // require user to be in keyboard navigation mode to activate key triggers
+ // as menu bars are always visible and it is easy to leave the mouse cursor over them
+ return LLMenuGL::getKeyboardMode() && getHighlightedItem() && LLMenuGL::jumpKeysActive();
}
// rearrange the child rects so they fit the shape of the menu bar.
@@ -4404,6 +4405,7 @@ BOOL LLMenuHolderGL::hideMenus()
BOOL menu_visible = hasVisibleMenu();
if (menu_visible)
{
+ LLMenuGL::setKeyboardMode(FALSE);
// clicked off of menu, hide them all
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index 4a5ae1dadf..c21bbdcc75 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -386,21 +386,23 @@ BOOL LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks)
BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type, void *carge_data, EAcceptance *accept, LLString &tooltip_msg)
{
- if (!drop)
- {
- //TODO: refactor this
- S32 variable_lines = getDocPosMax();
- S32 pos = (VERTICAL == mOrientation) ? y : x;
- S32 thumb_length = (VERTICAL == mOrientation) ? mThumbRect.getHeight() : mThumbRect.getWidth();
- S32 thumb_track_length = (VERTICAL == mOrientation) ? (mRect.getHeight() - 2 * SCROLLBAR_SIZE) : (mRect.getWidth() - 2 * SCROLLBAR_SIZE);
- S32 usable_track_length = thumb_track_length - thumb_length;
- F32 ratio = (VERTICAL == mOrientation) ? F32(pos - SCROLLBAR_SIZE - thumb_length) / usable_track_length
- : F32(pos - SCROLLBAR_SIZE) / usable_track_length;
- S32 new_pos = (VERTICAL == mOrientation) ? llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines )
- : llclamp( S32(ratio * variable_lines + 0.5f), 0, variable_lines );
- changeLine( new_pos - mDocPos, TRUE );
- }
- return TRUE;
+ // enable this to get drag and drop to control scrollbars
+ //if (!drop)
+ //{
+ // //TODO: refactor this
+ // S32 variable_lines = getDocPosMax();
+ // S32 pos = (VERTICAL == mOrientation) ? y : x;
+ // S32 thumb_length = (VERTICAL == mOrientation) ? mThumbRect.getHeight() : mThumbRect.getWidth();
+ // S32 thumb_track_length = (VERTICAL == mOrientation) ? (mRect.getHeight() - 2 * SCROLLBAR_SIZE) : (mRect.getWidth() - 2 * SCROLLBAR_SIZE);
+ // S32 usable_track_length = thumb_track_length - thumb_length;
+ // F32 ratio = (VERTICAL == mOrientation) ? F32(pos - SCROLLBAR_SIZE - thumb_length) / usable_track_length
+ // : F32(pos - SCROLLBAR_SIZE) / usable_track_length;
+ // S32 new_pos = (VERTICAL == mOrientation) ? llclamp( S32(variable_lines - ratio * variable_lines + 0.5f), 0, variable_lines )
+ // : llclamp( S32(ratio * variable_lines + 0.5f), 0, variable_lines );
+ // changeLine( new_pos - mDocPos, TRUE );
+ //}
+ //return TRUE;
+ return FALSE;
}
BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask)
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 2ee219a8ee..e93cc6082d 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -4,7 +4,7 @@ L [a-zA-Z_]
H [a-fA-F0-9]
E [Ee][+-]?{D}+
FS (f|F)
-%e 8000
+%e 9000
%n 4000
%p 5000
@@ -559,6 +559,10 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PARCEL_DETAILS_GROUP" { count(); yylval.ival = PARCEL_DETAILS_GROUP; return(INTEGER_CONSTANT); }
"PARCEL_DETAILS_AREA" { count(); yylval.ival = PARCEL_DETAILS_AREA; return(INTEGER_CONSTANT); }
+"STRING_TRIM_HEAD" { count(); yylval.ival = STRING_TRIM_HEAD; return(INTEGER_CONSTANT); }
+"STRING_TRIM_TAIL" { count(); yylval.ival = STRING_TRIM_TAIL; return(INTEGER_CONSTANT); }
+"STRING_TRIM" { count(); yylval.ival = STRING_TRIM; return(INTEGER_CONSTANT); }
+
{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
{D}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 0a2e896aea..5e87928ae6 100644
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
@@ -403,6 +403,8 @@ void LLScriptLibrary::init()
addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetLinkTexture", NULL, "isi", "llSetLinkTexture(integer link_pos, string texture, integer face)\nSets the texture of face for link_pos"));
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL."));
+
// energy, sleep, dummy_func, name, return type, parameters, help text, gods-only
// IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 0545c38959..bf49c2c5d5 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -468,6 +468,10 @@ PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id.
PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id.
PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters.
+STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string.
+STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string.
+STRING_TRIM Used with llStringTrim to trim both leading and trailing spaces from a string.
+
# string constants
[word .1, .3, .5]
NULL_KEY Indicates an empty key
diff --git a/indra/newview/app_settings/viewerart.xml b/indra/newview/app_settings/viewerart.xml
index 1ae2010002..d56efeae09 100644
--- a/indra/newview/app_settings/viewerart.xml
+++ b/indra/newview/app_settings/viewerart.xml
@@ -113,4 +113,4 @@
<avatar_yes_happy.bvh value="b8c8b2a3-9008-1771-3bfc-90924955ab2d"/>
<avatar_yes_head.bvh value="15dd911d-be82-2856-26db-27659b142875"/>
<avatar_yoga_float.bvh value="42ecd00b-9947-a97c-400a-bbc9174c7aeb"/>
-</settings>
+</settings> \ No newline at end of file
diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt
index 42d7eff0dd..7c972bb8d1 100644
--- a/indra/newview/linux_tools/client-readme.txt
+++ b/indra/newview/linux_tools/client-readme.txt
@@ -71,27 +71,31 @@ you wish.
4. KNOWN ISSUES
-=-=-=-=-=-=-=-
-The following user-visible features are currently not fully implemented on
-the Linux client and are therefore known not to work properly:
+These are the most commonly-encountered known issues which are specific to
+the Alpha release of the Linux client.
+
+* VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as
+ robust as their counterparts for other operating systems, so some advanced
+ Second Life graphical features have been DISABLED by default to aid
+ stability. See PROBLEM 3 in the TROUBLESHOOTING section if you wish to
+ turn these on to possibly enhance your experience.
+
+* MISC - The following user-visible features are not currently fully
+ implemented on the Linux client and are therefore known not to work properly
+ at this time:
* QuickTime movie playback and movie recording
* Video memory detection
* Full Unicode font rendering
* Auto-updater
+* UPLOAD / SAVE / COLOR-PICKER DIALOGS - These only appear when the client
+ is in 'windowed' mode, not 'fullscreen' mode.
+
* UPDATING - when the client detects that a new version of Second Life
is available, it will ask you if you wish to download the new version.
This option is not implemented; to upgrade, you should manually download a
new version from the Second Life web site, <http://www.secondlife.com/>.
-* UPLOAD / SAVE / COLOR-PICKER DIALOGS - These only function when the client
- is in 'windowed' mode, not 'fullscreen' mode.
-
-* GRAPHICAL SPEED/QUALITY - as many Linux graphics drivers are not as robust
- as their counterparts for some other operating systems, advanced Second Life
- graphical features have been disabled to aid stability. See PROBLEM 3 in the
- TROUBLESHOOTING section if you wish to turn these on to enhance your
- experience.
-
5. TROUBLESHOOTING
-=-=-=-=-=-=-=-=-=
@@ -130,8 +134,8 @@ SOLUTION:- As a last resort, you can disable most of Second Life's advanced
from the line which reads '#export LL_GL_NOEXT=x'
PROBLEM 3:- Performance or graphical quality are not as high as I expect.
+PROBLEM:- 'SHINY' doesn't work.
PROBLEM:- I can't turn on Anisotropic Filtering, Ripple Water, or AGP.
-PROBLEM:- 'Shiny' doesn't work.
SOLUTION:- Some graphics performance features in Second Life are disabled
by default for the Linux version due to stability issues with some common
Linux graphic drivers. You can re-enable these features at the slight
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 07daf89f1c..c0ad9ffb03 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4649,14 +4649,26 @@ void LLAgent::requestStopMotion( LLMotion* motion )
// Notify all avatars that a motion has stopped.
// This is needed to clear the animation state bits
LLUUID anim_state = motion->getID();
+ onAnimStop(motion->getID());
// if motion is not looping, it could have stopped by running out of time
// so we need to tell the server this
// llinfos << "Sending stop for motion " << motion->getName() << llendl;
sendAnimationRequest( anim_state, ANIM_REQUEST_STOP );
+}
+void LLAgent::onAnimStop(const LLUUID& id)
+{
// handle automatic state transitions (based on completion of animation playback)
- if (anim_state == ANIM_AGENT_STANDUP)
+ if (id == ANIM_AGENT_STAND)
+ {
+ stopFidget();
+ }
+ else if (id == ANIM_AGENT_AWAY)
+ {
+ clearAFK();
+ }
+ else if (id == ANIM_AGENT_STANDUP)
{
// send stand up command
setControlFlags(AGENT_CONTROL_FINISH_ANIM);
@@ -4665,7 +4677,7 @@ void LLAgent::requestStopMotion( LLMotion* motion )
if (mAvatarObject.notNull() && !mAvatarObject->mBelowWater && rand() % 3 == 0)
sendAnimationRequest( ANIM_AGENT_BRUSH, ANIM_REQUEST_START );
}
- else if (anim_state == ANIM_AGENT_PRE_JUMP || anim_state == ANIM_AGENT_LAND || anim_state == ANIM_AGENT_MEDIUM_LAND)
+ else if (id == ANIM_AGENT_PRE_JUMP || id == ANIM_AGENT_LAND || id == ANIM_AGENT_MEDIUM_LAND)
{
setControlFlags(AGENT_CONTROL_FINISH_ANIM);
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index a8e4d2f0b4..b86dc03807 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -331,6 +331,7 @@ public:
// Animation functions
void requestStopMotion( LLMotion* motion );
+ void onAnimStop(const LLUUID& id);
void sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request);
void sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request);
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index bb76957da1..6c00874982 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -944,19 +944,26 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
U8 mode = vobj->mTexAnimMode;
- if (mode & LLViewerTextureAnim::TRANSLATE)
+ if (!mode)
{
- os = ot = 0.f;
+ clearState(TEXTURE_ANIM);
}
- if (mode & LLViewerTextureAnim::ROTATE)
- {
- r = 0.f;
- cos_ang = 1.f;
- sin_ang = 0.f;
- }
- if (mode & LLViewerTextureAnim::SCALE)
+ else
{
- ms = mt = 1.f;
+ if (mode & LLViewerTextureAnim::TRANSLATE)
+ {
+ os = ot = 0.f;
+ }
+ if (mode & LLViewerTextureAnim::ROTATE)
+ {
+ r = 0.f;
+ cos_ang = 1.f;
+ sin_ang = 0.f;
+ }
+ if (mode & LLViewerTextureAnim::SCALE)
+ {
+ ms = mt = 1.f;
+ }
}
}
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index c178d0d416..f7bf4de34f 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -106,9 +106,9 @@ BOOL LLFloaterTOS::postBuild()
childSetAction("Cancel", onCancel, this);
childSetCommitCallback("tos_agreement", updateAgree, this);
- // this displays the critical message
if ( mType != TOS_TOS )
{
+ // this displays the critical message
LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text");
if (Editor)
{
@@ -118,25 +118,11 @@ BOOL LLFloaterTOS::postBuild()
Editor->setWordWrap(TRUE);
Editor->setFocus(TRUE);
}
- childSetValue("tos_text", LLSD(mMessage));
- };
-
- // this displays the critical message
- if ( mType != TOS_TOS )
- {
- LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text");
- if (Editor)
- {
- Editor->setHandleEditKeysDirectly( TRUE );
- Editor->setEnabled( FALSE );
- Editor->setReadOnlyFgColor(LLColor4::white);
- Editor->setWordWrap(TRUE);
- Editor->setFocus(TRUE);
- }
- childSetValue("tos_text", LLSD(mMessage));
- };
+ childSetValue("tos_text", LLSD(mMessage));
+ return TRUE;
+ }
- #if LL_LIBXUL_ENABLED
+#if LL_LIBXUL_ENABLED
// disable Agree to TOS radio button until the page has fully loaded
LLRadioGroup* tos_agreement = LLUICtrlFactory::getRadioGroupByName(this, "tos_agreement");
if ( tos_agreement )
@@ -163,7 +149,18 @@ BOOL LLFloaterTOS::postBuild()
gResponsePtr = LLIamHere::build( this );
LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr );
};
- #endif
+#else
+ LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text");
+ if (Editor)
+ {
+ Editor->setHandleEditKeysDirectly( TRUE );
+ Editor->setEnabled( FALSE );
+ Editor->setReadOnlyFgColor(LLColor4::white);
+ Editor->setWordWrap(TRUE);
+ Editor->setFocus(TRUE);
+ }
+ childSetValue("tos_text", LLSD(mMessage));
+#endif
return TRUE;
}
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index a39c2be6bf..d8ed27173d 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -439,6 +439,14 @@ void LLFloaterWorldMap::draw()
return;
}
+ // On orientation island, users don't have a home location yet, so don't
+ // let them teleport "home". It dumps them in an often-crowed welcome
+ // area (infohub) and they get confused. JC
+ LLViewerRegion* regionp = gAgent.getRegion();
+ bool agent_on_prelude = (regionp && regionp->isPrelude());
+ bool enable_go_home = gAgent.isGodlike() || !agent_on_prelude;
+ childSetEnabled("Go Home", enable_go_home);
+
updateLocation();
LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 32112a995f..5867ea179c 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -37,18 +37,18 @@ public:
static void *createWorldMapView(void* data);
BOOL postBuild();
- virtual void onClose(bool app_quitting);
+ /*virtual*/ void onClose(bool app_quitting);
static void show(void*, BOOL center_on_target );
static void reloadIcons(void*);
static void toggle(void*);
static void hide(void*);
- virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE );
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- virtual void setVisible(BOOL visible);
- virtual void draw();
+ /*virtual*/ void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE );
+ /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ void draw();
// methods for dealing with inventory. The observe() method is
// called during program startup. inventoryUpdated() will be
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 0dc7daa587..5f37d756fe 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -4449,14 +4449,15 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const
return mSubStringMatchOffset;
}
+// has user modified default filter params?
BOOL LLInventoryFilter::isActive()
{
- return mFilterOps.mFilterTypes != 0xffffffff
+ return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
|| mFilterSubString.size()
- || mFilterOps.mPermissions != PERM_NONE
- || mFilterOps.mMinDate != 0
- || mFilterOps.mMaxDate != U32_MAX
- || mFilterOps.mHoursAgo != 0;
+ || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
+ || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
+ || mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate
+ || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
}
BOOL LLInventoryFilter::isModified()
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 575d05cd0a..84dcddedbb 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -798,7 +798,6 @@ public:
static void idle(void* user_data);
- void setAutoSelectOverride(bool override) { mAutoSelectOverride = override; }
BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
BOOL getDebugFilters() { return mDebugFilters; }
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 154ce5b07c..be6ef4caf4 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -128,6 +128,7 @@ BOOL LLPreviewNotecard::postBuild()
if (ed)
{
ed->setNotecardInfo(mNotecardItemID, mObjectID);
+ ed->makePristine();
}
return TRUE;
}
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index a7d29a6591..eb86934a54 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -169,6 +169,18 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(std::string title, LLRect rect, LLS
sInstance = this;
childSetFocus("search_text", TRUE);
+
+ // find floater in which script panel is embedded
+ LLView* viewp = (LLView*)editor_core;
+ while(viewp)
+ {
+ if (viewp->getWidgetType() == WIDGET_TYPE_FLOATER)
+ {
+ ((LLFloater*)viewp)->addDependentFloater(this);
+ break;
+ }
+ viewp = viewp->getParent();
+ }
}
//static
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 62903011cf..38c4f72fc9 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2312,6 +2312,14 @@ S32 LLSpatialPartition::getLights(const LLVector3& pos, F32 rad, LLDrawable::dra
return getDrawables(pos, rad, results, TRUE);
}
+void pushVerts(LLDrawInfo* params, U32 mask)
+{
+ params->mVertexBuffer->setBuffer(mask);
+ U32* indicesp = (U32*) params->mVertexBuffer->getIndicesPointer();
+ glDrawRangeElements(params->mParticle ? GL_POINTS : GL_TRIANGLES, params->mStart, params->mEnd, params->mCount,
+ GL_UNSIGNED_INT, indicesp+params->mOffset);
+}
+
void pushVerts(LLSpatialGroup* group, U32 mask)
{
LLDrawInfo* params = NULL;
@@ -2321,10 +2329,7 @@ void pushVerts(LLSpatialGroup* group, U32 mask)
for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
params = *j;
- params->mVertexBuffer->setBuffer(mask);
- U32* indicesp = (U32*) params->mVertexBuffer->getIndicesPointer();
- glDrawRangeElements(params->mParticle ? GL_POINTS : GL_TRIANGLES, params->mStart, params->mEnd, params->mCount,
- GL_UNSIGNED_INT, indicesp+params->mOffset);
+ pushVerts(params, mask);
}
}
}
@@ -2617,6 +2622,18 @@ void renderPoints(LLDrawable* drawablep)
glEnd();
}
+void renderTextureAnim(LLDrawInfo* params)
+{
+ if (!params->mTextureMatrix)
+ {
+ return;
+ }
+
+ LLGLEnable blend(GL_BLEND);
+ glColor4f(1,1,0,0.5f);
+ pushVerts(params, LLVertexBuffer::MAP_VERTEX);
+}
+
class LLOctreeRenderNonOccluded : public LLOctreeTraveler<LLDrawable>
{
public:
@@ -2685,6 +2702,19 @@ public:
renderPoints(drawable);
}
}
+
+ for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
+ {
+ std::vector<LLDrawInfo*>& draw_vec = i->second;
+ for (std::vector<LLDrawInfo*>::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j)
+ {
+ LLDrawInfo* draw_info = *j;
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM))
+ {
+ renderTextureAnim(draw_info);
+ }
+ }
+ }
}
};
@@ -2694,7 +2724,8 @@ void LLSpatialPartition::renderDebug()
LLPipeline::RENDER_DEBUG_OCCLUSION |
LLPipeline::RENDER_DEBUG_BBOXES |
LLPipeline::RENDER_DEBUG_POINTS |
- LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
+ LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY |
+ LLPipeline::RENDER_DEBUG_TEXTURE_ANIM))
{
return;
}
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 794281965e..39feb40109 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -95,6 +95,7 @@ public:
EAcceptance *accept,
LLString& tooltip_msg);
virtual void draw();
+ virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
// LLFloater overrides
virtual void onClose(bool app_quitting);
@@ -156,6 +157,7 @@ protected:
BOOL mCanApplyImmediately;
BOOL mNoCopyTextureSelected;
F32 mContextConeOpacity;
+ LLSaveFolderState mSavedFolderState;
};
LLFloaterTexturePicker::LLFloaterTexturePicker(
@@ -210,13 +212,16 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
- mInventoryPanel->setAutoSelectOverride(true);
mInventoryPanel->setFilterTypes(filter_types);
//mInventoryPanel->setFilterPermMask(getFilterPermMask()); //Commented out due to no-copy texture loss.
mInventoryPanel->setFilterPermMask(immediate_filter_perm_mask);
mInventoryPanel->setSelectCallback(onSelectionChange, this);
mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
mInventoryPanel->setAllowMultiSelect(FALSE);
+
+ // store this filter as the default one
+ mInventoryPanel->getRootFolder()->getFilter()->markDefault();
+
// Commented out to stop opening all folders with textures
// mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_TEXTURE);
@@ -244,6 +249,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
updateFilterPermMask();
setCanMinimize(FALSE);
+
+ mSavedFolderState.setApply(FALSE);
}
LLFloaterTexturePicker::~LLFloaterTexturePicker()
@@ -379,6 +386,41 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
return handled;
}
+BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
+{
+ LLFolderView* root_folder = mInventoryPanel->getRootFolder();
+
+ if (!called_from_parent && root_folder &&
+ mSearchEdit && mSearchEdit->hasFocus() &&
+ (key == KEY_RETURN || key == KEY_DOWN) && mask == MASK_NONE)
+ {
+ if (!root_folder->getCurSelectedItem())
+ {
+ LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID());
+ if (itemp)
+ {
+ root_folder->setSelection(itemp, FALSE, FALSE);
+ }
+ }
+ root_folder->scrollToShowSelection();
+
+ // move focus to inventory proper
+ root_folder->setFocus(TRUE);
+
+ // treat this as a user selection of the first filtered result
+ commitIfImmediateSet();
+
+ return TRUE;
+ }
+
+ if (root_folder->hasFocus() && key == KEY_UP)
+ {
+ mSearchEdit->focusFirstItem(TRUE);
+ }
+
+ return LLFloater::handleKeyHere(key, mask, called_from_parent);
+}
+
// virtual
void LLFloaterTexturePicker::onClose(bool app_quitting)
{
@@ -738,53 +780,36 @@ void LLFloaterTexturePicker::onSearchEdit(const LLString& search_string, void* u
{
LLFloaterTexturePicker* picker = (LLFloaterTexturePicker*)user_data;
- std::string filter_text = search_string;
-
- if (filter_text.empty()&& picker->mInventoryPanel->getFilterSubString().empty())
- {
- // current filter and new filter empty, do nothing
- return;
- }
- std::string upper_case_search_string = filter_text;
+ std::string upper_case_search_string = search_string;
LLString::toUpper(upper_case_search_string);
- picker->mInventoryPanel->setFilterSubString(upper_case_search_string);
-
- LLFolderView* root_folder = picker->mInventoryPanel->getRootFolder();
-
- //if (search_string.size())
- //{
- // LLSelectFirstFilteredItem filter;
- // root_folder->applyFunctorRecursively(filter);
- // //...and scroll to show it
- // root_folder->scrollToShowSelection();
- //}
-
- KEY key = gKeyboard->currentKey();
-
- if ((key == KEY_RETURN || key == KEY_DOWN) && gKeyboard->currentMask(FALSE) == MASK_NONE)
+ if (upper_case_search_string.empty())
{
- if (search_string.size())
+ if (picker->mInventoryPanel->getFilterSubString().empty())
{
- LLSelectFirstFilteredItem filter;
- root_folder->applyFunctorRecursively(filter);
- //...and scroll to show it
- root_folder->scrollToShowSelection();
+ // current filter and new filter empty, do nothing
+ return;
}
- if (!root_folder->getCurSelectedItem())
+ picker->mSavedFolderState.setApply(TRUE);
+ picker->mInventoryPanel->getRootFolder()->applyFunctorRecursively(picker->mSavedFolderState);
+ // add folder with current item to list of previously opened folders
+ LLOpenFoldersWithSelection opener;
+ picker->mInventoryPanel->getRootFolder()->applyFunctorRecursively(opener);
+ picker->mInventoryPanel->getRootFolder()->scrollToShowSelection();
+
+ }
+ else if (picker->mInventoryPanel->getFilterSubString().empty())
+ {
+ // first letter in search term, save existing folder open state
+ if (!picker->mInventoryPanel->getRootFolder()->isFilterActive())
{
- LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID());
- if (itemp)
- {
- root_folder->setSelection(itemp, FALSE, FALSE);
- }
+ picker->mSavedFolderState.setApply(FALSE);
+ picker->mInventoryPanel->getRootFolder()->applyFunctorRecursively(picker->mSavedFolderState);
}
-
- // move focus to inventory proper
- root_folder->setFocus(TRUE);
- root_folder->scrollToShowSelection();
}
+
+ picker->mInventoryPanel->setFilterSubString(upper_case_search_string);
}
//static
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a638d99381..0cce868b4a 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1131,6 +1131,9 @@ void init_debug_rendering_menu(LLMenuGL* menu)
sub_menu->append(new LLMenuItemCheckGL("Occlusion", &LLPipeline::toggleRenderDebug, NULL,
&LLPipeline::toggleRenderDebugControl,
(void*)LLPipeline::RENDER_DEBUG_OCCLUSION));
+ sub_menu->append(new LLMenuItemCheckGL("Animated Textures", &LLPipeline::toggleRenderDebug, NULL,
+ &LLPipeline::toggleRenderDebugControl,
+ (void*)LLPipeline::RENDER_DEBUG_TEXTURE_ANIM));
sub_menu->append(new LLMenuItemCheckGL("Texture Priority", &LLPipeline::toggleRenderDebug, NULL,
&LLPipeline::toggleRenderDebugControl,
(void*)LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY));
@@ -7787,6 +7790,18 @@ class LLWorldEnableSetHomeLocation : public view_listener_t
}
};
+class LLWorldEnableTeleportHome : public view_listener_t
+{
+ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+ {
+ LLViewerRegion* regionp = gAgent.getRegion();
+ bool agent_on_prelude = (regionp && regionp->isPrelude());
+ bool enable_teleport_home = gAgent.isGodlike() || !agent_on_prelude;
+ gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_teleport_home);
+ return true;
+ }
+};
+
BOOL enable_region_owner(void*)
{
if(gAgent.getRegion() && gAgent.getRegion()->getOwner() == gAgent.getID())
@@ -8603,6 +8618,7 @@ void initialize_menu_actions()
(new LLWorldEnableCreateLandmark())->registerListener(gMenuHolder, "World.EnableCreateLandmark");
(new LLWorldEnableSetHomeLocation())->registerListener(gMenuHolder, "World.EnableSetHomeLocation");
+ (new LLWorldEnableTeleportHome())->registerListener(gMenuHolder, "World.EnableTeleportHome");
(new LLWorldEnableBuyLand())->registerListener(gMenuHolder, "World.EnableBuyLand");
(new LLWorldCheckAlwaysRun())->registerListener(gMenuHolder, "World.CheckAlwaysRun");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 6d4170e437..ed13f6dbe9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1978,6 +1978,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
is_linden = gMuteListp->isLinden(from_name);
}
+ BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
chatter = gObjectList.findObject(from_id);
if (chatter)
{
@@ -1997,7 +1998,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
// only pay attention to other people chatting
- if ((is_linden || (!is_muted && !is_busy))
+ if (is_audible
+ && (is_linden || (!is_muted && !is_busy))
&& chatter != gAgent.getAvatarObject())
{
gAgent.heardChat(chat);
@@ -2010,7 +2012,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
is_owned_by_me = chatter->permYouOwner();
}
- BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
if (is_audible)
{
BOOL visible_in_chat_bubble = FALSE;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 68193604bb..b80aabab34 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1217,7 +1217,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
if (!objectp)
{
- llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << llendl;
+// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << llendl;
return NULL;
}
@@ -1251,7 +1251,7 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
if (!objectp)
{
- llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl;
+// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl;
return NULL;
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 36c08321ed..a2dadcc438 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2172,7 +2172,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
// don't pass keys on to world when something in ui has focus
- return gFocusMgr.childHasKeyboardFocus(mRootView) || (gMenuBarView && gMenuBarView->getHighlightedItem());
+ return gFocusMgr.childHasKeyboardFocus(mRootView)
+ || LLMenuGL::getKeyboardMode()
+ || (gMenuBarView && gMenuBarView->getHighlightedItem() && gMenuBarView->getHighlightedItem()->isActive());
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index afeffa0aec..f9ee5064a1 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2014,7 +2014,7 @@ void LLVOAvatar::buildCharacter()
continue;
}
LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(),
- NULL, &object_selected_and_point_valid, &attach_label, NULL);
+ NULL, &object_selected_and_point_valid, &attach_label, attachment);
item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", mAttachmentPoints.reverseLookup(attachment));
gAttachSubMenu->append(item);
@@ -4508,14 +4508,7 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
{
if (mIsSelf)
{
- if (id == ANIM_AGENT_STAND)
- {
- LLAgent::stopFidget();
- }
- else if (id == ANIM_AGENT_AWAY)
- {
- gAgent.clearAFK();
- }
+ gAgent.onAnimStop(id);
}
if (id == ANIM_AGENT_WALK)
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index d08c5311d7..6619531953 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -59,6 +59,7 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
: LLViewerObject(id, pcode, regionp),
mVolumeImpl(NULL)
{
+ mTexAnimMode = 0;
mRelativeXform.identity();
mRelativeXformInvTrans.identity();
@@ -118,8 +119,8 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
mTextureAnimp->reset();
}
}
+ mTexAnimMode = 0;
mTextureAnimp->unpackTAMessage(mesgsys, block_num);
- gPipeline.markTextured(mDrawable);
}
else
{
@@ -129,6 +130,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
mTextureAnimp = NULL;
gPipeline.markTextured(mDrawable);
mFaceMappingChanged = TRUE;
+ mTexAnimMode = 0;
}
}
@@ -201,12 +203,16 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
mTextureAnimp->reset();
}
}
+ mTexAnimMode = 0;
mTextureAnimp->unpackTAMessage(*dp);
}
- else
+ else if (mTextureAnimp)
{
delete mTextureAnimp;
mTextureAnimp = NULL;
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ mTexAnimMode = 0;
}
}
else
@@ -229,94 +235,105 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
}
-BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOVolume::animateTextures()
{
- LLViewerObject::idleUpdate(agent, world, time);
-
- ///////////////////////
- //
- // Do texture animation stuff
- //
-
- if (mTextureAnimp && gAnimateTextures)
+ F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f;
+ S32 result;
+
+ if (result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot))
{
- F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f;
- S32 result;
- if (result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot))
+ if (!mTexAnimMode)
{
- mTexAnimMode = mTextureAnimp->mMode | result;
-
- S32 start, end;
- if (mTextureAnimp->mFace == -1)
- {
- start = 0;
- end = mDrawable->getNumFaces();
- }
- else
+ mFaceMappingChanged = TRUE;
+ gPipeline.markTextured(mDrawable);
+ }
+ mTexAnimMode = result | mTextureAnimp->mMode;
+
+ S32 start=0, end=mDrawable->getNumFaces()-1;
+ if (mTextureAnimp->mFace >= 0 && mTextureAnimp->mFace <= end)
+ {
+ start = end = mTextureAnimp->mFace;
+ }
+
+ for (S32 i = start; i <= end; i++)
+ {
+ LLQuaternion quat;
+ LLVector3 scale(1,1,1);
+
+ LLFace* facep = mDrawable->getFace(i);
+ const LLTextureEntry* te = facep->getTextureEntry();
+ LLMatrix4& tex_mat = facep->mTextureMatrix;
+
+ if (!te)
{
- start = mTextureAnimp->mFace;
- end = start + 1;
+ continue;
}
-
- for (S32 i = start; i < end; i++)
+ if (result & LLViewerTextureAnim::ROTATE)
{
- LLQuaternion quat;
- LLVector3 scale(1,1,1);
-
- LLFace* facep = mDrawable->getFace(i);
- const LLTextureEntry* te = facep->getTextureEntry();
- LLMatrix4& tex_mat = facep->mTextureMatrix;
-
- if (!te)
+ F32 axis = -1;
+ F32 s,t;
+ te->getScale(&s,&t);
+ if (s < 0)
{
- continue;
+ axis = -axis;
}
- if (result & LLViewerTextureAnim::ROTATE)
+ if (t < 0)
{
- F32 axis = -1;
- F32 s,t;
- te->getScale(&s,&t);
- if (s < 0)
- {
- axis = -axis;
- }
- if (t < 0)
- {
- axis = -axis;
- }
- quat.setQuat(rot, 0, 0, axis);
+ axis = -axis;
}
-
- if (!(result & LLViewerTextureAnim::TRANSLATE))
- {
- te->getOffset(&off_s,&off_t);
- }
+ quat.setQuat(rot, 0, 0, axis);
+ }
+
+ if (!(result & LLViewerTextureAnim::TRANSLATE))
+ {
+ te->getOffset(&off_s,&off_t);
+ }
- LLVector3 trans(off_s+0.5f, off_t+0.5f, 0.f);
+ LLVector3 trans(off_s+0.5f, off_t+0.5f, 0.f);
- tex_mat.identity();
- tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
- tex_mat.rotate(quat);
-
- if (result & LLViewerTextureAnim::SCALE)
- {
- scale.setVec(scale_s, scale_t, 1.f);
- LLMatrix4 mat;
- mat.initAll(scale, LLQuaternion(), LLVector3());
- tex_mat *= mat;
- }
-
- tex_mat.translate(trans);
+ tex_mat.identity();
+ tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
+ tex_mat.rotate(quat);
+
+ if (result & LLViewerTextureAnim::SCALE)
+ {
+ scale.setVec(scale_s, scale_t, 1.f);
+ LLMatrix4 mat;
+ mat.initAll(scale, LLQuaternion(), LLVector3());
+ tex_mat *= mat;
}
+
+ tex_mat.translate(trans);
}
- else
+ }
+ else
+ {
+ if (mTexAnimMode && mTextureAnimp->mRate == 0)
{
- if (mTextureAnimp->mRate == 0)
- {
- mTexAnimMode = 0;
- }
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ mTexAnimMode = 0;
}
}
+}
+BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+{
+ LLViewerObject::idleUpdate(agent, world, time);
+
+ if (mDead || mDrawable.isNull())
+ {
+ return TRUE;
+ }
+
+ ///////////////////////
+ //
+ // Do texture animation stuff
+ //
+
+ if (mTextureAnimp && gAnimateTextures)
+ {
+ animateTextures();
+ }
// Dispatch to implementation
if (mVolumeImpl)
@@ -717,15 +734,26 @@ void LLVOVolume::setParent(LLViewerObject* parent)
void LLVOVolume::regenFaces()
{
// remove existing faces
- deleteFaces();
+ BOOL count_changed = mNumFaces != getNumTEs();
- // add new faces
- mNumFaces = getNumTEs();
+ if (count_changed)
+ {
+ deleteFaces();
+ // add new faces
+ mNumFaces = getNumTEs();
+ }
+
for (S32 i = 0; i < mNumFaces; i++)
{
- LLFace* facep = addFace(i);
- facep->setViewerObject(this);
+ LLFace* facep = count_changed ? addFace(i) : mDrawable->getFace(i);
facep->setTEOffset(i);
+ facep->setTexture(getTEImage(i));
+ facep->setViewerObject(this);
+ }
+
+ if (!count_changed)
+ {
+ updateFaceFlags();
}
}
@@ -2062,21 +2090,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
facep->setState(LLFace::FULLBRIGHT);
}
- if (vobj->mTextureAnimp)
+ if (vobj->mTextureAnimp && vobj->mTexAnimMode)
{
if (vobj->mTextureAnimp->mFace <= -1)
{
S32 face;
for (face = 0; face < vobj->getNumTEs(); face++)
{
- if (vobj->mTextureAnimp->mMode & LLViewerTextureAnim::ON)
- {
- drawablep->getFace(face)->setState(LLFace::TEXTURE_ANIM);
- }
- else
- {
- drawablep->getFace(face)->clearState(LLFace::TEXTURE_ANIM);
- }
+ drawablep->getFace(face)->setState(LLFace::TEXTURE_ANIM);
}
}
else if (vobj->mTextureAnimp->mFace < vobj->getNumTEs())
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 76b469e6aa..16a91bce8e 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -71,6 +71,7 @@ public:
void deleteFaces();
+ void animateTextures();
/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
/*virtual*/ BOOL isActive() const;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 0fadae0a61..5061ef742c 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -327,6 +327,7 @@ public:
RENDER_DEBUG_TEXTURE_AREA = 0x08000,
RENDER_DEBUG_FACE_AREA = 0x10000,
RENDER_DEBUG_PARTICLES = 0x20000,
+ RENDER_DEBUG_TEXTURE_ANIM = 0x40000,
};
LLPointer<LLViewerImage> mAlphaSizzleImagep;