mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	FIX: STUDIO-1095 Prompt "import geometry data only" again
Prompt "import geometry data only" again when importing old or other 3mf Change-Id: If3edd3c36efa09925a9131e31567b0672f84f84b (cherry picked from commit 90eba8d55563997ceb1bc8feb1e110680c3b3678)
This commit is contained in:
		
							parent
							
								
									284154d053
								
							
						
					
					
						commit
						2ecb2fd22d
					
				
					 1 changed files with 18 additions and 13 deletions
				
			
		|  | @ -207,6 +207,14 @@ enum class LoadFilesType { | |||
|     Multiple3MFOther, | ||||
| }; | ||||
| 
 | ||||
| enum class LoadType : unsigned char | ||||
| { | ||||
|     Unknown, | ||||
|     OpenProject, | ||||
|     LoadGeometry, | ||||
|     LoadConfig | ||||
| }; | ||||
| 
 | ||||
| class SlicedInfo : public wxStaticBoxSizer | ||||
| { | ||||
| public: | ||||
|  | @ -2940,12 +2948,15 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_ | |||
|                         wxGetApp().get_tab(Preset::TYPE_PRINT)->update(); | ||||
|                     } | ||||
| 
 | ||||
|                     LoadType load_type = static_cast<LoadType>(std::stoi(wxGetApp().app_config->get("import_project_action"))); | ||||
| 
 | ||||
|                     // BBS: version check
 | ||||
|                     Semver app_version = *(Semver::parse(SLIC3R_VERSION)); | ||||
|                     if (en_3mf_file_type == En3mfType::From_Prusa) { | ||||
|                         // do not reset the model config
 | ||||
|                         load_config = false; | ||||
|                         show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); | ||||
|                         if(load_type != LoadType::LoadGeometry) | ||||
|                             show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); | ||||
|                     } | ||||
|                     else if (load_config && (file_version.maj() != app_version.maj())) { | ||||
|                         // version mismatch, only load geometries
 | ||||
|  | @ -2960,10 +2971,12 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_ | |||
|                         q->select_view_3D("3D"); | ||||
|                         // select plate 0 as default
 | ||||
|                         q->select_plate(0); | ||||
|                         if (en_3mf_file_type  == En3mfType::From_BBS) | ||||
|                             show_info(q, _L("The 3mf is generated by old Bambu Studio, load geometry data only."), _L("Load 3mf")); | ||||
|                         else | ||||
|                             show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); | ||||
|                         if (load_type != LoadType::LoadGeometry) { | ||||
|                             if (en_3mf_file_type == En3mfType::From_BBS) | ||||
|                                 show_info(q, _L("The 3mf is generated by old Bambu Studio, load geometry data only."), _L("Load 3mf")); | ||||
|                             else | ||||
|                                 show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); | ||||
|                         } | ||||
|                         for (ModelObject *model_object : model.objects) { | ||||
|                             model_object->config.reset(); | ||||
|                             // Is there any modifier or advanced config data?
 | ||||
|  | @ -7823,14 +7836,6 @@ std::vector<size_t> Plater::load_files(const std::vector<std::string>& input_fil | |||
|     return p->load_files(paths, strategy, ask_multi); | ||||
| } | ||||
| 
 | ||||
| enum class LoadType : unsigned char | ||||
| { | ||||
|     Unknown, | ||||
|     OpenProject, | ||||
|     LoadGeometry, | ||||
|     LoadConfig | ||||
| }; | ||||
| 
 | ||||
| class RadioBox; | ||||
| class RadioSelector | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zhimin.zeng
						zhimin.zeng