@@ -85,24 +85,25 @@ class Interface extends React.Component {
8585 classes : PropTypes . objectOf ( PropTypes . string ) ,
8686 defaultSettings : PropTypes . object . isRequired ,
8787 printers : PropTypes . object . isRequired ,
88- defaultPrinter : PropTypes . string . isRequired ,
88+ defaultPrinter : PropTypes . string ,
8989 quality : PropTypes . object . isRequired ,
9090 defaultQuality : PropTypes . string . isRequired ,
9191 material : PropTypes . object . isRequired ,
9292 defaultMaterial : PropTypes . string . isRequired ,
9393 pixelRatio : PropTypes . number . isRequired ,
94- onCancel : PropTypes . func
94+ onCancel : PropTypes . func ,
95+ name : PropTypes . string . isRequired
9596 } ;
9697
9798 static defaultProps = {
9899 defaultSettings : baseSettings ,
99100 printers : printerSettings ,
100- defaultPrinter : 'ultimaker2' ,
101101 quality : qualitySettings ,
102102 defaultQuality : 'medium' ,
103103 material : materialSettings ,
104104 defaultMaterial : 'pla' ,
105- pixelRatio : 1
105+ pixelRatio : 1 ,
106+ name : 'Doodle3D'
106107 } ;
107108
108109 constructor ( props ) {
@@ -177,13 +178,14 @@ class Interface extends React.Component {
177178
178179 slice = async ( ) => {
179180 const { mesh, settings, isSlicing, printers, quality, material } = this . state ;
181+ const { name } = this . props ;
180182
181183 if ( isSlicing ) return ;
182184
183185 this . setState ( { isSlicing : true , progress : { action : '' , slicing : 0 , uploading : 0 } , error : null } ) ;
184186
185187 try {
186- await slice ( mesh , settings , printers , quality , material , progress => {
188+ await slice ( name , mesh , settings , printers , quality , material , progress => {
187189 this . setState ( { progress : { ...this . state . progress , ...progress } } ) ;
188190 } ) ;
189191 } catch ( error ) {
0 commit comments