UI周りの改善

This commit is contained in:
2026-02-19 12:55:30 +09:00
parent a3de61d5ce
commit d67265aa39
3 changed files with 197 additions and 115 deletions
+33 -18
View File
@@ -216,7 +216,7 @@ class SEQUENCER_PT_face_mask(Panel):
has_mask = bpy.path.abspath(detections_path) and os.path.exists(
bpy.path.abspath(detections_path)
)
if not has_mask:
box.label(text="Generate detection cache first", icon='INFO')
return
@@ -227,24 +227,39 @@ class SEQUENCER_PT_face_mask(Panel):
col.prop(context.scene, "facemask_bake_display_scale")
col.prop(context.scene, "facemask_bake_format")
# Source status
source_mode = strip.get("facemask_source_mode", "original")
if source_mode == "baked":
box.label(text="Source: Baked", icon='CHECKMARK')
else:
box.label(text="Source: Original", icon='FILE_MOVIE')
box.separator()
# Bake and restore buttons
box.operator(
"sequencer.bake_and_swap_blur_source",
text="Bake & Swap Source",
icon='RENDER_STILL',
)
box.operator(
"sequencer.restore_original_source",
text="Restore Original Source",
icon='LOOP_BACK',
)
baked_path = strip.get("facemask_baked_filepath", "")
has_baked = bool(baked_path and os.path.exists(bpy.path.abspath(baked_path)))
source_mode = strip.get("facemask_source_mode", "original")
if not has_baked:
# 初回: Bakeのみ
box.operator(
"sequencer.bake_and_swap_blur_source",
text="Bake",
icon='RENDER_STILL',
)
else:
# Bake済み: ソース切り替え + Re-bake
row = box.row(align=True)
if source_mode == "baked":
row.operator(
"sequencer.restore_original_source",
text="Restore Original",
icon='LOOP_BACK',
)
else:
row.operator(
"sequencer.swap_to_baked_blur",
text="Swap to Baked",
icon='PLAY',
)
row.operator(
"sequencer.force_rebake_blur",
text="Re-bake",
icon='FILE_REFRESH',
)
# Registration