mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-12-03 04:40:46 +08:00
Fix #2132 issue with UV preview
This commit is contained in:
parent
3d5f11e88b
commit
81e36dfc2e
@ -683,13 +683,13 @@ function updateProjectResolution() {
|
||||
UVEditor.vue.uv_resolution.replace([Project.texture_width, Project.texture_height]);
|
||||
UVEditor.vue.updateSize()
|
||||
}
|
||||
Canvas.uvHelperMaterial.uniforms.DENSITY.value = Project.texture_width / 32;
|
||||
if (Texture.selected) {
|
||||
// Update animated textures
|
||||
Texture.selected.height++;
|
||||
Texture.selected.height--;
|
||||
}
|
||||
}
|
||||
Canvas.uvHelperMaterial.uniforms.DENSITY.value = Project.texture_width / 32;
|
||||
Blockbench.dispatchEvent('update_project_resolution', {project: Project});
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1183,7 @@ new NodePreviewController(Cube, {
|
||||
let vertex_uvs = mesh.geometry.attributes.uv;
|
||||
let pw = Project.texture_width;
|
||||
let ph = Project.texture_height;
|
||||
if (tex && Format.per_texture_uv_size) {
|
||||
if (tex && Format.per_texture_uv_size && Project.view_mode !== 'uv') {
|
||||
pw = tex.getUVWidth();
|
||||
ph = tex.getUVHeight();
|
||||
}
|
||||
|
@ -1112,7 +1112,7 @@ new NodePreviewController(Mesh, {
|
||||
stretch = tex.frameCount
|
||||
frame = tex.currentFrame || 0;
|
||||
}
|
||||
let uv_size = tex
|
||||
let uv_size = (tex && Project.view_mode !== 'uv')
|
||||
? [tex.getUVWidth(), tex.getUVHeight()]
|
||||
: [Project.texture_width, Project.texture_height];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user