feat: 中間データのmsgpack移行
This commit is contained in:
+19
-13
@@ -5,12 +5,18 @@ Provides a sidebar panel in the Video Sequence Editor
|
||||
for controlling mask generation and blur application.
|
||||
"""
|
||||
|
||||
import os
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
|
||||
from ..core.async_bake_generator import get_bake_generator
|
||||
from ..core.async_generator import get_generator
|
||||
from ..core.utils import get_server_status, get_cache_info, format_size
|
||||
from ..core.utils import (
|
||||
get_server_status,
|
||||
get_cache_info,
|
||||
format_size,
|
||||
get_detections_path_for_strip,
|
||||
)
|
||||
|
||||
|
||||
class SEQUENCER_PT_face_mask(Panel):
|
||||
@@ -186,19 +192,19 @@ class SEQUENCER_PT_face_mask(Panel):
|
||||
row = box.row()
|
||||
row.label(text=f"Strip: {strip.name}")
|
||||
|
||||
# Check for existing mask
|
||||
seq_editor = context.scene.sequence_editor
|
||||
mask_name = f"{strip.name}_mask"
|
||||
has_mask = mask_name in seq_editor.strips
|
||||
detections_path = get_detections_path_for_strip(strip.name)
|
||||
has_mask = bpy.path.abspath(detections_path) and os.path.exists(
|
||||
bpy.path.abspath(detections_path)
|
||||
)
|
||||
|
||||
if has_mask:
|
||||
row = box.row()
|
||||
row.label(text="✓ Mask exists", icon='CHECKMARK')
|
||||
row.label(text="✓ Detection cache exists", icon='CHECKMARK')
|
||||
|
||||
# Generate button
|
||||
op = box.operator(
|
||||
"sequencer.generate_face_mask",
|
||||
text="Generate Face Mask" if not has_mask else "Regenerate Mask",
|
||||
text="Generate Detection Cache" if not has_mask else "Regenerate Cache",
|
||||
icon='FACE_MAPS',
|
||||
)
|
||||
|
||||
@@ -206,14 +212,14 @@ class SEQUENCER_PT_face_mask(Panel):
|
||||
"""Draw blur application controls."""
|
||||
box = layout.box()
|
||||
box.label(text="Blur Bake", icon='MATFLUID')
|
||||
|
||||
# Check for mask strip
|
||||
seq_editor = context.scene.sequence_editor
|
||||
mask_name = f"{strip.name}_mask"
|
||||
has_mask = mask_name in seq_editor.strips
|
||||
|
||||
detections_path = get_detections_path_for_strip(strip.name)
|
||||
has_mask = bpy.path.abspath(detections_path) and os.path.exists(
|
||||
bpy.path.abspath(detections_path)
|
||||
)
|
||||
|
||||
if not has_mask:
|
||||
box.label(text="Generate a mask first", icon='INFO')
|
||||
box.label(text="Generate detection cache first", icon='INFO')
|
||||
return
|
||||
|
||||
# Bake parameters
|
||||
|
||||
Reference in New Issue
Block a user