From 971ea9f3d7956906c3721b7cbd9ebead4e3b24af Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 21 Dec 2016 16:18:51 -0500 Subject: MAINT-7005 - added ability to set base priority and joint priority in anim_tool.py --- scripts/content_tools/anim_tool.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py index 9b795f45fd..77bf731ae6 100644 --- a/scripts/content_tools/anim_tool.py +++ b/scripts/content_tools/anim_tool.py @@ -406,8 +406,13 @@ class Anim(object): def delete_joint(self, name): j = self.find_joint(name) if j: + if args.verbose: + print "removing joint", name anim.joints.remove(j) anim.num_joints = len(self.joints) + else: + if args.verbose: + print "joint not found to remove", name def summary(self): nj = len(self.joints) @@ -500,9 +505,9 @@ def resolve_joints(names, skel_tree, lad_tree): for elt in all_elts: if elt.get("name") is None: continue - print elt.get("name"),"hud",elt.get("hud") + #print elt.get("name"),"hud",elt.get("hud") if args.no_hud and elt.get("hud"): - print "skipping hud joint", elt.get("name") + #print "skipping hud joint", elt.get("name") continue if elt.get("name") in names or elt.tag in names: matches.append(elt.get("name")) @@ -532,6 +537,8 @@ if __name__ == "__main__": parser.add_argument("--lad", help="name of the avatar_lad file", default= os.path.join(path_to_skel,"avatar_lad.xml")) parser.add_argument("--set_version", nargs=2, type=int, help="set version and sub-version to specified values") parser.add_argument("--no_hud", help="omit hud joints from list of attachments", action="store_true") + parser.add_argument("--base_priority", help="set base priority", type=int) + parser.add_argument("--joint_priority", help="set joint priority for all joints", type=int) parser.add_argument("infilename", help="name of a .anim file to input") parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output") args = parser.parse_args() @@ -591,6 +598,13 @@ if __name__ == "__main__": if args.set_version: anim.version = args.set_version[0] anim.sub_version = args.set_version[1] + if args.base_priority is not None: + print "set base priority",args.base_priority + anim.base_priority = args.base_priority + if args.joint_priority is not None: + print "set joint priority",args.joint_priority + for joint in anim.joints: + joint.joint_priority = args.joint_priority if args.dump: anim.dump(args.dump) if args.summary: -- cgit v1.3 From fdfa832f4d4a93629d1ccda11357901e42d7b428 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 1 Mar 2017 18:10:24 -0500 Subject: SL-409 - simple script to summarize viewer metrics logs of asset fetches --- scripts/metrics/viewer_asset_logs.py | 98 ++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 scripts/metrics/viewer_asset_logs.py (limited to 'scripts') diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py new file mode 100644 index 0000000000..47f0658138 --- /dev/null +++ b/scripts/metrics/viewer_asset_logs.py @@ -0,0 +1,98 @@ +#!runpy.sh + +"""\ + +This module contains tools for analyzing viewer asset metrics logs produced by the viewer. + +$LicenseInfo:firstyear=2016&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2016, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" + +import argparse +from lxml import etree +from llbase import llsd + +def get_metrics_record(infiles): + for filename in args.infiles: + f = open(filename) + # get an iterable + context = etree.iterparse(f, events=("start", "end")) + + # turn it into an iterator + context = iter(context) + + # get the root element + event, root = context.next() + try: + for event, elem in context: + if event == "end" and elem.tag == "llsd": + xmlstr = etree.tostring(elem, encoding="utf8", method="xml") + sd = llsd.parse_xml(xmlstr) + yield sd + except etree.XMLSyntaxError: + print "Fell off end of document" + + f.close() + +def update_stats(stats,rec): + for region in rec["regions"]: + region_key = (region["grid_x"],region["grid_y"]) + #print "region",region_key + for field, val in region.iteritems(): + if field in ["duration","grid_x","grid_y"]: + continue + if field == "fps": + # handle fps record as special case + pass + else: + #print "field",field + stats.setdefault(field,{}) + type_stats = stats.get(field) + newcount = val["resp_count"] + #print "field",field,"add count",newcount + type_stats["count"] = type_stats.get("count",0) + val["resp_count"] + #print "field",field,"count",type_stats["count"] + if (newcount>0): + type_stats["sum"] = type_stats.get("sum",0) + val["resp_count"] * val["resp_mean"] + type_stats["enqueued"] = type_stats.get("enqueued",0) + val["enqueued"] + type_stats["dequeued"] = type_stats.get("dequeued",0) + val["dequeued"] + + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser(description="process metric xml files for viewer asset fetching") + parser.add_argument("--verbose", action="store_true",help="verbose flag") + parser.add_argument("infiles", nargs="+", help="name of .xml files to process") + args = parser.parse_args() + + #print "process files:",args.infiles + + stats = {} + for rec in get_metrics_record(args.infiles): + #print "record",rec + + update_stats(stats,rec) + + for key, val in stats.iteritems(): + if val["count"] > 0: + print "key",key,"count",val["count"],"mean",val["sum"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] + -- cgit v1.3 From f70abb4ad628b19c993a22c7e86d350395555fcf Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 3 Mar 2017 15:14:09 -0500 Subject: SL-409 - added tracking for bytes fetched to viewer assets metrics (does not currently work for textures) --- indra/llcommon/llerror.cpp | 2 +- indra/llmessage/llassetstorage.cpp | 17 ++++++++++++++++- indra/llmessage/llassetstorage.h | 1 + indra/newview/llviewerassetstats.cpp | 10 +++++++--- indra/newview/llviewerassetstats.h | 9 +++++---- indra/newview/llviewerassetstorage.cpp | 7 +++++-- indra/newview/llviewerassetstorage.h | 5 ++++- scripts/metrics/viewer_asset_logs.py | 8 ++++++-- 8 files changed, 45 insertions(+), 14 deletions(-) (limited to 'scripts') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index e6407ecf22..9c49f7eff4 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -572,7 +572,7 @@ namespace LLError mFunctionString += std::string(mFunction) + ":"; for (size_t i = 0; i < mTagCount; i++) { - mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? "" : ","); + mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? " " : ","); } } diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 7bf886ef26..ab6fc69413 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -195,7 +195,8 @@ LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type mInfoCallback( NULL ), mIsLocal(FALSE), mIsUserWaiting(FALSE), - mTimeout(LL_ASSET_STORAGE_TIMEOUT) + mTimeout(LL_ASSET_STORAGE_TIMEOUT), + mBytesFetched(0) { } @@ -641,6 +642,20 @@ void LLAssetStorage::downloadCompleteCallback( result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE; vfile.remove(); } + else + { +#if 1 + for (request_list_t::iterator iter = gAssetStorage->mPendingDownloads.begin(); + iter != gAssetStorage->mPendingDownloads.end(); ++iter ) + { + LLAssetRequest* dlreq = *iter; + if ((dlreq->getUUID() == file_id) && (dlreq->getType()== file_type)) + { + dlreq->mBytesFetched = vfile.getSize(); + } + } +#endif + } } removeAndCallbackPendingDownloads(file_id, file_type, callback_id, callback_type, ext_status, result); diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 2ec8ac31b4..d6b4fa0c7b 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -138,6 +138,7 @@ public: BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result. F64Seconds mTimeout; // Amount of time before timing out. LLUUID mRequestingAgentID; // Only valid for uploads from an agent + F64 mBytesFetched; virtual LLSD getTerseDetails() const; virtual LLSD getFullDetails() const; diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index d47f73ccce..a9e0ba7b5d 100644 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -168,6 +168,7 @@ namespace LLViewerAssetStatsFF static LLTrace::DCCountStatHandle<> sEnqueued[EVACCount]; static LLTrace::DCCountStatHandle<> sDequeued[EVACCount]; + static LLTrace::DCEventStatHandle<> sBytesFetched[EVACCount]; static LLTrace::DCEventStatHandle sResponse[EVACCount]; } @@ -277,7 +278,8 @@ void LLViewerAssetStats::getStat(LLTrace::Recording& rec, T& req, LLViewerAssetS .resp_count(rec.getSampleCount(sResponse[cat])) .resp_min(rec.getMin(sResponse[cat]).value()) .resp_max(rec.getMax(sResponse[cat]).value()) - .resp_mean(rec.getMean(sResponse[cat]).value()); + .resp_mean(rec.getMean(sResponse[cat]).value()) + .resp_mean_bytes(rec.getMean(sBytesFetched[cat])); } } @@ -370,11 +372,12 @@ void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp) add(sDequeued[int(eac)], 1); } -void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration) +void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration, F64 bytes) { const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); record(sResponse[int(eac)], F64Microseconds(duration)); + record(sBytesFetched[int(eac)], bytes); } void init() @@ -403,7 +406,8 @@ LLViewerAssetStats::AssetRequestType::AssetRequestType() resp_count("resp_count"), resp_min("resp_min"), resp_max("resp_max"), - resp_mean("resp_mean") + resp_mean("resp_mean"), + resp_mean_bytes("resp_mean_bytes") {} LLViewerAssetStats::FPSStats::FPSStats() diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index a2545c0bad..718c284224 100644 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -118,11 +118,12 @@ public: struct AssetRequestType : public LLInitParam::Block { Mandatory enqueued, - dequeued, - resp_count; + dequeued, + resp_count; Mandatory resp_min, resp_max, - resp_mean; + resp_mean, + resp_mean_bytes; AssetRequestType(); }; @@ -272,7 +273,7 @@ void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp); void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp); void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, - LLViewerAssetStats::duration_t duration); + LLViewerAssetStats::duration_t duration, F64 bytes=0); void record_avatar_stats(); diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 85150bf7fa..fa3567620c 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -82,7 +82,8 @@ protected: LLViewerAssetStatsFF::record_dequeue(mType, mWithHTTP, false); LLViewerAssetStatsFF::record_response(mType, mWithHTTP, false, (LLViewerAssetStatsFF::get_timestamp() - - mMetricsStartTime)); + - mMetricsStartTime), + mBytesFetched); mMetricsStartTime = (U32Seconds)0; } } @@ -458,12 +459,13 @@ void LLViewerAssetStorage::queueRequestHttp( LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp); LLCoros::instance().launch("LLViewerAssetStorage::assetRequestCoro", - boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, uuid, atype, callback, user_data)); + boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data)); } } } void LLViewerAssetStorage::assetRequestCoro( + LLViewerAssetRequest *req, const LLUUID& uuid, LLAssetType::EType atype, LLGetAssetCallback callback, @@ -506,6 +508,7 @@ void LLViewerAssetStorage::assetRequestCoro( temp_id.generate(); LLVFile vf(gAssetStorage->mVFS, temp_id, atype, LLVFile::WRITE); vf.setMaxSize(size); + req->mBytesFetched = size; if (!vf.write(raw.data(),size)) { // TODO asset-http: handle error diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index d28a8a276f..3ca8112601 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -31,6 +31,8 @@ class LLVFile; +class LLViewerAssetRequest; + class LLViewerAssetStorage : public LLAssetStorage { public: @@ -85,7 +87,8 @@ protected: BOOL duplicate, BOOL is_priority); - void assetRequestCoro(const LLUUID& uuid, + void assetRequestCoro(LLViewerAssetRequest *req, + const LLUUID& uuid, LLAssetType::EType atype, void (*callback) (LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), void *user_data); diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py index 47f0658138..8e46ca4707 100644 --- a/scripts/metrics/viewer_asset_logs.py +++ b/scripts/metrics/viewer_asset_logs.py @@ -72,6 +72,7 @@ def update_stats(stats,rec): #print "field",field,"count",type_stats["count"] if (newcount>0): type_stats["sum"] = type_stats.get("sum",0) + val["resp_count"] * val["resp_mean"] + type_stats["sum_bytes"] = type_stats.get("sum_bytes",0) + val["resp_count"] * val.get("resp_mean_bytes",0) type_stats["enqueued"] = type_stats.get("enqueued",0) + val["enqueued"] type_stats["dequeued"] = type_stats.get("dequeued",0) + val["dequeued"] @@ -92,7 +93,10 @@ if __name__ == "__main__": update_stats(stats,rec) - for key, val in stats.iteritems(): + for key in sorted(stats.keys()): + val = stats[key] if val["count"] > 0: - print "key",key,"count",val["count"],"mean",val["sum"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] + print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] + else: + print key,"count",val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] -- cgit v1.3 From f028290c9e1afd241944ad63e8ce34af755a2233 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 7 Mar 2017 08:06:03 -0500 Subject: SL-409 - added size stats to metrics for textures --- indra/newview/lltexturefetch.cpp | 23 ++++++++++++++++------- scripts/metrics/viewer_asset_logs.py | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 7c0d02c9ca..9469a3c373 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -485,7 +485,7 @@ private: void recordTextureStart(bool is_http); // Threads: Ttf - void recordTextureDone(bool is_http); + void recordTextureDone(bool is_http, F64 byte_count); void lockWorkMutex() { mWorkMutex.lock(); } void unlockWorkMutex() { mWorkMutex.unlock(); } @@ -1426,6 +1426,13 @@ bool LLTextureFetchWorker::doWork(S32 param) } if (processSimulatorPackets()) { + // Capture some measure of total size for metrics + F64 byte_count = 0; + for (S32 i=mFirstPacket; i<=mLastPacket; i++) + { + byte_count += mPackets[i]->mSize; + } + LL_DEBUGS(LOG_TXT) << mID << ": Loaded from Sim. Bytes: " << mFormattedImage->getDataSize() << LL_ENDL; mFetcher->removeFromNetworkQueue(this, false); if (mFormattedImage.isNull() || !mFormattedImage->getDataSize()) @@ -1443,7 +1450,8 @@ bool LLTextureFetchWorker::doWork(S32 param) } setState(DECODE_IMAGE); mWriteToCacheState = SHOULD_WRITE; - recordTextureDone(false); + + recordTextureDone(false, byte_count); } else { @@ -2093,7 +2101,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe mFetcher->removeFromHTTPQueue(mID, data_size); - recordTextureDone(true); + recordTextureDone(true, data_size); } // -Mw @@ -2493,14 +2501,15 @@ void LLTextureFetchWorker::recordTextureStart(bool is_http) // Threads: Ttf -void LLTextureFetchWorker::recordTextureDone(bool is_http) +void LLTextureFetchWorker::recordTextureDone(bool is_http, F64 byte_count) { if (mMetricsStartTime.value()) { LLViewerAssetStatsFF::record_response(LLViewerAssetType::AT_TEXTURE, - is_http, - LLImageBase::TYPE_AVATAR_BAKE == mType, - LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime); + is_http, + LLImageBase::TYPE_AVATAR_BAKE == mType, + LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime, + byte_count); mMetricsStartTime = (U32Seconds)0; } LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py index 8e46ca4707..e48286f696 100644 --- a/scripts/metrics/viewer_asset_logs.py +++ b/scripts/metrics/viewer_asset_logs.py @@ -96,7 +96,7 @@ if __name__ == "__main__": for key in sorted(stats.keys()): val = stats[key] if val["count"] > 0: - print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] + print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"net bytes/sec",val["sum_bytes"]/val["sum"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] else: print key,"count",val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"] -- cgit v1.3 From 880be86cf2f8d7cb7e948d8a456fd8cf5723b3f2 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 10 Mar 2017 15:07:55 -0800 Subject: MAINT-7196: Viewer changes supporting new Allow Access Override opition for estate owners. --- indra/llinventory/llparcel.h | 5 + indra/llmessage/llregionflags.h | 3 + indra/llmessage/message_prehash.cpp | 3 + indra/llmessage/message_prehash.h | 2 + indra/newview/llestateinfomodel.cpp | 80 ++----- indra/newview/llestateinfomodel.h | 4 +- indra/newview/llfloaterland.cpp | 20 +- indra/newview/llfloaterregioninfo.cpp | 6 +- indra/newview/llviewerparcelmgr.cpp | 229 +++++++++++---------- .../skins/default/xui/en/panel_region_estate.xml | 20 +- scripts/messages/message_template.msg | 4 + scripts/messages/message_template.msg.sha1 | 2 +- 12 files changed, 191 insertions(+), 187 deletions(-) (limited to 'scripts') diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index e68331b99a..135d0ca7b9 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -508,6 +508,9 @@ public: { return mRegionDenyAnonymousOverride; } BOOL getRegionDenyAgeUnverifiedOverride() const { return mRegionDenyAgeUnverifiedOverride; } + BOOL getRegionAllowAccessOverride() const + { return mRegionAllowAccessoverride; } + BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; } BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; } @@ -576,6 +579,7 @@ public: void setRegionPushOverride(BOOL override) {mRegionPushOverride = override; } void setRegionDenyAnonymousOverride(BOOL override) { mRegionDenyAnonymousOverride = override; } void setRegionDenyAgeUnverifiedOverride(BOOL override) { mRegionDenyAgeUnverifiedOverride = override; } + void setRegionAllowAccessOverride(BOOL override) { mRegionAllowAccessoverride = override; } // Accessors for parcel sellWithObjects void setPreviousOwnerID(LLUUID prev_owner) { mPreviousOwnerID = prev_owner; } @@ -657,6 +661,7 @@ protected: BOOL mRegionPushOverride; BOOL mRegionDenyAnonymousOverride; BOOL mRegionDenyAgeUnverifiedOverride; + BOOL mRegionAllowAccessoverride; BOOL mAllowGroupAVSounds; BOOL mAllowAnyAVSounds; diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index eb0c4e6d1e..d3791ef4d1 100644 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -42,6 +42,9 @@ const U64 REGION_FLAGS_RESET_HOME_ON_TELEPORT = (1 << 3); // Does the sun move? const U64 REGION_FLAGS_SUN_FIXED = (1 << 4); +// Does the estate owner allow private parcels? +const U64 REGION_FLAGS_ALLOW_ACCESS_OVERRIDE = (1 << 5); + // Can't change the terrain heightfield, even on owned parcels, // but can plant trees and grass. const U64 REGION_FLAGS_BLOCK_TERRAFORM = (1 << 6); diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index 5c6b3d5fab..a551f49250 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -1372,6 +1372,9 @@ char const* const _PREHASH_OwnerMask = LLMessageStringTable::getInstance()->getS char const* const _PREHASH_TransferInventoryAck = LLMessageStringTable::getInstance()->getString("TransferInventoryAck"); char const* const _PREHASH_RegionDenyAgeUnverified = LLMessageStringTable::getInstance()->getString("RegionDenyAgeUnverified"); char const* const _PREHASH_AgeVerificationBlock = LLMessageStringTable::getInstance()->getString("AgeVerificationBlock"); +char const* const _PREHASH_RegionAllowAccessBlock = LLMessageStringTable::getInstance()->getString("RegionAllowAccessBlock"); +char const* const _PREHASH_RegionAllowAccessOverride = LLMessageStringTable::getInstance()->getString("RegionAllowAccessOverride"); + char const* const _PREHASH_UCoord = LLMessageStringTable::getInstance()->getString("UCoord"); char const* const _PREHASH_VCoord = LLMessageStringTable::getInstance()->getString("VCoord"); char const* const _PREHASH_FaceIndex = LLMessageStringTable::getInstance()->getString("FaceIndex"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index e696c3b0ca..e38ced94eb 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -1372,6 +1372,8 @@ extern char const* const _PREHASH_OwnerMask; extern char const* const _PREHASH_TransferInventoryAck; extern char const* const _PREHASH_RegionDenyAgeUnverified; extern char const* const _PREHASH_AgeVerificationBlock; +extern char const* const _PREHASH_RegionAllowAccessBlock; +extern char const* const _PREHASH_RegionAllowAccessOverride; extern char const* const _PREHASH_UCoord; extern char const* const _PREHASH_VCoord; extern char const* const _PREHASH_FaceIndex; diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp index 8f2eb41307..950ac712d1 100644 --- a/indra/newview/llestateinfomodel.cpp +++ b/indra/newview/llestateinfomodel.cpp @@ -58,12 +58,18 @@ boost::signals2::connection LLEstateInfoModel::setCommitCallback(const update_si void LLEstateInfoModel::sendEstateInfo() { - if (!commitEstateInfoCaps()) - { - // the caps method failed, try the old way - LLFloaterRegionInfo::nextInvoice(); - commitEstateInfoDataserver(); - } + std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); + + if (url.empty()) + { + LL_WARNS("EstateInfo") << "Unable to get URL for cap: EstateChangeInfo!!!" << LL_ENDL; + // whoops, couldn't find the cap, so bail out + return; + } + + LLCoros::instance().launch("LLEstateInfoModel::commitEstateInfoCapsCoro", + boost::bind(&LLEstateInfoModel::commitEstateInfoCapsCoro, this, url)); + } bool LLEstateInfoModel::getUseFixedSun() const { return getFlag(REGION_FLAGS_SUN_FIXED); } @@ -71,14 +77,16 @@ bool LLEstateInfoModel::getIsExternallyVisible() const { return getFlag(REGION_F bool LLEstateInfoModel::getAllowDirectTeleport() const { return getFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT); } bool LLEstateInfoModel::getDenyAnonymous() const { return getFlag(REGION_FLAGS_DENY_ANONYMOUS); } bool LLEstateInfoModel::getDenyAgeUnverified() const { return getFlag(REGION_FLAGS_DENY_AGEUNVERIFIED); } -bool LLEstateInfoModel::getAllowVoiceChat() const { return getFlag(REGION_FLAGS_ALLOW_VOICE); } +bool LLEstateInfoModel::getAllowVoiceChat() const { return getFlag(REGION_FLAGS_ALLOW_VOICE); } +bool LLEstateInfoModel::getAllowAccessOverride() const { return getFlag(REGION_FLAGS_ALLOW_ACCESS_OVERRIDE); } void LLEstateInfoModel::setUseFixedSun(bool val) { setFlag(REGION_FLAGS_SUN_FIXED, val); } void LLEstateInfoModel::setIsExternallyVisible(bool val) { setFlag(REGION_FLAGS_EXTERNALLY_VISIBLE, val); } void LLEstateInfoModel::setAllowDirectTeleport(bool val) { setFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, val); } void LLEstateInfoModel::setDenyAnonymous(bool val) { setFlag(REGION_FLAGS_DENY_ANONYMOUS, val); } void LLEstateInfoModel::setDenyAgeUnverified(bool val) { setFlag(REGION_FLAGS_DENY_AGEUNVERIFIED, val); } -void LLEstateInfoModel::setAllowVoiceChat(bool val) { setFlag(REGION_FLAGS_ALLOW_VOICE, val); } +void LLEstateInfoModel::setAllowVoiceChat(bool val) { setFlag(REGION_FLAGS_ALLOW_VOICE, val); } +void LLEstateInfoModel::setAllowAccessOverride(bool val) { setFlag(REGION_FLAGS_ALLOW_ACCESS_OVERRIDE, val); } void LLEstateInfoModel::update(const strings_t& strings) { @@ -111,23 +119,6 @@ void LLEstateInfoModel::notifyCommit() //== PRIVATE STUFF ============================================================ -// tries to send estate info using a cap; returns true if it succeeded -bool LLEstateInfoModel::commitEstateInfoCaps() -{ - std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); - - if (url.empty()) - { - // whoops, couldn't find the cap, so bail out - return false; - } - - LLCoros::instance().launch("LLEstateInfoModel::commitEstateInfoCapsCoro", - boost::bind(&LLEstateInfoModel::commitEstateInfoCapsCoro, this, url)); - - return true; -} - void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); @@ -145,6 +136,7 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) body["deny_anonymous"] = getDenyAnonymous(); body["deny_age_unverified"] = getDenyAgeUnverified(); body["allow_voice_chat"] = getAllowVoiceChat(); + body["override_public_access"] = getAllowAccessOverride(); body["invoice"] = LLFloaterRegionInfo::getLastInvoice(); @@ -169,43 +161,6 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) } } -/* This is the old way of doing things, is deprecated, and should be - deleted when the dataserver model can be removed */ -// key = "estatechangeinfo" -// strings[0] = str(estate_id) (added by simulator before relay - not here) -// strings[1] = estate_name -// strings[2] = str(estate_flags) -// strings[3] = str((S32)(sun_hour * 1024.f)) -void LLEstateInfoModel::commitEstateInfoDataserver() -{ - LL_DEBUGS("Windlight Sync") << "Sending estate info: " - << "is_sun_fixed = " << getUseFixedSun() - << ", sun_hour = " << getSunHour() << LL_ENDL; - LL_DEBUGS() << getInfoDump() << LL_ENDL; - - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("EstateOwnerMessage"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used - - msg->nextBlock("MethodData"); - msg->addString("Method", "estatechangeinfo"); - msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); - - msg->nextBlock("ParamList"); - msg->addString("Parameter", getName()); - - msg->nextBlock("ParamList"); - msg->addString("Parameter", llformat("%u", getFlags())); - - msg->nextBlock("ParamList"); - msg->addString("Parameter", llformat("%d", (S32) (getSunHour() * 1024.0f))); - - gAgent.sendMessage(); -} - std::string LLEstateInfoModel::getInfoDump() { LLSD dump; @@ -218,6 +173,7 @@ std::string LLEstateInfoModel::getInfoDump() dump["deny_anonymous" ] = getDenyAnonymous(); dump["deny_age_unverified" ] = getDenyAgeUnverified(); dump["allow_voice_chat" ] = getAllowVoiceChat(); + dump["override_public_access"] = getAllowAccessOverride(); std::stringstream dump_str; dump_str << dump; diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h index e7a6a2a725..566cde34eb 100644 --- a/indra/newview/llestateinfomodel.h +++ b/indra/newview/llestateinfomodel.h @@ -55,6 +55,7 @@ public: bool getDenyAnonymous() const; bool getDenyAgeUnverified() const; bool getAllowVoiceChat() const; + bool getAllowAccessOverride() const; const std::string& getName() const { return mName; } const LLUUID& getOwnerID() const { return mOwnerID; } @@ -68,6 +69,7 @@ public: void setDenyAnonymous(bool val); void setDenyAgeUnverified(bool val); void setAllowVoiceChat(bool val); + void setAllowAccessOverride(bool val); void setSunHour(F32 sun_hour) { mSunHour = sun_hour; } @@ -82,8 +84,6 @@ protected: void notifyCommit(); private: - bool commitEstateInfoCaps(); - void commitEstateInfoDataserver(); inline bool getFlag(U64 flag) const; inline void setFlag(U64 flag, bool val); U64 getFlags() const { return mFlags; } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index a340cd1143..abe9f99914 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2432,9 +2432,16 @@ void LLPanelLandAccess::refresh() BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP); BOOL public_access = !use_access_list; - getChild("public_access")->setValue(public_access ); - getChild("GroupCheck")->setValue(use_group ); - + if (parcel->getRegionAllowAccessOverride()) + { + getChild("public_access")->setValue(public_access); + getChild("GroupCheck")->setValue(use_group); + } + else + { + getChild("public_access")->setValue(TRUE); + getChild("GroupCheck")->setValue(FALSE); + } std::string group_name; gCacheName->getGroupName(parcel->getGroupID(), group_name); getChild("GroupCheck")->setLabelArg("[GROUP]", group_name ); @@ -2610,9 +2617,14 @@ void LLPanelLandAccess::refresh_ui() LLParcel *parcel = mParcel->getParcel(); if (parcel && !gDisconnected) { - BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); + BOOL can_manage_allowed = false; BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); + if (parcel->getRegionAllowAccessOverride()) + { // Estate owner may have disabled allowing the parcel owner from managing access. + can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); + } + getChildView("public_access")->setEnabled(can_manage_allowed); BOOL public_access = getChild("public_access")->getValue().asBoolean(); if (public_access) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 843dbbf25e..f4bc3302ba 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2236,6 +2236,7 @@ BOOL LLPanelEstateInfo::postBuild() initCtrl("limit_payment"); initCtrl("limit_age_verified"); initCtrl("voice_chat_check"); + initCtrl("parcel_access_override"); getChild("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild("allowed_avatar_name_list"); @@ -2315,6 +2316,7 @@ void LLPanelEstateInfo::refreshFromEstate() getChild("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport()); getChild("limit_payment")->setValue(estate_info.getDenyAnonymous()); getChild("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified()); + getChild("parcel_access_override")->setValue(estate_info.getAllowAccessOverride()); // Ensure appriopriate state of the management UI updateControls(gAgent.getRegion()); @@ -2357,7 +2359,9 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con estate_info.setDenyAnonymous(getChild("limit_payment")->getValue().asBoolean()); estate_info.setDenyAgeUnverified(getChild("limit_age_verified")->getValue().asBoolean()); estate_info.setAllowVoiceChat(getChild("voice_chat_check")->getValue().asBoolean()); - + estate_info.setAllowAccessOverride(getChild("parcel_access_override")->getValue().asBoolean()); + // JIGGLYPUFF + //estate_info.setAllowAccessOverride(getChild("")->getValue().asBoolean()); // send the update to sim estate_info.sendEstateInfo(); } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2a126c9f01..a61181bada 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1427,122 +1427,128 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user) // static void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **user) { - S32 request_result; - S32 sequence_id; - BOOL snap_selection = FALSE; - S32 self_count = 0; - S32 other_count = 0; - S32 public_count = 0; - S32 local_id; - LLUUID owner_id; - BOOL is_group_owned; - U32 auction_id = 0; - S32 claim_price_per_meter = 0; - S32 rent_price_per_meter = 0; - S32 claim_date = 0; - LLVector3 aabb_min; - LLVector3 aabb_max; - S32 area = 0; - S32 sw_max_prims = 0; - S32 sw_total_prims = 0; - //LLUUID buyer_id; - U8 status = 0; - S32 max_prims = 0; - S32 total_prims = 0; - S32 owner_prims = 0; - S32 group_prims = 0; - S32 other_prims = 0; - S32 selected_prims = 0; - F32 parcel_prim_bonus = 1.f; - BOOL region_push_override = false; - BOOL region_deny_anonymous_override = false; - BOOL region_deny_identified_override = false; // Deprecated - BOOL region_deny_transacted_override = false; // Deprecated - BOOL region_deny_age_unverified_override = false; + S32 request_result; + S32 sequence_id; + BOOL snap_selection = FALSE; + S32 self_count = 0; + S32 other_count = 0; + S32 public_count = 0; + S32 local_id; + LLUUID owner_id; + BOOL is_group_owned; + U32 auction_id = 0; + S32 claim_price_per_meter = 0; + S32 rent_price_per_meter = 0; + S32 claim_date = 0; + LLVector3 aabb_min; + LLVector3 aabb_max; + S32 area = 0; + S32 sw_max_prims = 0; + S32 sw_total_prims = 0; + //LLUUID buyer_id; + U8 status = 0; + S32 max_prims = 0; + S32 total_prims = 0; + S32 owner_prims = 0; + S32 group_prims = 0; + S32 other_prims = 0; + S32 selected_prims = 0; + F32 parcel_prim_bonus = 1.f; + BOOL region_push_override = false; + BOOL region_deny_anonymous_override = false; + BOOL region_deny_identified_override = false; // Deprecated + BOOL region_deny_transacted_override = false; // Deprecated + BOOL region_deny_age_unverified_override = false; + BOOL region_allow_access_override = true; BOOL agent_parcel_update = false; // updating previous(existing) agent parcel - S32 other_clean_time = 0; + S32 other_clean_time = 0; - LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance(); + LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance(); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id ); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id); - if (request_result == PARCEL_RESULT_NO_DATA) - { - // no valid parcel data - LL_INFOS() << "no valid parcel data" << LL_ENDL; - return; - } - - // Decide where the data will go. - LLParcel* parcel = NULL; - if (sequence_id == SELECTED_PARCEL_SEQ_ID) - { - // ...selected parcels report this sequence id - parcel_mgr.mRequestResult = PARCEL_RESULT_SUCCESS; - parcel = parcel_mgr.mCurrentParcel; - } - else if (sequence_id == HOVERED_PARCEL_SEQ_ID) - { - parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; - parcel = parcel_mgr.mHoverParcel; - } - else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID || - sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID || - sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID) - { - parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; - parcel = parcel_mgr.mCollisionParcel; - } - else if (sequence_id == 0 || sequence_id > parcel_mgr.mAgentParcelSequenceID) - { - // new agent parcel - parcel_mgr.mAgentParcelSequenceID = sequence_id; - parcel = parcel_mgr.mAgentParcel; - } - else - { - LL_INFOS() << "out of order agent parcel sequence id " << sequence_id - << " last good " << parcel_mgr.mAgentParcelSequenceID - << LL_ENDL; - return; - } - - msg->getBOOL("ParcelData", "SnapSelection", snap_selection); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelfCount, self_count); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherCount, other_count); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_PublicCount, public_count); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_LocalID, local_id ); - msg->getUUIDFast(_PREHASH_ParcelData, _PREHASH_OwnerID, owner_id); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_IsGroupOwned, is_group_owned); - msg->getU32Fast(_PREHASH_ParcelData, _PREHASH_AuctionID, auction_id); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_ClaimDate, claim_date); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_ClaimPrice, claim_price_per_meter); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_RentPrice, rent_price_per_meter); - msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMin, aabb_min); - msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMax, aabb_max); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_Area, area ); - //msg->getUUIDFast( _PREHASH_ParcelData, _PREHASH_BuyerID, buyer_id); - msg->getU8("ParcelData", "Status", status); - msg->getS32("ParcelData", "SimWideMaxPrims", sw_max_prims ); - msg->getS32("ParcelData", "SimWideTotalPrims", sw_total_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_MaxPrims, max_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_TotalPrims, total_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OwnerPrims, owner_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_GroupPrims, group_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherPrims, other_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelectedPrims, selected_prims ); - msg->getF32Fast(_PREHASH_ParcelData, _PREHASH_ParcelPrimBonus, parcel_prim_bonus ); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionPushOverride, region_push_override ); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyAnonymous, region_deny_anonymous_override ); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyIdentified, region_deny_identified_override ); // Deprecated - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyTransacted, region_deny_transacted_override ); // Deprecated - if (msg->getNumberOfBlocksFast(_PREHASH_AgeVerificationBlock)) - { - // this block was added later and may not be on older sims, so we have to test its existence first - msg->getBOOLFast(_PREHASH_AgeVerificationBlock, _PREHASH_RegionDenyAgeUnverified, region_deny_age_unverified_override ); - } + if (request_result == PARCEL_RESULT_NO_DATA) + { + // no valid parcel data + LL_INFOS() << "no valid parcel data" << LL_ENDL; + return; + } + + // Decide where the data will go. + LLParcel* parcel = NULL; + if (sequence_id == SELECTED_PARCEL_SEQ_ID) + { + // ...selected parcels report this sequence id + parcel_mgr.mRequestResult = PARCEL_RESULT_SUCCESS; + parcel = parcel_mgr.mCurrentParcel; + } + else if (sequence_id == HOVERED_PARCEL_SEQ_ID) + { + parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; + parcel = parcel_mgr.mHoverParcel; + } + else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID || + sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID || + sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID) + { + parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; + parcel = parcel_mgr.mCollisionParcel; + } + else if (sequence_id == 0 || sequence_id > parcel_mgr.mAgentParcelSequenceID) + { + // new agent parcel + parcel_mgr.mAgentParcelSequenceID = sequence_id; + parcel = parcel_mgr.mAgentParcel; + } + else + { + LL_INFOS() << "out of order agent parcel sequence id " << sequence_id + << " last good " << parcel_mgr.mAgentParcelSequenceID + << LL_ENDL; + return; + } + + msg->getBOOL("ParcelData", "SnapSelection", snap_selection); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelfCount, self_count); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherCount, other_count); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_PublicCount, public_count); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_LocalID, local_id); + msg->getUUIDFast(_PREHASH_ParcelData, _PREHASH_OwnerID, owner_id); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_IsGroupOwned, is_group_owned); + msg->getU32Fast(_PREHASH_ParcelData, _PREHASH_AuctionID, auction_id); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_ClaimDate, claim_date); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_ClaimPrice, claim_price_per_meter); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RentPrice, rent_price_per_meter); + msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMin, aabb_min); + msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMax, aabb_max); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_Area, area); + //msg->getUUIDFast( _PREHASH_ParcelData, _PREHASH_BuyerID, buyer_id); + msg->getU8("ParcelData", "Status", status); + msg->getS32("ParcelData", "SimWideMaxPrims", sw_max_prims); + msg->getS32("ParcelData", "SimWideTotalPrims", sw_total_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_MaxPrims, max_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_TotalPrims, total_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OwnerPrims, owner_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_GroupPrims, group_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherPrims, other_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelectedPrims, selected_prims); + msg->getF32Fast(_PREHASH_ParcelData, _PREHASH_ParcelPrimBonus, parcel_prim_bonus); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionPushOverride, region_push_override); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyAnonymous, region_deny_anonymous_override); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyIdentified, region_deny_identified_override); // Deprecated + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyTransacted, region_deny_transacted_override); // Deprecated + if (msg->getNumberOfBlocksFast(_PREHASH_AgeVerificationBlock)) + { + // this block was added later and may not be on older sims, so we have to test its existence first + msg->getBOOLFast(_PREHASH_AgeVerificationBlock, _PREHASH_RegionDenyAgeUnverified, region_deny_age_unverified_override); + } + + if (msg->getNumberOfBlocks(_PREHASH_RegionAllowAccessBlock)) + { + msg->getBOOLFast(_PREHASH_RegionAllowAccessBlock, _PREHASH_RegionAllowAccessOverride, region_allow_access_override); + } msg->getS32("ParcelData", "OtherCleanTime", other_clean_time ); @@ -1585,6 +1591,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use parcel->setRegionPushOverride(region_push_override); parcel->setRegionDenyAnonymousOverride(region_deny_anonymous_override); parcel->setRegionDenyAgeUnverifiedOverride(region_deny_age_unverified_override); + parcel->setRegionAllowAccessOverride(region_allow_access_override); parcel->unpackMessage(msg); if (parcel == parcel_mgr.mAgentParcel) diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index 76a82212ae..69e7a7b7a5 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -98,20 +98,28 @@ width="200" /> +