Page 1 of 1
Pre task command
Posted: Wed Aug 28, 2019 8:13 am
by belegdae
Hello!
I'm writing a custom submission script for Meshroom, but due to a bug in incrimnetalSFM, it can't execute from windows UNC paths, so needs a windows drive letter mapping.
Is it possible to assign pre-task commands for each render to run before executing a task? I know that pre-commands can be used on blocks, but these run on the server.
Thank you!
Rich
Re: Pre task command
Posted: Wed Aug 28, 2019 8:23 am
by belegdae
As a side note:
I've looked into command concatonation, using & and && to join the commands together, but this seems unreliable once submitted.
If i take the following string:
Code: Select all
call \\server.com\live\_PLUGINS\_TOOLS\_HELPERSCRIPTS\pushDrive.py r: \\server.com\renderfarm\rjh1\MeshroomTrial_003 & if NOT exist r:\01_CameraInit mkdir r:\01_CameraInit & C:\_PLUGINS\_TOOLS\MESHROOM\2019.2.0\AliceVision\Bin\aliceVision_cameraInit.exe --imageFolder "r:\00_SourceImages" --sensorDatabase "C:\_PLUGINS\_TOOLS\MESHROOM\2019.2.0\aliceVision\share\aliceVision\cameraSensors.db" --defaultFieldOfView 45.0 --groupCameraFallback folder --verboseLevel info --allowSingleView 1 --output "r:\01_CameraInit\cameraInit.sfm" & call \\server.com\live\_PLUGINS\_TOOLS\_HELPERSCRIPTS\popDrive.py r:
This is the output from the command varibale fed into
If ran directly on a machine in the shell, it runs as expected, but through afanasy, it seems the strings are mangled (from double \\ I believe)
Re: Pre task command
Posted: Wed Aug 28, 2019 10:39 am
by timurhai
Hi.
You want afrender to run something before each task start?
If so, you can use command wrapper - make afrender to run some custom script, that run your pre-command, then, task main command.
But if you want to ensure that some drive is mapped, i think that you can make some script to afrender, that will map drive(s), than start afrender.
- we (me) did so some time, when we were using MS Windows for some rendering.
ps
Better to use Linux for rendering, even if you use (and need) MS Windows workstations.
Re: Pre task command
Posted: Wed Aug 28, 2019 11:50 am
by belegdae
Brilliant idea, I have it working now, thank you!
Sadly I don't have control over the operating systems we use for workstations/rendering, it's a large university with plenty of bureaucracy!
I appreciate the help as always!
Rich
Re: Pre task command
Posted: Wed Aug 28, 2019 2:17 pm
by belegdae
It's working! Distributed Meshroom!
Cheers Tim!
Re: Pre task command
Posted: Wed Aug 28, 2019 2:25 pm
by timurhai
Great!