| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  | import bpy | 
					
						
							| 
									
										
										
										
											2025-01-08 20:20:10 +08:00
										 |  |  | from . import PROP_preferences, UTIL_functions, UTIL_file_browser, UTIL_blender_mesh, UTIL_ioport_shared | 
					
						
							| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 13:07:10 +08:00
										 |  |  | class BBP_OT_export_bmfile(bpy.types.Operator, UTIL_file_browser.ExportBmxFile, UTIL_ioport_shared.ExportParams): | 
					
						
							| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  |     """Save a Ballance Map File (BM File Spec 1.4)""" | 
					
						
							|  |  |  |     bl_idname = "bbp.export_bmfile" | 
					
						
							|  |  |  |     bl_label = "Export BM (Ballance Map) File" | 
					
						
							|  |  |  |     bl_options = {'PRESET'} | 
					
						
							| 
									
										
										
										
											2025-01-11 21:36:11 +08:00
										 |  |  |     bl_translation_context = 'BBP_OT_export_bmfile' | 
					
						
							| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     @classmethod | 
					
						
							| 
									
										
										
										
											2025-01-03 09:36:32 +08:00
										 |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  |         return PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder() | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     def execute(self, context): | 
					
						
							| 
									
										
										
										
											2025-01-11 21:36:11 +08:00
										 |  |  |         self.report({'ERROR'}, 'This feature is not supported yet.') | 
					
						
							| 
									
										
										
										
											2025-01-08 20:20:10 +08:00
										 |  |  |         # self.report({'INFO'}, "BM File Exporting Finished.") | 
					
						
							| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  |         return {'FINISHED'} | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2025-01-08 20:20:10 +08:00
										 |  |  |         self.draw_export_params(context, layout.box()) | 
					
						
							| 
									
										
										
										
											2023-10-18 21:23:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | def register() -> None: | 
					
						
							|  |  |  |     bpy.utils.register_class(BBP_OT_export_bmfile) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def unregister() -> None: | 
					
						
							|  |  |  |     bpy.utils.unregister_class(BBP_OT_export_bmfile) |