fix: fix previous commit remained issues.

- vt encodings in list showcase now works.
- modify some usage of message_box to Operator.report to make it more like blender suggested.
This commit is contained in:
2025-01-08 20:20:10 +08:00
parent 0862ecd269
commit 77315ffbea
8 changed files with 127 additions and 121 deletions

View File

@ -19,13 +19,10 @@ class BBP_OT_rail_uv(bpy.types.Operator):
def execute(self, context):
# check material
mtl: bpy.types.Material = PROP_ptrprop_resolver.PtrPropResolver.get_rail_uv_material()
ptrprops = PROP_ptrprop_resolver.PropsVisitor(context.scene)
mtl: bpy.types.Material = ptrprops.get_rail_uv_material()
if mtl is None:
UTIL_functions.message_box(
("No specific material", ),
"Lost Parameter",
UTIL_icons_manager.BlenderPresetIcons.Error.value
)
self.report({'ERROR'}, "Specified material is empty.")
return {'CANCELLED'}
# apply rail uv
@ -34,7 +31,8 @@ class BBP_OT_rail_uv(bpy.types.Operator):
def draw(self, context):
layout: bpy.types.UILayout = self.layout
PROP_ptrprop_resolver.PtrPropResolver.draw_rail_uv_material(layout)
ptrprops = PROP_ptrprop_resolver.PropsVisitor(context.scene)
ptrprops.draw_rail_uv_material(layout)
#region Real Worker Functions