feat: add translation context for operators and their properties.

- add translation context for operator, menu, panel and etc. and their associated properties.
- improve some name and description but not finished.
- move reset BME material function inside BMEMaterialsHelper.
- rename variable of collection visitor in BME adder operator for clear meaning.
- replace some message box to report in ballance elements reset operator, BME materials reset operator and rail UV operator
This commit is contained in:
2025-01-11 21:36:11 +08:00
parent 1d7ac76d0e
commit 4ffe29654b
27 changed files with 444 additions and 206 deletions

View File

@ -7,6 +7,7 @@ class BBP_OT_regulate_objects_name(bpy.types.Operator):
bl_idname = "bbp.regulate_objects_name"
bl_label = "Regulate Objects Name"
bl_options = {'UNDO'}
bl_translation_context = 'BBP_OT_regulate_objects_name'
def invoke(self, context, event):
wm = context.window_manager
@ -24,6 +25,7 @@ class BBP_OT_auto_grouping(bpy.types.Operator):
bl_idname = "bbp.auto_grouping"
bl_label = "Auto Grouping"
bl_options = {'UNDO'}
bl_translation_context = 'BBP_OT_auto_grouping'
def invoke(self, context, event):
wm = context.window_manager
@ -41,6 +43,7 @@ class BBP_OT_convert_to_imengyu(bpy.types.Operator):
bl_idname = "bbp.convert_to_imengyu"
bl_label = "Convert to Imengyu"
bl_options = {'UNDO'}
bl_translation_context = 'BBP_OT_convert_to_imengyu'
def invoke(self, context, event):
wm = context.window_manager