Use factory startup when detecting blender version
This commit is contained in:
6
run.sh
6
run.sh
@@ -133,14 +133,14 @@ CONFIGURE_SCRIPT="${SCRIPTPATH}/benchmark/configure.py"
|
|||||||
if [ ! -f "${BLENDER_BIN}" ]; then
|
if [ ! -f "${BLENDER_BIN}" ]; then
|
||||||
FATAL_ERROR "Unable to find Blender executable."
|
FATAL_ERROR "Unable to find Blender executable."
|
||||||
fi
|
fi
|
||||||
BLENDER_VERSION=`${BLENDER_BIN} --version |
|
BLENDER_VERSION=`${BLENDER_BIN} --factory-startup --version 2>/dev/null |
|
||||||
head -n 1 | sed -r 's/Blender ([0-9]\.[0-9]{2}).*/\1/'`
|
head -n 1 | sed -r 's/Blender ([0-9]\.[0-9]{2}).*/\1/'`
|
||||||
PRINT_INFO "Detected Blender version: ${White}${BLENDER_VERSION}${Normal}"
|
PRINT_INFO "Detected Blender version: ${White}${BLENDER_VERSION}${Normal}"
|
||||||
|
|
||||||
# Detect Python version used by Blender.
|
# Detect Python version used by Blender.
|
||||||
PYTHON_VERSION=`${BLENDER_BIN} -b --python-expr \
|
PYTHON_VERSION=`${BLENDER_BIN} --factory-startup -b --python-expr \
|
||||||
'import platform; print("Python Version: {}" . \
|
'import platform; print("Python Version: {}" . \
|
||||||
format(platform.python_version()))' |
|
format(platform.python_version()))' 2>/dev/null |
|
||||||
grep "Python Version" |
|
grep "Python Version" |
|
||||||
sed -r 's/.*\s([0-9]+)\.([0-9]+).*/\1.\2/'`
|
sed -r 's/.*\s([0-9]+)\.([0-9]+).*/\1.\2/'`
|
||||||
PRINT_INFO "Detected Python version: ${White}${PYTHON_VERSION}${Normal}"
|
PRINT_INFO "Detected Python version: ${White}${PYTHON_VERSION}${Normal}"
|
||||||
|
Reference in New Issue
Block a user