refactor EnumPropHelper to improve BME again.

This commit is contained in:
2023-12-16 22:27:31 +08:00
parent 94872957fd
commit 77b15a8797
8 changed files with 137 additions and 70 deletions

View File

@ -521,6 +521,8 @@ def preset_virtools_material(mtl: bpy.types.Material, preset_type: MaterialPrese
# create preset enum blender helper
_g_Helper_MtlPreset: UTIL_functions.EnumPropHelper = UTIL_functions.EnumPropHelper(
MaterialPresetType,
lambda x: str(x.value),
lambda x: MaterialPresetType(int(x)),
lambda x: x.name,
lambda _: '',
lambda _: ''