Fix issue with step interpolation in glTF export

Switch to new screen color picker on mac and linux
Fix issue with painting in Paint panel
This commit is contained in:
JannisX11 2022-03-29 17:28:03 +02:00
parent c11c0d96a0
commit c5585e6a73
4 changed files with 15 additions and 11 deletions

View File

@ -119,7 +119,7 @@
position: relative;
}
.panel[order="-1"]::before {
margin-top: -2px;
margin-top: 0;
}
.panel[order="1"]::before {
bottom: 0px;

View File

@ -41,7 +41,7 @@ function buildAnimationTracks(do_quaternions = true) {
// Sampling non-linear and math-based values
let contains_script
for (var kf of keyframes) {
if (kf.interpolation != 'linear') {
if (kf.interpolation == Keyframe.interpolation.catmullrom) {
contains_script = true; break;
}
for (var data_point of kf.data_points) {
@ -122,6 +122,9 @@ function buildAnimationTracks(do_quaternions = true) {
if (kf.interpolation == Keyframe.interpolation.catmullrom) {
interpolation = THREE.InterpolateSmooth
}
if (kf.interpolation == Keyframe.interpolation.step) {
interpolation = THREE.InterpolateDiscrete
}
times.push(kf.time);
Timeline.time = kf.time;
kf.getFixed(0, do_quaternions).toArray(values, values.length);

View File

@ -864,15 +864,16 @@ BARS.defineActions(function() {
new Action('pick_screen_color', {
icon: 'colorize',
category: 'color',
condition: () => (typeof EyeDropper == 'function' || isApp),
condition: () => (typeof EyeDropper == 'function'),
click: async function () {
if (!isApp && typeof EyeDropper == 'function') {
if (Blockbench.platform == 'win32') {
// workaround for https://github.com/electron/electron/issues/27980
ipcRenderer.send('request-color-picker', {sync: settings.sync_color.value});
} else if (typeof EyeDropper == 'function') {
let dropper = new EyeDropper();
let {sRGBHex} = await dropper.open();
ColorPanel.set(sRGBHex);
} else if (isApp) {
ipcRenderer.send('request-color-picker', {sync: settings.sync_color.value});
}
}
})

View File

@ -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, false );
addEventListeners(document, 'mouseup touchend', UVEditor.stopBrush, false );
addEventListeners(this.vue.$refs.frame, 'mousemove touchmove', UVEditor.movePaintTool, {capture: true} );
addEventListeners(document, 'mouseup touchend', UVEditor.stopBrush, {capture: true} );
}
},
movePaintTool(event) {
@ -2117,8 +2117,8 @@ Interface.definePanels(function() {
selection_rect.active = false;
}, 1)
}
addEventListeners(document, 'mousemove touchmove', drag);
addEventListeners(document, 'mouseup touchend', stop);
addEventListeners(document, 'mousemove touchmove', drag, {capture: true});
addEventListeners(document, 'mouseup touchend', stop, {capture: true});
}
},
onMouseLeave(event) {