This commit is contained in:
JannisX11 2018-12-16 19:31:45 +01:00 committed by GitHub
parent d4e6ad1471
commit d1b8aef1eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 14 deletions

View File

@ -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%;

View File

@ -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',

View File

@ -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) {

View File

@ -1,4 +1,4 @@
const appVersion = '2.2.1'
const appVersion = '2.2.2'
var osfs = '/'
var File, i;
const elements = [];

View File

@ -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;
}
}
@ -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')

View File

@ -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(

View File

@ -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})
}
})
}
})

View File

@ -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

View File

@ -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>')
@ -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

View File

@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Minecraft Block Model Editor",
"version": "2.2.1",
"version": "2.2.2",
"license": "MIT",
"author": {
"name": "JannisX11",