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

@ -22,7 +22,8 @@ class BBP_PG_ballance_map_info(bpy.types.PropertyGroup):
default = 1,
max = 999, min = 1,
soft_max = 8, soft_min = 1,
step = 1
step = 1,
translation_context = 'BBP_PG_ballance_map_info/property'
) # type: ignore
def get_ballance_map_info(scene: bpy.types.Scene) -> BBP_PG_ballance_map_info:
@ -51,6 +52,7 @@ class BBP_PT_ballance_map_info(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"
bl_translation_context = 'BBP_PT_ballance_map_info'
@classmethod
def poll(cls, context):