mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 12:19:54 +02:00
Support MTOON in Material Assistant
Support MTOON in Material Assistant
This commit is contained in:
parent
4a69e90035
commit
d189f70b36
2 changed files with 1736 additions and 121 deletions
|
@ -1841,6 +1841,7 @@ let createAppTooltip = new CreateAppTooltip();
|
||||||
let currentSpaceMode = PROPERTY_SPACE_MODE.LOCAL;
|
let currentSpaceMode = PROPERTY_SPACE_MODE.LOCAL;
|
||||||
let zonesList = [];
|
let zonesList = [];
|
||||||
let canViewAssetURLs = false;
|
let canViewAssetURLs = false;
|
||||||
|
let maSelectedId;
|
||||||
|
|
||||||
function createElementFromHTML(htmlString) {
|
function createElementFromHTML(htmlString) {
|
||||||
let elTemplate = document.createElement('template');
|
let elTemplate = document.createElement('template');
|
||||||
|
@ -3613,10 +3614,9 @@ function saveMaterialData() {
|
||||||
|
|
||||||
function openMaterialAssistant() {
|
function openMaterialAssistant() {
|
||||||
if (materialEditor === null) {
|
if (materialEditor === null) {
|
||||||
loadDataInMaUi({});
|
newJSONMaterialEditor();
|
||||||
} else {
|
|
||||||
loadDataInMaUi(materialEditor.getText());
|
|
||||||
}
|
}
|
||||||
|
loadDataInMaUi(materialEditor.getText());
|
||||||
$('#uiMaterialAssistant').show();
|
$('#uiMaterialAssistant').show();
|
||||||
$('#properties-list').hide();
|
$('#properties-list').hide();
|
||||||
}
|
}
|
||||||
|
@ -4177,7 +4177,16 @@ function handleEntitySelectionUpdate(selections, isPropertiesToolUpdate) {
|
||||||
const multipleSelections = currentSelections.length > 1;
|
const multipleSelections = currentSelections.length > 1;
|
||||||
const hasSelectedEntityChanged = !areSetsEqual(selectedEntityIDs, previouslySelectedEntityIDs);
|
const hasSelectedEntityChanged = !areSetsEqual(selectedEntityIDs, previouslySelectedEntityIDs);
|
||||||
|
|
||||||
closeMaterialAssistant();
|
if (selections.length === 1) {
|
||||||
|
if (maSelectedId !== selections[0].id) {
|
||||||
|
closeMaterialAssistant();
|
||||||
|
}
|
||||||
|
maSelectedId = selections[0].id;
|
||||||
|
} else {
|
||||||
|
closeMaterialAssistant();
|
||||||
|
maSelectedId = "";
|
||||||
|
}
|
||||||
|
|
||||||
requestZoneList();
|
requestZoneList();
|
||||||
|
|
||||||
if (selections.length === 0) {
|
if (selections.length === 0) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue