chore:模型调整

This commit is contained in:
2026-07-21 14:44:44 +08:00
parent 269615a7fa
commit b283097c03
836 changed files with 483661 additions and 42749 deletions
+25
View File
@@ -0,0 +1,25 @@
param(
[string]$Source,
[string]$Destination,
[switch]$Overwrite
)
$Blender = "E:\Program Files\Blender Foundation\Blender 5.2\blender.exe"
$Script = Join-Path $PSScriptRoot "convert_glb_to_fbx.py"
if ([string]::IsNullOrWhiteSpace($Source)) {
$AssetRoot = Join-Path (Split-Path $PSScriptRoot -Parent) "docs\asset"
$Source = Get-ChildItem -LiteralPath $AssetRoot -Directory |
Where-Object { @(Get-ChildItem -LiteralPath $_.FullName -Recurse -File -Filter "*.glb").Count -gt 0 } |
Select-Object -First 1 -ExpandProperty FullName
}
if ([string]::IsNullOrWhiteSpace($Destination)) { $Destination = "$Source`_fbx" }
if (-not (Test-Path -LiteralPath $Blender)) { throw "Blender was not found: $Blender" }
if (-not (Test-Path -LiteralPath $Source)) { throw "Source folder was not found: $Source" }
$Arguments = @("--background", "--python", $Script, "--", "--source", $Source, "--destination", $Destination)
if ($Overwrite) { $Arguments += "--overwrite" }
& $Blender @Arguments
exit $LASTEXITCODE