[ui] load 3D depth map: custom label in 3D inspector

This commit is contained in:
Loïc Vital 2022-12-20 12:31:36 +01:00
parent 125fa8ca17
commit 935a8a2568
4 changed files with 11 additions and 9 deletions

View file

@ -83,7 +83,7 @@ Entity {
return -1;
}
function load(filepath) {
function load(filepath, label = undefined) {
var pathStr = Filepath.urlToString(filepath);
if(!Filepath.exists(pathStr))
{
@ -99,12 +99,11 @@ Entity {
// add file to the internal ListModel
m.mediaModel.append(makeElement({
"source": pathStr,
"label": Filepath.basename(pathStr),
"label": label ? label : Filepath.basename(pathStr),
"section": "External"
}));
}
function view(attribute) {
if(m.sourceToEntity[attribute]) {
ensureVisible(attribute);