Merge pull request #703 from AleziaKurdis/feature_Create_App_materialData

Feature: Create Material even without a URL.
This commit is contained in:
kasenvr 2020-09-16 23:36:56 -04:00 committed by GitHub
commit 9fad6109ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View file

@ -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?<material name> to use Material Data."
"tooltip": "The URL to an external JSON file or \"materialData\". Append \"?<material name>\" to select a single material if multiple are defined."
},
"materialData": {
"tooltip": "Can be used instead of a JSON file when material set to materialData."

View file

@ -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:

View file

@ -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
@ -54,7 +55,7 @@ Rectangle {
Text {
id: text1
text: qsTr("Material URL")
text: qsTr("Material URL (Optional)")
color: "#ffffff"
font.pixelSize: 12
}
@ -139,7 +140,7 @@ Rectangle {
Button {
id: button1
text: qsTr("Add")
text: qsTr("Create")
z: -1
onClicked: {
newMaterialDialog.sendToScript({

View file

@ -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: {