Skip to content

Commit

Permalink
v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 authored Dec 16, 2018
1 parent d4e6ad1 commit d1b8aef
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 14 deletions.
1 change: 1 addition & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,7 @@
}
#display_bar .tool, #display_ref_bar > div {
width: calc(100% / 8 - 2px);
max-width: 52px;
}
#display_ref_bar > div > label {
width: 100%;
Expand Down
7 changes: 7 additions & 0 deletions js/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,13 @@ var BARS = {
Blockbench.removeListener('update_selection', Vertexsnap.select)
}
})
new BarSelect({
id: 'vertex_snap_mode',
options: {
move: true,
scale: true
}
})
new Tool({
id: 'display_mode_tool',
icon: 'icon-player',
Expand Down
1 change: 1 addition & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ function saveFile(props) {
if (Prop.file_path) {
Prop.project_saved = true;
setProjectTitle(pathToName(Prop.file_path, false))
addRecentProject({name: pathToName(path, true), path: path})
var extension = pathToExtension(Prop.file_path)

if (Blockbench.entity_mode === false) {
Expand Down
2 changes: 1 addition & 1 deletion js/blockbench.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const appVersion = '2.2.1'
const appVersion = '2.2.2'
var osfs = '/'
var File, i;
const elements = [];
Expand Down
10 changes: 7 additions & 3 deletions js/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ class Cube extends OutlinerElement {
}
rotationAxis() {
for (var axis = 0; axis < 3; axis++) {
if (this.rotation[axis_i] !== 0) {
this.rotation_axis = getAxisLetter(axis_i);
if (this.rotation[axis] !== 0) {
this.rotation_axis = getAxisLetter(axis);
return this.rotation_axis;
}
}
Expand Down Expand Up @@ -486,7 +486,11 @@ class Cube extends OutlinerElement {
if (object.faces) {
for (var face in this.faces) {
if (this.faces.hasOwnProperty(face) && object.faces.hasOwnProperty(face)) {
Merge.string(this.faces[face], object.faces[face], 'texture')
if (object.faces[face].texture === null) {
this.faces[face].texture = null
} else {
Merge.string(this.faces[face], object.faces[face], 'texture')
}
Merge.string(this.faces[face], object.faces[face], 'cullface')
Merge.number(this.faces[face], object.faces[face], 'rotation')
Merge.number(this.faces[face], object.faces[face], 'tintindex')
Expand Down
1 change: 0 additions & 1 deletion js/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ function updateInterfacePanels() {
var panel = Interface.Panels[key]
panel.update()
}
return;
var left_width = $('.sidebar#left_bar > .panel:visible').length ? Interface.data.left_bar_width : 0
var right_width = $('.sidebar#right_bar > .panel:visible').length ? Interface.data.right_bar_width : 0
$('body').css(
Expand Down
7 changes: 7 additions & 0 deletions js/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,13 @@ BARS.defineActions(function() {
name: Project.name||'model',
startpath: Prop.file_path,
content: content
}, (path) => {
Prop.project_saved = true
if (isApp && path) {
Prop.file_path = path
setProjectTitle(pathToName(Prop.file_path, true))
addRecentProject({name: pathToName(path, true), path: path})
}
})
}
})
Expand Down
7 changes: 0 additions & 7 deletions js/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,13 +671,6 @@ BARS.defineActions(function() {
//Eraser fa-eraser
//Fill format_color_fill

new BarSelect({
id: 'vertex_snap_mode',
options: {
move: true,
scale: true
}
})
new ColorPicker({
id: 'brush_color',
palette: true
Expand Down
5 changes: 4 additions & 1 deletion js/uv.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ class UVEditor {
if (Blockbench.browser === 'firefox') {
this.jquery.frame.css('image-rendering', '-moz-crisp-edges')
}
if (Toolbox.selected.paintTool) {
this.jquery.size.hide()
}

this.jquery.sliders = $('<div class="bar" style="margin-left: 2px;"></div>')

Expand Down Expand Up @@ -370,7 +373,7 @@ class UVEditor {
while (i < length) {
x = end_x - diff.x / length * i
y = end_y - diff.y / length * i
Painter.useBrush(texture, x, y)
Painter.useBrush(texture, x, y, undefined, i < length-1)
i++;
}
Painter.current.x = end_x
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Minecraft Block Model Editor",
"version": "2.2.1",
"version": "2.2.2",
"license": "MIT",
"author": {
"name": "JannisX11",
Expand Down

0 comments on commit d1b8aef

Please sign in to comment.