From da6a86b4117c827cb9a66f1a5e44825f6f1d14a0 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Thu, 10 Sep 2020 00:11:50 -0400 Subject: [PATCH 1/5] Create Material without url This enhancement changes the behavior when a Material Entity is created using the Create App. Previously, if we left the URL null, no entity was created. With this fix, if we left the URL null, then the entity is created with "materialData" already set in materialURL (ready to use Material Data). --- scripts/system/create/edit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 0de87e563c..ba410735e8 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -736,6 +736,9 @@ var toolBar = (function () { function handleNewMaterialDialogResult(result) { if (result) { var materialURL = result.textInput; + if (materialURL === "") { + materialURL = "materialData"; + } //var materialMappingMode; //switch (result.comboBox) { // case MATERIAL_MODE_PROJECTED: From 180742f790e53615fe69c7d62bfb4a898fb40242 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Thu, 10 Sep 2020 00:15:07 -0400 Subject: [PATCH 2/5] Clarify the "materialURL" tooltip Clarify the "materialURL" tooltip that was a bit obscure. New value: "The URL to an external JSON file or "materialData". Append "?" to select a single material if multiple are defined." --- scripts/system/create/assets/data/createAppTooltips.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/create/assets/data/createAppTooltips.json b/scripts/system/create/assets/data/createAppTooltips.json index c247bc7cae..8e53823cd8 100644 --- a/scripts/system/create/assets/data/createAppTooltips.json +++ b/scripts/system/create/assets/data/createAppTooltips.json @@ -402,7 +402,7 @@ "tooltip": "Affects the size of the spotlight beam; the higher the value, the larger the beam." }, "materialURL": { - "tooltip": "The URL to an external JSON file or \"materialData\", \"materialData? to use Material Data." + "tooltip": "The URL to an external JSON file or \"materialData\". Append \"?\" to select a single material if multiple are defined." }, "materialData": { "tooltip": "Can be used instead of a JSON file when material set to materialData." From ec4d559055507d3ab616b6bb7e4004f757d374bd Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 15 Sep 2020 22:24:08 -0400 Subject: [PATCH 3/5] Added (Optional) to the label "Material URL" Added "(Optional)" to the label "Material URL" "Material URL (Optional)" --- scripts/system/create/qml/NewMaterialDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/create/qml/NewMaterialDialog.qml b/scripts/system/create/qml/NewMaterialDialog.qml index 1631632fb4..d3435fdade 100644 --- a/scripts/system/create/qml/NewMaterialDialog.qml +++ b/scripts/system/create/qml/NewMaterialDialog.qml @@ -54,7 +54,7 @@ Rectangle { Text { id: text1 - text: qsTr("Material URL") + text: qsTr("Material URL (Optional)") color: "#ffffff" font.pixelSize: 12 } From 1a0e69ed6ea11a03b90d9684072349b102fad964 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 16 Sep 2020 23:07:41 -0400 Subject: [PATCH 4/5] Change "Add" button for "Create" Change "Add" button for "Create" --- scripts/system/create/qml/NewMaterialDialog.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/qml/NewMaterialDialog.qml b/scripts/system/create/qml/NewMaterialDialog.qml index d3435fdade..3cc619e176 100644 --- a/scripts/system/create/qml/NewMaterialDialog.qml +++ b/scripts/system/create/qml/NewMaterialDialog.qml @@ -4,6 +4,7 @@ // // Created by Sam Gondelman on 1/17/18 // Copyright 2018 High Fidelity, Inc. +// Copyright 2020 Vircadia contributors // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -139,7 +140,7 @@ Rectangle { Button { id: button1 - text: qsTr("Add") + text: qsTr("Create") z: -1 onClicked: { newMaterialDialog.sendToScript({ From 6ca176335e9e6a54157185b2fa2213b3f1429c07 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Wed, 16 Sep 2020 23:15:07 -0400 Subject: [PATCH 5/5] Change "Add" button for "Create" Change "Add" button for "Create" --- scripts/system/create/qml/NewModelDialog.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/create/qml/NewModelDialog.qml b/scripts/system/create/qml/NewModelDialog.qml index 741902fa7f..dd4ef3c8ad 100644 --- a/scripts/system/create/qml/NewModelDialog.qml +++ b/scripts/system/create/qml/NewModelDialog.qml @@ -4,6 +4,7 @@ // // Created by Seth Alves on 2017-2-10 // Copyright 2017 High Fidelity, Inc. +// Copyright 2020 Vircadia contributors // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -208,7 +209,7 @@ Rectangle { Button { id: button1 - text: qsTr("Add") + text: qsTr("Create") z: -1 enabled: false onClicked: {