Fix #1272 Particle script export issue

Fix issue with vertex selection accuracy
This commit is contained in:
JannisX11 2022-02-01 20:28:51 +01:00
parent 7ec192bcbe
commit 42bb1a1614
6 changed files with 7 additions and 5 deletions

View File

@ -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.3';
const appVersion = '4.1.4';
if (localStorage.getItem('theme')) {

View File

@ -272,7 +272,7 @@ class Keyframe {
let points = [];
this.data_points.forEach(data_point => {
if (data_point.effect) {
let script = this.script || undefined;
let script = data_point.script || undefined;
if (script && !script.match(/;$/)) script += ';';
points.push({
effect: data_point.effect,

View File

@ -173,7 +173,6 @@ function updateSelection(options = {}) {
if (settings.highlight_cubes.value || (Mesh.all[0])) updateCubeHighlights();
Canvas.updatePivotMarker();
Transformer.updateSelection();
Transformer.update();
Preview.all.forEach(preview => {
preview.updateAnnotations();
})

View File

@ -1547,7 +1547,7 @@ class Preview {
Preview.all = [];
Blockbench.on('update_camera_position', e => {
let scale = Preview.selected.calculateControlScale(new THREE.Vector3(0, 0, 0));
let scale = Preview.selected.calculateControlScale(Transformer.position);
Preview.all.forEach(preview => {
if (preview.canvas.isConnected) {
preview.raycaster.params.Points.threshold = scale * 0.8;

View File

@ -898,6 +898,9 @@
Transformer.rotation_ref = space.mesh;
}
} else if (Toolbox.selected.id == 'vertex_snap_tool' && (Outliner.selected.length || Group.selected)) {
var center = getSelectionCenter()
Transformer.position.fromArray(center)
}
} else if (Modes.display) {

View File

@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Low-poly modeling and animation software",
"version": "4.1.3",
"version": "4.1.4",
"license": "GPL-3.0-or-later",
"author": {
"name": "JannisX11",