From 5e612e8d381c5d610889f6d3b28bdb75e07ffff6 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Mon, 17 Apr 2023 14:30:51 +0200 Subject: [PATCH] Fix UV snapping using only initial keys Fix color picker Z index in dialog Resolve todos --- css/spectrum.css | 2 +- js/io/formats/gltf.js | 1 - js/io/io.js | 2 +- js/preview/reference_images.js | 1 - js/texturing/uv.js | 2 ++ 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/css/spectrum.css b/css/spectrum.css index 89a2ecd6..a2aaf4a5 100644 --- a/css/spectrum.css +++ b/css/spectrum.css @@ -17,7 +17,7 @@ License: MIT overflow: hidden; } .sp-container:not(.sp-flat) { - z-index: 22; + z-index: 42; } .sp-container.sp-flat { position: relative; diff --git a/js/io/formats/gltf.js b/js/io/formats/gltf.js index 4918adc3..019ce1a6 100644 --- a/js/io/formats/gltf.js +++ b/js/io/formats/gltf.js @@ -191,7 +191,6 @@ function buildSkinnedMesh(root_group, scale) { for (let i = 0; i < geometry.attributes.position.count; i++) { vertex.fromBufferAttribute(geometry.attributes.position, i); normal.fromBufferAttribute(geometry.attributes.normal, i); - // todo: apply transform vertex.applyMatrix4(matrix); normal.transformDirection(matrix); diff --git a/js/io/io.js b/js/io/io.js index 5d6730be..b5362e09 100644 --- a/js/io/io.js +++ b/js/io/io.js @@ -102,7 +102,7 @@ async function loadImages(files, event) { if (Condition(Panels.textures.condition)) { options.texture = 'action.import_texture'; } - options.reference_image = 'Reference Image';// todo: translation + options.reference_image = 'data.reference_image'; } options.edit = 'message.load_images.edit_image'; if (img.naturalHeight == img.naturalWidth && [64, 128].includes(img.naturalWidth)) { diff --git a/js/preview/reference_images.js b/js/preview/reference_images.js index e86ae1e0..ca6ebcf3 100644 --- a/js/preview/reference_images.js +++ b/js/preview/reference_images.js @@ -953,7 +953,6 @@ BARS.defineActions(function() { '_', /** Todo: add options * Center - * Delete */ { name: 'menu.texture.properties', diff --git a/js/texturing/uv.js b/js/texturing/uv.js index 85588109..cb101cad 100644 --- a/js/texturing/uv.js +++ b/js/texturing/uv.js @@ -2479,9 +2479,11 @@ Interface.definePanels(function() { let last_pos = [0, 0]; let viewport = this.$refs.viewport; let initial_scroll_offset = [viewport.scrollLeft, viewport.scrollTop]; + let original_snap = snap; function drag(e1) { convertTouchEvent(e1); let step_x, step_y; + let snap = original_snap; if (snap == undefined) { snap = UVEditor.grid / canvasGridSize(e1.shiftKey || Pressing.overrides.shift, e1.ctrlOrCmd || Pressing.overrides.ctrl);