diff --git a/js/interface/menu.js b/js/interface/menu.js index 58184a0d..81bbcea4 100644 --- a/js/interface/menu.js +++ b/js/interface/menu.js @@ -568,7 +568,7 @@ const MenuBar = { 'convert_project', 'close_project', '_', - {name: 'menu.file.import', id: 'import', icon: 'insert_drive_file', children: [ + {name: 'menu.file.import', id: 'import', icon: 'insert_drive_file', condition: () => Format && !Format.pose_mode, children: [ { id: 'import_open_project', name: 'menu.file.import.import_open_project', diff --git a/js/io/formats/bbmodel.js b/js/io/formats/bbmodel.js index 15cd04ed..db997bf6 100644 --- a/js/io/formats/bbmodel.js +++ b/js/io/formats/bbmodel.js @@ -493,7 +493,7 @@ BARS.defineActions(function() { new Action('import_project', { icon: 'icon-blockbench_file', category: 'file', - condition: () => Format, + condition: () => Format && !Format.pose_mode, click: function () { Blockbench.import({ resource_id: 'model', diff --git a/js/outliner/mesh.js b/js/outliner/mesh.js index 15f36cc9..538426b5 100644 --- a/js/outliner/mesh.js +++ b/js/outliner/mesh.js @@ -239,7 +239,7 @@ class Mesh extends OutlinerElement { while (!key || this.vertices[key]) { key = bbuid(4); } - this.vertices[key] = [...vector]; + this.vertices[key] = [vector[0] || 0, vector[1] || 0, vector[2] || 0]; return key; }) } @@ -887,7 +887,7 @@ new NodePreviewController(Mesh, { for (let fkey in element.faces) { let face = element.faces[fkey]; - if (face.vertices <= 2) continue; + if (face.vertices.length <= 2) continue; let offset = face.getNormal(true).V3_multiply(0.01); let x_memory = {}; let y_memory = {};