Remove render-modifiers feature reference

This commit is contained in:
ochafik 2024-12-25 11:28:15 +00:00 • committed by Olivier Chafik
commit 657ccb9181

View file

@ -106,19 +106,16 @@ export const render =
isPreview, isPreview,
mountArchives, mountArchives,
vars, vars,
features: additionalFeatures, features,
extraArgs, extraArgs,
renderFormat, renderFormat,
streamsCallback, streamsCallback,
} = renderArgs; } = renderArgs;
const prefixLines: string[] = []; const prefixLines: string[] = [];
let features: string[]
if (isPreview) { if (isPreview) {
// TODO: add render-modifiers feature to OpenSCAD.
prefixLines.push('$preview=true;'); prefixLines.push('$preview=true;');
features = ['render-modifiers', ...(additionalFeatures ?? [])];
} else {
features = (additionalFeatures ?? []).filter(f => f != 'render-modifiers');
} }
if (!scadPath.endsWith('.scad')) throw new Error('First source must be a .scad file, got ' + sources[0].path + ' instead'); if (!scadPath.endsWith('.scad')) throw new Error('First source must be a .scad file, got ' + sources[0].path + ' instead');