Fix 3mf export flow through material dialog
This commit is contained in:
parent
e087b87c19
commit
56173552af
2 changed files with 3 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ export default function ExportButton({className, style}: {className?: string, st
|
|||
{
|
||||
data: '3mf',
|
||||
buttonLabel: 'Download 3MF',
|
||||
label: '3MF (3D Manufacturing Format)',
|
||||
label: '3MF (Multimaterial)',
|
||||
icon: 'pi pi-file',
|
||||
command: () => model!.setFormats(undefined, '3mf'),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,11 +43,12 @@ export default function MultimaterialColorsDialog() {
|
|||
disabled={!tempExtruderColors.every(c => chroma.valid(c) || c.trim() === '')}
|
||||
autoFocus
|
||||
onClick={e => {
|
||||
const wasExporting = state.view.extruderPickerVisibility === 'exporting';
|
||||
model!.mutate(s => {
|
||||
s.params.extruderColors = tempExtruderColors.filter(c => c.trim() !== '');
|
||||
s.view.extruderPickerVisibility = undefined;
|
||||
});
|
||||
if (state.view.extruderPickerVisibility === 'exporting') {
|
||||
if (wasExporting) {
|
||||
model!.export();
|
||||
}
|
||||
}} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue