diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js
index 99e2851d96..2e43be159e 100644
--- a/scripts/system/create/entityList/html/js/entityList.js
+++ b/scripts/system/create/entityList/html/js/entityList.js
@@ -1,6 +1,6 @@
// entityList.js
//
-// Created by Ryan Huffman on 19 Nov 2014
+// Created by Ryan Huffman on November 19th, 2014
// Copyright 2014 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
// Copyright 2024 Overte e.V.
@@ -328,6 +328,7 @@ function loaded() {
elToolsMenu = document.getElementById("tools");
elMenuBackgroundOverlay = document.getElementById("menuBackgroundOverlay");
elHmdCopy = document.getElementById("hmdcopy");
+ elHmdCopyID = document.getElementById("hmdcopyid");
elHmdCut = document.getElementById("hmdcut");
elHmdPaste = document.getElementById("hmdpaste");
elHmdDuplicate = document.getElementById("hmdduplicate");
@@ -424,6 +425,10 @@ function loaded() {
EventBridge.emitWebEvent(JSON.stringify({ type: "copy" }));
closeAllEntityListMenu();
};
+ elHmdCopyID.onclick = function() {
+ EventBridge.emitWebEvent(JSON.stringify({ type: "copyID" }));
+ closeAllEntityListMenu();
+ };
elHmdCut.onclick = function() {
EventBridge.emitWebEvent(JSON.stringify({ type: "cut" }));
closeAllEntityListMenu();
@@ -822,6 +827,9 @@ function loaded() {
case "Copy":
EventBridge.emitWebEvent(JSON.stringify({ type: "copy" }));
break;
+ case "Copy ID":
+ EventBridge.emitWebEvent(JSON.stringify({ type: "copyID" }));
+ break;
case "Paste":
EventBridge.emitWebEvent(JSON.stringify({ type: "paste" }));
break;
@@ -862,6 +870,10 @@ function loaded() {
enabledContextMenuItems.push("Rename");
enabledContextMenuItems.push("Delete");
}
+
+ if (selectedEntities.length === 1) {
+ enabledContextMenuItems.push("Copy ID");
+ }
entityListContextMenu.open(clickEvent, entityID, enabledContextMenuItems);
}
diff --git a/scripts/system/create/entityList/html/js/entityListContextMenu.js b/scripts/system/create/entityList/html/js/entityListContextMenu.js
index d71719f252..f4b07f21b8 100644
--- a/scripts/system/create/entityList/html/js/entityListContextMenu.js
+++ b/scripts/system/create/entityList/html/js/entityListContextMenu.js
@@ -1,9 +1,10 @@
//
// entityListContextMenu.js
//
-// exampleContextMenus.js was originally created by David Rowe on 22 Aug 2018.
-// Modified to entityListContextMenu.js by Thijs Wenker on 10 Oct 2018
+// exampleContextMenus.js was originally created by David Rowe on August 22nd, 2018.
+// Modified to entityListContextMenu.js by Thijs Wenker on October 10th, 2018
// Copyright 2018 High Fidelity, Inc.
+// Copyright 2024 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@@ -137,6 +138,7 @@ EntityListContextMenu.prototype = {
this._addListItem("Cut");
this._addListItem("Copy");
+ this._addListItem("Copy ID");
this._addListItem("Paste");
this._addListSeparator();
this._addListItem("Rename");