Command line overrides now define the default "Trusted Source"
for drop and the file-selector.
This is done so the default matches the behavior of opening
files in contexts where the option to trust source isn't shown.
"Recover Last Session" run without setting "use_scripts"
(from Python for e.g.) now disables auto-execution
unless a command line override is passed in,
as the path being recovered isn't known until the file is read.
This includes a refactor & tests.
Details:
- `bpy.path.is_autoexec(..., skip_overrides=False)`:
Can be used to check if the current environment would trust a file.
- Expose: `bpy.app.autoexec_override`,
set when `--enable-autoexec` & `--disable-autoexec` are passed in.
- `BKE_autoexec_default_trust_source`:
new function to more conveniently access the default trust for a file.
- Show when "Auto Run Python Scripts" preference is overridden.
- Add tests for the file selector, dropping & the command line.
Ref !163894
Callers had to split the directory from a blend-file path before checking
it against the excluded paths. Add "canonicalize" & "strip_filename" to
BKE_autoexec_match & bpy.path.is_autoexec so this is done in one place.
Depending on the source of the filepath, we can't rely on it
being normalized, so canonicalize should be used when the path
comes from external sources such as command line arguments
or dropped paths.
Ref !163715
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.
While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.
Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.
Some directories in `./intern/` have also been excluded:
- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.
An "AUTHORS" file has been added, using the chromium projects authors
file as a template.
Design task: #110784
Ref !110783.
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069