mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-18 15:26:19 +08:00
Fix model import working in Skin mode
Fix OBJ import issue with broken models Fix Painting grid issue with single edges
This commit is contained in:
parent
dfd4c1e641
commit
ce0f1078a8
@ -568,7 +568,7 @@ const MenuBar = {
|
|||||||
'convert_project',
|
'convert_project',
|
||||||
'close_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',
|
id: 'import_open_project',
|
||||||
name: 'menu.file.import.import_open_project',
|
name: 'menu.file.import.import_open_project',
|
||||||
|
@ -493,7 +493,7 @@ BARS.defineActions(function() {
|
|||||||
new Action('import_project', {
|
new Action('import_project', {
|
||||||
icon: 'icon-blockbench_file',
|
icon: 'icon-blockbench_file',
|
||||||
category: 'file',
|
category: 'file',
|
||||||
condition: () => Format,
|
condition: () => Format && !Format.pose_mode,
|
||||||
click: function () {
|
click: function () {
|
||||||
Blockbench.import({
|
Blockbench.import({
|
||||||
resource_id: 'model',
|
resource_id: 'model',
|
||||||
|
@ -239,7 +239,7 @@ class Mesh extends OutlinerElement {
|
|||||||
while (!key || this.vertices[key]) {
|
while (!key || this.vertices[key]) {
|
||||||
key = bbuid(4);
|
key = bbuid(4);
|
||||||
}
|
}
|
||||||
this.vertices[key] = [...vector];
|
this.vertices[key] = [vector[0] || 0, vector[1] || 0, vector[2] || 0];
|
||||||
return key;
|
return key;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -887,7 +887,7 @@ new NodePreviewController(Mesh, {
|
|||||||
|
|
||||||
for (let fkey in element.faces) {
|
for (let fkey in element.faces) {
|
||||||
let face = element.faces[fkey];
|
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 offset = face.getNormal(true).V3_multiply(0.01);
|
||||||
let x_memory = {};
|
let x_memory = {};
|
||||||
let y_memory = {};
|
let y_memory = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user