mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	FIX: enhance interaction of timelapse
Change-Id: Iac13a485d0f5a458a435137619caddce39ad61fb
This commit is contained in:
		
							parent
							
								
									4f4223a2b4
								
							
						
					
					
						commit
						acb05dcf19
					
				
					 2 changed files with 47 additions and 7 deletions
				
			
		|  | @ -1983,10 +1983,12 @@ void PrintConfigDef::init_fff_params() | ||||||
| 
 | 
 | ||||||
|     def = this->add("timelapse_no_toolhead", coBool); |     def = this->add("timelapse_no_toolhead", coBool); | ||||||
|     def->label = L("Timelapse"); |     def->label = L("Timelapse"); | ||||||
|     def->tooltip = L("Record timelapse video of printing without showing toolhead. In this mode " |     def->tooltip = L("If enabled, a timelapse video will be generated for each print. " | ||||||
|                     "the toolhead docks near the excess chute at each layer change, and then " |                      "After each layer is printed, the toolhead will move to the excess chute, " | ||||||
|                     "a snapshot is taken with the chamber camera. When printing finishes a timelapse " |                      "and then a snapshot is taken with the chamber camera. " | ||||||
|                     "video is composed of all the snapshots."); |                      "All of these snapshots are composed into a timelapse video when printing completes. " | ||||||
|  |                      "Since the melt filament may leak from the nozzle during the process of taking a snapshot, " | ||||||
|  |                      "prime tower is required for nozzle priming."); | ||||||
|     def->mode = comSimple; |     def->mode = comSimple; | ||||||
|     def->set_default_value(new ConfigOptionBool(false)); |     def->set_default_value(new ConfigOptionBool(false)); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1371,12 +1371,50 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (opt_key == "enable_prime_tower" || opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" ) |     if (opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" ) | ||||||
|         update_wiping_button_visibility(); |         update_wiping_button_visibility(); | ||||||
| 
 | 
 | ||||||
|  |     if (opt_key == "enable_prime_tower") { | ||||||
|  |         bool timelapse_enabled = m_config->option<ConfigOptionBool>("timelapse_no_toolhead")->value; | ||||||
|  |         if (!boost::any_cast<bool>(value) && timelapse_enabled) { | ||||||
|  |             MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by timeplase. Are you sure you want to disable both of them?"), | ||||||
|  |                               _L("Warning"), wxICON_WARNING | wxYES | wxNO); | ||||||
|  |             if (dlg.ShowModal() == wxID_YES) { | ||||||
|  |                 DynamicPrintConfig new_conf = *m_config; | ||||||
|  |                 new_conf.set_key_value("timelapse_no_toolhead", new ConfigOptionBool(false)); | ||||||
|  |                 m_config_manipulation.apply(m_config, &new_conf); | ||||||
|  |                 wxGetApp().plater()->update(); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 DynamicPrintConfig new_conf = *m_config; | ||||||
|  |                 new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true)); | ||||||
|  |                 m_config_manipulation.apply(m_config, &new_conf); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         update_wiping_button_visibility(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     // reload scene to update timelapse wipe tower
 |     // reload scene to update timelapse wipe tower
 | ||||||
|     if (opt_key == "timelapse_no_toolhead") |     if (opt_key == "timelapse_no_toolhead") { | ||||||
|         wxGetApp().plater()->update(); |         bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value; | ||||||
|  |         if (!wipe_tower_enabled && boost::any_cast<bool>(value)) { | ||||||
|  |             MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by timelapse. Do you want to enable both of them?"), | ||||||
|  |                               _L("Warning"), wxICON_WARNING | wxYES | wxNO); | ||||||
|  |             if (dlg.ShowModal() == wxID_YES) { | ||||||
|  |                 DynamicPrintConfig new_conf = *m_config; | ||||||
|  |                 new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true)); | ||||||
|  |                 m_config_manipulation.apply(m_config, &new_conf); | ||||||
|  |                 wxGetApp().plater()->update(); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 DynamicPrintConfig new_conf = *m_config; | ||||||
|  |                 new_conf.set_key_value("timelapse_no_toolhead", new ConfigOptionBool(false)); | ||||||
|  |                 m_config_manipulation.apply(m_config, &new_conf); | ||||||
|  |             } | ||||||
|  |         } else { | ||||||
|  |             wxGetApp().plater()->update(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     // BBS
 |     // BBS
 | ||||||
| #if 0 | #if 0 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zhimin.zeng
						zhimin.zeng