diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-08-28 14:21:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-28 14:21:52 -0700 |
| commit | 5ddd940bf4bd75659a86e8d0eb205a766be5d53e (patch) | |
| tree | 862ca9ad6c1ed12e92967826a60bcb39f13db523 /indra/newview/llpublishedobjectmgr.cpp | |
| parent | e3320f649d2e25aac6df491614b42c94645679c7 (diff) | |
| parent | 608d7193ab965dbf05466dd3a327d6ead356306d (diff) | |
Merge pull request #6214 from secondlife/rider/lua_beta_bugfixA
Rider/lua beta bugfix a
Diffstat (limited to 'indra/newview/llpublishedobjectmgr.cpp')
| -rw-r--r-- | indra/newview/llpublishedobjectmgr.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llpublishedobjectmgr.cpp b/indra/newview/llpublishedobjectmgr.cpp index d92bb382de..85a9542dce 100644 --- a/indra/newview/llpublishedobjectmgr.cpp +++ b/indra/newview/llpublishedobjectmgr.cpp @@ -88,6 +88,23 @@ namespace // Never emit an empty prim/object name to downstream tooling. return obj->getID().asString(); } + + void add_object_permissions(LLSD& object_data, LLViewerObject* object) + { + LLPermissions* permissions = + LLSelectMgr::getInstance()->findObjectPermissions(object); + if (!permissions) + { + return; + } + + LLSD permission_entry; + permission_entry["owner"] = + static_cast<S32>(permissions->getMaskOwner()); + permission_entry["next_owner"] = + static_cast<S32>(permissions->getMaskNextOwner()); + object_data["permissions"] = permission_entry; + } } class LLPublishedPrimListener : public LLVOInventoryListener @@ -729,6 +746,7 @@ LLSD LLPublishedObjectMgr::buildPublishedObjectLLSD(LLViewerObject* root) const { LL_PROFILE_ZONE_SCOPED_CATEGORY_SCRIPTDEV; LLSD pub; + add_object_permissions(pub, root); pub["object_id"] = root->getID(); pub["object_name"] = get_prim_name(root); pub["object_description"] = nv_string(root, "Desc"); @@ -737,6 +755,11 @@ LLSD LLPublishedObjectMgr::buildPublishedObjectLLSD(LLViewerObject* root) const { pub["region"] = root->getRegion()->getName(); } + const PublishedObjectInfo* published_info = getPublished(root->getID()); + if (published_info) + { + pub["can_save_back"] = published_info->mCanSaveBackToContents; + } pub["inventory"] = buildPrimInventoryLLSD(root); LLSD linked_objects = LLSD::emptyArray(); @@ -748,6 +771,7 @@ LLSD LLPublishedObjectMgr::buildPublishedObjectLLSD(LLViewerObject* root) const link["link_number"] = link_number++; link["link_name"] = get_prim_name(child); link["link_description"] = nv_string(child, "Desc"); + add_object_permissions(link, child); link["inventory"] = buildPrimInventoryLLSD(child); linked_objects.append(link); } @@ -773,6 +797,7 @@ LLSD LLPublishedObjectMgr::buildObjectListLLSD() const } LLSD pub; + add_object_permissions(pub, root); pub["object_id"] = info.mObjectID; pub["object_name"] = info.mObjectName; pub["object_description"] = info.mObjectDescription; @@ -803,6 +828,7 @@ LLSD LLPublishedObjectMgr::buildObjectListLLSD() const link["link_number"] = prim_info.mLinkNumber; link["link_name"] = prim_info.mPrimName; link["link_description"] = prim_info.mPrimDescription; + add_object_permissions(link, child); link["inventory"] = buildPrimInventoryLLSD(child); linked_objects.append(link); } |
