+
diff --git a/js/blockbench.js b/js/blockbench.js
index e367ace02..8de420635 100644
--- a/js/blockbench.js
+++ b/js/blockbench.js
@@ -194,6 +194,12 @@ function updateNslideValues() {
}
}
function setProjectResolution(width, height, modify_uv) {
+ if (Project.texture_width / width != Project.texture_width / height) {
+ modify_uv = false;
+ }
+
+ Undo.initEdit({uv_mode: true, elements: Cube.all, uv_only: true})
+
let old_res = {
x: Project.texture_width,
y: Project.texture_height
@@ -201,14 +207,11 @@ function setProjectResolution(width, height, modify_uv) {
Project.texture_width = width;
Project.texture_height = height;
- if (Project.texture_width / old_res.x != Project.texture_width / old_res.y) {
- modify_uv = false;
- }
if (modify_uv) {
var multiplier = [
- Project.texture_width/entityMode.old_res.x,
- Project.texture_height/entityMode.old_res.y
+ Project.texture_width/old_res.x,
+ Project.texture_height/old_res.y
]
function shiftCube(cube, axis) {
if (Project.box_uv) {
@@ -228,7 +231,7 @@ function setProjectResolution(width, height, modify_uv) {
Cube.all.forEach(cube => shiftCube(cube, 1));
}
}
-
+ Undo.finishEdit('Changed project resolution')
Canvas.updateAllUVs()
if (selected.length) {
main_uv.loadData()
diff --git a/js/io/bedrock_old.js b/js/io/bedrock_old.js
index ee5f2cd06..54c79733c 100644
--- a/js/io/bedrock_old.js
+++ b/js/io/bedrock_old.js
@@ -11,18 +11,9 @@ function parseGeometry(data) {
data = pe_list_data[0]
}
}
- Project.geometry_name = data.name.replace(/^geometry\./, '')
- Project.texture_width = 64
- Project.texture_height = 64
-
- if (data.object.texturewidth !== undefined) {
- Project.texture_width = data.object.texturewidth
- }
- if (data.object.textureheight !== undefined) {
- Project.texture_height = data.object.textureheight
- }
- entityMode.old_res.x = Project.texture_width
- entityMode.old_res.y = Project.texture_height
+ Project.geometry_name = data.name.replace(/^geometry\./, '');
+ Project.texture_width = data.object.texturewidth || 64;
+ Project.texture_height = data.object.textureheight || 64;
var bones = {}
@@ -164,19 +155,13 @@ var codec = new Codec('bedrock_old', {
bone.rotation[ri] *= -1
})
}
- if (g.reset) {
- bone.reset = true
- }
- if (g.mirror_uv) {
- bone.mirror = true
- }
- if (g.material) {
- bone.material = g.material
- }
- //Cubes
+ if (g.reset) bone.reset = true;
+ if (g.mirror_uv) bone.mirror = true;
+ if (g.material) bone.material = g.material;
+
+ //Elements
var cubes = []
var locators = {};
-
for (var obj of g.children) {
if (obj.export) {
if (obj instanceof Cube) {
diff --git a/package.json b/package.json
index 38d6c477e..76fd219c8 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Model editing and animation software",
- "version": "3.0.5",
+ "version": "3.0.6",
"license": "MIT",
"author": {
"name": "JannisX11",
@@ -80,6 +80,6 @@
"devDependencies": {
"async": "^2.4.1",
"electron": "5.0.6",
- "electron-builder": "^21.1.1"
+ "electron-builder": "^21.2.0"
}
}
Oops...
+It looks like your internet connection was too unstable to automatically update Blockbench.
+Download and run the installer to update manually. Your custom settings will remain untouched.
+