diff --git a/bin/paraFoam b/bin/paraFoam index cc97a4a9e..cfd483da9 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -61,19 +61,10 @@ error() { } pvExec () { - paraview "$@" 2> /dev/null && return 0 + _opt="" + [ "$ParaView_GL" = mesa ] && _opt="--mesa" - pvFallback - paraview --mesa "$@" -} - -pvFallback () { - cat < 0 ) @@ -127,6 +129,7 @@ if ( -r $ParaView_DIR || -r $paraviewInstDir ) then setenv PYTHONPATH ${paraviewPython}:$ParaView_LIB_DIR endif endif + if ("$ParaView_GL" == mesa) alias paraview 'paraview --mesa' else unsetenv PV_PLUGIN_PATH endif diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index 8b5292b58..02fd41c40 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -69,6 +69,8 @@ export ParaView_VERSION=5.4.0 #export ParaView_VERSION=5.5.0 export ParaView_MAJOR=detect +#export ParaView_GL=system +export ParaView_GL=mesa # Evaluate command-line parameters for ParaView _foamParaviewEval() @@ -144,6 +146,8 @@ then export PYTHONPATH=$paraviewPython:$ParaView_LIB_DIR fi fi + + [ "$ParaView_GL" = mesa ] && alias paraview="paraview --mesa" else unset PV_PLUGIN_PATH fi