From ad533fcd6b1a3433273fa6d75e19a7ce56c75867 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 14 Jun 2022 23:39:11 -0500 Subject: SL-17586 WIP -- LLMaterialEditor prototype and "New Material" inventory buttons. --- indra/newview/llinventorybridge.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a0de3a2af1..a296d2dfef 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4011,6 +4011,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Note")); disabled_items.push_back(std::string("New Settings")); disabled_items.push_back(std::string("New Gesture")); + disabled_items.push_back(std::string("New Material")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); disabled_items.push_back(std::string("upload_def")); @@ -4038,6 +4039,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Script")); disabled_items.push_back(std::string("New Note")); disabled_items.push_back(std::string("New Gesture")); + disabled_items.push_back(std::string("New Material")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); disabled_items.push_back(std::string("upload_def")); @@ -4102,6 +4104,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Script")); items.push_back(std::string("New Note")); items.push_back(std::string("New Gesture")); + items.push_back(std::string("New Material")); items.push_back(std::string("New Clothes")); items.push_back(std::string("New Body Parts")); items.push_back(std::string("New Settings")); -- cgit v1.2.3 From 590a63afa9868198271bc1cf5660040708d1cf10 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 27 Jun 2022 23:34:14 +0300 Subject: SL-17623 Revise right-click menu on inventory folders --- indra/newview/llinventorybridge.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a296d2dfef..d23980024d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -785,7 +785,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (obj) { - items.push_back(std::string("Copy Separator")); + if (obj->getType() != LLInventoryType::IT_CATEGORY) + { + items.push_back(std::string("Copy Separator")); + } items.push_back(std::string("Copy")); if (!isItemCopyable()) { @@ -878,7 +881,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - items.push_back(std::string("Paste Separator")); + if (obj->getType() != LLInventoryType::IT_CATEGORY) + { + items.push_back(std::string("Paste Separator")); + } addDeleteContextMenuOptions(items, disabled_items); @@ -4094,10 +4100,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (!isInboxFolder() // don't allow creation in inbox && outfits_id != mUUID) { + bool menu_items_added = false; // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694. if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat)) { items.push_back(std::string("New Folder")); + menu_items_added = true; } if (!isMarketplaceListingsFolder()) { @@ -4109,12 +4117,18 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Body Parts")); items.push_back(std::string("New Settings")); items.push_back(std::string("upload_def")); + + menu_items_added = true; if (!LLEnvironment::instance().isInventoryEnabled()) { disabled_items.push_back("New Settings"); } + } + if (menu_items_added) + { + items.push_back(std::string("Create Separator")); } } getClipboardEntries(false, items, disabled_items, flags); -- cgit v1.2.3 From cc535ecccc3c415655a52cc597b33102e5ea21db Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Mon, 27 Jun 2022 13:40:17 -0700 Subject: Continuing progress on SL-17602 inventory support for Materials. now have working inventory bridge implementations --- indra/newview/llinventorybridge.cpp | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d23980024d..cd6f631ee1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1426,6 +1426,14 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, new_listener = new LLSettingsBridge(inventory, root, uuid, LLSettingsType::fromInventoryFlags(flags)); break; + case LLAssetType::AT_MATERIAL: + if (inv_type != LLInventoryType::IT_MATERIAL) + { + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; + } + new_listener = new LLMaterialBridge(inventory, root, uuid); + break; + default: LL_INFOS_ONCE() << "Unhandled asset type (llassetstorage.h): " << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << LL_ENDL; @@ -7214,6 +7222,39 @@ bool LLSettingsBridge::canUpdateRegion() const } +// +=================================================+ +// | LLMaterialBridge | +// +=================================================+ + +void LLMaterialBridge::openItem() +{ + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); + } +} + +void LLMaterialBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + LL_DEBUGS() << "LLMaterialBridge::buildContextMenu()" << LL_ENDL; + + if (isMarketplaceListingsFolder()) + { + menuentry_vec_t items; + menuentry_vec_t disabled_items; + addMarketplaceContextMenuOptions(flags, items, disabled_items); + items.push_back(std::string("Properties")); + getClipboardEntries(false, items, disabled_items, flags); + hide_context_entries(menu, items, disabled_items); + } + else + { + LLItemBridge::buildContextMenu(menu, flags); + } +} + + // +=================================================+ // | LLLinkBridge | // +=================================================+ @@ -7601,6 +7642,25 @@ protected: LLSettingsBridgeAction(const LLUUID& id, LLInventoryModel* model) : LLInvFVBridgeAction(id, model) {} }; +class LLMaterialBridgeAction : public LLInvFVBridgeAction +{ + friend class LLInvFVBridgeAction; +public: + void doIt() override + { + LLViewerInventoryItem* item = getItem(); + if (item) + { + // TODO - show UI for material preview? + LL_INFOS() << "inventory action performed on material: " << item->getName() << " " << item->getUUID() << LL_ENDL; + } + LLInvFVBridgeAction::doIt(); + } + ~LLMaterialBridgeAction() = default; +private: + LLMaterialBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; + LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, const LLUUID& uuid, @@ -7642,6 +7702,9 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_ break; case LLAssetType::AT_SETTINGS: action = new LLSettingsBridgeAction(uuid, model); + break; + case LLAssetType::AT_MATERIAL: + action = new LLMaterialBridgeAction(uuid, model); break; default: break; -- cgit v1.2.3 From 57805cac68bbc67ecb8a8e76c0ced2ce9b622dd1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 28 Jun 2022 15:15:57 -0500 Subject: SL-17379 More complete integration of material asset type --- indra/newview/llinventorybridge.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index cd6f631ee1..2bb2c9676b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7651,8 +7651,7 @@ public: LLViewerInventoryItem* item = getItem(); if (item) { - // TODO - show UI for material preview? - LL_INFOS() << "inventory action performed on material: " << item->getName() << " " << item->getUUID() << LL_ENDL; + LLFloaterReg::showInstance("material_editor", LLSD(item->getUUID()), TAKE_FOCUS_YES); } LLInvFVBridgeAction::doIt(); } -- cgit v1.2.3 From fd6b5ea8c3df7e8b4b648ac7ecc9f30eedd4b7c0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 29 Jun 2022 17:59:09 -0500 Subject: SL-17685 Drag and drop material support WIP --- indra/newview/llinventorybridge.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2bb2c9676b..d325831c8f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4403,6 +4403,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_GESTURE: case DAD_MESH: case DAD_SETTINGS: + case DAD_MATERIAL: accept = dragItemIntoFolder(inv_item, drop, tooltip_msg); break; case DAD_LINK: @@ -6032,6 +6033,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_GESTURE: case DAD_MESH: case DAD_SETTINGS: + case DAD_MATERIAL: { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; const LLPermissions& perm = inv_item->getPermissions(); -- cgit v1.2.3 From 075049d02c6e86eaf25cbe67556207247627a5e8 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Thu, 14 Jul 2022 10:46:24 -0700 Subject: DRTVWR-559 fix mac build again --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d325831c8f..03c6996de6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -785,7 +785,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (obj) { - if (obj->getType() != LLInventoryType::IT_CATEGORY) + if (obj->getType() != LLAssetType::AT_CATEGORY) { items.push_back(std::string("Copy Separator")); } @@ -881,7 +881,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - if (obj->getType() != LLInventoryType::IT_CATEGORY) + if (obj->getType() != LLAssetType::AT_CATEGORY) { items.push_back(std::string("Paste Separator")); } -- cgit v1.2.3 From eaebe8fe70985f6d25cf883867f19617164ead81 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 29 Jul 2022 12:08:31 -0400 Subject: DRTVWR-559: Revert "Fix minor Mac build issues." Somehow this commit got into my local repository without showing up as a new commit relative to bitbucket. Try double-reverting it. This is the first one. This reverts commit 7772b5639a9bae2c4fbbcd2575355404c4bdca55. --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 03c6996de6..d325831c8f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -785,7 +785,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (obj) { - if (obj->getType() != LLAssetType::AT_CATEGORY) + if (obj->getType() != LLInventoryType::IT_CATEGORY) { items.push_back(std::string("Copy Separator")); } @@ -881,7 +881,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - if (obj->getType() != LLAssetType::AT_CATEGORY) + if (obj->getType() != LLInventoryType::IT_CATEGORY) { items.push_back(std::string("Paste Separator")); } -- cgit v1.2.3 From 842ed39584b3df814c290931d750a1bf3b982cf3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 29 Jul 2022 12:10:05 -0400 Subject: DRTVWR-559: Revert "Revert "Fix minor Mac build issues."" Try to reapply the original commit in such a way that it can be pushed. This reverts commit eaebe8fe70985f6d25cf883867f19617164ead81. --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d325831c8f..03c6996de6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -785,7 +785,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (obj) { - if (obj->getType() != LLInventoryType::IT_CATEGORY) + if (obj->getType() != LLAssetType::AT_CATEGORY) { items.push_back(std::string("Copy Separator")); } @@ -881,7 +881,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - if (obj->getType() != LLInventoryType::IT_CATEGORY) + if (obj->getType() != LLAssetType::AT_CATEGORY) { items.push_back(std::string("Paste Separator")); } -- cgit v1.2.3 From d573bc2f926fb6ff473d9b346cdeb4d73e3b0ab3 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Sat, 15 Jul 2023 14:23:44 +0300 Subject: SL-20011 Restrict 'Empty Trash' if objects are attached --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index db347f7096..31b1cb7a23 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4141,7 +4141,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items || is_recent_panel || !trash || trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN - || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN) + || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN + || gAgentAvatarp->hasAttachmentsInTrash()) { disabled_items.push_back(std::string("Empty Trash")); } -- cgit v1.2.3 From 893857cabaf302cda5c90ac7a945cc4788eb77d7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 2 Oct 2023 23:23:15 +0300 Subject: SL-20384 Add "play" button into inventory menu. --- indra/newview/llinventorybridge.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 53c1a0ffe0..d2e1cdb3af 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6475,6 +6475,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { items.push_back(std::string("Activate")); } + items.push_back(std::string("PlayGesture")); } addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); -- cgit v1.2.3 From 4c7920778fa3ea4b9ea9fe3945eb57d250a0527f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 17 Oct 2023 18:12:13 +0300 Subject: SL-20457 allow creating new items from the right-click context menu --- indra/newview/llinventorybridge.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 22dd884b91..cb5316ddf4 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -765,7 +765,7 @@ void hide_context_entries(LLMenuGL& menu, // descend into split menus: LLMenuItemBranchGL* branchp = dynamic_cast(menu_item); - if ((name == "More") && branchp) + if (((name == "More") || (name == "create_new")) && branchp) { hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries); } @@ -820,7 +820,7 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - bool enabled = (menu_item->getEnabled() == TRUE); + bool enabled = true; for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) { enabled &= (*itor2 != name); @@ -4282,6 +4282,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("create_new")); } if (favorites == mUUID) { @@ -4304,6 +4305,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items { disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("create_new")); } if (marketplace_listings_id == mUUID) { @@ -4367,6 +4369,18 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (!isMarketplaceListingsFolder()) { items.push_back(std::string("upload_def")); + items.push_back(std::string("create_new")); + items.push_back(std::string("New Script")); + items.push_back(std::string("New Note")); + items.push_back(std::string("New Gesture")); + items.push_back(std::string("New Material")); + items.push_back(std::string("New Clothes")); + items.push_back(std::string("New Body Parts")); + items.push_back(std::string("New Settings")); + if (!LLEnvironment::instance().isInventoryEnabled()) + { + disabled_items.push_back("New Settings"); + } } if (menu_items_added) { -- cgit v1.2.3