mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Fix #1633 Null object visual size resets in animation mode
Fix issue with molang expression validator Fix UV editing of mesh vertices not working on tall textures Add failsafe and warning for plugin BarItems without correct ID
This commit is contained in:
parent
756433c6ae
commit
54b9f83c80
@ -906,7 +906,9 @@ const Animator = {
|
||||
var mesh = node.mesh;
|
||||
if (mesh.fix_rotation) mesh.rotation.copy(mesh.fix_rotation);
|
||||
if (mesh.fix_position) mesh.position.copy(mesh.fix_position);
|
||||
mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
|
||||
if (node.constructor.animator.prototype.channels && node.constructor.animator.prototype.channels.scale) {
|
||||
mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
|
||||
}
|
||||
})
|
||||
if (!no_matrix_update) scene.updateMatrixWorld()
|
||||
},
|
||||
|
@ -9,7 +9,15 @@ class BarItem {
|
||||
constructor(id, data) {
|
||||
this.id = id;
|
||||
if (!data.private) {
|
||||
BarItems[this.id] = this;
|
||||
if (this.id && !BarItems[this.id]) {
|
||||
BarItems[this.id] = this;
|
||||
} else {
|
||||
if (!BarItems[this.id]) {
|
||||
console.warn(`${this.constructor.name} ${this.id} has a duplicate ID`)
|
||||
} else {
|
||||
console.warn(`${this.constructor.name} defined without a vaild ID`)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.name = tl('action.'+this.id)
|
||||
if (data.name) this.name = tl(data.name);
|
||||
|
@ -67,7 +67,7 @@ class Mode extends KeybindItem {
|
||||
}
|
||||
|
||||
Canvas.updateRenderSides()
|
||||
if (BarItems[this.tool] && Condition(BarItems[this.tool])) {
|
||||
if (this.tool && BarItems[this.tool] && Condition(BarItems[this.tool])) {
|
||||
BarItems[this.tool].select();
|
||||
} else if (BarItems[this.default_tool]) {
|
||||
if (!BarItems[this.default_tool].selected) BarItems[this.default_tool].select();
|
||||
|
@ -2734,7 +2734,7 @@ Interface.definePanels(function() {
|
||||
face.vertices.forEach(vertex_key => {
|
||||
if (this.selected_vertices[element.uuid] && this.selected_vertices[element.uuid].includes(vertex_key)) {
|
||||
x = Math.clamp(x, -face.uv[vertex_key][0], Project.texture_width - face.uv[vertex_key][0]);
|
||||
y = Math.clamp(y, -face.uv[vertex_key][1], Project.texture_width - face.uv[vertex_key][1]);
|
||||
y = Math.clamp(y, -face.uv[vertex_key][1], Project.texture_height - face.uv[vertex_key][1]);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -325,9 +325,6 @@ new ValidatorCheck('molang_syntax', {
|
||||
if (clear_string.match(/^[+*/.,?=&<>|]/)) {
|
||||
issues.push('Expression starts with an invalid character');
|
||||
}
|
||||
if (clear_string.match(/(?!')[a-df-z_]+\s*[-?]+\s*[a-z_]+/i)) {
|
||||
issues.push('Invalid expression "' + clear_string.match(/(?!')[a-df-z_]+\s*[-?]+\s*[a-z_]+/i)[0] + '"');
|
||||
}
|
||||
if (clear_string.match(/[\w.]\s+[\w.]/)) {
|
||||
issues.push('Two expressions with no operator in between');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user