allow grouping of imported 3mf object groups
This commit is contained in:
parent
67dd214d67
commit
ea5a72dece
1 changed files with 17 additions and 2 deletions
|
|
@ -2741,8 +2741,8 @@
|
|||
}
|
||||
}
|
||||
else if (is3mf) {
|
||||
MOTO.TMF.parseAsync(e.target.result).then(models => {
|
||||
console.log({models});
|
||||
let odon = function(models) {
|
||||
let msg = API.show.alert('Adding Objects');
|
||||
for (let model of models) {
|
||||
let name = e.target.file.name;
|
||||
if (model.name) {
|
||||
|
|
@ -2754,6 +2754,21 @@
|
|||
.saveToCatalog(name)
|
||||
);
|
||||
}
|
||||
API.hide.alert(msg);
|
||||
}
|
||||
let msg = API.show.alert('Decoding 3MF');
|
||||
MOTO.TMF.parseAsync(e.target.result).then(models => {
|
||||
API.hide.alert(msg);
|
||||
if (models.length > 1 && !group) {
|
||||
UC.confirm(`group ${models.length} objects?`).then(ok => {
|
||||
if (ok) {
|
||||
group = [];
|
||||
}
|
||||
odon(models);
|
||||
});
|
||||
} else {
|
||||
odon(models);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (isgcode) loadCode(e.target.result, 'gcode');
|
||||
|
|
|
|||
Loading…
Reference in a new issue