diff --git a/src/kiri/core/widget.js b/src/kiri/core/widget.js index 85b16879..f72115da 100644 --- a/src/kiri/core/widget.js +++ b/src/kiri/core/widget.js @@ -332,6 +332,10 @@ class Widget { moto.space.refresh(); } + isSynth() { + return this.track.synth ?? false; + } + isVisible() { return this.getMaterial().visible; } diff --git a/src/kiri/mode/cam/client.js b/src/kiri/mode/cam/client.js index 16459738..40adae9e 100644 --- a/src/kiri/mode/cam/client.js +++ b/src/kiri/mode/cam/client.js @@ -810,6 +810,7 @@ export function init() { clearPops(); for (let group of Widget.Groups.list()) { let root = group[0]; + if (root.tabs) for (let tab of Object.values(root.tabs)) { let geo = tab.box.geometry.clone(); if (geo.index) geo = geo.toNonIndexed(); diff --git a/src/kiri/mode/cam/prepare.js b/src/kiri/mode/cam/prepare.js index 1bc4c4b7..079cc378 100644 --- a/src/kiri/mode/cam/prepare.js +++ b/src/kiri/mode/cam/prepare.js @@ -26,7 +26,7 @@ export async function cam_prepare(widall, settings, update) { print.output = []; let point; - widgets.forEach((widget, index) => { + widgets.filter(w => !w.isSynth()).forEach((widget, index) => { point = prepEach(widget, settings, print, point, (progress, msg) => { update((index * weight + progress * weight) * 0.75, msg || "prepare"); }); @@ -337,7 +337,7 @@ export function prepEach(widget, settings, print, firstPoint, update) { // 1. move to safe z of current point preserving angle // 2. move to safe z of new point preserving old angle // 3. move to safe z of new point with new angle - if (lop && lop !== currentOp && lastPoint) { + if (lop !== currentOp && lastPoint) { // compensate for applyWidgetMovement() applied to lastPoint let lpo = lastPoint.clone().move({ x: -wmx, y: -wmy, z: -zadd }); camOut(lpo.clone().setZ(zsafe).setA(lastPoint.a), 0);