diff --git a/scripts/debug_tool/tabs/edge_net_tab.py b/scripts/debug_tool/tabs/edge_net_tab.py index 6760896cef8ec4b94219b03ddaefeb22f2a577f7..f6018d6eecc731583ff184af8f7fb2ebf30468ef 100644 --- a/scripts/debug_tool/tabs/edge_net_tab.py +++ b/scripts/debug_tool/tabs/edge_net_tab.py @@ -721,16 +721,52 @@ class EdgeNetTab: def run_all_steps(self): """Run all EdgeNet processing steps in sequence""" + if self.is_processing: + messagebox.showwarning("Warning", "A process is already running!") + return + + # Start processing in a separate thread + thread = threading.Thread(target=self._run_all_steps_thread) + thread.daemon = True + thread.start() + + def _run_all_steps_thread(self): + """Run all steps sequentially in a thread""" try: + self.update_status("\nStarting complete pipeline processing...") + + # Run EdgeNet and wait for completion + self.update_status("\nStep 1: Running EdgeNet...") self.run_edge_net() + while self.is_processing: + time.sleep(0.1) + + # Check EdgeNet completion status if self.edge_status.cget("text") == "✓ Complete": + # Run Mesh Split and wait for completion + self.update_status("\nStep 2: Running Mesh Split...") self.run_mesh_split() + while self.is_processing: + time.sleep(0.1) + + # Check Mesh Split completion status if self.split_status.cget("text") == "✓ Complete": + # Run Blender Flip and wait for completion + self.update_status("\nStep 3: Running Blender Flip...") self.run_blender_flip() - + while self.is_processing: + time.sleep(0.1) + + # Final check + if self.flip_status.cget("text") == "✓ Complete": + self.update_status("\nComplete pipeline processing finished successfully!") + self.tab.after(0, messagebox.showinfo, "Success", + "All processing steps completed successfully!") + except Exception as e: - self.update_status(f"Error in processing pipeline: {str(e)}") - messagebox.showerror("Error", f"Processing pipeline failed: {str(e)}") + error_msg = f"Error in processing pipeline: {str(e)}" + self.update_status(f"\n{error_msg}") + self.tab.after(0, messagebox.showerror, "Error", error_msg) def clean_temp_files(self): """Clean up temporary files"""