Clean actor runtime baseline after motion fix
Some checks failed
ci / headless-e2e (push) Has been cancelled
runtime-self-hosted / runtime-ci (push) Has been cancelled

This commit is contained in:
server
2026-04-14 19:22:49 +02:00
parent 15c10c9a6f
commit 65a8e243d3
4 changed files with 32 additions and 21 deletions

View File

@@ -15,6 +15,7 @@ BASE_MODEL_RE = re.compile(r'^BaseModelFileName\s+"([^"]+)"', re.IGNORECASE)
EFFECT_SCRIPT_RE = re.compile(r'^EffectScriptName\s+"([^"]+)"', re.IGNORECASE)
DEFAULT_HIT_EFFECT_RE = re.compile(r'^DefaultHitEffectFileName\s+"([^"]*)"', re.IGNORECASE)
DEFAULT_HIT_SOUND_RE = re.compile(r'^DefaultHitSoundFileName\s+"([^"]*)"', re.IGNORECASE)
MOTION_FILE_RE = re.compile(r'^MotionFileName\s+"([^"]+)"', re.IGNORECASE)
@dataclass
@@ -110,6 +111,15 @@ def parse_motlist(path: Path) -> list[str]:
return motions
def parse_msa_motion_file(path: Path) -> str | None:
for raw_line in path.read_text(encoding="utf-8", errors="ignore").splitlines():
line = raw_line.strip()
match = MOTION_FILE_RE.match(line)
if match:
return match.group(1)
return None
def parse_msm_references(path: Path) -> tuple[str | None, list[str], list[str], list[str]]:
base_model: str | None = None
effect_scripts: list[str] = []
@@ -146,6 +156,13 @@ def validate_actor_dir(pack: str, pack_dir: Path, actor_dir: Path, asset_index:
if not msa_path.is_file():
missing_msa.append(motion)
continue
motion_file = parse_msa_motion_file(msa_path)
if motion_file:
resolved_motion = normalize_virtual_path(motion_file)
if resolved_motion not in asset_index:
missing_gr2_for_motions.append(resolved_motion)
continue
gr2_name = Path(motion).with_suffix(".gr2").name
if not (actor_dir / gr2_name).is_file():
missing_gr2_for_motions.append(gr2_name)
@@ -234,7 +251,8 @@ def main() -> int:
failures.append(message)
issue_map[issue_id] = message
for gr2_name in check.missing_gr2_for_motions:
issue_id = f"actor:paired_model:{check.actor_dir}:{gr2_name.lower()}"
normalized_gr2 = normalize_virtual_path(gr2_name)
issue_id = f"actor:paired_model:{check.actor_dir}:{normalized_gr2}"
message = f"{check.actor_dir}: missing paired model {gr2_name}"
failures.append(message)
issue_map[issue_id] = message