Fix issue with UV dragging [ci-build]

Fix color of selected mesh seams
This commit is contained in:
JannisX11 2022-03-29 18:52:41 +02:00
parent aa061d51d1
commit 4a9e48b049
3 changed files with 12 additions and 10 deletions

@ -929,6 +929,8 @@ new NodePreviewController(Mesh, {
let white = new THREE.Color(0xffffff);
let join = new THREE.Color(0x16d606);
let divide = new THREE.Color(0xff4400);
let join_selected = new THREE.Color(0x6bffcb);
let divide_selected = new THREE.Color(0xff8c69);
let selected_vertices = element.getSelectedVertices();
if (BarItems.selection_mode.value == 'vertex') {
@ -961,12 +963,12 @@ new NodePreviewController(Mesh, {
}
if (Toolbox.selected.id === 'seam_tool') {
let seam = element.getSeam([key, key_b]);
if (seam == 'join') color = join;
if (seam == 'divide') color = divide;
if (selected) {
color.r *= 1.2;
color.g *= 1.2;
color.b *= 1.2;
if (seam == 'join') color = join_selected;
if (seam == 'divide') color = divide_selected;
} else {
if (seam == 'join') color = join;
if (seam == 'divide') color = divide;
}
}
line_colors.push(color.r, color.g, color.b);

@ -89,8 +89,8 @@ const UVEditor = {
}
}
if (Toolbox.selected.id !== 'color_picker' && Toolbox.selected.id !== 'copy_paste_tool' && texture) {
addEventListeners(this.vue.$refs.frame, 'mousemove touchmove', UVEditor.movePaintTool, {capture: true} );
addEventListeners(document, 'mouseup touchend', UVEditor.stopBrush, {capture: true} );
addEventListeners(this.vue.$refs.frame, 'mousemove touchmove', UVEditor.movePaintTool, false );
addEventListeners(document, 'mouseup touchend', UVEditor.stopBrush, false );
}
},
movePaintTool(event) {
@ -2117,8 +2117,8 @@ Interface.definePanels(function() {
selection_rect.active = false;
}, 1)
}
addEventListeners(document, 'mousemove touchmove', drag, {capture: true});
addEventListeners(document, 'mouseup touchend', stop, {capture: true});
addEventListeners(document, 'mousemove touchmove', drag, false);
addEventListeners(document, 'mouseup touchend', stop, false);
}
},
onMouseLeave(event) {

File diff suppressed because one or more lines are too long