Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Feb 13, 2022
2 parents db63aa6 + d3223f8 commit def82ef
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 32 deletions.
5 changes: 5 additions & 0 deletions css/dialogs.css
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@
height: 48px;
}
#plugin_list > li .title i {
width: 22px;
font-size: 0.9em;
padding: 3px;
float: left;
Expand Down Expand Up @@ -1120,6 +1121,10 @@
background-color: #73e473;
color: #111625;
}
.plugin_tag_list li.plugin_tag_deprecated {
background-color: #ff3467;
color: #000000;
}
.no_plugin_message {
text-align: center;
margin-top: 30px;
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '4.1.4';
const appVersion = '4.1.5';


if (localStorage.getItem('theme')) {
Expand Down
4 changes: 2 additions & 2 deletions js/animations/keyframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class Keyframe {
let this_data_point = (this.data_points.length > 1 && this.time < other.time) ? 1 : 0;
let other_data_point = (other.data_points.length > 1 && this.time > other.time) ? 1 : 0;
if (allow_expression && this.get(axis, this_data_point) === other.get(axis, other_data_point)) {
return this.get(axis)
return this.get(axis, this_data_point);
} else {
let calc = this.calc(axis, this_data_point);
return calc + (other.calc(axis, other_data_point) - calc) * amount;
Expand Down Expand Up @@ -1001,7 +1001,7 @@ Interface.definePanels(function() {
})
},
focusAxis(axis) {
if (Timeline.vue.graph_editor_open && 'xyz'.includes(axis)) {
if ('xyz'.includes(axis)) {
Timeline.vue.graph_editor_axis = axis;
}
},
Expand Down
1 change: 1 addition & 0 deletions js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const Blockbench = {
reload() {
localStorage.removeItem('backup_model')
if (isApp) {
Blockbench.setProgress(0)
Blockbench.addFlag('allow_closing')
Blockbench.addFlag('allow_reload')
currentwindow.reload()
Expand Down
2 changes: 1 addition & 1 deletion js/io/formats/bedrock.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function calculateVisibleBox() {
texture_mesh.local_pivot[2] *= -1;
texture_mesh.origin[1] *= -1;

texture_mesh.origin[1] += b.pivot[1];
if (b.pivot) texture_mesh.origin[1] += b.pivot[1];

texture_mesh.origin[0] *= -1;
texture_mesh.rotation[0] *= -1;
Expand Down
2 changes: 1 addition & 1 deletion js/io/formats/java_block.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ var codec = new Codec('java_block', {
}

//Load
if (model.texture_size instanceof Array) {
if (model.texture_size instanceof Array && !add) {
Project.texture_width = Math.clamp(parseInt(model.texture_size[0]), 1, Infinity)
Project.texture_height = Math.clamp(parseInt(model.texture_size[1]), 1, Infinity)
}
Expand Down
4 changes: 2 additions & 2 deletions js/outliner/texture_mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ new NodePreviewController(TextureMesh, {
ex += 0.4 * -dir;
sy += 0.1;
ey -= 0.1;
addNormal(dir, 0, 0);
addNormal(-dir, 0, 0);
}
if (sy == ey) {
sy += 0.1 * dir;
ey += 0.4 * dir;
sx += 0.1;
ex -= 0.1;
addNormal(0, 0, dir);
addNormal(0, 0, -dir);
}
uvs.push(
ex / canvas.width, 1 - (sy / canvas.height),
Expand Down
11 changes: 7 additions & 4 deletions js/plugin_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const Plugins = {
console.log('Reloaded '+reloads+ ' plugin'+pluralS(reloads))
},
sort() {
Plugins.all.sort(function(a,b) {
Plugins.all.sort((a, b) => {
if (a.tags.find(tag => tag.match(/deprecated/i))) return 1;
if (b.tags.find(tag => tag.match(/deprecated/i))) return -1;
let download_difference = (Plugins.download_stats[b.id] || 0) - (Plugins.download_stats[a.id] || 0);
if (download_difference) {
return download_difference
Expand Down Expand Up @@ -543,11 +545,12 @@ BARS.defineActions(function() {
},
methods: {
getTagClass(tag) {
let lowercase = tag.toLowerCase();
if (lowercase == 'local' || lowercase == 'remote') {
if (tag.match(/^(local|remote)$/i)) {
return 'plugin_tag_source'
} else if (lowercase.substr(0, 9) == 'minecraft') {
} else if (tag.match(/^minecraft/i)) {
return 'plugin_tag_mc'
} else if (tag.match(/^deprecated/i)) {
return 'plugin_tag_deprecated'
}
},
getIconNode: Blockbench.getIconNode,
Expand Down
13 changes: 11 additions & 2 deletions js/preview/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,14 @@ class Preview {
this.raycaster = new THREE.Raycaster();
this.mouse = new THREE.Vector2();
addEventListeners(this.canvas, 'mousedown touchstart', event => { this.click(event)}, { passive: false })
addEventListeners(this.canvas, 'mousemove touchmove', event => { this.static_rclick = false}, false)
addEventListeners(this.canvas, 'mousemove touchmove', event => {
if (!this.static_rclick) return;
convertTouchEvent(event);
let threshold = 7;
if (!this.event_start || !Math.epsilon(this.event_start[0], event.clientX, threshold) || !Math.epsilon(this.event_start[1], event.clientY, threshold)) {
this.static_rclick = false;
}
}, false)
addEventListeners(this.canvas, 'mousemove', event => { this.mousemove(event)}, false)
addEventListeners(this.canvas, 'mouseup touchend', event => { this.mouseup(event)}, false)
addEventListeners(this.canvas, 'dblclick', event => { Toolbox.toggleTransforms(event)}, false)
Expand Down Expand Up @@ -714,7 +721,9 @@ class Preview {
convertTouchEvent(event);
Preview.selected = this;
this.static_rclick = event.which === 3 || event.type == 'touchstart';

if (this.static_rclick) {
this.event_start = [event.clientX, event.clientY];
}
if (event.type == 'touchstart') {
this.rclick_cooldown = setTimeout(() => {
this.rclick_cooldown = true;
Expand Down
2 changes: 1 addition & 1 deletion js/texturing/texture_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const TextureGenerator = {
form: {
name: {label: 'generic.name', value: 'texture'},
folder: {label: 'dialog.create_texture.folder', condition: Format.id == 'java_block'},
type: {label: 'dialog.create_texture.type', type: 'select', condition: Cube.all.length || Mesh.all.length, options: type_options},
type: {label: 'dialog.create_texture.type', type: 'select', options: type_options},
section2: "_",

resolution: {label: 'dialog.create_texture.pixel_density', description: 'dialog.create_texture.pixel_density.desc', type: 'select', value: 16, condition: (form) => (form.type == 'template'), options: {
Expand Down
2 changes: 1 addition & 1 deletion js/webpack/bundle.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,10 +1110,10 @@
"settings.motion_trails": "Senderos de movimiento",
"settings.motion_trails.desc": "Mostrar senderos de movimiento en el editor de animación",
"settings.antialiasing": "Anti-aliasing",
"settings.antialiasing.desc": "Toggle anti-aliasing in the preview. Restart Blockbench to apply changes",
"settings.antialiasing.desc": "Modificar el anti-aliassing en la vista previa. Debes reiniciar Blockbench para aplicar los cambios",
"action.timeline_frame_back": "Avanza un fotograma atras",
"action.timeline_frame_forth": "Avanza un fotograma adelante",
"panel.bone.ik": "Inverse Kinematics (Experimental)",
"panel.bone.ik": "Cinemáticas inversas (Experimental)",
"settings.particle_tick_rate": "Particle Tick Rate",
"settings.particle_tick_rate.desc": "Tick rate for particle effects in ticks per second. Default is 30",
"action.lock_motion_trail": "Lock Motion Trail",
Expand All @@ -1122,7 +1122,7 @@
"data.null_object": "Objeto Nulo",
"status_bar.toggle_sidebar": "Mostrarbarralateral",
"message.load_plugin_failed.title": "Falló al cargar el plugin",
"message.load_plugin_failed.message": "Ensure that the base file name of the plugin matches the plugin ID `%0`, as specified in Plugin.register().",
"message.load_plugin_failed.message": "Asegúrate que el nombre del archivo del plugin corresponde al ID `%0`, tal como se especifica en Plugin.Register().",
"dialog.project.uv_mode": "Modo UV",
"dialog.project.uv_mode.box_uv": "Caja UV ",
"dialog.project.uv_mode.face_uv": "Per-face UV",
Expand All @@ -1131,25 +1131,25 @@
"dialog.create_texture.rearrange_uv": "Rearrange UV",
"layout.color.subtle_text": "Subtle Text",
"layout.color.subtle_text.desc": "Color del texto secundario con menos contraste",
"settings.interface_scale": "Interface Scale",
"settings.interface_scale.desc": "Scale of the entire Blockbench interface",
"settings.background_rendering": "Background Rendering",
"settings.interface_scale": "Escala de la interfaz",
"settings.interface_scale.desc": "Escala de la interfaz de Blockbench",
"settings.background_rendering": "Renderizado del fondo",
"settings.background_rendering.desc": "Actualiza la previsualización mientras la ventana no esté enfocada",
"settings.ctrl_shift_size": "Control + Shift Resolution",
"settings.ctrl_shift_size.desc": "Resolution of the grid while holding control and shift",
"settings.ctrl_shift_size.desc": "Resolución del mapa mientras mantienes presionado control y shift",
"settings.hardware_acceleration": "Aceleración de Hardware",
"settings.hardware_acceleration.desc": "Outsource rendering tasks to the graphics card. Restart Blockbench to apply changes",
"action.explode_skin_model": "Exporta Piel de Minecraft",
"action.explode_skin_model.desc": "Toggles an explosion view that allows you to edit covered faces",
"action.export_minecraft_skin": "Exportar Skin de Minecraft",
"action.export_minecraft_skin.desc": "Exportar la Skin de Minecraft como una textura PNG",
"action.add_null_object": "Add Null Object",
"action.add_null_object.desc": "Adds a new null object",
"action.add_null_object": "Agregar un objeto nulo",
"action.add_null_object.desc": "Agrega un nuevo objeto nulo",
"action.animated_texture_frame": "Animated Texture Frame",
"action.animated_texture_frame.desc": "Set the current frame of the animated texture",
"action.export_animation_file": "Exportar animaciones...",
"action.export_animation_file.desc": "Exportar una selección de animaciones a un nuevo archivo",
"action.timeline_graph_editor": "Toggle Graph Editor",
"action.timeline_graph_editor": "Editor gráfico",
"action.timeline_graph_editor.desc": "Toggle the timeline between graph editor view and keyframe view",
"menu.file.recent.clear": "Limpiar archivos recientes",
"switches.shade": "Shade",
Expand Down
6 changes: 3 additions & 3 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@
"generic.all": "Tout",
"message.small_face_dimensions.title": "Dimensions des Faces imcompatibles",
"message.small_face_dimensions.message": "La sélection contient des faces inférieures à 1 unité dans une direction. Le système de mappage Encadrement UV considère toutes les faces inférieures à ce seuil comme ayant une largeur de 0 pixel. La texture sur ces faces est donc susceptible de ne pas fonctionner correctement.",
"message.small_face_dimensions.face_uv": "Le format actuel supporte les cartes UV par face pouvant gérer de petites dimensions de faces. Allez dans « Fichier »« Projet… » et décochez « Encadrement UV ».",
"message.small_face_dimensions.face_uv": "Le format actuel supporte les cartes UV par face pouvant gérer de petites dimensions de faces. Allez dans Fichier → Projet… et décochez Encadrement UV.",
"dialog.plugins.outdated_client": "Requis une nouvelle version de Blockbench",
"dialog.plugins.outdated_plugin": "Le plugin n'est pas à jour et ne fonctionne pas avec cette version de Blockbench",
"settings.motion_trails": "Trainée de Mouvement",
Expand Down Expand Up @@ -1453,7 +1453,7 @@
"action.bake_animation_into_model.desc": "Intègre l'image d'animation actuellement affichée au modèle. Seules la rotation et la position s'appliquent, la mise à l'échelle est ignorée.",
"action.keyframe_interpolation.step": "Étape",
"action.set_ik_target": "Définir la cible CI",
"action.set_ik_target.desc": "Choisir le segment cible à faire déplacer par cet objet nul via la Cinématique inverse",
"action.set_ik_target.desc": "Choisir le segment cible à faire déplacer par cet objet nul via la Cinématique inverse (CI)",
"menu.action_control.type.tab": "Onglet",
"menu.action_control.type.angle": "Angle de caméra",
"menu.action_control.recent_in_streamer_mode": "Êtes-vous sûr ? Le mode Streamer est activé",
Expand All @@ -1478,5 +1478,5 @@
"panel.skin_pose.jumping": "Saut",
"panel.skin_pose.aiming": "Visée",
"edit.loop_cut.direction": "Direction",
"message.meshes_and_box_uv": "Meshes are not compatible with Box UV. Go to File > Project... and switch to Per-face UV."
"message.meshes_and_box_uv": "Les mailles ne sont pas compatibles avec Encadrement UV. Allez dans Fichier → Projet… et choisissez UV par face."
}
2 changes: 1 addition & 1 deletion lang/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1478,5 +1478,5 @@
"panel.skin_pose.jumping": "점프",
"panel.skin_pose.aiming": "사격",
"edit.loop_cut.direction": "방향",
"message.meshes_and_box_uv": "Meshes are not compatible with Box UV. Go to File > Project... and switch to Per-face UV."
"message.meshes_and_box_uv": "메쉬들은 상자 UV와 호환되지 않습니다. 파일 > 프로젝트... 로 이동하고 표면별 UV로 전환하십시오."
}
Loading

0 comments on commit def82ef

Please sign in to comment.