diff options
Diffstat (limited to 'src/SomhairlesDream.Modeling/BlenderBridge.fs')
| -rw-r--r-- | src/SomhairlesDream.Modeling/BlenderBridge.fs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/SomhairlesDream.Modeling/BlenderBridge.fs b/src/SomhairlesDream.Modeling/BlenderBridge.fs index c0795e9..c4215ae 100644 --- a/src/SomhairlesDream.Modeling/BlenderBridge.fs +++ b/src/SomhairlesDream.Modeling/BlenderBridge.fs @@ -101,8 +101,13 @@ type BlenderProcessBridge(python: string, stageRoot: string, ?timeout: TimeSpan) File.WriteAllText(path, content) - member private _.StartInfo(request: BridgeRequest) = - let scriptPath = Path.GetFullPath(Path.Combine(stageRoot, "blender", "fixture.py")) + member private _.ScriptPath(stepId: string) = + let scriptName = if stepId.StartsWith("probe-") then "probe.py" else "fixture.py" + + Path.GetFullPath(Path.Combine(stageRoot, "blender", scriptName)) + + member private this.StartInfo(request: BridgeRequest) = + let scriptPath = this.ScriptPath(request.Step.StepId) let info = ProcessStartInfo() info.FileName <- python info.UseShellExecute <- false @@ -128,10 +133,10 @@ type BlenderProcessBridge(python: string, stageRoot: string, ?timeout: TimeSpan) interface IArtifactBridge with member this.Export(request, heartbeat) = try - let scriptPath = Path.GetFullPath(Path.Combine(stageRoot, "blender", "fixture.py")) + let scriptPath = this.ScriptPath(request.Step.StepId) if not (File.Exists(scriptPath)) then - Error(bridgeError $"fixture is missing: {scriptPath}") + Error(bridgeError $"blender script is missing: {scriptPath}") else match Path.GetDirectoryName(request.GlbPath) with | null -> () |
