mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-27 18:51:11 -06:00 
			
		
		
		
	Ported config load / stored to C++, thanks @alexrj
Implemented import of config values from the G-code.
This commit is contained in:
		
							parent
							
								
									c61e098066
								
							
						
					
					
						commit
						93dce7a2d3
					
				
					 7 changed files with 192 additions and 35 deletions
				
			
		|  | @ -101,8 +101,14 @@ sub load { | |||
|     my $class = shift; | ||||
|     my ($file) = @_; | ||||
|      | ||||
|     my $ini = __PACKAGE__->read_ini($file); | ||||
|     return $class->load_ini_hash($ini->{_}); | ||||
|     if ($file =~ /\.gcode$/i || $file =~ /\.g$/i) { | ||||
|         my $config = $class->new;         | ||||
|         $config->_load_from_gcode($file); | ||||
|         return $config; | ||||
|     } else { | ||||
|         my $ini = __PACKAGE__->read_ini($file); | ||||
|         return $class->load_ini_hash($ini->{_}); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| # Deserialize a perl hash into the underlying C++ Slic3r::DynamicConfig class, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv