- Move sys_info into an internal module to avoid having so many top level modules for Blender's internal functionality. - Rename system_info sub-modules that pre-fill URL's for clarity. - Move top-level exception handling into the operator. - Report an error if an unexpected exception occurs. - Use `Exception` instead of `BaseException` as there is no reason to catch the additional exceptions. - Remove use of sys_info from the command line example, replace with in-lined system info.
17 lines
586 B
Bash
Executable File
17 lines
586 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Directory to this SH file.
|
|
BASE_DIR=$(dirname "$0")
|
|
|
|
PYTHON_BIN="$BASE_DIR/@BLENDER_VERSION@/python/bin/@PYTHON_EXECUTABLE_NAME_ONLY@"
|
|
SYSTEM_INFO_STARTUP_PY="$BASE_DIR/@BLENDER_VERSION@/scripts/modules/_bpy_internal/system_info/url_prefill_startup.py"
|
|
if test -f "$PYTHON_BIN"; then
|
|
exec "$PYTHON_BIN" -I "$SYSTEM_INFO_STARTUP_PY"
|
|
fi
|
|
|
|
echo "ERROR: Failed to find Python executable at: $PYTHON_BIN"
|
|
echo "Possible causes include:"
|
|
echo "- Your Blender installation is corrupt or missing python."
|
|
echo "- The location or name of the python executable has changed."
|
|
exit 1
|