From 2837b648fe300166952f6f9d6a315f5dafda02cb Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 21:55:34 -0400 Subject: [PATCH 01/35] Add CSS for Actions and Selection menu Add CSS for "Actions" and "Selection" menu in the Create App. (HMD/Desktop compliant) --- scripts/system/html/css/edit-style.css | 80 +++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 8a381ff4ad..842a4e27f1 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -415,6 +415,14 @@ input[type=button].glyph, button.hifi-edit-button.glyph { padding: 0; } +input[type=button].normal, button.hifi-edit-button.normal { + font-family: FiraSans-SemiBold; + font-size: 15px; + text-transform: none; + //min-width: 65px; + padding: 0; +} + input[type=button].vglyph, button.hifi-edit-button.vglyph { font-family: Vircadia-Glyphs; font-size: 20px; @@ -1267,11 +1275,11 @@ div#grid-section, body#entity-list-body { border-bottom-left-radius: 0; } -#delete { +/*#delete { float: right; margin-right: 0; background-color: #ff0000; -} +}*/ #entity-list { position: relative; /* New positioning context. */ @@ -1860,3 +1868,71 @@ div.multiZoneSelToolbar { padding: 0px; } +#menuBackgroundOverlay{ + background-color:transparent; + position:fixed; + width: 100%; + height: 100%; + top:0; + left:0; + right:0; + bottom:0; + display:block; +} + +div.entity-list-menu { + position: fixed; + display: none; + width: 70%; + height: 30px; + top: 42px; + left: 150px; + right: 0; + bottom: 0; + border-style: solid; + border-color: #505050; + border-width: 1px; + background-color: #c0c0c0; + z-index: 2; + cursor: pointer; +} + +div.menu-separator{ + width: 90%; + height: 2px; + background-color: #505050; + } + +button.menu-button { + font-family: FiraSans-SemiBold; + font-size: 15px; + width: 100%; + height: auto; + border-radius: 0; + padding: 6px; + text-align: left; + background-color: #c0c0c0; + border: none; +} + +button.menu-button:hover { + background-color: #00B4EF; + border: none; +} + +button.menu-button:active { + background-color: #00B4EF; + border: none; +} + +div.menu-item { + width: 100%; +} + +div.menu-item-caption { + float: left; +} + +div.menu-item-shortcut { + float: right; +} From 426df39e1de87733ac843a491fdb01cc36ac583d Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 21:57:13 -0400 Subject: [PATCH 02/35] Add "Actions" and "Selection" menu Add "Actions" and "Selection" menu in the Create App. (HMD/Desktop compliant) --- scripts/system/create/entityList/entityList.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index 4b8163968d..80cf2cbdc8 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -323,6 +323,10 @@ EntityListTool = function(shouldUseEditTabletApp) { unparentSelectedEntities(); } else if (data.type === 'hmdMultiSelectMode') { hmdMultiSelectMode = data.value; + } else if (data.type === 'selectAllInBox') { + selectAllEntitiesInCurrentSelectionBox(false); + } else if (data.type === 'selectAllTouchingBox') { + selectAllEntitiesInCurrentSelectionBox(true); } }; From bd4b9d5d45dd32a76f22e2655131b55315324895 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 21:58:21 -0400 Subject: [PATCH 03/35] Add "Actions" and "Selection" menu Add "Actions" and "Selection" menu in the Create App. (HMD/Desktop compliant) --- .../create/entityList/html/entityList.html | 107 +++++++++++++++--- 1 file changed, 94 insertions(+), 13 deletions(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index 824ca380ec..f06dc86855 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -32,19 +32,8 @@ - - - - -
- - -
-
- - -
- + +
@@ -102,5 +91,97 @@
+
+ + + + + + + + + + + +
+
+ + + + + + +
+ From 9004251bcffbfdd83828bfe559d2b8a8c9b793a9 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 21:59:14 -0400 Subject: [PATCH 04/35] Add "Actions" and "Selection" menu Add "Actions" and "Selection" menu in the Create App. (HMD/Desktop compliant) --- .../create/entityList/html/js/entityList.js | 128 ++++++++++++++++-- 1 file changed, 115 insertions(+), 13 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index aa40d5286f..949b8684c8 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -200,7 +200,10 @@ let elEntityTable, elRefresh, elToggleLocked, elToggleVisible, - elHmdMultiSelect, + elActionsMenu, + elSelectionMenu, + elMenuBackgroundOverlay, + elHmdMultiSelect, elHmdCopy, elHmdCut, elHmdPaste, @@ -210,6 +213,11 @@ let elEntityTable, elParent, elUnparent, elDelete, + elSelectAll, + elSelectInverse, + elSelectNone, + elSelectAllInBox, + elSelectAllTouchingBox, elFilterTypeMultiselectBox, elFilterTypeText, elFilterTypeOptions, @@ -252,8 +260,11 @@ function loaded() { elEntityTableScroll = document.getElementById("entity-table-scroll"); elRefresh = document.getElementById("refresh"); elToggleLocked = document.getElementById("locked"); - elToggleVisible = document.getElementById("visible"); + elToggleVisible = document.getElementById("visible"); elHmdMultiSelect = document.getElementById("hmdmultiselect"); + elActionsMenu = document.getElementById("actions"); + elSelectionMenu = document.getElementById("selection"); + elMenuBackgroundOverlay = document.getElementById("menuBackgroundOverlay"); elHmdCopy = document.getElementById("hmdcopy"); elHmdCut = document.getElementById("hmdcut"); elHmdPaste = document.getElementById("hmdpaste"); @@ -263,6 +274,11 @@ function loaded() { elParent = document.getElementById("parent"); elUnparent = document.getElementById("unparent"); elDelete = document.getElementById("delete"); + elSelectAll = document.getElementById("selectall"); + elSelectInverse = document.getElementById("selectinverse"); + elSelectNone = document.getElementById("selectnone"); + elSelectAllInBox = document.getElementById("selectallinbox"); + elSelectAllTouchingBox = document.getElementById("selectalltouchingbox"); elFilterTypeMultiselectBox = document.getElementById("filter-type-multiselect-box"); elFilterTypeText = document.getElementById("filter-type-text"); elFilterTypeOptions = document.getElementById("filter-type-options"); @@ -300,32 +316,119 @@ function loaded() { } EventBridge.emitWebEvent(JSON.stringify({ type: 'hmdMultiSelectMode', value: hmdMultiSelectMode })); }; + elActionsMenu.onclick = function() { + + document.getElementById("menuBackgroundOverlay").style.display = "block"; + document.getElementById("actions-menu").style.display = "block"; + }; + elSelectionMenu.onclick = function() { + document.getElementById("menuBackgroundOverlay").style.display = "block"; + document.getElementById("selection-menu").style.display = "block"; + }; + elMenuBackgroundOverlay.onclick = function() { + closeAllEntityListMenu(); + }; elHmdCopy.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'copy' })); + closeAllEntityListMenu(); }; elHmdCut.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'cut' })); + closeAllEntityListMenu(); }; elHmdPaste.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'paste' })); + closeAllEntityListMenu(); }; elHmdDuplicate.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'duplicate' })); + closeAllEntityListMenu(); }; elParent.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'parent' })); + closeAllEntityListMenu(); }; elUnparent.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'unparent' })); + closeAllEntityListMenu(); }; elUndo.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'undo' })); + closeAllEntityListMenu(); }; elRedo.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'redo' })); + closeAllEntityListMenu(); }; elDelete.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'delete' })); + closeAllEntityListMenu(); + }; + elSelectAll.onclick = function() { + + let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); + let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { + return selectedEntities.includes(visibleEntityID); + }); + + let selection = []; + + if (!selectionIncludesAllVisibleEntityIDs) { + selection = visibleEntityIDs; + } + + updateSelectedEntities(selection, false); + + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": selection + })); + + closeAllEntityListMenu(); + }; + elSelectInverse.onclick = function() { + let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); + let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { + return selectedEntities.includes(visibleEntityID); + }); + + let selection = []; + + if (!selectionIncludesAllVisibleEntityIDs) { + visibleEntityIDs.forEach(function(id) { + if (!selectedEntities.includes(id)) { + selection.push(id); + } + }); + } + + updateSelectedEntities(selection, false); + + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": selection + })); + + closeAllEntityListMenu(); + }; + elSelectNone.onclick = function() { + updateSelectedEntities([], false); + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": [] + })); + closeAllEntityListMenu(); + }; + elSelectAllInBox.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectAllInBox' })); + closeAllEntityListMenu(); + }; + elSelectAllTouchingBox.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectAllTouchingBox' })); + closeAllEntityListMenu(); }; elToggleSpaceMode.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'toggleSpaceMode' })); @@ -871,7 +974,7 @@ function loaded() { function updateSelectedEntities(selectedIDs, autoScroll) { let notFound = false; - + // reset all currently selected entities and their rows first selectedEntities.forEach(function(id) { let entity = entitiesByID[id]; @@ -882,7 +985,7 @@ function loaded() { } } }); - + // then reset selected entities list with newly selected entities and set them selected selectedEntities = []; selectedIDs.forEach(function(id) { @@ -1454,16 +1557,8 @@ function loaded() { } else if (data.type === "confirmHMDstate") { if (data.isHmd) { document.getElementById("hmdmultiselect").style.display = "inline"; - document.getElementById("hmdcopy").style.display = "inline"; - document.getElementById("hmdcut").style.display = "inline"; - document.getElementById("hmdpaste").style.display = "inline"; - document.getElementById("hmdduplicate").style.display = "inline"; } else { - document.getElementById("hmdmultiselect").style.display = "none"; - document.getElementById("hmdcopy").style.display = "none"; - document.getElementById("hmdcut").style.display = "none"; - document.getElementById("hmdpaste").style.display = "none"; - document.getElementById("hmdduplicate").style.display = "none"; + document.getElementById("hmdmultiselect").style.display = "none"; } } }); @@ -1489,4 +1584,11 @@ function loaded() { $(window).blur(function() { entityListContextMenu.close(); }); + + function closeAllEntityListMenu() { + document.getElementById("menuBackgroundOverlay").style.display = "none"; + document.getElementById("selection-menu").style.display = "none"; + document.getElementById("actions-menu").style.display = "none"; + } + } From 3241ea7c1f3ec4973ba746dedd3cafa2ebe6e11b Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 22:59:08 -0400 Subject: [PATCH 05/35] Add support for teleportToEntity Add support for teleportToEntity --- .../create/entitySelectionTool/entitySelectionTool.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index 0250ead0a9..b218d8b986 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -636,6 +636,16 @@ SelectionManager = (function() { } }; + that.teleportToEntity = function() { + if (SelectionManager.hasSelection()) { + var distanceFromTarget = 3 + Math.max(Math.max(SelectionManager.worldDimensions.x, SelectionManager.worldDimensions.y), SelectionManager.worldDimensions.z); + var teleportTargetPosition = Vec3.sum(SelectionManager.worldPosition, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: distanceFromTarget })); + MyAvatar.goToLocation(teleportTargetPosition, false); + } else { + audioFeedback.rejection(); + } + }; + return that; })(); From 8c94d20177983fa06ef7dcbbb8a4bbe45976ce3f Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 23:00:31 -0400 Subject: [PATCH 06/35] Add support for teleportToEntity Add support for teleportToEntity --- scripts/system/create/entityList/entityList.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index 80cf2cbdc8..3835e448ec 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -327,6 +327,8 @@ EntityListTool = function(shouldUseEditTabletApp) { selectAllEntitiesInCurrentSelectionBox(false); } else if (data.type === 'selectAllTouchingBox') { selectAllEntitiesInCurrentSelectionBox(true); + } else if (data.type === 'teleportToEntity') { + SelectionManager.teleportToEntity(); } }; From 943ae9aa4cf4eebdd3026c04a14c0a3af068a7f6 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 23:01:10 -0400 Subject: [PATCH 07/35] Add support for teleportToEntity Add support for teleportToEntity --- scripts/system/create/entityList/html/entityList.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index f06dc86855..e2ac043039 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -180,7 +180,14 @@ - + + + From 4c74d5a63006473492fb508528c4ddb57c651a7d Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 23:01:55 -0400 Subject: [PATCH 08/35] Add support for teleportToEntity Add support for teleportToEntity --- scripts/system/create/entityList/html/js/entityList.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index 949b8684c8..c40b4e67a8 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -218,6 +218,7 @@ let elEntityTable, elSelectNone, elSelectAllInBox, elSelectAllTouchingBox, + elTeleportToEntity, elFilterTypeMultiselectBox, elFilterTypeText, elFilterTypeOptions, @@ -278,7 +279,8 @@ function loaded() { elSelectInverse = document.getElementById("selectinverse"); elSelectNone = document.getElementById("selectnone"); elSelectAllInBox = document.getElementById("selectallinbox"); - elSelectAllTouchingBox = document.getElementById("selectalltouchingbox"); + elSelectAllTouchingBox = document.getElementById("selectalltouchingbox"); + elTeleportToEntity = document.getElementById("teleport-to-entity"); elFilterTypeMultiselectBox = document.getElementById("filter-type-multiselect-box"); elFilterTypeText = document.getElementById("filter-type-text"); elFilterTypeOptions = document.getElementById("filter-type-options"); @@ -430,6 +432,10 @@ function loaded() { EventBridge.emitWebEvent(JSON.stringify({ type: 'selectAllTouchingBox' })); closeAllEntityListMenu(); }; + elTeleportToEntity.onclick = function () { + EventBridge.emitWebEvent(JSON.stringify({ type: "teleportToEntity" })); + closeAllEntityListMenu(); + }; elToggleSpaceMode.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'toggleSpaceMode' })); }; From d0de5154fed211a7b7c3aef157345f99efed2f9e Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 23:22:17 -0400 Subject: [PATCH 09/35] Fix for Issue #711 Fix for Issue: #711 Add error dialogue if an unsupported filetype is added as a model URL in the create app. As agreed, the label "Model URL" will indicate now: "Model URL (.fbx, .fst, .glb, .gltf, .obj, .gz)" The list of file type has been set in Italic. And the label for Material dialog has been adjust to have the same standard "(Optional)" is also in italic. --- scripts/system/create/qml/NewMaterialDialog.qml | 2 +- scripts/system/create/qml/NewModelDialog.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/qml/NewMaterialDialog.qml b/scripts/system/create/qml/NewMaterialDialog.qml index 3cc619e176..e08ca868b6 100644 --- a/scripts/system/create/qml/NewMaterialDialog.qml +++ b/scripts/system/create/qml/NewMaterialDialog.qml @@ -55,7 +55,7 @@ Rectangle { Text { id: text1 - text: qsTr("Material URL (Optional)") + text: qsTr("Material URL (Optional)") color: "#ffffff" font.pixelSize: 12 } diff --git a/scripts/system/create/qml/NewModelDialog.qml b/scripts/system/create/qml/NewModelDialog.qml index dd4ef3c8ad..758706a79b 100644 --- a/scripts/system/create/qml/NewModelDialog.qml +++ b/scripts/system/create/qml/NewModelDialog.qml @@ -55,7 +55,7 @@ Rectangle { Text { id: text1 - text: qsTr("Model URL") + text: qsTr("Model URL (.fbx, .fst, .glb, .gltf, .obj, .gz)") color: "#ffffff" font.pixelSize: 12 } From 1aa09f59c33c1ec8d3ffce7cfa1366ab8a97eee1 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 18 Oct 2020 23:34:36 -0400 Subject: [PATCH 10/35] Increase the precison of Angular Velocity Increase the precison of Angular Velocity to make more comfortable the Issue #798 Angular Velocity can't go below 0.4 something (round to 0.5) But this won't solve the trouble. For this it would require a fixed for issue #76 Rotations that are transmitted over server lose precision --- .../system/create/entityProperties/html/js/entityProperties.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js index 8364d5b155..f3f92a887e 100644 --- a/scripts/system/create/entityProperties/html/js/entityProperties.js +++ b/scripts/system/create/entityProperties/html/js/entityProperties.js @@ -1618,7 +1618,8 @@ const GROUPS = [ type: "vec3", vec3Type: "pyr", multiplier: DEGREES_TO_RADIANS, - decimals: 4, + decimals: 6, + step: 1, subLabels: [ "x", "y", "z" ], unit: "deg/s", propertyID: "localAngularVelocity", From c3719a753880bd86ce835548fdcd3b21e099b739 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 20 Oct 2020 00:15:40 -0400 Subject: [PATCH 11/35] Add "Move Selected Entity To Avatar" Add "Move Selected Entity To Avatar" --- .../entitySelectionTool.js | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index b218d8b986..685eadae90 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -637,15 +637,42 @@ SelectionManager = (function() { }; that.teleportToEntity = function() { - if (SelectionManager.hasSelection()) { - var distanceFromTarget = 3 + Math.max(Math.max(SelectionManager.worldDimensions.x, SelectionManager.worldDimensions.y), SelectionManager.worldDimensions.z); - var teleportTargetPosition = Vec3.sum(SelectionManager.worldPosition, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: distanceFromTarget })); + if (that.hasSelection()) { + var distanceFromTarget = 3 + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); + var teleportTargetPosition = Vec3.sum(that.worldPosition, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: distanceFromTarget })); MyAvatar.goToLocation(teleportTargetPosition, false); } else { audioFeedback.rejection(); } }; + that.moveEntitiesSelectionToAvatar = function() { + if (that.hasSelection()) { + that.saveProperties(); + var distanceFromTarget = 3 + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); + var targetPosition = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -distanceFromTarget })); + // editing a parent will cause all the children to automatically follow along, so don't + // edit any entity who has an ancestor in that.selections + var toMove = that.selections.filter(function (selection) { + if (that.selections.indexOf(that.savedProperties[selection].parentID) >= 0) { + return false; // a parent is also being moved, so don't issue an edit for this entity + } else { + return true; + } + }); + for (var i = 0; i < toMove.length; i++) { + var id = toMove[i]; + var properties = that.savedProperties[id]; + var relativePosition = Vec3.subtract(properties.position, that.worldPosition); + var newPosition = Vec3.sum(relativePosition, targetPosition); + Entities.editEntity(id, { "position": newPosition }); + } + that._update(false, this); + } else { + audioFeedback.rejection(); + } + }; + return that; })(); From 6d7d9a3dde67a008033864d3b7230e6521ef025b Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 20 Oct 2020 00:16:38 -0400 Subject: [PATCH 12/35] Add "Move Selected Entity To Avatar" Add "Move Selected Entity To Avatar" --- scripts/system/create/entityList/entityList.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index 3835e448ec..20434484a1 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -329,6 +329,8 @@ EntityListTool = function(shouldUseEditTabletApp) { selectAllEntitiesInCurrentSelectionBox(true); } else if (data.type === 'teleportToEntity') { SelectionManager.teleportToEntity(); + } else if (data.type === 'moveEntitySelectionToAvatar') { + SelectionManager.moveEntitiesSelectionToAvatar(); } }; From 5924a65eebd817dfcfb2c1ad083d822f77b67cd8 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 20 Oct 2020 00:17:11 -0400 Subject: [PATCH 13/35] Add "Move Selected Entity To Avatar" Add "Move Selected Entity To Avatar" --- scripts/system/create/entityList/html/entityList.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index e2ac043039..df8652ddd6 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -148,6 +148,13 @@ + +
- - + +
From fdae7877e1f1c26c5efdaca26665b0da2345aba3 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:46:15 -0400 Subject: [PATCH 16/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection --- scripts/system/html/css/edit-style.css | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 842a4e27f1..2ba68e505b 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -1456,6 +1456,11 @@ input[type=button]#export { font-size: 15px; } +#entity-table-scroll .vglyph { + font-family: Vircadia-Glyphs; + font-size: 15px; +} + #entity-table { margin-top: -28px; margin-bottom: -18px; @@ -1468,7 +1473,7 @@ input[type=button]#export { background: none; } -#entity-table .glyph { +#entity-table .glyph .vglyph { margin: 0 -2px 0 -2px; vertical-align: middle; } @@ -1501,11 +1506,11 @@ input[type=button]#export { outline: none; } -#entity-table th .glyph { +#entity-table th .glyph .vglyph { position: relative; left: 4px; } -#entity-table th .glyph + .sort-order { +#entity-table th .glyph .vglyph + .sort-order { position: relative; left: 4px; } @@ -1532,7 +1537,7 @@ input[type=button]#export { #entity-table td { box-sizing: border-box; } -#entity-table td.glyph { +#entity-table td .glyph .vglyph { text-align: center; padding: 0; } @@ -1877,7 +1882,7 @@ div.multiZoneSelToolbar { left:0; right:0; bottom:0; - display:block; + display:none; } div.entity-list-menu { From 8afa9781225998553a3a8af5f05129f2f854e13e Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:47:10 -0400 Subject: [PATCH 17/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection --- scripts/system/create/edit.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 5c488a71ee..35bcd45786 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -1720,6 +1720,9 @@ function unparentSelectedEntities() { } else { Window.notify("Entity unparented"); } + //Refresh + entityListTool.sendUpdate(); + selectionManager._update(false, this); } else { audioFeedback.rejection(); if (selectedEntities.length > 1) { @@ -1756,6 +1759,9 @@ function parentSelectedEntities() { if (parentCheck) { audioFeedback.confirmation(); Window.notify("Entities parented"); + //Refresh + entityListTool.sendUpdate(); + selectionManager._update(false, this); } else { audioFeedback.rejection(); Window.notify("Entities are already parented to last"); @@ -2963,4 +2969,22 @@ function zoneSortOrder(a, b) { return 0; } +function getParentState(id) { + var state = "NONE"; + var properties = Entities.getEntityProperties(id, ["parentID"]); + var children = Entities.getChildrenIDs(id); + if (properties.parentID !== Uuid.NULL) { + if (children.length > 0) { + state = "PARENT_CHILDREN"; + } else { + state = "CHILDREN"; + } + } else { + if (children.length > 0) { + state = "PARENT"; + } + } + return state; +} + }()); // END LOCAL_SCOPE From 48bd101d08cad848b012b47b9bc6c2018b8e64bc Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:47:55 -0400 Subject: [PATCH 18/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection --- .../entitySelectionTool.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index 685eadae90..0f8c8cc8bf 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -697,8 +697,10 @@ SelectionDisplay = (function() { const COLOR_HOVER = { red: 255, green: 220, blue: 82 }; const COLOR_DUPLICATOR = { red: 162, green: 0, blue: 255 }; const COLOR_ROTATE_CURRENT_RING = { red: 255, green: 99, blue: 9 }; - const COLOR_BOUNDING_EDGE = { red: 128, green: 128, blue: 128 }; - const COLOR_SCALE_CUBE = { red: 160, green: 160, blue: 160 }; + const COLOR_BOUNDING_EDGE = { red: 160, green: 160, blue: 160 }; + const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 }; //{ red: 255, green: 160, blue: 0 }; + const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 }; // { red: 0, green: 200, blue: 255 } + const COLOR_SCALE_CUBE = { red: 192, green: 192, blue: 192 }; const COLOR_DEBUG_PICK_PLANE = { red: 255, green: 255, blue: 255 }; const COLOR_DEBUG_PICK_PLANE_HIT = { red: 255, green: 165, blue: 0 }; @@ -1828,6 +1830,18 @@ SelectionDisplay = (function() { var rotationZ = Quat.multiply(rotation, localRotationZ); worldRotationZ = rotationZ; + var handleBoundingBoxColor = COLOR_BOUNDING_EDGE; + if (SelectionManager.selections.length === 1) { + var parentState = getParentState(SelectionManager.selections[0]); + if (parentState === "CHILDREN") { + handleBoundingBoxColor = COLOR_BOUNDING_EDGE_CHILDREN; + } else { + if (parentState === "PARENT" || parentState === "PARENT_CHILDREN") { + handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT; + } + } + } + var selectionBoxGeometry = { position: position, rotation: rotation, @@ -1949,6 +1963,7 @@ SelectionDisplay = (function() { Entities.editEntity(handleBoundingBox, { position: position, rotation: rotation, + color: handleBoundingBoxColor, dimensions: dimensions }); From cfec2c492b15dd7ef6128155180c4a7ce16c80fe Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:48:49 -0400 Subject: [PATCH 19/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection --- scripts/system/create/entityList/entityList.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index 20434484a1..cb6beeaa4a 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -203,6 +203,17 @@ EntityListTool = function(shouldUseEditTabletApp) { } else if (properties.type === "Image") { url = properties.imageURL; } + + var parentStatus = getParentState(ids[i]); + var parentState = ""; + if (parentStatus === "PARENT") { + parentState = "N"; + } else if (parentStatus === "CHILDREN") { + parentState = "O"; + } else if (parentStatus === "PARENT_CHILDREN") { + parentState = "M"; + } + entities.push({ id: ids[i], name: properties.name, @@ -222,7 +233,8 @@ EntityListTool = function(shouldUseEditTabletApp) { isBaked: entityIsBaked(properties), drawCalls: (properties.renderInfo !== undefined ? valueIfDefined(properties.renderInfo.drawCalls) : ""), - hasScript: properties.script !== "" + hasScript: properties.script !== "", + parentState: parentState }); } } From 46bb29bded2c21498836d08ee19da64c7f63692d Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:49:36 -0400 Subject: [PATCH 20/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection From 8baebbdd16aed3ed5d35524b8c4dd839d07dc688 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:50:28 -0400 Subject: [PATCH 21/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection --- .../create/entityList/html/js/entityList.js | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index 74112047f1..b6e682e0c2 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -134,6 +134,14 @@ const COLUMNS = { initialWidth: 0.06, defaultSortOrder: DESCENDING_SORT, }, + parentState: { + columnHeader: "M", + vglyph: true, + dropdownLabel: "Hierarchy", + propertyID: "parentState", + initialWidth: 0.04, + defaultSortOrder: DESCENDING_SORT, + }, }; const FILTER_TYPES = [ @@ -499,9 +507,12 @@ function loaded() { elTh.setAttribute("id", thID); elTh.setAttribute("columnIndex", columnIndex); elTh.setAttribute("columnID", columnID); - if (columnData.glyph) { + if (columnData.glyph || columnData.vglyph) { let elGlyph = document.createElement("span"); elGlyph.className = "glyph"; + if (columnData.vglyph) { + elGlyph.className = "vglyph"; + } elGlyph.innerHTML = columnData.columnHeader; elTh.appendChild(elGlyph); } else { @@ -801,10 +812,11 @@ function loaded() { isBaked: entity.isBaked, drawCalls: displayIfNonZero(entity.drawCalls), hasScript: entity.hasScript, + parentState: entity.parentState, elRow: null, // if this entity has a visible row element assigned to it selected: false // if this entity is selected for edit regardless of having a visible row }; - + entities.push(entityData); entitiesByID[entityData.id] = entityData; }); @@ -1060,6 +1072,8 @@ function loaded() { let elCell = elRow.childNodes[i]; if (column.data.glyph) { elCell.innerHTML = itemData[column.data.propertyID] ? column.data.columnHeader : null; + } else if (column.data.vglyph) { + elCell.innerHTML = itemData[column.data.propertyID]; } else { let value = itemData[column.data.propertyID]; if (column.data.format) { @@ -1147,6 +1161,9 @@ function loaded() { let column = columnsByID[columnID]; let visible = column.elTh.style.visibility !== "hidden"; let className = column.data.glyph ? "glyph" : ""; + if (column.data.vglyph) { + className = "vglyph"; + } className += visible ? "" : " hidden"; return className; } From 35210fdb3259a266da5175e7047156e4144b488c Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 01:12:48 -0400 Subject: [PATCH 22/35] Add Hierarchy display in List and Selection Add Hierarchy display in List and Selection --- interface/resources/fonts/vircadia_glyphs.ttf | Bin 4660 -> 5240 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/interface/resources/fonts/vircadia_glyphs.ttf b/interface/resources/fonts/vircadia_glyphs.ttf index b6a8c2e7ad4c30ed5d6d713f6590cae1f5a27f10..f7e9d7f372c88e34027d1ab63880127354150ed1 100644 GIT binary patch literal 5240 zcmd5=eT*B&b^pED-PtAggIq4TOY(R;lFQ?gcc(jw$J;&Mon=drRNK*qeHH>)-{+H} zQ>t?WDRylGb=)K<;8aLmrAA`Aa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NRkn5G}OP!3?%xJGz*S8EA78EM9dQApY*ePZDx*1pP!x{Kw(1?|xGJ%X!y7lm7y& Ck#F?? From affad6741ca4dafaffe0d45f98a5e74cdcb93818 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 21 Oct 2020 22:44:55 -0400 Subject: [PATCH 23/35] Better icons for Hierarchy Better icons for Hierarchy --- interface/resources/fonts/vircadia_glyphs.ttf | Bin 5240 -> 4000 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/interface/resources/fonts/vircadia_glyphs.ttf b/interface/resources/fonts/vircadia_glyphs.ttf index f7e9d7f372c88e34027d1ab63880127354150ed1..7d3fe9d913a85bcbfc00162d1ebf1617c40c1b48 100644 GIT binary patch literal 4000 zcmds)Yit}>703VQ&g{&3-)ry7$-caHX4j4#@67DOk0gG^X&#Q9M;)hmIGaapD{*TQ zH#7o;3RNgVk!S!_0-_2CAjGE_1VVxj{SXPLQt_b?&_ZY;BoJ1W@}Z!zg0+1Zr z-)T%A7=H_(NdU)B&Q<1LUwGlifcOBQebbfm^D8Tm0RIsH&grukpDxE58Ue=@K-xWX zx^gP^$xB-S{02a2X6AH7dK*^05P+7MxrOKD2jm0jhX4(pefDIfa_;z70eKvtp1I2N z^Y}fc0O|seex@>a`poA)bp~+$3Xl%YKYM;*cKkDc0X%s?YJ)X50;Ipb=b!R#{xjSH zR{Ql2UKv}BA%O0P>sGy}?zYDWEZ+uq&>cI|!_8s$T*DDK?QUx%*?s+dm_#4YdvE~a zv*Jepu2dtv4V`M9TBAUX08CC!PNE;_yWQ0q=)S$vnu{g*tu=EH{miNyz;^(P)~5Uq zS{HWU^6EGZJ*)iDZ4zLA;=I1QA=wm%jJ$nK)UJw4ce__s?1f0*g+(jBOP{En6|0eA zUpQ5^PRH6)VqJ-{Ls6Y|F1N?)^9O?U4WV!(8f#p)KAuRX(oLD>mJM1q*V?wRy<<~n zUN_7_u~hEr?&;mUWouvmz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$-2>+5Uz8JwF_8&R6#>Rqv^GCaM{cpAq@%{k04IyA=f-BdD`4u%}SQES9hX zdvO=wc#)V9VHA$hY&0kEaMF6N@Y+#-hUU~+;X1g=XGqP@dafe^k_<(mDwbLio>06z z-$ZJ|i((h=b8{3PT%v9o;k zY@V5!89X`H-@UtkkbbH{$c|fSEtNU4%Y0PIWGtO)gJ(?3RFu@bbm7P@E0bZQsqxOJ zfX(a$_Bd2zQA7hROkf&4pxG1uwAGK_{sw5Y`ZO$<>xa>-?FV!9LNHtK$7c&Z%`Y!5 zE-zANd10~LSsa`ge(s*xzWvCK?G@ku7rI#Y{Xxg~FD{6(g{z+Qh^W+^*}go`?(=>B z)mL5>yV@bY#e`o4H8j!2)b;pX!^)`_>hHnqhN~(43Q2=YKZDnS!6OMD`m4W-cZ7Lt z!uROQ&|m@u*Tly#ie#<@ebdAH&*Rm2N%T*qNlFxF$r>l2^q8!%%Eatf+dvj zi3H2=@Ye}e!0={*Ib0e^unM9u!5WB`5}X3jwgjg^G(1rNbP(-H@(mE}ORx!|0|~Z3 zbS%MHWN3qr4V9i2yK6a>?2U(*Pz6sggM~1`5_;H^U>Vc+odhe8@xugjOyR8rt6t4kb8?D&3u68x~zaO&mzzKAgf? ztYQVnaSAIqijz2v2XF>!I0xK!>g?*u@lz{DPo93@%-T6%87FWO_u@2Ga28lTaq`~N zD`$nMg`XpsgT Date: Fri, 23 Oct 2020 23:17:22 -0400 Subject: [PATCH 24/35] Code Adjustments Code Adjustments --- scripts/system/html/css/edit-style.css | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 2ba68e505b..1f1fb9c86a 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -419,7 +419,6 @@ input[type=button].normal, button.hifi-edit-button.normal { font-family: FiraSans-SemiBold; font-size: 15px; text-transform: none; - //min-width: 65px; padding: 0; } @@ -1244,7 +1243,6 @@ textarea:enabled[scrolling="true"]::-webkit-resizer { background: #2e2e2e url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACKSURBVChTjdAxDsMgDAXQT4UYuQIzCwsSKxsSJ4YDoByDY7AwUOG2aZMQqX+xhd9gzIwxA3/k8a7LCCFgraX+Fk4UY4RSCoyxNfwgzjlyzhhjXOEvSimhtUbvB3hGUkp472m2wxUKIaD3TnOCd6jWim3bvlBrfdjJOUeolEJoZj/4PMH83bl/BXgCWSs2Z09IjgoAAAAASUVORK5CYII=) no-repeat bottom right; } - div#grid-section, body#entity-list-body { padding-bottom: 0; margin: 16px; @@ -1275,12 +1273,6 @@ div#grid-section, body#entity-list-body { border-bottom-left-radius: 0; } -/*#delete { - float: right; - margin-right: 0; - background-color: #ff0000; -}*/ - #entity-list { position: relative; /* New positioning context. */ } From 5b0a00a81aa5c97c22403e66324bda7dac8fcbb3 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 23 Oct 2020 23:21:32 -0400 Subject: [PATCH 25/35] Add Parent-Children Selector group Add Parent-Children Selector group Prevent action to happen when some entities are Locked in the Selection Code Adjustments --- scripts/system/create/edit.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 35bcd45786..69e2e94818 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -1696,7 +1696,7 @@ function recursiveDelete(entities, childrenList, deletedIDs, entityHostType) { } function unparentSelectedEntities() { - if (SelectionManager.hasSelection()) { + if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) { var selectedEntities = selectionManager.selections; var parentCheck = false; @@ -1733,11 +1733,11 @@ function unparentSelectedEntities() { } } else { audioFeedback.rejection(); - Window.notifyEditError("You have nothing selected to unparent"); + Window.notifyEditError("You have nothing selected or the selection has locked entities."); } } function parentSelectedEntities() { - if (SelectionManager.hasSelection()) { + if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) { var selectedEntities = selectionManager.selections; if (selectedEntities.length <= 1) { audioFeedback.rejection(); @@ -1768,11 +1768,11 @@ function parentSelectedEntities() { } } else { audioFeedback.rejection(); - Window.notifyEditError("You have nothing selected to parent"); + Window.notifyEditError("You have nothing selected or the selection has locked entities."); } } function deleteSelectedEntities() { - if (SelectionManager.hasSelection()) { + if (SelectionManager.hasSelection() && SelectionManager.hasUnlockedSelection()) { var deletedIDs = []; SelectionManager.saveProperties(); @@ -1803,6 +1803,9 @@ function deleteSelectedEntities() { pushCommandForSelections([], savedProperties); entityListTool.deleteEntities(deletedIDs); } + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected or the selection has locked entities."); } } From 6da472b7e31d031db95844bf0831a7f51f498d43 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 23 Oct 2020 23:22:37 -0400 Subject: [PATCH 26/35] Add Parent-Children Selector group Add Parent-Children Selector group Prevent action to happen when some entities are Locked in the Selection Code Adjustments --- .../entitySelectionTool.js | 110 +++++++++++++++++- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index 0f8c8cc8bf..b4bf427a85 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -19,6 +19,7 @@ const SPACE_LOCAL = "local"; const SPACE_WORLD = "world"; const HIGHLIGHT_LIST_NAME = "editHandleHighlightList"; +const MIN_DISTANCE_TO_REZ_FROM_AVATAR = 3; Script.include([ "../../libraries/controllers.js", @@ -26,7 +27,6 @@ Script.include([ "../../libraries/utils.js" ]); - function deepCopy(v) { return JSON.parse(JSON.stringify(v)); } @@ -638,18 +638,19 @@ SelectionManager = (function() { that.teleportToEntity = function() { if (that.hasSelection()) { - var distanceFromTarget = 3 + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); + var distanceFromTarget = MIN_DISTANCE_TO_REZ_FROM_AVATAR + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); var teleportTargetPosition = Vec3.sum(that.worldPosition, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: distanceFromTarget })); MyAvatar.goToLocation(teleportTargetPosition, false); } else { audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); } }; that.moveEntitiesSelectionToAvatar = function() { - if (that.hasSelection()) { + if (that.hasSelection() && that.hasUnlockedSelection()) { that.saveProperties(); - var distanceFromTarget = 3 + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); + var distanceFromTarget = MIN_DISTANCE_TO_REZ_FROM_AVATAR + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); var targetPosition = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -distanceFromTarget })); // editing a parent will cause all the children to automatically follow along, so don't // edit any entity who has an ancestor in that.selections @@ -670,9 +671,106 @@ SelectionManager = (function() { that._update(false, this); } else { audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected or the selection has locked entities."); } }; + that.selectParent = function() { + if (that.hasSelection()) { + var currentSelection = that.selections; + that.selections = []; + for (var i = 0; i < currentSelection.length; i++) { + var properties = Entities.getEntityProperties(currentSelection[i], ['parentID']); + if (properties.parentID !== Uuid.NULL) { + that.selections.push(properties.parentID); + } + } + that._update(true, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + that.selectTopParent = function() { + if (that.hasSelection()) { + var currentSelection = that.selections; + that.selections = []; + for (var i = 0; i < currentSelection.length; i++) { + var topParentId = getTopParent(currentSelection[i]); + if (topParentId !== Uuid.NULL) { + that.selections.push(topParentId); + } + } + that._update(true, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + function getTopParent(id) { + var topParentId = Uuid.NULL; + var properties = Entities.getEntityProperties(id, ['parentID']); + if(properties.parentID === Uuid.NULL) { + topParentId = id; + } else { + topParentId = getTopParent(properties.parentID); + } + return topParentId; + } + + that.addChildrenToSelection = function() { + if (that.hasSelection()) { + for (var i = 0; i < that.selections.length; i++) { + var childrenIds = Entities.getChildrenIDs(that.selections[i]); + var collectNewChildren; + var j; + var k = 0; + do { + collectNewChildren = Entities.getChildrenIDs(childrenIds[k]); + if (collectNewChildren.length > 0) { + for (j = 0; j < collectNewChildren.length; j++) { + childrenIds.push(collectNewChildren[j]); + } + } + k++; + } while (k < childrenIds.length); + if (childrenIds.length > 0) { + for (j = 0; j < childrenIds.length; j++) { + that.selections.push(childrenIds[j]); + } + } + } + that._update(true, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + that.hasUnlockedSelection = function() { + var selectionNotLocked = true; + for (var i = 0; i < that.selections.length; i++) { + var properties = Entities.getEntityProperties(that.selections[i], ['locked']); + if (properties.locked) { + selectionNotLocked = false; + break; + } + } + return selectionNotLocked; + }; + + that.selectFamily = function() { + that.selectParent(); + that.addChildrenToSelection(); + }; + + that.selectTopFamily = function() { + that.selectTopParent(); + that.addChildrenToSelection(); + }; + return that; })(); @@ -698,8 +796,8 @@ SelectionDisplay = (function() { const COLOR_DUPLICATOR = { red: 162, green: 0, blue: 255 }; const COLOR_ROTATE_CURRENT_RING = { red: 255, green: 99, blue: 9 }; const COLOR_BOUNDING_EDGE = { red: 160, green: 160, blue: 160 }; - const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 }; //{ red: 255, green: 160, blue: 0 }; - const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 }; // { red: 0, green: 200, blue: 255 } + const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 }; + const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 }; const COLOR_SCALE_CUBE = { red: 192, green: 192, blue: 192 }; const COLOR_DEBUG_PICK_PLANE = { red: 255, green: 255, blue: 255 }; const COLOR_DEBUG_PICK_PLANE_HIT = { red: 255, green: 165, blue: 0 }; From ba371613ba0be00a99fc4a4997cb5e71f012a5c7 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 23 Oct 2020 23:24:06 -0400 Subject: [PATCH 27/35] Add Parent-Children Selector group Add Parent-Children Selector group Prevent action to happen when some entities are Locked in the Selection Code Adjustments --- scripts/system/create/entityList/entityList.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index cb6beeaa4a..d0294c2c27 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -207,11 +207,11 @@ EntityListTool = function(shouldUseEditTabletApp) { var parentStatus = getParentState(ids[i]); var parentState = ""; if (parentStatus === "PARENT") { - parentState = "N"; + parentState = "A"; } else if (parentStatus === "CHILDREN") { - parentState = "O"; + parentState = "C"; } else if (parentStatus === "PARENT_CHILDREN") { - parentState = "M"; + parentState = "B"; } entities.push({ @@ -339,6 +339,16 @@ EntityListTool = function(shouldUseEditTabletApp) { selectAllEntitiesInCurrentSelectionBox(false); } else if (data.type === 'selectAllTouchingBox') { selectAllEntitiesInCurrentSelectionBox(true); + } else if (data.type === 'selectParent') { + SelectionManager.selectParent(); + } else if (data.type === 'selectTopParent') { + SelectionManager.selectTopParent(); + } else if (data.type === 'addChildrenToSelection') { + SelectionManager.addChildrenToSelection(); + } else if (data.type === 'selectFamily') { + SelectionManager.selectFamily(); + } else if (data.type === 'selectTopFamily') { + SelectionManager.selectTopFamily(); } else if (data.type === 'teleportToEntity') { SelectionManager.teleportToEntity(); } else if (data.type === 'moveEntitySelectionToAvatar') { From bfc216ab00abeafe0d3807e20b31d719f82904fe Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 23 Oct 2020 23:25:51 -0400 Subject: [PATCH 28/35] Add Parent-Children Selector group Add Parent-Children Selector group "Inverse Selection" is now responding to Ctrl-I Code Adjustments --- .../create/entityList/html/entityList.html | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/entityList.html b/scripts/system/create/entityList/html/entityList.html index 361b1a2c70..242a91eeda 100644 --- a/scripts/system/create/entityList/html/entityList.html +++ b/scripts/system/create/entityList/html/entityList.html @@ -138,7 +138,7 @@ @@ -172,7 +172,7 @@ @@ -189,6 +189,37 @@
+ + + + + + From bcebf36261cb14bb4106bbf5d50aefb70eaf1ec0 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 24 Oct 2020 13:19:09 -0400 Subject: [PATCH 31/35] Minor Code Adjustments Minor Code Adjustments --- .../entitySelectionTool/entitySelectionTool.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index b4bf427a85..ffa828affe 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -712,7 +712,7 @@ SelectionManager = (function() { function getTopParent(id) { var topParentId = Uuid.NULL; var properties = Entities.getEntityProperties(id, ['parentID']); - if(properties.parentID === Uuid.NULL) { + if (properties.parentID === Uuid.NULL) { topParentId = id; } else { topParentId = getTopParent(properties.parentID); @@ -723,22 +723,22 @@ SelectionManager = (function() { that.addChildrenToSelection = function() { if (that.hasSelection()) { for (var i = 0; i < that.selections.length; i++) { - var childrenIds = Entities.getChildrenIDs(that.selections[i]); + var childrenIDs = Entities.getChildrenIDs(that.selections[i]); var collectNewChildren; var j; var k = 0; do { - collectNewChildren = Entities.getChildrenIDs(childrenIds[k]); + collectNewChildren = Entities.getChildrenIDs(childrenIDs[k]); if (collectNewChildren.length > 0) { for (j = 0; j < collectNewChildren.length; j++) { - childrenIds.push(collectNewChildren[j]); + childrenIDs.push(collectNewChildren[j]); } } k++; - } while (k < childrenIds.length); - if (childrenIds.length > 0) { - for (j = 0; j < childrenIds.length; j++) { - that.selections.push(childrenIds[j]); + } while (k < childrenIDs.length); + if (childrenIDs.length > 0) { + for (j = 0; j < childrenIDs.length; j++) { + that.selections.push(childrenIDs[j]); } } } From 8cc9c19b4037c935365713ba2283a1d1bccea858 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 24 Oct 2020 22:37:35 -0400 Subject: [PATCH 32/35] Set the shortkey CTRL-A and CTRL-I only Set the shortkeys for Select All and Inverse Selection to respond to CTRL-A and CTRL-I only. (Previously it was also responding to Ctrl-Shift-A, Ctrl-Alt-A, Ctrl-Shift-Alt-A and Ctrl-Shift-I, Ctrl-Alt-I, Ctrl-Shift-Alt-I) --- scripts/system/create/entityList/html/js/entityList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index 4d152688b8..7cdcd7a6fc 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -1542,7 +1542,7 @@ function loaded() { break; } - if (controlKey && keyCodeString === "A") { + if (controlKey && !shiftKey && !altKey && keyCodeString === "A") { let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { return selectedEntities.includes(visibleEntityID); @@ -1565,7 +1565,7 @@ function loaded() { return; } - if (controlKey && keyCodeString === "I") { + if (controlKey && !shiftKey && !altKey && keyCodeString === "I") { let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { return selectedEntities.includes(visibleEntityID); From 7c4115c4cf0535c27732300194f154d022a2fd48 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 24 Oct 2020 23:59:26 -0400 Subject: [PATCH 33/35] Expose 2 new columns: Creation and Modification Date Expose 2 new optional columns: - Creation Date - Modification Date To address Issue #673 --- .../system/create/entityList/entityList.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index d0294c2c27..623e0b7326 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -190,7 +190,7 @@ EntityListTool = function(shouldUseEditTabletApp) { PROFILE("getMultipleProperties", function () { var multipleProperties = Entities.getMultipleEntityProperties(ids, ['position', 'name', 'type', 'locked', 'visible', 'renderInfo', 'modelURL', 'materialURL', 'imageURL', 'script', 'certificateID', - 'skybox.url', 'ambientLight.url']); + 'skybox.url', 'ambientLight.url', 'created', 'lastEdited']); for (var i = 0; i < multipleProperties.length; i++) { var properties = multipleProperties[i]; @@ -234,7 +234,9 @@ EntityListTool = function(shouldUseEditTabletApp) { drawCalls: (properties.renderInfo !== undefined ? valueIfDefined(properties.renderInfo.drawCalls) : ""), hasScript: properties.script !== "", - parentState: parentState + parentState: parentState, + created: formatToStringDateTime(properties.created), + lastEdited: formatToStringDateTime(properties.lastEdited), }); } } @@ -254,6 +256,20 @@ EntityListTool = function(shouldUseEditTabletApp) { }); }; + function formatToStringDateTime(timestamp) { + var d = new Date(Math.floor(timestamp/1000)); + var dateTime = d.getUTCFullYear() + "-" + zeroPad((d.getUTCMonth() + 1), 2) + "-" + zeroPad(d.getUTCDate(), 2); + dateTime = dateTime + " " + zeroPad(d.getUTCHours(),2) + ":" + zeroPad(d.getUTCMinutes(), 2) + ":" + zeroPad(d.getUTCSeconds(), 2); + dateTime = dateTime + "." + zeroPad(d.getUTCMilliseconds(), 3); + return dateTime; + } + + function zeroPad(num, size) { + num = num.toString(); + while (num.length < size) num = "0" + num; + return num; + } + function onFileSaveChanged(filename) { Window.saveFileChanged.disconnect(onFileSaveChanged); if (filename !== "") { From a264fc358ef574cd4fd84b4f7246f3e5baaf1102 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 25 Oct 2020 00:00:44 -0400 Subject: [PATCH 34/35] Expose 2 new columns: Creation and Modif. Date Expose 2 new optional columns: - Creation Date - Modification Date To address Issue #673 --- .../create/entityList/html/js/entityList.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index 7cdcd7a6fc..be79593511 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -141,7 +141,21 @@ const COLUMNS = { propertyID: "hasScript", initialWidth: 0.06, defaultSortOrder: DESCENDING_SORT, - }, + }, + created: { + columnHeader: "Created (UTC)", + dropdownLabel: "Creation Date", + propertyID: "created", + initialWidth: 0.38, + defaultSortOrder: DESCENDING_SORT, + }, + lastEdited: { + columnHeader: "Modified (UTC)", + dropdownLabel: "Modification Date", + propertyID: "lastEdited", + initialWidth: 0.38, + defaultSortOrder: DESCENDING_SORT, + }, }; const FILTER_TYPES = [ @@ -842,6 +856,8 @@ function loaded() { drawCalls: displayIfNonZero(entity.drawCalls), hasScript: entity.hasScript, parentState: entity.parentState, + created: entity.created, + lastEdited: entity.lastEdited, elRow: null, // if this entity has a visible row element assigned to it selected: false // if this entity is selected for edit regardless of having a visible row }; From 1e51df0843a0c46f899f50414129e5cba741a6b0 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 25 Oct 2020 14:25:19 -0400 Subject: [PATCH 35/35] Minor adjustments Minor adjustments --- scripts/system/create/entityList/entityList.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/system/create/entityList/entityList.js b/scripts/system/create/entityList/entityList.js index 623e0b7326..252481d44d 100644 --- a/scripts/system/create/entityList/entityList.js +++ b/scripts/system/create/entityList/entityList.js @@ -236,7 +236,7 @@ EntityListTool = function(shouldUseEditTabletApp) { hasScript: properties.script !== "", parentState: parentState, created: formatToStringDateTime(properties.created), - lastEdited: formatToStringDateTime(properties.lastEdited), + lastEdited: formatToStringDateTime(properties.lastEdited) }); } } @@ -259,14 +259,16 @@ EntityListTool = function(shouldUseEditTabletApp) { function formatToStringDateTime(timestamp) { var d = new Date(Math.floor(timestamp/1000)); var dateTime = d.getUTCFullYear() + "-" + zeroPad((d.getUTCMonth() + 1), 2) + "-" + zeroPad(d.getUTCDate(), 2); - dateTime = dateTime + " " + zeroPad(d.getUTCHours(),2) + ":" + zeroPad(d.getUTCMinutes(), 2) + ":" + zeroPad(d.getUTCSeconds(), 2); + dateTime = dateTime + " " + zeroPad(d.getUTCHours(), 2) + ":" + zeroPad(d.getUTCMinutes(), 2) + ":" + zeroPad(d.getUTCSeconds(), 2); dateTime = dateTime + "." + zeroPad(d.getUTCMilliseconds(), 3); return dateTime; } function zeroPad(num, size) { num = num.toString(); - while (num.length < size) num = "0" + num; + while (num.length < size) { + num = "0" + num; + } return num; }