From da68d3a57ecb27eba5d7efb8ff77d9640c0be65e Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:57 -0500 Subject: Second Life viewer sources 1.16.0.5 --- linden/indra/llcommon/llbase32.cpp | 32 +- linden/indra/llcommon/llchat.h | 3 +- linden/indra/llcommon/llcommon_vc8.vcproj | 1522 ++++++++++---------- linden/indra/llcommon/lllslconstants.h | 6 + linden/indra/llcommon/llversion.h | 6 +- linden/indra/llinventory/llinventory_vc8.vcproj | 8 + linden/indra/llinventory/llparcel.h | 2 +- linden/indra/llinventory/lltransactiontypes.h | 2 +- linden/indra/llmath/llvolume.cpp | 278 +++- linden/indra/llmath/llvolume.h | 44 +- linden/indra/llmessage/llcachename.cpp | 14 +- linden/indra/llmessage/llcurl.cpp | 33 +- linden/indra/llmessage/llcurl.h | 33 +- linden/indra/llmessage/llmessage_vc8.vcproj | 80 +- linden/indra/llmessage/lluseroperation.h | 2 +- linden/indra/llmessage/message_prehash.cpp | 14 +- linden/indra/llmessage/message_prehash.h | 7 +- linden/indra/llprimitive/llprimitive.cpp | 97 +- linden/indra/llprimitive/llprimitive.h | 28 +- linden/indra/llprimitive/lltextureentry.cpp | 15 +- linden/indra/llprimitive/lltextureentry.h | 8 +- linden/indra/llui/lldraghandle.cpp | 14 +- linden/indra/llui/llfloater.cpp | 79 +- linden/indra/llui/llfloater.h | 3 +- linden/indra/llwindow/llwindow_vc8.vcproj | 225 +-- linden/indra/lscript/lscript_compile/indra.l | 8 +- .../lscript/lscript_library/lscript_library.cpp | 1 + .../indra/newview/English.lproj/InfoPlist.strings | 4 +- linden/indra/newview/Info-SecondLife.plist | 2 +- linden/indra/newview/app_settings/keywords.ini | 10 +- linden/indra/newview/llagent.cpp | 8 +- linden/indra/newview/llassetuploadresponders.cpp | 4 +- linden/indra/newview/llcontroldef.cpp | 10 +- linden/indra/newview/llface.cpp | 21 +- linden/indra/newview/llfirstuse.h | 4 +- linden/indra/newview/llfloaterimagepreview.cpp | 215 ++- linden/indra/newview/llfloaterimagepreview.h | 29 + linden/indra/newview/llfloaterlandholdings.cpp | 2 +- linden/indra/newview/llfloaterregioninfo.cpp | 2 +- linden/indra/newview/llgivemoney.cpp | 6 +- linden/indra/newview/llgivemoney.h | 4 +- linden/indra/newview/llhoverview.cpp | 2 +- linden/indra/newview/llmanipscale.cpp | 4 +- linden/indra/newview/llpanelgrouplandmoney.cpp | 18 +- linden/indra/newview/llpanelgrouplandmoney.h | 2 +- linden/indra/newview/llpanelobject.cpp | 199 +++ linden/indra/newview/llpanelobject.h | 15 +- linden/indra/newview/llpreview.cpp | 16 +- linden/indra/newview/llstartup.cpp | 4 +- linden/indra/newview/llviewercamera.cpp | 2 +- linden/indra/newview/llviewerinventory.cpp | 1 + linden/indra/newview/llviewermessage.cpp | 2 +- linden/indra/newview/llviewerobject.cpp | 15 +- linden/indra/newview/llviewerregion.cpp | 2 +- linden/indra/newview/llvovolume.cpp | 126 +- linden/indra/newview/llvovolume.h | 4 + linden/indra/newview/newview_vc8.vcproj | 75 +- linden/indra/newview/releasenotes.txt | 52 + linden/indra/newview/res/newViewRes.rc | 8 +- linden/indra/newview/skins/xui/en-us/alerts.xml | 1289 ++++++++--------- .../newview/skins/xui/en-us/floater_about.xml | 6 +- .../skins/xui/en-us/floater_image_preview.xml | 3 + .../newview/skins/xui/en-us/floater_tools.xml | 7 + linden/indra/test/test_vc8.vcproj | 110 +- 64 files changed, 2928 insertions(+), 1919 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/llcommon/llbase32.cpp b/linden/indra/llcommon/llbase32.cpp index 711ba63..27f7284 100644 --- a/linden/indra/llcommon/llbase32.cpp +++ b/linden/indra/llcommon/llbase32.cpp @@ -6,6 +6,32 @@ * Based on code from bitter * http://ghostwhitecrab.com/bitter/ * + * Some parts of this file are: + * Copyright (c) 2007-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + */ + +/** * Copyright (c) 2006 Christian Biere * All rights reserved. * @@ -192,6 +218,8 @@ base32_decode(char *dst, size_t size, const void *data, size_t len) */ +// The following is +// Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. // static std::string LLBase32::encode(const U8* input, size_t input_size) { @@ -207,8 +235,8 @@ std::string LLBase32::encode(const U8* input, size_t input_size) size_t encoded = base32_encode(&output[0], output_size, input, input_size); - llinfos << "encoded " << encoded << " into buffer of size " << output_size - << llendl; + llinfos << "encoded " << encoded << " into buffer of size " + << output_size << llendl; } return output; } diff --git a/linden/indra/llcommon/llchat.h b/linden/indra/llcommon/llchat.h index b1635a7..bb2610b 100644 --- a/linden/indra/llcommon/llchat.h +++ b/linden/indra/llcommon/llchat.h @@ -49,7 +49,8 @@ typedef enum e_chat_type CHAT_TYPE_SHOUT = 2, CHAT_TYPE_START = 4, CHAT_TYPE_STOP = 5, - CHAT_TYPE_DEBUG_MSG = 6 + CHAT_TYPE_DEBUG_MSG = 6, + CHAT_TYPE_REGION = 7 } EChatType; typedef enum e_chat_audible_level diff --git a/linden/indra/llcommon/llcommon_vc8.vcproj b/linden/indra/llcommon/llcommon_vc8.vcproj index 0a34543..15371f5 100644 --- a/linden/indra/llcommon/llcommon_vc8.vcproj +++ b/linden/indra/llcommon/llcommon_vc8.vcproj @@ -1,759 +1,763 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llcommon/lllslconstants.h b/linden/indra/llcommon/lllslconstants.h index 59d1cc8..afe4a9e 100644 --- a/linden/indra/llcommon/lllslconstants.h +++ b/linden/indra/llcommon/lllslconstants.h @@ -75,6 +75,7 @@ const S32 LSL_PRIM_TYPE_SPHERE = 3; const S32 LSL_PRIM_TYPE_TORUS = 4; const S32 LSL_PRIM_TYPE_TUBE = 5; const S32 LSL_PRIM_TYPE_RING = 6; +const S32 LSL_PRIM_TYPE_SCULPT = 7; const S32 LSL_PRIM_HOLE_DEFAULT = 0x00; const S32 LSL_PRIM_HOLE_CIRCLE = 0x10; @@ -117,6 +118,11 @@ const S32 LSL_PRIM_BUMP_STUCCO = 15; const S32 LSL_PRIM_BUMP_SUCTION = 16; const S32 LSL_PRIM_BUMP_WEAVE = 17; +const S32 LSL_PRIM_SCULPT_TYPE_SPHERE = 1; +const S32 LSL_PRIM_SCULPT_TYPE_TORUS = 2; +const S32 LSL_PRIM_SCULPT_TYPE_PLANE = 3; +const S32 LSL_PRIM_SCULPT_TYPE_CYLINDER = 4; + const S32 LSL_ALL_SIDES = -1; const S32 LSL_LINK_ROOT = 1; const S32 LSL_LINK_FIRST_CHILD = 2; diff --git a/linden/indra/llcommon/llversion.h b/linden/indra/llcommon/llversion.h index a76551d..f2ea20d 100644 --- a/linden/indra/llcommon/llversion.h +++ b/linden/indra/llcommon/llversion.h @@ -30,8 +30,8 @@ #define LL_LLVERSION_H const S32 LL_VERSION_MAJOR = 1; -const S32 LL_VERSION_MINOR = 15; -const S32 LL_VERSION_PATCH = 1; -const S32 LL_VERSION_BUILD = 3; +const S32 LL_VERSION_MINOR = 16; +const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_BUILD = 5; #endif diff --git a/linden/indra/llinventory/llinventory_vc8.vcproj b/linden/indra/llinventory/llinventory_vc8.vcproj index d66f352..2763cac 100644 --- a/linden/indra/llinventory/llinventory_vc8.vcproj +++ b/linden/indra/llinventory/llinventory_vc8.vcproj @@ -238,6 +238,10 @@ > + + @@ -284,6 +288,10 @@ > + + diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h index cc20182..3144eb9 100644 --- a/linden/indra/llinventory/llparcel.h +++ b/linden/indra/llinventory/llparcel.h @@ -347,7 +347,7 @@ public: void startSale(const LLUUID& buyer_id, BOOL is_buyer_group); // do the expiration logic, which needs to return values usable in - // a money transaction. + // a L$ transaction. void expireSale(U32& type, U8& flags, LLUUID& from_id, LLUUID& to_id); void completeSale(U32& type, U8& flags, LLUUID& to_id); void clearSale(); diff --git a/linden/indra/llinventory/lltransactiontypes.h b/linden/indra/llinventory/lltransactiontypes.h index 49ba6aa..6eaced9 100644 --- a/linden/indra/llinventory/lltransactiontypes.h +++ b/linden/indra/llinventory/lltransactiontypes.h @@ -35,7 +35,7 @@ // insert into transaction_description // set type = 1000, description = 'Object Claim'; // -// Also add it to the various money string lookups on the dataserver +// Also add it to the various L$ string lookups on the dataserver // in lldatamoney // Money transaction failure codes diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 89644a5..fb745b8 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -454,9 +454,18 @@ LLProfile::Face* LLProfile::addHole(BOOL flat, F32 sides, F32 offset, F32 box_ho return face; } -BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split) + +F32 next_power_of_two(F32 value) { - if (!mDirty) + S32 power = (S32)llceil((F32)log((double)value)/(F32)log(2.0)); + return pow(2.0f, power); +} + + + +BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted) +{ + if ((!mDirty) && (!is_sculpted)) { return FALSE; } @@ -592,10 +601,14 @@ BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split) circle_detail = llceil(circle_detail / 4.0f) * 4.0f; } } + + S32 sides = (S32)circle_detail; + + if (is_sculpted) + sides = (S32)next_power_of_two((F32)sides); + + genNGon(sides); - //llinfos << "(CIRCLE) detail: " << detail << "; genNGon(" - // << llfloor(circle_detail) << ")" << llendl; - genNGon(llfloor(circle_detail)); if (path_open) { addCap (LL_FACE_PATH_BEGIN); @@ -844,7 +857,7 @@ BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword " << keyword << " in profile import" << llendl; + llwarns << "unknown keyword " << keyword << " in profile import" << llendl; } } @@ -1074,9 +1087,9 @@ const LLVector2 LLPathParams::getEndScale() const return end_scale; } -BOOL LLPath::generate(F32 detail, S32 split) +BOOL LLPath::generate(F32 detail, S32 split, BOOL is_sculpted) { - if (!mDirty) + if ((!mDirty) && (!is_sculpted)) { return FALSE; } @@ -1131,7 +1144,13 @@ BOOL LLPath::generate(F32 detail, S32 split) { // Increase the detail as the revolutions and twist increase. F32 twist_mag = fabs(mParams.getTwistBegin() - mParams.getTwist()); - genNGon(llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions())); + + S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions()); + + if (is_sculpted) + sides = (S32)next_power_of_two((F32)sides); + + genNGon(sides); } break; @@ -1194,7 +1213,7 @@ BOOL LLPath::generate(F32 detail, S32 split) return TRUE; } -BOOL LLDynamicPath::generate(F32 detail, S32 split) +BOOL LLDynamicPath::generate(F32 detail, S32 split, BOOL is_sculpted) { mOpen = TRUE; // Draw end caps if (getPathLength() == 0) @@ -1555,13 +1574,15 @@ LLProfile::~LLProfile() } -S32 LLVolume::mNumMeshPoints = 0; +S32 LLVolume::sNumMeshPoints = 0; LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL generate_single_face, const BOOL is_unique) : mParams(params) { mUnique = is_unique; mFaceMask = 0x0; mDetail = detail; + mSculptLevel = -2; + // set defaults if (mParams.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE) { @@ -1578,7 +1599,10 @@ LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL ge mGenerateSingleFace = generate_single_face; generate(); - createVolumeFaces(); + if (mParams.getSculptID().isNull()) + { + createVolumeFaces(); + } } void LLVolume::regen() @@ -1589,7 +1613,7 @@ void LLVolume::regen() LLVolume::~LLVolume() { - mNumMeshPoints -= mMesh.size(); + sNumMeshPoints -= mMesh.size(); delete mPathp; delete mProfilep; delete[] mVolumeFaces; @@ -1640,9 +1664,9 @@ BOOL LLVolume::generate() if (regenPath || regenProf ) { - mNumMeshPoints -= mMesh.size(); + sNumMeshPoints -= mMesh.size(); mMesh.resize(mProfilep->mProfile.size() * mPathp->mPath.size()); - mNumMeshPoints += mMesh.size(); + sNumMeshPoints += mMesh.size(); S32 s = 0, t=0; S32 sizeS = mPathp->mPath.size(); @@ -1772,6 +1796,128 @@ void LLVolume::createVolumeFaces() } +// sculpt replaces generate() for sculpted surfaces +void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) +{ + BOOL data_is_empty = FALSE; + + if (sculpt_width == 0 || sculpt_height == 0 || sculpt_data == NULL) + { + sculpt_level = -1; + data_is_empty = TRUE; + } + + mPathp->generate(mDetail, 0, TRUE); + mProfilep->generate(mPathp->isOpen(), mDetail, 0, TRUE); + + + S32 sizeS = mPathp->mPath.size(); + S32 sizeT = mProfilep->mProfile.size(); + + sNumMeshPoints -= mMesh.size(); + mMesh.resize(sizeS * sizeT); + sNumMeshPoints += mMesh.size(); + + S32 vertex_change = 0; + // first test to see if image has enough variation to create geometry + if (!data_is_empty) + { + S32 last_index = 0; + for (S32 s = 0; s < sizeS; s++) + for (S32 t = 0; t < sizeT; t++) + { + U32 x = (U32) ((F32)s/(sizeS-1) * (F32) sculpt_width); + U32 y = (U32) ((F32)t/(sizeT-1) * (F32) sculpt_height); + + if (y == sculpt_height) // clamp to bottom row + y = sculpt_height - 1; + + if (x == sculpt_width) // stitch sides + x = 0; + + if ((y == 0) || (y == sculpt_height-1)) // stitch top and bottom + x = sculpt_width / 2; + + U32 index = (x + y * sculpt_width) * sculpt_components; + + if (fabs((F32)(sculpt_data[index] - sculpt_data[last_index])) + + fabs((F32)(sculpt_data[index+1] - sculpt_data[last_index+1])) + + fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 256 * 0.02) + vertex_change++; + + last_index = index; + } + } + + + if ((F32)vertex_change / sizeS / sizeT < 0.05) // less than 5% + data_is_empty = TRUE; + + + //generate vertex positions + // Run along the path. + S32 s = 0, t = 0; + S32 line = 0; + while (s < sizeS) + { + t = 0; + // Run along the profile. + while (t < sizeT) + { + S32 i = t + line; + Point& pt = mMesh[i]; + + U32 x = (U32) ((F32)t/(sizeT-1) * (F32) sculpt_width); + U32 y = (U32) ((F32)s/(sizeS-1) * (F32) sculpt_height); + + if (y == sculpt_height) // clamp to bottom row + y = sculpt_height - 1; + + if (x == sculpt_width) // stitch sides + x = 0; + + if ((y == 0) || (y == sculpt_height-1)) // stitch top and bottom + x = sculpt_width / 2; + + + if (data_is_empty) // if empty, make a sphere + { + F32 u = (F32)s/(sizeS-1); + F32 v = (F32)t/(sizeT-1); + + const F32 RADIUS = (F32) 0.3; + + pt.mPos.mV[0] = (F32)(sin(F_PI * v) * cos(2.0 * F_PI * u) * RADIUS); + pt.mPos.mV[1] = (F32)(sin(F_PI * v) * sin(2.0 * F_PI * u) * RADIUS); + pt.mPos.mV[2] = (F32)(cos(F_PI * v) * RADIUS); + } + + else + { + U32 index = (x + y * sculpt_width) * sculpt_components; + pt.mPos.mV[0] = sculpt_data[index ] / 256.f - 0.5f; + pt.mPos.mV[1] = sculpt_data[index+1] / 256.f - 0.5f; + pt.mPos.mV[2] = sculpt_data[index+2] / 256.f - 0.5f; + } + + t++; + } + line += sizeT; + s++; + } + + for (S32 i = 0; i < (S32)mProfilep->mFaces.size(); i++) + { + mFaceMask |= mProfilep->mFaces[i].mFaceID; + } + + mSculptLevel = sculpt_level; + createVolumeFaces(); +} + + + + BOOL LLVolume::isCap(S32 face) { return mProfilep->mFaces[face].mCap; @@ -1785,14 +1931,18 @@ BOOL LLVolume::isFlat(S32 face) bool LLVolumeParams::operator==(const LLVolumeParams ¶ms) const { - return (getPathParams() == params.getPathParams()) && - (getProfileParams() == params.getProfileParams()); + return ( (getPathParams() == params.getPathParams()) && + (getProfileParams() == params.getProfileParams()) && + (mSculptID == params.mSculptID) && + (mSculptType == params.mSculptType) ); } bool LLVolumeParams::operator!=(const LLVolumeParams ¶ms) const { - return (getPathParams() != params.getPathParams()) || - (getProfileParams() != params.getProfileParams()); + return ( (getPathParams() != params.getPathParams()) || + (getProfileParams() != params.getProfileParams()) || + (mSculptID != params.mSculptID) || + (mSculptType != params.mSculptType) ); } bool LLVolumeParams::operator<(const LLVolumeParams ¶ms) const @@ -1801,16 +1951,29 @@ bool LLVolumeParams::operator<(const LLVolumeParams ¶ms) const { return getPathParams() < params.getPathParams(); } - else + + if (getProfileParams() != params.getProfileParams()) { return getProfileParams() < params.getProfileParams(); } + + if (mSculptID != params.mSculptID) + { + return mSculptID < params.mSculptID; + } + + + return mSculptType < params.mSculptType; + + } void LLVolumeParams::copyParams(const LLVolumeParams ¶ms) { mProfileParams.copyParams(params.mProfileParams); mPathParams.copyParams(params.mPathParams); + mSculptID = params.getSculptID(); + mSculptType = params.getSculptType(); } // Less restricitve approx 0 for volumes @@ -2070,6 +2233,13 @@ bool LLVolumeParams::setSkew(const F32 skew_value) return valid; } +bool LLVolumeParams::setSculptID(const LLUUID sculpt_id, U8 sculpt_type) +{ + mSculptID = sculpt_id; + mSculptType = sculpt_type; + return true; +} + bool LLVolumeParams::setType(U8 profile, U8 path) { bool result = true; @@ -2829,7 +2999,7 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, segments.clear(); //for each face - for (S32 i = 0; i < getNumFaces(); i++) { + for (S32 i = 0; i < getNumVolumeFaces(); i++) { LLVolumeFace face = this->getVolumeFace(i); if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) { @@ -4436,6 +4606,9 @@ BOOL LLVolumeFace::createSide() } } + BOOL s_bottom_converges = ((mVertices[0].mPosition - mVertices[mNumS*(mNumT-2)].mPosition).magVecSquared() < 0.000001f); + BOOL s_top_converges = ((mVertices[mNumS-1].mPosition - mVertices[mNumS*(mNumT-2)+mNumS-1].mPosition).magVecSquared() < 0.000001f); + if (mVolumep->getPath().isOpen() == FALSE) { //wrap normals on T for (S32 i = 0; i < mNumS; i++) { LLVector3 norm = mVertices[i].mNormal + mVertices[mNumS*(mNumT-1)+i].mNormal; @@ -4444,30 +4617,73 @@ BOOL LLVolumeFace::createSide() } } - if (mVolumep->getProfile().isOpen() == FALSE) { //wrap normals on S - for (S32 i = 0; i < mNumT; i++) { - LLVector3 norm = mVertices[mNumS*i].mNormal + mVertices[mNumS*i+mNumS-1].mNormal; - mVertices[mNumS * i].mNormal = norm; - mVertices[mNumS * i+mNumS-1].mNormal = norm; + if ((mVolumep->getProfile().isOpen() == FALSE) && + !(s_bottom_converges)) + { //wrap normals on S + for (S32 i = 0; i < mNumT; i++) { + LLVector3 norm = mVertices[mNumS*i].mNormal + mVertices[mNumS*i+mNumS-1].mNormal; + mVertices[mNumS * i].mNormal = norm; + mVertices[mNumS * i+mNumS-1].mNormal = norm; + } } - } - if (mVolumep->getPathType() == LL_PCODE_PATH_CIRCLE && ((mVolumep->getProfileType() & LL_PCODE_PROFILE_MASK) == LL_PCODE_PROFILE_CIRCLE_HALF)) { - if ((mVertices[0].mPosition - mVertices[mNumS*(mNumT-2)].mPosition).magVecSquared() < 0.000001f) + if (mVolumep->getPathType() == LL_PCODE_PATH_CIRCLE && + ((mVolumep->getProfileType() & LL_PCODE_PROFILE_MASK) == LL_PCODE_PROFILE_CIRCLE_HALF)) + { + if (s_bottom_converges) { //all lower S have same normal for (S32 i = 0; i < mNumT; i++) { mVertices[mNumS*i].mNormal = LLVector3(1,0,0); } } - if ((mVertices[mNumS-1].mPosition - mVertices[mNumS*(mNumT-2)+mNumS-1].mPosition).magVecSquared() < 0.000001f) - { //all upper T have same normal + if (s_top_converges) + { //all upper S have same normal for (S32 i = 0; i < mNumT; i++) { mVertices[mNumS*i+mNumS-1].mNormal = LLVector3(-1,0,0); } } } + U8 sculpt_type = mVolumep->getParams().getSculptType(); + + if (sculpt_type == LL_SCULPT_TYPE_SPHERE) + { + // average normals for north pole + + LLVector3 average(0.0, 0.0, 0.0); + for (S32 i = 0; i < mNumS; i++) + { + average += mVertices[i].mNormal; + } + + // set average + for (S32 i = 0; i < mNumS; i++) + { + mVertices[i].mNormal = average; + } + } + + + if (sculpt_type == LL_SCULPT_TYPE_SPHERE) + { + // average normals for south pole + + LLVector3 average(0.0, 0.0, 0.0); + for (S32 i = 0; i < mNumS; i++) + { + average += mVertices[i + mNumS * (mNumT - 1)].mNormal; + } + + // set average + for (S32 i = 0; i < mNumS; i++) + { + mVertices[i + mNumS * (mNumT - 1)].mNormal = average; + } + } + + + //normalize normals and binormals here so the meshes that reference //this volume data don't have to for (U32 i = 0; i < mVertices.size(); i++) diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 7137346..a3e89ab 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -169,6 +169,16 @@ const LLFaceID LL_FACE_OUTER_SIDE_3 = 0x1 << 8; //============================================================================ +// sculpt types + +const U8 LL_SCULPT_TYPE_NONE = 0; +const U8 LL_SCULPT_TYPE_SPHERE = 1; +const U8 LL_SCULPT_TYPE_TORUS = 2; +const U8 LL_SCULPT_TYPE_PLAIN = 3; +const U8 LL_SCULPT_TYPE_CYLINDER = 4; + + + class LLProfileParams { public: @@ -512,8 +522,9 @@ public: { } - LLVolumeParams(LLProfileParams &profile, LLPathParams &path) - : mProfileParams(profile), mPathParams(path) + LLVolumeParams(LLProfileParams &profile, LLPathParams &path, + LLUUID sculpt_id = LLUUID::null, U8 sculpt_type = LL_SCULPT_TYPE_NONE) + : mProfileParams(profile), mPathParams(path), mSculptID(sculpt_id), mSculptType(sculpt_type) { } @@ -564,6 +575,7 @@ public: bool setRevolutions(const F32 revolutions); // 1 to 4 bool setRadiusOffset(const F32 radius_offset); bool setSkew(const F32 skew); + bool setSculptID(const LLUUID sculpt_id, U8 sculpt_type); static bool validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 hollow, U8 path_curve, F32 path_begin, F32 path_end, @@ -591,6 +603,8 @@ public: const F32& getTaperY() const { return mPathParams.getTaperY(); } const F32& getRevolutions() const { return mPathParams.getRevolutions(); } const F32& getSkew() const { return mPathParams.getSkew(); } + const LLUUID& getSculptID() const { return mSculptID; } + const U8& getSculptType() const { return mSculptType; } BOOL isConvex() const; @@ -613,6 +627,8 @@ public: protected: LLProfileParams mProfileParams; LLPathParams mPathParams; + LLUUID mSculptID; + U8 mSculptType; }; @@ -635,7 +651,7 @@ public: BOOL isFlat(S32 face) const { return (mFaces[face].mCount == 2); } BOOL isOpen() const { return mOpen; } void setDirty() { mDirty = TRUE; } - BOOL generate(BOOL path_open, F32 detail = 1.0f, S32 split = 0); + BOOL generate(BOOL path_open, F32 detail = 1.0f, S32 split = 0, BOOL is_sculpted = FALSE); BOOL isConcave() const { return mConcave; } public: const LLProfileParams &mParams; @@ -704,7 +720,7 @@ public: virtual ~LLPath(); void genNGon(S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f); - virtual BOOL generate(F32 detail=1.0f, S32 split = 0); + virtual BOOL generate(F32 detail=1.0f, S32 split = 0, BOOL is_sculpted = FALSE); BOOL isOpen() const { return mOpen; } F32 getStep() const { return mStep; } @@ -731,7 +747,7 @@ class LLDynamicPath : public LLPath { public: LLDynamicPath(const LLPathParams ¶ms) : LLPath(params) { } - BOOL generate(F32 detail=1.0f, S32 split = 0); + BOOL generate(F32 detail=1.0f, S32 split = 0, BOOL is_sculpted = FALSE); }; // Yet another "face" class - caches volume-specific, but not instance-specific data for faces) @@ -821,7 +837,7 @@ public: U8 getProfileType() const { return mProfilep->mParams.getCurveType(); } U8 getPathType() const { return mPathp->mParams.getCurveType(); } S32 getNumFaces() const { return (S32)mProfilep->mFaces.size(); } - + S32 getNumVolumeFaces() const { return mNumVolumeFaces; } const F32 getDetail() const { return mDetail; } const LLVolumeParams & getParams() const { return mParams; } LLVolumeParams getCopyOfParams() const { return mParams; } @@ -839,6 +855,11 @@ public: BOOL isFlat(S32 face); BOOL isUnique() const { return mUnique; } + S32 getSculptLevel() const { return mSculptLevel; } + void setSculptLevel(S32 level) { mSculptLevel = level; } + + U8 getSculptType() const { return mSculptType; } + S32 *getTriangleIndices(U32 &num_indices) const; void generateSilhouetteVertices(std::vector &vertices, std::vector &normals, std::vector &segments, const LLVector3& view_vec, const LLMatrix4& mat, @@ -863,7 +884,7 @@ public: LLFaceID generateFaceMask(); BOOL isFaceMaskValid(LLFaceID face_mask); - static S32 mNumMeshPoints; + static S32 sNumMeshPoints; friend std::ostream& operator<<(std::ostream &s, const LLVolume &volume); friend std::ostream& operator<<(std::ostream &s, const LLVolume *volumep); // HACK to bypass Windoze confusion over @@ -872,14 +893,19 @@ public: U32 mFaceMask; // bit array of which faces exist in this volume LLVector3 mLODScaleBias; // vector for biasing LOD based on scale - + + void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); + protected: BOOL generate(); void createVolumeFaces(); -protected: + protected: BOOL mUnique; F32 mDetail; + S32 mSculptLevel; + U8 mSculptType; + LLVolumeParams mParams; LLPath *mPathp; LLProfile *mProfilep; diff --git a/linden/indra/llmessage/llcachename.cpp b/linden/indra/llmessage/llcachename.cpp index 1cc7e09..3df4b82 100644 --- a/linden/indra/llmessage/llcachename.cpp +++ b/linden/indra/llmessage/llcachename.cpp @@ -528,26 +528,28 @@ void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callb LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id ); if (entry) { - if (!entry->mIsGroup) + // id found in map therefore we can call the callback immediately. + if (entry->mIsGroup) { - callback(id, entry->mFirstName, entry->mLastName, entry->mIsGroup, user_data); + callback(id, entry->mGroupName, "", entry->mIsGroup, user_data); } else { - callback(id, entry->mGroupName, "", entry->mIsGroup, user_data); + callback(id, entry->mFirstName, entry->mLastName, entry->mIsGroup, user_data); } } else { + // id not found in map so we must queue the callback call until available. if (!impl.isRequestPending(id)) { - if (!is_group) + if (is_group) { - impl.mAskNameQueue.insert(id); + impl.mAskGroupQueue.insert(id); } else { - impl.mAskGroupQueue.insert(id); + impl.mAskNameQueue.insert(id); } } impl.mReplyQueue.push_back(PendingReply(id, callback, user_data)); diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index 886697e..9d883a7 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp @@ -1,10 +1,31 @@ -/* - * llcurl.cpp - * MacTester - * - * Created by Zero Linden on 10/15/06. - * Copyright 2006 __MyCompanyName__. All rights reserved. +/** + * @file llcurl.h + * @author Zero / Donovan + * @date 2006-10-15 + * @brief Curl wrapper * + * Copyright (c) 2006-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. */ #include "llcurl.h" diff --git a/linden/indra/llmessage/llcurl.h b/linden/indra/llmessage/llcurl.h index 4f1b5e6..e188c38 100644 --- a/linden/indra/llmessage/llcurl.h +++ b/linden/indra/llmessage/llcurl.h @@ -1,10 +1,31 @@ -/* - * llcurl.h - * MacTester - * - * Created by Zero Linden on 10/15/06. - * Copyright 2006 __MyCompanyName__. All rights reserved. +/** + * @file llcurl.h + * @author Zero / Donovan + * @date 2006-10-15 + * @brief Curl wrapper * + * Copyright (c) 2006-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. */ #ifndef LL_LLCURL_H diff --git a/linden/indra/llmessage/llmessage_vc8.vcproj b/linden/indra/llmessage/llmessage_vc8.vcproj index ac32525..9692930 100644 --- a/linden/indra/llmessage/llmessage_vc8.vcproj +++ b/linden/indra/llmessage/llmessage_vc8.vcproj @@ -295,6 +295,10 @@ > + + @@ -327,6 +331,22 @@ > + + + + + + + + @@ -367,7 +387,11 @@ > + + + + + + + + @@ -573,6 +609,14 @@ > + + + + @@ -617,6 +661,22 @@ > + + + + + + + + @@ -673,7 +733,11 @@ > + + + + @@ -697,6 +765,14 @@ > + + + + diff --git a/linden/indra/llmessage/lluseroperation.h b/linden/indra/llmessage/lluseroperation.h index 325567c..2b351f9 100644 --- a/linden/indra/llmessage/lluseroperation.h +++ b/linden/indra/llmessage/lluseroperation.h @@ -1,7 +1,7 @@ /** * @file lluseroperation.h * @brief LLUserOperation class header file - used for message based - * transaction. For example, money transactions. + * transaction. For example, L$ transactions. * * Copyright (c) 2002-2007, Linden Research, Inc. * diff --git a/linden/indra/llmessage/message_prehash.cpp b/linden/indra/llmessage/message_prehash.cpp index 39b3737..3e26726 100644 --- a/linden/indra/llmessage/message_prehash.cpp +++ b/linden/indra/llmessage/message_prehash.cpp @@ -554,8 +554,8 @@ char * _PREHASH_ReturnIDs; char * _PREHASH_Date; char * _PREHASH_AgentWearablesUpdate; char * _PREHASH_AgentDataUpdate; -char * _PREHASH_Hash; char * _PREHASH_GroupDataUpdate; +char * _PREHASH_Hash; char * _PREHASH_AgentGroupDataUpdate; char * _PREHASH_Left; char * _PREHASH_Mask; @@ -683,7 +683,6 @@ char * _PREHASH_CreateNewOutfitAttachments; char * _PREHASH_RegionHandle; char * _PREHASH_TeleportProgress; char * _PREHASH_AgentQuitCopy; -char * _PREHASH_ToViewer; char * _PREHASH_AvatarInterestsUpdate; char * _PREHASH_GroupNoticeID; char * _PREHASH_ParcelName; @@ -742,6 +741,7 @@ char * _PREHASH_LogoutReply; char * _PREHASH_FeatureDisabled; char * _PREHASH_ObjectLocalID; char * _PREHASH_Dropped; +char * _PREHASH_PhysicalAvatarEventList; char * _PREHASH_WebProfilesDisabled; char * _PREHASH_Destination; char * _PREHASH_MasterID; @@ -1015,7 +1015,6 @@ char * _PREHASH_TrackAgentSession; char * _PREHASH_CacheMissType; char * _PREHASH_VFileID; char * _PREHASH_GroupInsigniaID; -char * _PREHASH_FromID; char * _PREHASH_Online; char * _PREHASH_KickFlags; char * _PREHASH_CovenantID; @@ -1199,7 +1198,6 @@ char * _PREHASH_EventData; char * _PREHASH_Final; char * _PREHASH_TelehubPos; char * _PREHASH_ReportAutosaveCrash; -char * _PREHASH_Reset; char * _PREHASH_CreateTrustedCircuit; char * _PREHASH_DenyTrustedCircuit; char * _PREHASH_RequestTrustedCircuit; @@ -1382,7 +1380,6 @@ char * _PREHASH_SimulatorPublicHostBlock; char * _PREHASH_HeaderData; char * _PREHASH_RequestMultipleObjects; char * _PREHASH_RetrieveInstantMessages; -char * _PREHASH_DequeueInstantMessages; char * _PREHASH_OpenCircuit; char * _PREHASH_SecureSessionID; char * _PREHASH_CrossedRegion; @@ -2020,8 +2017,8 @@ void init_prehash_data() _PREHASH_Date = gMessageStringTable.getString("Date"); _PREHASH_AgentWearablesUpdate = gMessageStringTable.getString("AgentWearablesUpdate"); _PREHASH_AgentDataUpdate = gMessageStringTable.getString("AgentDataUpdate"); - _PREHASH_Hash = gMessageStringTable.getString("Hash"); _PREHASH_GroupDataUpdate = gMessageStringTable.getString("GroupDataUpdate"); + _PREHASH_Hash = gMessageStringTable.getString("Hash"); _PREHASH_AgentGroupDataUpdate = gMessageStringTable.getString("AgentGroupDataUpdate"); _PREHASH_Left = gMessageStringTable.getString("Left"); _PREHASH_Mask = gMessageStringTable.getString("Mask"); @@ -2149,7 +2146,6 @@ void init_prehash_data() _PREHASH_RegionHandle = gMessageStringTable.getString("RegionHandle"); _PREHASH_TeleportProgress = gMessageStringTable.getString("TeleportProgress"); _PREHASH_AgentQuitCopy = gMessageStringTable.getString("AgentQuitCopy"); - _PREHASH_ToViewer = gMessageStringTable.getString("ToViewer"); _PREHASH_AvatarInterestsUpdate = gMessageStringTable.getString("AvatarInterestsUpdate"); _PREHASH_GroupNoticeID = gMessageStringTable.getString("GroupNoticeID"); _PREHASH_ParcelName = gMessageStringTable.getString("ParcelName"); @@ -2208,6 +2204,7 @@ void init_prehash_data() _PREHASH_FeatureDisabled = gMessageStringTable.getString("FeatureDisabled"); _PREHASH_ObjectLocalID = gMessageStringTable.getString("ObjectLocalID"); _PREHASH_Dropped = gMessageStringTable.getString("Dropped"); + _PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList"); _PREHASH_WebProfilesDisabled = gMessageStringTable.getString("WebProfilesDisabled"); _PREHASH_Destination = gMessageStringTable.getString("Destination"); _PREHASH_MasterID = gMessageStringTable.getString("MasterID"); @@ -2481,7 +2478,6 @@ void init_prehash_data() _PREHASH_CacheMissType = gMessageStringTable.getString("CacheMissType"); _PREHASH_VFileID = gMessageStringTable.getString("VFileID"); _PREHASH_GroupInsigniaID = gMessageStringTable.getString("GroupInsigniaID"); - _PREHASH_FromID = gMessageStringTable.getString("FromID"); _PREHASH_Online = gMessageStringTable.getString("Online"); _PREHASH_KickFlags = gMessageStringTable.getString("KickFlags"); _PREHASH_CovenantID = gMessageStringTable.getString("CovenantID"); @@ -2665,7 +2661,6 @@ void init_prehash_data() _PREHASH_Final = gMessageStringTable.getString("Final"); _PREHASH_TelehubPos = gMessageStringTable.getString("TelehubPos"); _PREHASH_ReportAutosaveCrash = gMessageStringTable.getString("ReportAutosaveCrash"); - _PREHASH_Reset = gMessageStringTable.getString("Reset"); _PREHASH_CreateTrustedCircuit = gMessageStringTable.getString("CreateTrustedCircuit"); _PREHASH_DenyTrustedCircuit = gMessageStringTable.getString("DenyTrustedCircuit"); _PREHASH_RequestTrustedCircuit = gMessageStringTable.getString("RequestTrustedCircuit"); @@ -2848,7 +2843,6 @@ void init_prehash_data() _PREHASH_HeaderData = gMessageStringTable.getString("HeaderData"); _PREHASH_RequestMultipleObjects = gMessageStringTable.getString("RequestMultipleObjects"); _PREHASH_RetrieveInstantMessages = gMessageStringTable.getString("RetrieveInstantMessages"); - _PREHASH_DequeueInstantMessages = gMessageStringTable.getString("DequeueInstantMessages"); _PREHASH_OpenCircuit = gMessageStringTable.getString("OpenCircuit"); _PREHASH_SecureSessionID = gMessageStringTable.getString("SecureSessionID"); _PREHASH_CrossedRegion = gMessageStringTable.getString("CrossedRegion"); diff --git a/linden/indra/llmessage/message_prehash.h b/linden/indra/llmessage/message_prehash.h index 84c769e..06a8a9c 100644 --- a/linden/indra/llmessage/message_prehash.h +++ b/linden/indra/llmessage/message_prehash.h @@ -554,8 +554,8 @@ extern char * _PREHASH_ReturnIDs; extern char * _PREHASH_Date; extern char * _PREHASH_AgentWearablesUpdate; extern char * _PREHASH_AgentDataUpdate; -extern char * _PREHASH_Hash; extern char * _PREHASH_GroupDataUpdate; +extern char * _PREHASH_Hash; extern char * _PREHASH_AgentGroupDataUpdate; extern char * _PREHASH_Left; extern char * _PREHASH_Mask; @@ -683,7 +683,6 @@ extern char * _PREHASH_CreateNewOutfitAttachments; extern char * _PREHASH_RegionHandle; extern char * _PREHASH_TeleportProgress; extern char * _PREHASH_AgentQuitCopy; -extern char * _PREHASH_ToViewer; extern char * _PREHASH_AvatarInterestsUpdate; extern char * _PREHASH_GroupNoticeID; extern char * _PREHASH_ParcelName; @@ -742,6 +741,7 @@ extern char * _PREHASH_LogoutReply; extern char * _PREHASH_FeatureDisabled; extern char * _PREHASH_ObjectLocalID; extern char * _PREHASH_Dropped; +extern char * _PREHASH_PhysicalAvatarEventList; extern char * _PREHASH_WebProfilesDisabled; extern char * _PREHASH_Destination; extern char * _PREHASH_MasterID; @@ -1015,7 +1015,6 @@ extern char * _PREHASH_TrackAgentSession; extern char * _PREHASH_CacheMissType; extern char * _PREHASH_VFileID; extern char * _PREHASH_GroupInsigniaID; -extern char * _PREHASH_FromID; extern char * _PREHASH_Online; extern char * _PREHASH_KickFlags; extern char * _PREHASH_CovenantID; @@ -1199,7 +1198,6 @@ extern char * _PREHASH_EventData; extern char * _PREHASH_Final; extern char * _PREHASH_TelehubPos; extern char * _PREHASH_ReportAutosaveCrash; -extern char * _PREHASH_Reset; extern char * _PREHASH_CreateTrustedCircuit; extern char * _PREHASH_DenyTrustedCircuit; extern char * _PREHASH_RequestTrustedCircuit; @@ -1382,7 +1380,6 @@ extern char * _PREHASH_SimulatorPublicHostBlock; extern char * _PREHASH_HeaderData; extern char * _PREHASH_RequestMultipleObjects; extern char * _PREHASH_RetrieveInstantMessages; -extern char * _PREHASH_DequeueInstantMessages; extern char * _PREHASH_OpenCircuit; extern char * _PREHASH_SecureSessionID; extern char * _PREHASH_CrossedRegion; diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp index 9ab44f7..1dfc570 100644 --- a/linden/indra/llprimitive/llprimitive.cpp +++ b/linden/indra/llprimitive/llprimitive.cpp @@ -107,6 +107,9 @@ const BOOL FLEXIBLE_OBJECT_DEFAULT_USING_COLLISION_SPHERE = FALSE; const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE = FALSE; +const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e"; + + //=============================================================== LLPrimitive::LLPrimitive() { @@ -511,6 +514,18 @@ S32 LLPrimitive::setTEMediaFlags(const U8 te, const U8 media_flags) return mTextureList[te].setMediaFlags( media_flags ); } +S32 LLPrimitive::setTEGlow(const U8 te, const F32 glow) +{ + // if we're asking for a non-existent face, return null + if (te >= mNumTEs) + { + llwarns << "setting non-existent te " << te << llendl + return 0; + } + + return mTextureList[te].setGlow( glow ); +} + LLPCode LLPrimitive::legacyToPCode(const U8 legacy) { @@ -1292,7 +1307,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const S16 image_rot[MAX_TES]; U8 bump[MAX_TES]; U8 media_flags[MAX_TES]; - + U8 glow[MAX_TES]; + const U32 MAX_TE_BUFFER = 4096; U8 packed_buffer[MAX_TE_BUFFER]; U8 *cur_ptr = packed_buffer; @@ -1328,7 +1344,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); bump[face_index] = te->getBumpShinyFullbright(); media_flags[face_index] = te->getMediaTexGen(); -// llinfos << "BUMP pack [" << (S32)face_index << "]=" << (S32) bump[face_index] << llendl; + glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF)); } cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID); @@ -1348,6 +1364,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const cur_ptr += packTEField(cur_ptr, (U8 *)bump, 1 ,last_face_index, MVT_U8); *cur_ptr++ = 0; cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8); + *cur_ptr++ = 0; + cur_ptr += packTEField(cur_ptr, (U8 *)glow, 1 ,last_face_index, MVT_U8); } mesgsys->addBinaryDataFast(_PREHASH_TextureEntry, packed_buffer, (S32)(cur_ptr - packed_buffer)); @@ -1368,7 +1386,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const S16 image_rot[MAX_TES]; U8 bump[MAX_TES]; U8 media_flags[MAX_TES]; - + U8 glow[MAX_TES]; + const U32 MAX_TE_BUFFER = 4096; U8 packed_buffer[MAX_TE_BUFFER]; U8 *cur_ptr = packed_buffer; @@ -1404,8 +1423,7 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); bump[face_index] = te->getBumpShinyFullbright(); media_flags[face_index] = te->getMediaTexGen(); - -// llinfos << "BUMP pack (Datapacker) [" << (S32)face_index << "]=" << (S32) bump[face_index] << llendl; + glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF)); } cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID); @@ -1425,6 +1443,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const cur_ptr += packTEField(cur_ptr, (U8 *)bump, 1 ,last_face_index, MVT_U8); *cur_ptr++ = 0; cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8); + *cur_ptr++ = 0; + cur_ptr += packTEField(cur_ptr, (U8 *)glow, 1 ,last_face_index, MVT_U8); } dp.packBinaryData(packed_buffer, (S32)(cur_ptr - packed_buffer), "TextureEntry"); @@ -1453,7 +1473,8 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con S16 image_rot[MAX_TES]; U8 bump[MAX_TES]; U8 media_flags[MAX_TES]; - + U8 glow[MAX_TES]; + const U32 MAX_TE_BUFFER = 4096; U8 packed_buffer[MAX_TE_BUFFER]; U8 *cur_ptr = packed_buffer; @@ -1503,7 +1524,9 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8); cur_ptr++; cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8); - + cur_ptr++; + cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8); + LLColor4 color; LLColor4U coloru; for (U32 i = 0; i < face_count; i++) @@ -1514,6 +1537,7 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); retval |= setTEBumpShinyFullbright(i, bump[i]); retval |= setTEMediaTexGen(i, media_flags[i]); + retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF); coloru = LLColor4U(colors + 4*i); // Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f) @@ -1548,6 +1572,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) S16 image_rot[MAX_TES]; U8 bump[MAX_TES]; U8 media_flags[MAX_TES]; + U8 glow[MAX_TES]; const U32 MAX_TE_BUFFER = 4096; U8 packed_buffer[MAX_TE_BUFFER]; @@ -1588,10 +1613,11 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8); cur_ptr++; cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8); + cur_ptr++; + cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8); for (i = 0; i < face_count; i++) { -// llinfos << "BUMP unpack (Datapacker) [" << i << "]=" << S32(bump[i]) <mUsingCollisionSphere; //mRenderingCollisionSphere = flex_data->mRenderingCollisionSphere; } + + +//============================================================================ + +LLSculptParams::LLSculptParams() +{ + mType = PARAMS_SCULPT; + mSculptTexture.set(SCULPT_DEFAULT_TEXTURE); + mSculptType = LL_SCULPT_TYPE_SPHERE; +} + +BOOL LLSculptParams::pack(LLDataPacker &dp) const +{ + dp.packUUID(mSculptTexture, "texture"); + dp.packU8(mSculptType, "type"); + + return TRUE; +} + +BOOL LLSculptParams::unpack(LLDataPacker &dp) +{ + dp.unpackUUID(mSculptTexture, "texture"); + dp.unpackU8(mSculptType, "type"); + + return TRUE; +} + +bool LLSculptParams::operator==(const LLNetworkData& data) const +{ + if (data.mType != PARAMS_SCULPT) + { + return false; + } + + const LLSculptParams *param = (const LLSculptParams*)&data; + if ( (param->mSculptTexture != mSculptTexture) || + (param->mSculptType != mSculptType) ) + + { + return false; + } + + return true; +} + +void LLSculptParams::copy(const LLNetworkData& data) +{ + const LLSculptParams *param = (LLSculptParams*)&data; + mSculptTexture = param->mSculptTexture; + mSculptType = param->mSculptType; +} + diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h index 89e6623..29cd09f 100644 --- a/linden/indra/llprimitive/llprimitive.h +++ b/linden/indra/llprimitive/llprimitive.h @@ -88,6 +88,7 @@ extern const F32 OBJECT_REV_MIN; extern const F32 OBJECT_REV_MAX; extern const F32 OBJECT_REV_INC; +extern const char *SCULPT_DEFAULT_TEXTURE; //============================================================================ @@ -99,7 +100,8 @@ public: enum { PARAMS_FLEXIBLE = 0x10, - PARAMS_LIGHT = 0x20 + PARAMS_LIGHT = 0x20, + PARAMS_SCULPT = 0x30 }; public: @@ -226,6 +228,29 @@ public: void copy(const LLNetworkData& data); };// end of attributes structure + + +class LLSculptParams : public LLNetworkData +{ +protected: + LLUUID mSculptTexture; + U8 mSculptType; + +public: + LLSculptParams(); + /*virtual*/ BOOL pack(LLDataPacker &dp) const; + /*virtual*/ BOOL unpack(LLDataPacker &dp); + /*virtual*/ bool operator==(const LLNetworkData& data) const; + /*virtual*/ void copy(const LLNetworkData& data); + + void setSculptTexture(const LLUUID& id) { mSculptTexture = id; } + LLUUID getSculptTexture() { return mSculptTexture; } + void setSculptType(U8 type) { mSculptType = type; } + U8 getSculptType() { return mSculptType; } +}; + + + class LLPrimitive : public LLXform { public: @@ -266,6 +291,7 @@ public: virtual S32 setTEShiny(const U8 te, const U8 shiny); virtual S32 setTEFullbright(const U8 te, const U8 fullbright); virtual S32 setTEMediaFlags(const U8 te, const U8 flags); + virtual S32 setTEGlow(const U8 te, const F32 glow); virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed void setTEArrays(const U8 size, diff --git a/linden/indra/llprimitive/lltextureentry.cpp b/linden/indra/llprimitive/lltextureentry.cpp index 81bfd6f..4f329f2 100644 --- a/linden/indra/llprimitive/lltextureentry.cpp +++ b/linden/indra/llprimitive/lltextureentry.cpp @@ -57,6 +57,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) mColor = rhs.mColor; mBump = rhs.mBump; mMediaFlags = rhs.mMediaFlags; + mGlow = rhs.mGlow; } LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) @@ -72,6 +73,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) mColor = rhs.mColor; mBump = rhs.mBump; mMediaFlags = rhs.mMediaFlags; + mGlow = rhs.mGlow; } return *this; @@ -88,7 +90,8 @@ void LLTextureEntry::init(const LLUUID& tex_id, F32 scale_s, F32 scale_t, F32 of mRotation = rotation; mBump = bump; mMediaFlags = 0x0; - + mGlow = 0; + setColor(LLColor4(1.f, 1.f, 1.f, 1.f)); } @@ -366,3 +369,13 @@ S32 LLTextureEntry::setTexGen(U8 tex_gen) return 0; } +S32 LLTextureEntry::setGlow(F32 glow) +{ + if (mGlow != glow) + { + mGlow = glow; + return TEM_CHANGE_TEXTURE; + } + return 0; +} + diff --git a/linden/indra/llprimitive/lltextureentry.h b/linden/indra/llprimitive/lltextureentry.h index 861b585..c1f355b 100644 --- a/linden/indra/llprimitive/lltextureentry.h +++ b/linden/indra/llprimitive/lltextureentry.h @@ -107,7 +107,8 @@ public: S32 setMediaFlags(U8 media_flags); S32 setTexGen(U8 texGen); S32 setMediaTexGen(U8 media); - + S32 setGlow(F32 glow); + const LLUUID &getID() const { return mID; } const LLColor4 &getColor() const { return mColor; } void getScale(F32 *s, F32 *t) const { *s = mScaleS; *t = mScaleT; } @@ -124,7 +125,8 @@ public: U8 getMediaFlags() const { return mMediaFlags & TEM_MEDIA_MASK; } U8 getTexGen() const { return mMediaFlags & TEM_TEX_GEN_MASK; } U8 getMediaTexGen() const { return mMediaFlags; } - + F32 getGlow() const { return mGlow; } + // Media flags enum { MF_NONE = 0x0, MF_WEB_PAGE = 0x1 }; @@ -141,6 +143,8 @@ protected: LLColor4 mColor; U8 mBump; // Bump map, shiny, and fullbright U8 mMediaFlags; // replace with web page, movie, etc. + F32 mGlow; + }; #endif diff --git a/linden/indra/llui/lldraghandle.cpp b/linden/indra/llui/lldraghandle.cpp index a3d28ad..3497f0d 100644 --- a/linden/indra/llui/lldraghandle.cpp +++ b/linden/indra/llui/lldraghandle.cpp @@ -328,7 +328,12 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) // Resize the parent S32 delta_x = screen_x - mDragLastScreenX; S32 delta_y = screen_y - mDragLastScreenY; - getParent()->translate(delta_x, delta_y); + + LLRect original_rect = getParent()->getRect(); + LLRect translated_rect = getParent()->getRect(); + translated_rect.translate(delta_x, delta_y); + // temporarily slam dragged window to new position + getParent()->setRect(translated_rect); S32 pre_snap_x = getParent()->getRect().mLeft; S32 pre_snap_y = getParent()->getRect().mBottom; mDragLastScreenX = screen_x; @@ -348,7 +353,12 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) getParent()->snappedTo(snap_view); delta_x = new_rect.mLeft - pre_snap_x; delta_y = new_rect.mBottom - pre_snap_y; - getParent()->translate(delta_x, delta_y); + translated_rect.translate(delta_x, delta_y); + + // restore original rect so delta are detected, then call user reshape method to handle snapped floaters, etc + getParent()->setRect(original_rect); + getParent()->userSetShape(translated_rect); + mDragLastScreenX += delta_x; mDragLastScreenY += delta_y; diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 1613fd7..df44a58 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp @@ -675,25 +675,6 @@ const LLString& LLFloater::getTitle() const return mDragHandle ? mDragHandle->getTitle() : LLString::null; } -void LLFloater::translate(S32 x, S32 y) -{ - LLPanel::translate(x, y); - - if (x != 0 || y != 0) - { - for(handle_set_iter_t dependent_it = mDependents.begin(); - dependent_it != mDependents.end(); ++dependent_it) - { - LLFloater* floaterp = LLFloater::getFloaterByHandle(*dependent_it); - // is a dependent snapped to us? - if (floaterp && floaterp->getSnapTarget() == mViewHandle) - { - floaterp->translate(x, y); - } - } - } -} - BOOL LLFloater::canSnapTo(LLView* other_view) { if (NULL == other_view) @@ -731,14 +712,13 @@ void LLFloater::snappedTo(LLView* snap_view) } } -void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloater::userSetShape(const LLRect& new_rect) { - S32 old_width = mRect.getWidth(); - S32 old_height = mRect.getHeight(); - - LLView::reshape(width, height, called_from_parent); + LLRect old_rect = mRect; + LLView::userSetShape(new_rect); - if (width != old_width || height != old_height) + // if not minimized, adjust all snapped dependents to new shape + if (!isMinimized()) { // gather all snapped dependents for(handle_set_iter_t dependent_it = mDependents.begin(); @@ -750,22 +730,27 @@ void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent) { S32 delta_x = 0; S32 delta_y = 0; - // check to see if it snapped to right or top - LLRect floater_rect = floaterp->getRect(); - if (floater_rect.mLeft - mRect.mLeft >= old_width || - floater_rect.mRight == mRect.mLeft + old_width) + // check to see if it snapped to right or top, and move if dependee floater is resizing + LLRect dependent_rect = floaterp->getRect(); + if (dependent_rect.mLeft - mRect.mLeft >= old_rect.getWidth() || // dependent on my right? + dependent_rect.mRight == mRect.mLeft + old_rect.getWidth()) // dependent aligned with my right { // was snapped directly onto right side or aligned with it - delta_x += width - old_width; + delta_x += new_rect.getWidth() - old_rect.getWidth(); } - if (floater_rect.mBottom - mRect.mBottom >= old_height || - floater_rect.mTop == mRect.mBottom + old_height) + if (dependent_rect.mBottom - mRect.mBottom >= old_rect.getHeight() || + dependent_rect.mTop == mRect.mBottom + old_rect.getHeight()) { // was snapped directly onto top side or aligned with it - delta_y += height - old_height; + delta_y += new_rect.getHeight() - old_rect.getHeight(); } - floaterp->translate(delta_x, delta_y); + // take translation of dependee floater into account as well + delta_x += new_rect.mLeft - old_rect.mLeft; + delta_y += new_rect.mBottom - old_rect.mBottom; + + dependent_rect.translate(delta_x, delta_y); + floaterp->userSetShape(dependent_rect); } } } @@ -812,28 +797,33 @@ void LLFloater::setMinimized(BOOL minimize) setBorderVisible(TRUE); for(handle_set_iter_t dependent_it = mDependents.begin(); - dependent_it != mDependents.end(); ) + dependent_it != mDependents.end(); + ++dependent_it) { LLFloater* floaterp = LLFloater::getFloaterByHandle(*dependent_it); if (floaterp) { - floaterp->setVisible(FALSE); + if (floaterp->isMinimizeable()) + { + floaterp->setMinimized(TRUE); + } + else if (!floaterp->isMinimized()) + { + floaterp->setVisible(FALSE); + } } - ++dependent_it; } - mMinimized = TRUE; - // Lose keyboard focus when minimized releaseFocus(); + + mMinimized = TRUE; } else { reshape( mPreviousRect.getWidth(), mPreviousRect.getHeight(), TRUE ); setOrigin( mPreviousRect.mLeft, mPreviousRect.mBottom ); - mMinimized = FALSE; - if (mButtonsEnabled[BUTTON_RESTORE]) { mButtonsEnabled[BUTTON_MINIMIZE] = TRUE; @@ -857,15 +847,18 @@ void LLFloater::setMinimized(BOOL minimize) // show dependent floater for(handle_set_iter_t dependent_it = mDependents.begin(); - dependent_it != mDependents.end(); ) + dependent_it != mDependents.end(); + ++dependent_it) { LLFloater* floaterp = LLFloater::getFloaterByHandle(*dependent_it); if (floaterp) { + floaterp->setMinimized(FALSE); floaterp->setVisible(TRUE); } - ++dependent_it; } + + mMinimized = FALSE; } make_ui_sound("UISndWindowClose"); updateButtons(); diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index e752d8b..cd45762 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h @@ -108,8 +108,7 @@ public: static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); void initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory, BOOL open = TRUE); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = 1); - /*virtual*/ void translate(S32 x, S32 y); + /*virtual*/ void userSetShape(const LLRect& new_rect); /*virtual*/ BOOL canSnapTo(LLView* other_view); /*virtual*/ void snappedTo(LLView* snap_view); /*virtual*/ void setFocus( BOOL b ); diff --git a/linden/indra/llwindow/llwindow_vc8.vcproj b/linden/indra/llwindow/llwindow_vc8.vcproj index 4d6bbcb..803f11c 100644 --- a/linden/indra/llwindow/llwindow_vc8.vcproj +++ b/linden/indra/llwindow/llwindow_vc8.vcproj @@ -42,11 +42,12 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\;Logitech_LCD;Logitech_LCD\LCDUI" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;LL_DEBUG" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" StructMemberAlignment="4" + TreatWChar_tAsBuiltInType="false" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" @@ -171,11 +172,12 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\GLMESA;..\..\libraries\include\;Logitech_LCD;Logitech_LCD\LCDUI" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;LL_DEBUG;LL_MESA;LL_MESA_HEADLESS" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;LL_MESA;LL_MESA_HEADLESS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" StructMemberAlignment="4" + TreatWChar_tAsBuiltInType="false" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" @@ -238,9 +240,10 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\;Logitech_LCD;Logitech_LCD\LCDUI" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" RuntimeLibrary="0" StructMemberAlignment="0" + TreatWChar_tAsBuiltInType="false" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="3" @@ -378,222 +381,6 @@ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l index f4199df..7c9b3aa 100644 --- a/linden/indra/lscript/lscript_compile/indra.l +++ b/linden/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 9000 +%e 10000 %n 4000 %p 5000 @@ -434,6 +434,7 @@ extern "C" { int yyerror(const char *fmt, ...); } "PRIM_TYPE_TORUS" { count(); yylval.ival = LSL_PRIM_TYPE_TORUS; return(INTEGER_CONSTANT); } "PRIM_TYPE_TUBE" { count(); yylval.ival = LSL_PRIM_TYPE_TUBE; return(INTEGER_CONSTANT); } "PRIM_TYPE_RING" { count(); yylval.ival = LSL_PRIM_TYPE_RING; return(INTEGER_CONSTANT); } +"PRIM_TYPE_SCULPT" { count(); yylval.ival = LSL_PRIM_TYPE_SCULPT; return(INTEGER_CONSTANT); } "PRIM_HOLE_DEFAULT" { count(); yylval.ival = LSL_PRIM_HOLE_DEFAULT; return(INTEGER_CONSTANT); } "PRIM_HOLE_CIRCLE" { count(); yylval.ival = LSL_PRIM_HOLE_CIRCLE; return(INTEGER_CONSTANT); } @@ -476,6 +477,11 @@ extern "C" { int yyerror(const char *fmt, ...); } "PRIM_TEXGEN_DEFAULT" { count(); yylval.ival = LSL_PRIM_TEXGEN_DEFAULT; return(INTEGER_CONSTANT); } "PRIM_TEXGEN_PLANAR" { count(); yylval.ival = LSL_PRIM_TEXGEN_PLANAR; return(INTEGER_CONSTANT); } +"PRIM_SCULPT_TYPE_SPHERE" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_SPHERE; return(INTEGER_CONSTANT); } +"PRIM_SCULPT_TYPE_TORUS" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_TORUS; return(INTEGER_CONSTANT); } +"PRIM_SCULPT_TYPE_PLANE" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_PLANE; return(INTEGER_CONSTANT); } +"PRIM_SCULPT_TYPE_CYLINDER" { count(); yylval.ival = LSL_PRIM_SCULPT_TYPE_CYLINDER; return(INTEGER_CONSTANT); } + "MASK_BASE" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); } "MASK_OWNER" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); } "MASK_GROUP" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); } diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp index 7d38621..c44e1c0 100644 --- a/linden/indra/lscript/lscript_library/lscript_library.cpp +++ b/linden/indra/lscript/lscript_library/lscript_library.cpp @@ -424,6 +424,7 @@ void LLScriptLibrary::init() 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.")); + addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llRegionSay", NULL, "is", "llRegionSay(integer channel, string msg)\nbroadcasts msg to entire region on channel (not 0.)")); // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index e9cd858..8fae01f 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.15.1.3"; -CFBundleGetInfoString = "Second Life version 1.15.1.3, Copyright 2004-2007 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.16.0.5"; +CFBundleGetInfoString = "Second Life version 1.16.0.5, Copyright 2004-2007 Linden Research, Inc."; diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist index 108f716..764b152 100644 --- a/linden/indra/newview/Info-SecondLife.plist +++ b/linden/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.15.1.3 + 1.16.0.5 CSResourcesFileMapped diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini index f53a384..c7f8426 100644 --- a/linden/indra/newview/app_settings/keywords.ini +++ b/linden/indra/newview/app_settings/keywords.ini @@ -37,7 +37,7 @@ at_target at_target(integer tnum, vector targetpos, vector ourpos):Result of ll not_at_target not_at_target():Result of llTarget library function call at_rot_target at_rot_target(integer tnum, rotation targetrot, rotation ourrot):Result of LLRotTarget library function call not_at_rot_target not_at_rot_target():Result of LLRotTarget library function call -money money(key id, integer amount):Triggered when money is given to task +money money(key id, integer amount):Triggered when L$ is given to task email email(string time, string address, string subj, string message, integer num_left):Triggered when task receives email run_time_permissions run_time_permissions(integer perm):Triggered when an agent grants run time permissions to task attach attach(key id):Triggered when an agent attaches or detaches from agent @@ -79,7 +79,7 @@ CONTROL_UP Passed to llTakeControls library function and used control event CONTROL_DOWN Passed to llTakeControls library function and used control event handler to test for agent down control CONTROL_LBUTTON Passed to llTakeControls library function and used control event handler to test for agent left button control CONTROL_ML_LBUTTON Passed to llTakeControls library function and used control event handler to test for agent left button control with the agent in mouse look -PERMISSION_DEBIT Passed to llRequestPermissions library function to request permission to take money from agent's account +PERMISSION_DEBIT Passed to llRequestPermissions library function to request permission to take L$ from agent's account PERMISSION_TAKE_CONTROLS Passed to llRequestPermissions library function to request permission to take agent's controls # PERMISSION_REMAP_CONTROLS Passed to llRequestPermissions library function to request permission to remap agent's controls (not implemented yet) PERMISSION_TRIGGER_ANIMATION Passed to llRequestPermissions library function to request permission to trigger animation on agent @@ -346,6 +346,7 @@ PRIM_TYPE_SPHERE Followed by integer hole shape, vector cut, float hollow, vecto PRIM_TYPE_TORUS Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew PRIM_TYPE_TUBE Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew PRIM_TYPE_RING Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew +PRIM_TYPE_SCULPT Followed by a key or string texture uuid. PRIM_HOLE_DEFAULT Sets hole type to match the prim type. PRIM_HOLE_SQUARE Sets hole type to square. @@ -388,6 +389,11 @@ PRIM_BUMP_WEAVE Weave bump map PRIM_TEXGEN_DEFAULT Default texture mapping PRIM_TEXGEN_PLANAR Planar texture mapping +PRIM_SCULPT_TYPE_SPHERE Stitch edges in a sphere-like way +PRIM_SCULPT_TYPE_TORUS Stitch edges in a torus-like way +PRIM_SCULPT_TYPE_PLANE Do not stitch edges +PRIM_SCULPT_TYPE_CYLINDER Stitch edges in a cylinder-like way + MASK_BASE Base permissions MASK_OWNER Owner permissions MASK_GROUP Group permissions diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 85c268b..ab51120 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -4937,6 +4937,8 @@ void LLAgent::sendAnimationRequests(LLDynamicArray &anim_ids, EAnimReque num_valid_anims++; } + msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); + msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0); if (num_valid_anims) { sendReliableMessage(); @@ -4960,6 +4962,8 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request) msg->addUUIDFast(_PREHASH_AnimID, (anim_id) ); msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE); + msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); + msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0); sendReliableMessage(); } @@ -6773,7 +6777,7 @@ void LLAgent::removeWearable( EWearableType type ) if( old_wearable->isDirty() ) { // Bring up view-modal dialog: Save changes? Yes, No, Cancel - gViewerWindow->alertXml("RemoveWearableSave", LLAgent::onRemoveWearableDialog, (void*)(S32)type ); + gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)(S32)type ); return; } else @@ -7003,7 +7007,7 @@ void LLAgent::setWearable( LLInventoryItem* new_item, LLWearable* new_wearable ) if( old_wearable->isDirty() ) { // Bring up modal dialog: Save changes? Yes, No, Cancel - gViewerWindow->alertXml( "SetWearableSave", LLAgent::onSetWearableDialog, + gViewerWindow->alertXml( "WearableSave", LLAgent::onSetWearableDialog, new LLSetWearableData( new_item->getUUID(), new_wearable )); return; } diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp index 26c606f..789beaa 100644 --- a/linden/indra/newview/llassetuploadresponders.cpp +++ b/linden/indra/newview/llassetuploadresponders.cpp @@ -128,7 +128,7 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content) void LLAssetUploadResponder::uploadFailure(const LLSD& content) { std::string reason = content["state"]; - // deal with money errors + // deal with L$ errors if (reason == "insufficient funds") { LLFloaterBuyCurrency::buyCurrency("Uploading costs", gGlobalEconomy->getPriceUpload()); @@ -166,7 +166,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) LLAssetType::EType asset_type = LLAssetType::lookup(mPostData["asset_type"].asString().c_str()); LLInventoryType::EType inventory_type = LLInventoryType::lookup(mPostData["inventory_type"].asString().c_str()); - // Update money and ownership credit information + // Update L$ and ownership credit information // since it probably changed on the server if (asset_type == LLAssetType::AT_TEXTURE || asset_type == LLAssetType::AT_SOUND || diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index 11b97b4..01d7edf 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp @@ -865,7 +865,7 @@ void declare_settings() // recompile everything dialog gSavedSettings.declareRect("CompileOutputRect", LLRect(0, 400, 300, 0), "Rectangle for script Recompile Everything output window"); - // money + // L$ gSavedSettings.declareRect("FloaterPayRectB", LLRect(0, 150, 400, 0), "Rectangle for pay window"); // Buy @@ -1015,7 +1015,7 @@ void declare_settings() gSavedSettings.declareBOOL("UISndDebugSpamToggle", FALSE, "Log UI sound effects as they are played"); gSavedSettings.declareF32("UISndHealthReductionThreshold", 10.f, "Amount of health reduction required to trigger \"pain\" sound"); - gSavedSettings.declareF32("UISndMoneyChangeThreshold", 50.f, "Amount of change in bank balance required to trigger \"money\" sound"); + gSavedSettings.declareF32("UISndMoneyChangeThreshold", 50.f, "Amount of change in L$ balance required to trigger \"money\" sound"); gSavedSettings.declareString("UISndAlert", "ed124764-705d-d497-167a-182cd9fa2e6c", "Sound file for alerts (uuid for sound asset)"); //gSavedSettings.declareString("UISndAppearanceAnimate", "6cf2be26-90cb-2669-a599-f5ab7698225f", "[NOT USED]"); @@ -1031,8 +1031,8 @@ void declare_settings() //gSavedSettings.declareString("UISndInvApplyToObject", "00000000-0000-0000-0000-000000000000", "[NOT USED]"); gSavedSettings.declareString("UISndInvalidOp", "4174f859-0d3d-c517-c424-72923dc21f65", "Sound file for invalid operations (uuid for sound asset)"); //gSavedSettings.declareString("UISndInventoryCopyToInv", "00000000-0000-0000-0000-000000000000", "[NOT USED]"); - gSavedSettings.declareString("UISndMoneyChangeDown", "104974e3-dfda-428b-99ee-b0d4e748d3a3", "Sound file for bank balance increase (uuid for sound asset)"); - gSavedSettings.declareString("UISndMoneyChangeUp", "77a018af-098e-c037-51a6-178f05877c6f", "Sound file for bank balance decrease(uuid for sound asset)"); + gSavedSettings.declareString("UISndMoneyChangeDown", "104974e3-dfda-428b-99ee-b0d4e748d3a3", "Sound file for L$ balance increase (uuid for sound asset)"); + gSavedSettings.declareString("UISndMoneyChangeUp", "77a018af-098e-c037-51a6-178f05877c6f", "Sound file for L$ balance decrease(uuid for sound asset)"); gSavedSettings.declareString("UISndNewIncomingIMSession", "67cc2844-00f3-2b3c-b991-6418d01e1bb7", "Sound file for new instant message session(uuid for sound asset)"); //gSavedSettings.declareString("UISndObjectCopyToInv", "00000000-0000-0000-0000-000000000000", "[NOT USED]"); gSavedSettings.declareString("UISndObjectCreate", "f4a0660f-5446-dea2-80b7-6482a082803c", "Sound file for object creation (uuid for sound asset)"); @@ -1144,7 +1144,7 @@ void declare_settings() gSavedSettings.declareF32("NotifyTipDuration", 4.f, "Length of time that notification tips stay on screen (seconds)"); - gSavedSettings.declareBOOL("NotifyMoneyChange", TRUE, "Pop up notifications for all financial transactions"); + gSavedSettings.declareBOOL("NotifyMoneyChange", TRUE, "Pop up notifications for all L$ transactions"); gSavedSettings.declareBOOL("ShowNewInventory", TRUE, "Automatic Previews of new notecards/textures/landmarks"); diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp index 3b47e21..342c76e 100644 --- a/linden/indra/newview/llface.cpp +++ b/linden/indra/newview/llface.cpp @@ -726,8 +726,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, { LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - const LLVolumeFace &face = volume.getVolumeFace(f); - //get bounding box if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) { @@ -738,9 +736,18 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, } LLVector3 min,max; - - min = face.mExtents[0]; - max = face.mExtents[1]; + + if (f >= volume.getNumVolumeFaces()) + { + min = LLVector3(-1,-1,-1); + max = LLVector3(1,1,1); + } + else + { + const LLVolumeFace &face = volume.getVolumeFace(f); + min = face.mExtents[0]; + max = face.mExtents[1]; + } //min, max are in volume space, convert to drawable render space LLVector3 center = ((min + max) * 0.5f)*mat_vert; @@ -904,6 +911,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, full_rebuild = TRUE; } } + else + { + full_rebuild = TRUE; + } } else { diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index 89a58be..4d0e754 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h @@ -49,8 +49,8 @@ reduced range, how to leave conversation, arrow keys to orbit. 6. First lft-click that does nothing (land,object): Explain that rgt-click gives menu, lft-click interacts or moves if physical -7. On first receipt of money (not rez/derez) explain that objects or people may -give you money, and how to give someone or something money ('Pay...'). +7. On first receipt of L$ (not rez/derez) explain that objects or people may +give you L$, and how to give someone or something money ('Pay...'). 8. After first teleporting and being sent to nearest hub, a dialog explaining how to find and move toward the beacon. diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 9237380..9dfaa49 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -102,10 +102,14 @@ BOOL LLFloaterImagePreview::postBuild() { mAvatarPreview = new LLImagePreviewAvatar(256, 256); mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE); + + mSculptedPreview = new LLImagePreviewSculpted(256, 256); + mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f); } else { mAvatarPreview = NULL; + mSculptedPreview = NULL; childShow("bad_image_text"); childDisable("clothing_type_combo"); childDisable("ok_btn"); @@ -121,6 +125,8 @@ LLFloaterImagePreview::~LLFloaterImagePreview() { mRawImagep = NULL; delete mAvatarPreview; + delete mSculptedPreview; + if (mGLName) { glDeleteTextures(1, &mGLName ); @@ -135,7 +141,7 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata) { LLFloaterImagePreview *fp =(LLFloaterImagePreview *)userdata; - if (!fp->mAvatarPreview) + if (!fp->mAvatarPreview || !fp->mSculptedPreview) { return; } @@ -176,10 +182,15 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata) case 8: fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, FALSE); break; + case 9: + fp->mSculptedPreview->setPreviewTarget(fp->mRawImagep, 2.0f); + break; default: break; } + fp->mAvatarPreview->refresh(); + fp->mSculptedPreview->refresh(); } //----------------------------------------------------------------------------- @@ -193,7 +204,11 @@ void LLFloaterImagePreview::draw() if (mRawImagep.notNull()) { LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo"); - if (iface && iface->getFirstSelectedIndex() <= 0) + U32 selected = 0; + if (iface) + selected = iface->getFirstSelectedIndex(); + + if (selected <= 0) { gl_rect_2d_checkerboard(mPreviewRect); LLGLDisable gls_alpha(GL_ALPHA_TEST); @@ -230,6 +245,7 @@ void LLFloaterImagePreview::draw() if (mAvatarPreview) { mAvatarPreview->setTexture(mGLName); + mSculptedPreview->setTexture(mGLName); } } @@ -253,10 +269,14 @@ void LLFloaterImagePreview::draw() } else { - if (mAvatarPreview) + if ((mAvatarPreview) && (mSculptedPreview)) { glColor3f(1.f, 1.f, 1.f); - mAvatarPreview->bindTexture(); + + if (selected == 9) + mSculptedPreview->bindTexture(); + else + mAvatarPreview->bindTexture(); glBegin( GL_QUADS ); { @@ -271,12 +291,16 @@ void LLFloaterImagePreview::draw() } glEnd(); - mAvatarPreview->unbindTexture(); + if (selected == 9) + mSculptedPreview->unbindTexture(); + else + mAvatarPreview->unbindTexture(); } } } } + //----------------------------------------------------------------------------- // loadImage() //----------------------------------------------------------------------------- @@ -417,6 +441,7 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask) else { mAvatarPreview->pan((F32)(x - mLastMouseX) * -0.005f, (F32)(y - mLastMouseY) * -0.005f); + mSculptedPreview->pan((F32)(x - mLastMouseX) * -0.005f, (F32)(y - mLastMouseY) * -0.005f); } } else if (local_mask == MASK_ORBIT) @@ -425,6 +450,7 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask) F32 pitch_radians = (F32)(y - mLastMouseY) * 0.02f; mAvatarPreview->rotate(yaw_radians, pitch_radians); + mSculptedPreview->rotate(yaw_radians, pitch_radians); } else { @@ -441,6 +467,8 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask) mAvatarPreview->rotate(yaw_radians, 0.f); mAvatarPreview->zoom(zoom_amt); + mSculptedPreview->rotate(yaw_radians, 0.f); + mSculptedPreview->zoom(zoom_amt); } } @@ -486,12 +514,13 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask) else { mAvatarPreview->refresh(); + mSculptedPreview->refresh(); } LLUI::setCursorPositionLocal(this, mLastMouseX, mLastMouseY); } - if (!mPreviewRect.pointInRect(x, y) || !mAvatarPreview) + if (!mPreviewRect.pointInRect(x, y) || !mAvatarPreview || !mSculptedPreview) { return LLFloater::handleHover(x, y, mask); } @@ -520,6 +549,9 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks) { mAvatarPreview->zoom((F32)clicks * -0.2f); mAvatarPreview->refresh(); + + mSculptedPreview->zoom((F32)clicks * -0.2f); + mSculptedPreview->refresh(); } return TRUE; @@ -560,6 +592,7 @@ LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLDynamicTex mTextureName = 0; } + LLImagePreviewAvatar::~LLImagePreviewAvatar() { mDummyAvatar->markDead(); @@ -602,7 +635,7 @@ void LLImagePreviewAvatar::setPreviewTarget(const char* joint_name, const char* //----------------------------------------------------------------------------- // update() //----------------------------------------------------------------------------- -BOOL LLImagePreviewAvatar::render() +BOOL LLImagePreviewAvatar::render() { mNeedsUpdate = FALSE; LLVOAvatar* avatarp = mDummyAvatar; @@ -640,6 +673,7 @@ BOOL LLImagePreviewAvatar::render() stop_glerror(); + gCamera->setAspect((F32)mWidth / mHeight); gCamera->setView(gCamera->getDefaultFOV() / mCameraZoom); gCamera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); @@ -692,3 +726,170 @@ void LLImagePreviewAvatar::pan(F32 right, F32 up) mCameraOffset.mV[VY] = llclamp(mCameraOffset.mV[VY] + right * mCameraDistance / mCameraZoom, -1.f, 1.f); mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f); } + + +//----------------------------------------------------------------------------- +// LLImagePreviewSculpted +//----------------------------------------------------------------------------- + +LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE) +{ + mNeedsUpdate = TRUE; + mCameraDistance = 0.f; + mCameraYaw = 0.f; + mCameraPitch = 0.f; + mCameraZoom = 1.f; + mTextureName = 0; + + LLVolumeParams volume_params; + volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE); + mVolume = new LLVolume(volume_params, (F32) MAX_LOD); + + /* + mDummyAvatar = new LLVOAvatar(LLUUID::null, LL_PCODE_LEGACY_AVATAR, gAgent.getRegion()); + mDummyAvatar->createDrawable(&gPipeline); + mDummyAvatar->mIsDummy = TRUE; + mDummyAvatar->mSpecialRenderMode = 2; + mDummyAvatar->setPositionAgent(LLVector3::zero); + mDummyAvatar->slamPosition(); + mDummyAvatar->updateJointLODs(); + mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); + gPipeline.markVisible(mDummyAvatar->mDrawable, *gCamera); + mTextureName = 0; + */ +} + + +LLImagePreviewSculpted::~LLImagePreviewSculpted() +{ + /* + mDummyAvatar->markDead(); + */ +} + + +void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance) +{ + mCameraDistance = distance; + mCameraZoom = 1.f; + mCameraPitch = 0.f; + mCameraYaw = 0.f; + mCameraOffset.clearVec(); + + if (imagep) + { + mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0); + } + +} + + +//----------------------------------------------------------------------------- +// render() +//----------------------------------------------------------------------------- +BOOL LLImagePreviewSculpted::render() +{ + mNeedsUpdate = FALSE; + + LLGLSUIDefault def; + LLGLDisable no_blend(GL_BLEND); + LLGLEnable cull(GL_CULL_FACE); + LLGLDepthTest depth(GL_TRUE); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f); + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + + glColor4f(0.15f, 0.2f, 0.3f, 1.f); + + gl_rect_2d_simple( mWidth, mHeight ); + + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + LLVector3 target_pos(0, 0, 0); + + LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) * + LLQuaternion(mCameraYaw, LLVector3::z_axis); + + LLQuaternion av_rot = camera_rot; + gCamera->setOriginAndLookAt( + target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera + LLVector3::z_axis, // up + target_pos + (mCameraOffset * av_rot) ); // point of interest + + stop_glerror(); + + gCamera->setAspect((F32) mWidth / mHeight); + gCamera->setView(gCamera->getDefaultFOV() / mCameraZoom); + gCamera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); + + gPipeline.enableLightsAvatar(0.0); + + + glPushMatrix(); + glScalef(0.5, 0.5, 0.5); + + glBegin(GL_TRIANGLES); + glColor3f(0.8f, 0.8f, 0.8f); + + const LLVolumeFace &vf = mVolume->getVolumeFace(0); + S32 num_indices = (S32)vf.mIndices.size(); + for (U32 i = 0; (S32)i < num_indices; i++) + { + LLVector3 normal = vf.mVertices[vf.mIndices[i]].mNormal; + normal.normVec(); + glNormal3f(normal.mV[VX], normal.mV[VY], normal.mV[VZ]); + + LLVector3 position = vf.mVertices[vf.mIndices[i]].mPosition; + glVertex3f(position.mV[VX], position.mV[VY], position.mV[VZ]); + } + + glEnd(); + + glPopMatrix(); + + return TRUE; +} + +//----------------------------------------------------------------------------- +// refresh() +//----------------------------------------------------------------------------- +void LLImagePreviewSculpted::refresh() +{ + mNeedsUpdate = TRUE; +} + +//----------------------------------------------------------------------------- +// rotate() +//----------------------------------------------------------------------------- +void LLImagePreviewSculpted::rotate(F32 yaw_radians, F32 pitch_radians) +{ + mCameraYaw = mCameraYaw + yaw_radians; + + mCameraPitch = llclamp(mCameraPitch + pitch_radians, F_PI_BY_TWO * -0.8f, F_PI_BY_TWO * 0.8f); +} + +//----------------------------------------------------------------------------- +// zoom() +//----------------------------------------------------------------------------- +void LLImagePreviewSculpted::zoom(F32 zoom_amt) +{ + mCameraZoom = llclamp(mCameraZoom + zoom_amt, 1.f, 10.f); +} + +void LLImagePreviewSculpted::pan(F32 right, F32 up) +{ + mCameraOffset.mV[VY] = llclamp(mCameraOffset.mV[VY] + right * mCameraDistance / mCameraZoom, -1.f, 1.f); + mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f); +} diff --git a/linden/indra/newview/llfloaterimagepreview.h b/linden/indra/newview/llfloaterimagepreview.h index 57874f1..1d212be 100644 --- a/linden/indra/newview/llfloaterimagepreview.h +++ b/linden/indra/newview/llfloaterimagepreview.h @@ -39,6 +39,34 @@ class LLViewerJointMesh; class LLVOAvatar; class LLTextBox; +class LLImagePreviewSculpted : public LLDynamicTexture +{ + public: + LLImagePreviewSculpted(S32 width, S32 height); + virtual ~LLImagePreviewSculpted(); + + void setPreviewTarget(LLImageRaw *imagep, F32 distance); + void setTexture(U32 name) { mTextureName = name; } + + BOOL render(); + void refresh(); + void rotate(F32 yaw_radians, F32 pitch_radians); + void zoom(F32 zoom_amt); + void pan(F32 right, F32 up); + virtual BOOL needsRender() { return mNeedsUpdate; } + + protected: + BOOL mNeedsUpdate; + U32 mTextureName; + F32 mCameraDistance; + F32 mCameraYaw; + F32 mCameraPitch; + F32 mCameraZoom; + LLVector3 mCameraOffset; + LLPointer mVolume; +}; + + class LLImagePreviewAvatar : public LLDynamicTexture { public: @@ -91,6 +119,7 @@ protected: LLPointer mRawImagep; LLImagePreviewAvatar* mAvatarPreview; + LLImagePreviewSculpted* mSculptedPreview; S32 mLastMouseX; S32 mLastMouseY; LLRect mPreviewRect; diff --git a/linden/indra/newview/llfloaterlandholdings.cpp b/linden/indra/newview/llfloaterlandholdings.cpp index 3bdfdd9..9ebd18c 100644 --- a/linden/indra/newview/llfloaterlandholdings.cpp +++ b/linden/indra/newview/llfloaterlandholdings.cpp @@ -72,7 +72,7 @@ void LLFloaterLandHoldings::show(void*) LLParcel::C_ANY, ""); - // TODO: request updated money balance? + // TODO: request updated L$ balance? floater->open(); /* Flawfinder: ignore */ } diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 682fda8..85fbfe1 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp @@ -2791,7 +2791,7 @@ bool LLDispatchEstateUpdateInfo::operator()( // UI, as anyone can teleport there. // However, gods need to be able to edit the access list for // linden estates, regardless of visibility, to allow object - // and money transfers. + // and L$ transfers. bool enable_agent = (!visible_from_mainland || (god && linden_estate)); bool enable_group = enable_agent; bool enable_ban = !linden_estate; diff --git a/linden/indra/newview/llgivemoney.cpp b/linden/indra/newview/llgivemoney.cpp index e89ab3d..9ae6c67 100644 --- a/linden/indra/newview/llgivemoney.cpp +++ b/linden/indra/newview/llgivemoney.cpp @@ -319,7 +319,7 @@ void LLFloaterPay::payViaObject(money_callback callback, const LLUUID& object_id LLViewerObject* object = gObjectList.findObject(object_id); if (!object) return; - LLFloaterPay *floater = new LLFloaterPay("Give Money", callback, object_id, TRUE); + LLFloaterPay *floater = new LLFloaterPay("Give L$", callback, object_id, TRUE); if (!floater) return; LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); @@ -352,7 +352,7 @@ void LLFloaterPay::payDirectly(money_callback callback, const LLUUID& target_id, BOOL is_group) { - LLFloaterPay *floater = new LLFloaterPay("Give Money", callback, target_id, FALSE); + LLFloaterPay *floater = new LLFloaterPay("Give L$", callback, target_id, FALSE); if (!floater) return; floater->childSetVisible("amount", TRUE); @@ -476,7 +476,7 @@ void LLFloaterPay::give(S32 amount) } else { - // just transfer the money + // just transfer the L$ mCallback(mTargetUUID, gAgent.getRegion(), amount, mTargetIsGroup, TRANS_GIFT, LLString::null); } } diff --git a/linden/indra/newview/llgivemoney.h b/linden/indra/newview/llgivemoney.h index 664d1c8..f2b5a9a 100644 --- a/linden/indra/newview/llgivemoney.h +++ b/linden/indra/newview/llgivemoney.h @@ -56,13 +56,13 @@ public: virtual ~LLFloaterPay(); // Pay into an in-world object, which will trigger scripts and eventually - // transfer the money to the resident or group that owns the object. + // transfer the L$ to the resident or group that owns the object. // Object must be selected. Must pass object id, because it may be // a child of the selected object. static void payViaObject(money_callback callback, const LLUUID& object_id); // Pay an avatar or group directly, not via an object in the world. - // Scripts are not notified, money can be direcly transferred. + // Scripts are not notified, L$ can be direcly transferred. static void payDirectly(money_callback callback, const LLUUID& target_id, BOOL is_group); diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index 8296e14..d00b062 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp @@ -378,7 +378,7 @@ void LLHoverView::updateText() if (object->flagTakesMoney() || (parent && parent->flagTakesMoney()) ) { - temp_str->append("Money "); + temp_str->append("L$ "); suppressObjectHoverDisplay = FALSE; // Show tip } diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp index c153339..648be34 100644 --- a/linden/indra/newview/llmanipscale.cpp +++ b/linden/indra/newview/llmanipscale.cpp @@ -604,6 +604,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) if (mManipPart == LL_NO_PART) { glColor4fv( default_normal_color.mV ); + LLGLDepthTest gls_depth(GL_FALSE); glBegin(GL_QUADS); { // Face 0 @@ -766,7 +767,8 @@ void LLManipScale::renderCorners( const LLBBox& bbox ) void LLManipScale::renderBoxHandle( F32 x, F32 y, F32 z ) { LLGLDisable gls_tex(GL_TEXTURE_2D); - + LLGLDepthTest gls_depth(GL_FALSE); + glPushMatrix(); { glTranslatef( x, y, z ); diff --git a/linden/indra/newview/llpanelgrouplandmoney.cpp b/linden/indra/newview/llpanelgrouplandmoney.cpp index 02aaec4..b7a74b1 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.cpp +++ b/linden/indra/newview/llpanelgrouplandmoney.cpp @@ -1,6 +1,6 @@ /** * @file llpanelgrouplandmoney.cpp - * @brief Panel for group land and money. + * @brief Panel for group land and L$. * * Copyright (c) 2006-2007, Linden Research, Inc. * @@ -481,7 +481,7 @@ void LLPanelGroupLandMoney::update(LLGroupChange gc) panelp = tabp->getCurrentPanel(); - //now pull the event handler associated with that money tab + //now pull the event handler associated with that L$ tab if ( panelp ) { eh = get_if_there(LLGroupMoneyTabEventHandler::sTabsToHandlers, @@ -634,7 +634,7 @@ BOOL LLPanelGroupLandMoney::postBuild() } - //pull out the widgets for the money details tab + //pull out the widgets for the L$ details tab earlierp = (LLButton*) getChildByName("earlier_details_button", true); laterp = (LLButton*) getChildByName("later_details_button", true); textp = (LLTextEditor*) getChildByName("group_money_details_text", true); @@ -671,7 +671,7 @@ BOOL LLPanelGroupLandMoney::postBuild() mGroupID); } - //pull out the widgets for the money sales tab + //pull out the widgets for the L$ sales tab earlierp = (LLButton*) getChildByName("earlier_sales_button", true); laterp = (LLButton*) getChildByName("later_sales_button", true); textp = (LLTextEditor*) getChildByName("group_money_sales_text", true); @@ -708,7 +708,7 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**) LLPanelGroupLandMoney* selfp = sGroupIDs.getIfThere(group_id); if(!selfp) { - llinfos << "Group Panel Land Money " << group_id << " no longer in existence." + llinfos << "Group Panel Land L$ " << group_id << " no longer in existence." << llendl; return; } @@ -1042,7 +1042,7 @@ void LLGroupMoneyDetailsTabEventHandler::processGroupAccountDetailsReply(LLMessa msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group money history reply for another agent!" + llwarns << "Got group L$ history reply for another agent!" << " Probably a userserver bug!" << llendl; return; } @@ -1217,7 +1217,7 @@ void LLGroupMoneySalesTabEventHandler::processGroupAccountTransactionsReply(LLMe msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group money history reply for another agent!" + llwarns << "Got group L$ history reply for another agent!" << " Probably a userserver bug!" << llendl; return; } @@ -1386,7 +1386,7 @@ void LLGroupMoneyPlanningTabEventHandler::processGroupAccountSummaryReply(LLMess msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group money history reply for another agent!" + llwarns << "Got group L$ history reply for another agent!" << " Probably a userserver bug!" << llendl; return; } @@ -1399,7 +1399,7 @@ void LLGroupMoneyPlanningTabEventHandler::processGroupAccountSummaryReply(LLMess self = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id); if (!self) { - llwarns << "GroupAccountSummary recieved for non-existent group money planning tab." << llendl; + llwarns << "GroupAccountSummary recieved for non-existent group L$ planning tab." << llendl; return; } diff --git a/linden/indra/newview/llpanelgrouplandmoney.h b/linden/indra/newview/llpanelgrouplandmoney.h index 6cd4753..8ac8bc7 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.h +++ b/linden/indra/newview/llpanelgrouplandmoney.h @@ -1,6 +1,6 @@ /** * @file llpanelgrouplandmoney.h - * @brief Panel for group land and money. + * @brief Panel for group land and L$. * * Copyright (c) 2006-2007, Linden Research, Inc. * diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index fb740a4..9fe94f9 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -53,6 +53,7 @@ #include "llresmgr.h" #include "llselectmgr.h" #include "llspinctrl.h" +#include "lltexturectrl.h" #include "lltextbox.h" #include "lltool.h" #include "lltoolcomp.h" @@ -80,6 +81,7 @@ enum { MI_TORUS, MI_TUBE, MI_RING, + MI_SCULPT, MI_NONE, MI_VOLUME_COUNT }; @@ -252,6 +254,34 @@ BOOL LLPanelObject::postBuild() childSetCommitCallback("Revolutions",onCommitParametric,this); mSpinRevolutions->setValidateBeforeCommit( &precommitValidate ); + // Sculpt + mCtrlSculptTexture = LLUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); + mCtrlSculptTexture->setDefaultImageAssetID(LLUUID(SCULPT_DEFAULT_TEXTURE)); + mCtrlSculptTexture->setCommitCallback( LLPanelObject::onCommitSculpt ); + mCtrlSculptTexture->setOnCancelCallback( LLPanelObject::onCancelSculpt ); + mCtrlSculptTexture->setOnSelectCallback( LLPanelObject::onSelectSculpt ); + mCtrlSculptTexture->setDropCallback(LLPanelObject::onDropSculpt); + mCtrlSculptTexture->setCallbackUserData( this ); + // Don't allow (no copy) or (no transfer) textures to be selected during immediate mode + mCtrlSculptTexture->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); + // Allow any texture to be used during non-immediate mode. + mCtrlSculptTexture->setNonImmediateFilterPermMask(PERM_NONE); + LLAggregatePermissions texture_perms; + if (gSelectMgr->selectGetAggregateTexturePermissions(texture_perms)) + { + BOOL can_copy = + texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || + texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_ALL; + BOOL can_transfer = + texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_EMPTY || + texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_ALL; + mCtrlSculptTexture->setCanApplyImmediately(can_copy && can_transfer); + } + else + { + mCtrlSculptTexture->setCanApplyImmediately(FALSE); + } + // Start with everyone disabled clearCtrls(); @@ -603,6 +633,14 @@ void LLPanelObject::getState( ) llinfos << "Unknown path " << (S32) path << " profile " << (S32) profile << " in getState" << llendl; selected_item = MI_BOX; } + + + if (objectp->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) + { + selected_item = MI_SCULPT; + } + + mComboBaseType ->setCurrentByIndex( selected_item ); mSelectedType = selected_item; @@ -760,6 +798,8 @@ void LLPanelObject::getState( ) // Compute control visibility, label names, and twist range. // Start with defaults. + BOOL cut_visible = TRUE; + BOOL hollow_visible = TRUE; BOOL top_size_x_visible = TRUE; BOOL top_size_y_visible = TRUE; BOOL top_shear_x_visible = TRUE; @@ -770,6 +810,7 @@ void LLPanelObject::getState( ) BOOL skew_visible = FALSE; BOOL radius_offset_visible = FALSE; BOOL revolutions_visible = FALSE; + BOOL sculpt_texture_visible = FALSE; F32 twist_min = OBJECT_TWIST_LINEAR_MIN; F32 twist_max = OBJECT_TWIST_LINEAR_MAX; F32 twist_inc = OBJECT_TWIST_LINEAR_INC; @@ -809,6 +850,23 @@ void LLPanelObject::getState( ) twist_inc = OBJECT_TWIST_INC; break; + + case MI_SCULPT: + cut_visible = FALSE; + hollow_visible = FALSE; + twist_visible = FALSE; + top_size_x_visible = FALSE; + top_size_y_visible = FALSE; + top_shear_x_visible = FALSE; + top_shear_y_visible = FALSE; + skew_visible = FALSE; + advanced_cut_visible = FALSE; + taper_visible = FALSE; + radius_offset_visible = FALSE; + revolutions_visible = FALSE; + sculpt_texture_visible = TRUE; + + break; case MI_BOX: case MI_CYLINDER: @@ -929,6 +987,15 @@ void LLPanelObject::getState( ) mSpinRevolutions ->setEnabled( enabled ); // Update field visibility + mLabelCut ->setVisible( cut_visible ); + mSpinCutBegin ->setVisible( cut_visible ); + mSpinCutEnd ->setVisible( cut_visible ); + + mLabelHollow ->setVisible( hollow_visible ); + mSpinHollow ->setVisible( hollow_visible ); + mLabelHoleType ->setVisible( hollow_visible ); + mComboHoleType ->setVisible( hollow_visible ); + mLabelTwist ->setVisible( twist_visible ); mSpinTwist ->setVisible( twist_visible ); mSpinTwistBegin ->setVisible( twist_visible ); @@ -962,6 +1029,30 @@ void LLPanelObject::getState( ) mLabelRevolutions->setVisible( revolutions_visible ); mSpinRevolutions ->setVisible( revolutions_visible ); + mCtrlSculptTexture->setVisible( sculpt_texture_visible ); + + + // sculpt texture + + if (selected_item == MI_SCULPT) + { + LLUUID id; + LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + + LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); + if((mTextureCtrl) && (sculpt_params)) + { + mTextureCtrl->setTentative(FALSE); + mTextureCtrl->setEnabled(editable); + mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture()); + + if (mObject != objectp) // we've just selected a new object, so save for undo + mSculptTextureRevert = sculpt_params->getSculptTexture(); + } + + } + + //---------------------------------------------------------------------------- mObject = objectp; @@ -1083,9 +1174,26 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata ) LLVolumeParams volume_params; self->getVolumeParams(volume_params); + + + // set sculpting + S32 selected_type = self->mComboBaseType->getCurrentIndex(); + + if (selected_type == MI_SCULPT) + { + self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE); + } + else + { + LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + if (sculpt_params) + self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, FALSE, TRUE); + } + // Update the volume, if necessary. self->mObject->updateVolume(volume_params); + // This was added to make sure thate when changes are made, the UI // adjusts to present valid options. // *FIX: only some changes, ie, hollow or primitive type changes, @@ -1138,6 +1246,11 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) path = LL_PCODE_PATH_CIRCLE; break; + case MI_SCULPT: + profile = LL_PCODE_PROFILE_CIRCLE; + path = LL_PCODE_PATH_CIRCLE; + break; + default: llwarns << "Unknown base type " << selected_type << " in getVolumeParams()" << llendl; @@ -1148,6 +1261,7 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) break; } + if (path == LL_PCODE_PATH_LINE) { LLVOVolume *volobjp = (LLVOVolume *)(LLViewerObject*)(mObject); @@ -1358,6 +1472,23 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) F32 shear_x = mSpinShearX->get(); F32 shear_y = mSpinShearY->get(); volume_params.setShear( shear_x, shear_y ); + + if (selected_type == MI_SCULPT) + { + volume_params.setSculptID(LLUUID::null, 0); + volume_params.setBeginAndEndT (0, 1); + volume_params.setBeginAndEndS (0, 1); + volume_params.setHollow (0); + volume_params.setTwistBegin (0); + volume_params.setTwistEnd (0); + volume_params.setRatio (1, 0.5); + volume_params.setShear (0, 0); + volume_params.setTaper (0, 0); + volume_params.setRevolutions (1); + volume_params.setRadiusOffset (0); + volume_params.setSkew (0); + } + } // BUG: Make work with multiple objects @@ -1502,6 +1633,18 @@ void LLPanelObject::sendPosition() } } +void LLPanelObject::sendSculpt() +{ + LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(this,"sculpt texture control"); + if(!mTextureCtrl) + return; + + LLSculptParams sculpt_params; + sculpt_params.setSculptTexture(mTextureCtrl->getImageAssetID()); + sculpt_params.setSculptType(LL_SCULPT_TYPE_SPHERE); + + mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); +} void LLPanelObject::refresh() { @@ -1697,3 +1840,59 @@ void LLPanelObject::onCommitCastShadows( LLUICtrl* ctrl, void* userdata ) LLPanelObject* self = (LLPanelObject*) userdata; self->sendCastShadows(); } + + +// static +void LLPanelObject::onSelectSculpt(LLUICtrl* ctrl, void* userdata) +{ + LLPanelObject* self = (LLPanelObject*) userdata; + + LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control"); + + if (mTextureCtrl) + self->mSculptTextureRevert = mTextureCtrl->getImageAssetID(); + + self->sendSculpt(); +} + + +void LLPanelObject::onCommitSculpt( LLUICtrl* ctrl, void* userdata ) +{ + LLPanelObject* self = (LLPanelObject*) userdata; + + self->sendSculpt(); +} + +// static +BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdata) +{ + LLPanelObject* self = (LLPanelObject*) userdata; + + LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control"); + + if (mTextureCtrl) + { + LLUUID asset = item->getAssetUUID(); + + mTextureCtrl->setImageAssetID(asset); + self->mSculptTextureRevert = asset; + } + + + return TRUE; +} + + +// static +void LLPanelObject::onCancelSculpt(LLUICtrl* ctrl, void* userdata) +{ + LLPanelObject* self = (LLPanelObject*) userdata; + + LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self,"sculpt texture control"); + if(!mTextureCtrl) + return; + + mTextureCtrl->setImageAssetID(self->mSculptTextureRevert); + + self->sendSculpt(); +} diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h index 76b0dab..c734b38 100644 --- a/linden/indra/newview/llpanelobject.h +++ b/linden/indra/newview/llpanelobject.h @@ -43,6 +43,9 @@ class LLViewerObject; class LLComboBox; class LLPanelInventory; class LLColorSwatchCtrl; +class LLTextureCtrl; +class LLInventoryItem; +class LLUUID; class LLPanelObject : public LLPanel { @@ -70,6 +73,11 @@ public: static void onCommitParametric(LLUICtrl* ctrl, void* userdata); static void onCommitMaterial( LLUICtrl* ctrl, void* userdata); + + static void onCommitSculpt( LLUICtrl* ctrl, void* userdata); + static void onCancelSculpt( LLUICtrl* ctrl, void* userdata); + static void onSelectSculpt( LLUICtrl* ctrl, void* userdata); + static BOOL onDropSculpt(LLUICtrl* ctrl, LLInventoryItem* item, void* ud); protected: void getState(); @@ -81,7 +89,8 @@ protected: void sendIsTemporary(); void sendIsPhantom(); void sendCastShadows(); - + void sendSculpt(); + void getVolumeParams(LLVolumeParams& volume_params); protected: @@ -153,12 +162,16 @@ protected: LLCheckBoxCtrl *mCheckPhantom; LLCheckBoxCtrl *mCheckCastShadows; + LLTextureCtrl *mCtrlSculptTexture; + LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed BOOL mIsPhysical; // to avoid sending "physical" when not changed BOOL mIsTemporary; // to avoid sending "temporary" when not changed BOOL mIsPhantom; // to avoid sending "phantom" when not changed BOOL mCastShadows; // to avoid sending "cast shadows" when not changed S32 mSelectedType; // So we know what selected type we last were + + LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel LLPointer mObject; LLPointer mRootObject; diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp index 23f31aa..7137f85 100644 --- a/linden/indra/newview/llpreview.cpp +++ b/linden/indra/newview/llpreview.cpp @@ -484,8 +484,11 @@ LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id) void LLPreview::userSetShape(const LLRect& new_rect) { - userResized(); - LLView::userSetShape(new_rect); + if(new_rect.getWidth() != mRect.getWidth() || new_rect.getHeight() != mRect.getHeight()) + { + userResized(); + } + LLFloater::userSetShape(new_rect); } // @@ -510,9 +513,12 @@ void LLMultiPreview::open() /*Flawfinder: ignore*/ void LLMultiPreview::userSetShape(const LLRect& new_rect) { - LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel(); - if (frontmost_preview) frontmost_preview->userResized(); - LLView::userSetShape(new_rect); + if(new_rect.getWidth() != mRect.getWidth() || new_rect.getHeight() != mRect.getHeight()) + { + LLPreview* frontmost_preview = (LLPreview*)mTabContainer->getCurrentPanel(); + if (frontmost_preview) frontmost_preview->userResized(); + } + LLFloater::userSetShape(new_rect); } diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index e83aa0d..54161c0 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2124,7 +2124,7 @@ BOOL idle_startup() // request mute list gMuteListp->requestFromServer(gAgent.getID()); - // Get money and ownership credit information + // Get L$ and ownership credit information msg->newMessageFast(_PREHASH_MoneyBalanceRequest); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -2320,7 +2320,7 @@ BOOL idle_startup() gViewerWindow->sendShapeToSim(); // Ignore stipend information for now. Money history is on the web site. - // if needed, show the money history window + // if needed, show the L$ history window //if (stipend_since_login && !gNoRender) //{ //} diff --git a/linden/indra/newview/llviewercamera.cpp b/linden/indra/newview/llviewercamera.cpp index 3a21ddf..c52b51c 100644 --- a/linden/indra/newview/llviewercamera.cpp +++ b/linden/indra/newview/llviewercamera.cpp @@ -622,7 +622,7 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts) LLMatrix4 render_mat(vo_volume->getRenderRotation(), LLVector4(vo_volume->getRenderPosition())); - num_faces = volume->getNumFaces(); + num_faces = volume->getNumVolumeFaces(); for (i = 0; i < num_faces; i++) { const LLVolumeFace& face = volume->getVolumeFace(i); diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index d271af5..0a65b8b 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp @@ -184,6 +184,7 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_TransactionID, mTransactionID); msg->nextBlockFast(_PREHASH_InventoryData); msg->addU32Fast(_PREHASH_CallbackID, 0); packMessage(msg); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 5eafd9d..4973989 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -4000,7 +4000,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) msg->getS32("MoneyData", "SquareMetersCredit", credit); msg->getS32("MoneyData", "SquareMetersCommitted", committed); msg->getStringFast(_PREHASH_MoneyData, _PREHASH_Description, STD_STRING_BUF_SIZE, desc); - llinfos << "money, credit, committed: " << balance << " " << credit << " " + llinfos << "L$, credit, committed: " << balance << " " << credit << " " << committed << llendl; if (gStatusBar) diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 58d57b5..88ac978 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -1328,9 +1328,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U32 value; dp->unpackU32(value, "SpecialCode"); - dp->setPassFlags(value); - + dp->unpackUUID(owner_id, "Owner"); if (value & 0x80) { @@ -1469,7 +1468,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (value & 0x10) { dp->unpackUUID(sound_uuid, "SoundUUID"); - dp->unpackUUID(owner_id, "OwnerID"); dp->unpackF32(gain, "SoundGain"); dp->unpackU8(sound_flags, "SoundFlags"); dp->unpackF32(cutoff, "SoundRadius"); @@ -4016,9 +4014,9 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own } else { + LLViewerPartSourceScript *pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num); //If the owner is muted, don't create the system if(gMuteListp->isMuted(owner_id)) return; - LLViewerPartSourceScript *pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num); // We need to be able to deal with a particle source that hasn't changed, but still got an update! if (pss) @@ -4065,10 +4063,9 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_ } else { + LLViewerPartSourceScript *pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp); //If the owner is muted, don't create the system if(gMuteListp->isMuted(owner_id)) return; - LLViewerPartSourceScript *pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp); - // We need to be able to deal with a particle source that hasn't changed, but still got an update! if (pss) { @@ -4260,6 +4257,12 @@ LLViewerObject::ExtraParameter* LLViewerObject::createNewParameterEntry(U16 para new_block = new LLLightParams(); break; } + case LLNetworkData::PARAMS_SCULPT: + { + new_block = new LLSculptParams(); + break; + } + default: { llinfos << "Unknown param type." << llendl; diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index 51b1ebe..4409f8b 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp @@ -62,7 +62,7 @@ // Viewer object cache version, change if object update // format changes. JC -const U32 INDRA_OBJECT_CACHE_VERSION = 12; +const U32 INDRA_OBJECT_CACHE_VERSION = 14; extern BOOL gNoRender; diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 0a778e4..b9bdddc 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -89,6 +89,8 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mGlobalVolume = FALSE; mVObjRadius = LLVector3(1,1,0.5f).magVec(); mNumFaces = 0; + mLODChanged = FALSE; + mSculptChanged = FALSE; } LLVOVolume::~LLVOVolume() @@ -116,6 +118,15 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, // Do base class updates... U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp); + LLUUID sculpt_id; + U8 sculpt_type = 0; + if (isSculpted()) + { + LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + sculpt_id = sculpt_params->getSculptTexture(); + sculpt_type = sculpt_params->getSculptType(); + } + if (!dp) { if (update_type == OUT_FULL) @@ -157,6 +168,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, // Unpack volume data LLVolumeParams volume_params; LLVolumeMessage::unpackVolumeParams(&volume_params, mesgsys, _PREHASH_ObjectData, block_num); + volume_params.setSculptID(sculpt_id, sculpt_type); if (setVolume(volume_params, 0)) { @@ -186,7 +198,9 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, llwarns << "Bogus volume parameters in object " << getID() << llendl; llwarns << getRegion()->getOriginGlobal() << llendl; } - + + volume_params.setSculptID(sculpt_id, sculpt_type); + if (setVolume(volume_params, 0)) { markForUpdate(TRUE); @@ -462,6 +476,28 @@ void LLVOVolume::updateTextures() if (pri > max_vsize) max_vsize = pri; } } + + if (isSculpted()) + { + LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLUUID id = sculpt_params->getSculptTexture(); + mSculptTexture = gImageList.getImage(id); + if (mSculptTexture.notNull()) + { + mSculptTexture->addTextureStats(mPixelArea); + } + + S32 desired_discard = MAX_LOD - mLOD; + S32 current_discard = getVolume()->getSculptLevel(); + + if (desired_discard != current_discard) + { + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + mSculptChanged = TRUE; + } + + } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA)) { @@ -624,22 +660,79 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail } } } + mGlobalVolume = (mVolumeImpl && mVolumeImpl->isVolumeGlobal()); - if (LLPrimitive::setVolume(volume_params, mLOD, (mVolumeImpl && mVolumeImpl->isVolumeUnique()))) + if ((LLPrimitive::setVolume(volume_params, mLOD, (mVolumeImpl && mVolumeImpl->isVolumeUnique()))) || mSculptChanged) { mFaceMappingChanged = TRUE; - + if (mVolumeImpl) { mVolumeImpl->onSetVolume(volume_params, detail); } + + if (isSculpted()) + { + mSculptTexture = gImageList.getImage(volume_params.getSculptID()); + if (mSculptTexture.notNull()) + { + sculpt(); + } + } + else + { + mSculptTexture = NULL; + } return TRUE; } return FALSE; } +// sculpt replaces generate() for sculpted surfaces +void LLVOVolume::sculpt() +{ + U16 sculpt_height = 0; + U16 sculpt_width = 0; + S8 sculpt_components = 0; + const U8* sculpt_data = NULL; + + if (mSculptTexture.notNull()) + { + S32 discard_level; + S32 desired_discard = MAX_LOD - mLOD; // desired + + discard_level = desired_discard; + + S32 max_discard = mSculptTexture->getMaxDiscardLevel(); + if (discard_level > max_discard) + discard_level = max_discard; // clamp to the best we can do + + S32 best_discard = mSculptTexture->getDiscardLevel(); + if (discard_level < best_discard) + discard_level = best_discard; // clamp to what we have + + if (best_discard == -1) + discard_level = -1; // and if we have nothing, set to nothing + + + S32 current_discard = getVolume()->getSculptLevel(); + if (current_discard == discard_level) // no work to do here + return; + + LLPointer raw_image = new LLImageRaw(); + mSculptTexture->readBackRaw(discard_level, raw_image, TRUE); + + sculpt_height = raw_image->getHeight(); + sculpt_width = raw_image->getWidth(); + + sculpt_components = raw_image->getComponents(); + sculpt_data = raw_image->getData(); + getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); + } +} + S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius) { S32 cur_detail; @@ -978,7 +1071,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) genBBoxes(FALSE); } } - else if (mLODChanged) + else if ((mLODChanged) || (mSculptChanged)) { LLPointer old_volumep, new_volumep; F32 old_lod, new_lod; @@ -994,7 +1087,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) new_volumep = getVolume(); new_lod = new_volumep->getDetail(); - if (new_lod != old_lod) + if ((new_lod != old_lod) || mSculptChanged) { compiled = TRUE; sNumLODChanges += getVolume()->getNumFaces(); @@ -1030,6 +1123,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) mVolumeChanged = FALSE; mLODChanged = FALSE; + mSculptChanged = FALSE; mFaceMappingChanged = FALSE; return TRUE; @@ -1037,9 +1131,16 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) void LLVOVolume::updateFaceSize(S32 idx) { - const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx); LLFace* facep = mDrawable->getFace(idx); - facep->setSize(vol_face.mVertices.size(), vol_face.mIndices.size()); + if (idx >= getVolume()->getNumVolumeFaces()) + { + facep->setSize(0,0); + } + else + { + const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx); + facep->setSize(vol_face.mVertices.size(), vol_face.mIndices.size()); + } } BOOL LLVOVolume::isRootEdit() const @@ -1469,7 +1570,6 @@ BOOL LLVOVolume::isFlexible() const { if (getVolume()->getParams().getPathParams().getCurveType() != LL_PCODE_PATH_FLEXIBLE) { - llwarns << "wtf" << llendl; LLVolumeParams volume_params = getVolume()->getParams(); U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE); @@ -1482,6 +1582,16 @@ BOOL LLVOVolume::isFlexible() const } } +BOOL LLVOVolume::isSculpted() const +{ + if (getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) + { + return TRUE; + } + + return FALSE; +} + BOOL LLVOVolume::isVolumeGlobal() const { if (mVolumeImpl) diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index 80e4e8a..14c640f 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h @@ -152,6 +152,7 @@ public: void setTexture(const S32 face); /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); + void sculpt(); void updateRelativeXform(); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); /*virtual*/ void updateFaceSize(S32 idx); @@ -197,6 +198,7 @@ public: // Flexible Objects U32 getVolumeInterfaceID() const; virtual BOOL isFlexible() const; + virtual BOOL isSculpted() const; BOOL isVolumeGlobal() const; BOOL canBeFlexible() const; BOOL setIsFlexible(BOOL is_flexible); @@ -223,12 +225,14 @@ protected: LLFrameTimer mTextureUpdateTimer; S32 mLOD; BOOL mLODChanged; + BOOL mSculptChanged; F32 mRadius; LLMatrix4 mRelativeXform; LLMatrix3 mRelativeXformInvTrans; BOOL mVolumeChanged; F32 mVObjRadius; LLVolumeInterface *mVolumeImpl; + LLPointer mSculptTexture; // statics public: diff --git a/linden/indra/newview/newview_vc8.vcproj b/linden/indra/newview/newview_vc8.vcproj index 4cb359b..8b55869 100644 --- a/linden/indra/newview/newview_vc8.vcproj +++ b/linden/indra/newview/newview_vc8.vcproj @@ -42,11 +42,12 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llaudio;..\llmedia;..\llimage;..\llscene;..\llxml;..\llmessage;..\llprimitive;..\llrender;..\llwindow;..\llcharacter;..\llinventory;..\llui;..\lscript;"..\..\libraries\i686-win32\include";..\..\libraries\include\;"..\..\libraries\i686-win32\include\quicktime";..\llwindow\Logitech_LCD;..\llwindow\Logitech_LCD\LCDUI" - PreprocessorDefinitions="WIN32;_DEBUG;LL_WINDOWS;LL_DEBUG;XP_WIN;XP_WIN32;MOZILLA_INTERNAL_API" + PreprocessorDefinitions="WIN32;_DEBUG;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;XP_WIN;XP_WIN32;MOZILLA_INTERNAL_API" MinimalRebuild="false" BasicRuntimeChecks="3" RuntimeLibrary="1" StructMemberAlignment="4" + TreatWChar_tAsBuiltInType="false" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" PrecompiledHeaderThrough="llviewerprecompiledheaders.h" @@ -66,11 +67,11 @@ /> + + @@ -785,10 +792,6 @@ > - - @@ -973,10 +976,6 @@ > - - @@ -1173,10 +1172,6 @@ > - - @@ -1485,6 +1480,10 @@ > + + @@ -1533,6 +1532,10 @@ > + + @@ -1569,10 +1572,6 @@ > - - @@ -1803,6 +1802,10 @@ > + + @@ -2143,10 +2146,6 @@ > - - @@ -2323,10 +2322,6 @@ > - - @@ -2527,10 +2522,6 @@ > - - @@ -2859,6 +2850,10 @@ > + + @@ -2907,6 +2902,10 @@ > + + @@ -2943,10 +2942,6 @@ > - - diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt index c6c57f0..a223e08 100644 --- a/linden/indra/newview/releasenotes.txt +++ b/linden/indra/newview/releasenotes.txt @@ -1,3 +1,55 @@ +Release Notes for Second Life 1.16.0(5) May 23, 2007 +===================================== +New Features: +* Sculpted Prims +** Sculpted Prims are a new primitive type that uses a texture to control its 3D shape +** See http://wiki.secondlife.com/wiki/Sculpted_Prims for FAQ and detailed information +* Add "Mute" button to block unwanted notecards, landmarks, and textures + +Changes: +* Improved muting of particle systems + +LSL Changes: +* New function: llRegionSay() +** Allows object to communicate region-wide +** Does not allow communication on channel 0 +** This is intended to reduce simulator load by eliminating the need for relay objects + +Bug fixes: +* Text for several alert messages has been updated +* Fixed positioning of maximize button when minimizing both script and lsl window +* Fixed positioning of LSL help window after minimizing/maximizing main script window +* Fixed group chat IM showing sender as the only participant until someone responds +* Fixed group chat IM reopening with an error when sending a message after user closes group chat +* Fixed '... has left the session' when leaving group chat after talking +* Fixed failed email when no subject is included +* Fixed object loss occuring when taking an item +* VWR-657: Beta -> Linux -> Startup -> Crash + +Release Notes for Second Life 1.15.3(0) May 22, 2007 (Server-Only Update) +===================================== +Bug fixes: +* SVC-213: llGiveInventoryList not creating a folder to place items + + +Release Notes for Second Life 1.15.2(0) May 18, 2007 (Server-Only Update) +===================================== +Changes: +* IMs and emails received when inventory is given now include the item name, owner, position and SLURL. +** This is useful to track down spamming objects. + +Bug fixes: +* SVC-85: Friends online in the grid does not reflect who is actually online +* SVC-138: Land sales search sorting doesn't work +* MISC-37: Continued breakdowns in group notice popup functionality +* Teleporting to Help Island no longer allows you to teleport back to Orientation Island +* No-copy objects that fail to rez now reappear in inventory (may take up to one minute) +* Scripted attachments work again correctly on group land +* Fixed a bug where email sent by script with an empty subject would fail (valid per RFC2822) +* Fixed several server-side memory leaks, and changed to new memory allocation library +* Fixed several server-side crashes + + Release Notes for Second Life 1.15.1(3) May 14, 2007 ===================================== Changes: diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc index e9ac143..482f14e 100644 --- a/linden/indra/newview/res/newViewRes.rc +++ b/linden/indra/newview/res/newViewRes.rc @@ -227,8 +227,8 @@ TOOLPIPETTE CURSOR "toolpipette.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,15,1,3 - PRODUCTVERSION 1,15,1,3 + FILEVERSION 1,16,0,5 + PRODUCTVERSION 1,16,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -245,12 +245,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "1.15.1.3" + VALUE "FileVersion", "1.16.0.5" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "1.15.1.3" + VALUE "ProductVersion", "1.16.0.5" END END BLOCK "VarFileInfo" diff --git a/linden/indra/newview/skins/xui/en-us/alerts.xml b/linden/indra/newview/skins/xui/en-us/alerts.xml index a783d00..cac8dc4 100644 --- a/linden/indra/newview/skins/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/xui/en-us/alerts.xml @@ -11,7 +11,7 @@ Floater error: Could not find the following controls: - + [CONTROLS] - - - Save changes to current clothing/body part? - - - - - - + Save changes to current clothing/body part? @@ -98,7 +84,7 @@ for advice and a link to the system status web page. - Failure writing animation data. + There was a problem writing animation data. Please try again later. @@ -126,7 +112,7 @@ Enter a brief description of the group's purpose. A snapshot of your character has been saved. - + Visit the Webpage Studio exhibit to see it. @@ -146,8 +132,8 @@ Visit the Webpage Studio exhibit to see it. - Granting modify rights to another resident allows them to change -ANY objects you may have in-world. Be VERY careful when handing + Granting modify rights to another resident allows them to change +ANY objects you may have in-world. Be VERY careful when handing out this permission. Do you want to grant modify rights for [FIRST_NAME] [LAST_NAME]? @@ -171,7 +157,7 @@ Do you want to grant modify rights for [FIRST_NAME] [LAST_NAME]? - Do you want to remove [FIRST] [LAST] from your friends? + Do you want to remove [FIRST] [LAST] from your list of friends? @@ -1022,7 +1012,7 @@ and report the problem. Unable to connect to [SECOND_LIFE]. Despite our best efforts, something unexpected has gone wrong. -Please go to the Support section of the SecondLife.com web site +Please go to www.secondlife.com/support and report the problem. If possible, include your SecondLife.log file from: C:\Documents and Settings\(name)\Application Data\SecondLife\logs Thank you. @@ -1032,7 +1022,7 @@ Thank you. Unable to connect to [SECOND_LIFE]. Despite our best efforts, something unexpected has gone wrong. -Please go to the Support section of the SecondLife.com web site +Please go to www.secondlife.com/support and report the problem. If possible, include your SecondLife.log file from: ~/Library/Application Support/SecondLife/logs Thank you. @@ -1043,15 +1033,13 @@ Thank you. There was a problem resolving your login authentication token. Please try logging in again. If you continue to receive this error, -please goto the Support section of the -SecondLife.com web site. +please go to www.secondlife.com/support. Unknown problem trying to connect. -(Blank error message from server.) - + Please try again in a few minutes, or click Help for advice and a link to the system status web page. @@ -1065,7 +1053,7 @@ for advice and a link to the system status web page. Unable to connect. No reply from login database. - + Please try again in a few minutes, or click Help for advice and a link to the system status web page. @@ -1084,10 +1072,10 @@ for advice and a link to the system status web page. [SECOND_LIFE] installation is complete. - + If this is your first time using [SECOND_LIFE], you will need to create an account before you can log on. - + Return to www.secondlife.com to create a new account? - Your clothing is still downloading. -You can use the world normally, and other users + Your avatar is still downloading. +You can use [SECOND_LIFE] normally, and other Residents will see you correctly. @@ -1115,7 +1103,7 @@ Please check your network connection. Unable to connect. Login packet never received by login server. - + Please try again in a few minutes, or click Help for advice and a link to the system status web page. @@ -1128,11 +1116,11 @@ for advice and a link to the system status web page. - Welcome to [SECOND_LIFE]! - + Welcome to [SECOND_LIFE]! + Use arrow keys to walk. - -Please choose the male or female character. + +Please choose the male or female avatar. You can change your mind later. - Welcome to [SECOND_LIFE]! - + Welcome to [SECOND_LIFE]! + Use arrow keys to walk. - -Please choose the male or female character. + +Please choose the male or female avatar.