Skip to content

Instantly share code, notes, and snippets.

@simogasp
Last active June 20, 2019 12:00
Show Gist options
  • Save simogasp/da63569624b50b0c8ffe2283f58c2636 to your computer and use it in GitHub Desktop.
Save simogasp/da63569624b50b0c8ffe2283f58c2636 to your computer and use it in GitHub Desktop.
example of bash for calling a generic meshroom script (ui or batch CLI)
#!/usr/bin/env bash
export QML2_IMPORT_PATH=/home/alcov/dev/alicevision/qmlAlembic/build/install/qml:$QML2_IMPORT_PATH
export ALICEVISION_INSTALL=/home/alcov/dev/alicevision/AliceVision/build/install
export ALICEVISION_SENSOR_DB=${ALICEVISION_INSTALL}/share/aliceVision/cameraSensors.db
export LD_LIBRARY_PATH=/home/alcov/dev/common/lib:/usr/lib/nvidia-384:/usr/local/cuda-8.0/lib64/:$LD_LIBRARY_PATH
export MESHROOMPATH=/home/alcov/dev/alicevision/meshroom
PYTHONPATH=${MESHROOMPATH} PATH=$PATH:${ALICEVISION_INSTALL}/bin python ${MESHROOMPATH}/$@
# PYTHONPATH=${MESHROOMPATH} PATH=$PATH:/home/alcov/dev/alicevision/AliceVision/cmake-build-release/Linux-x86_64/ python ${MESHROOMPATH}/$@
------------------------------------------------
Then you can have a `meshroom_ui.sh` like this
```
#!/usr/bin/env bash
DIR=$(dirname "$0")
${DIR}/meshroom.sh meshroom/ui $@
```
to be called from CLI eg like
```
meshroom_ui.sh
```
to load the UI, or
```
meshroom_ui.sh --project /path/to/your/project.mg
```
if you want to load a project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment