This patch adds a placeholder for the vulkan backend.
When activated (`WITH_VULKAN_BACKEND=On` and `--gpu-backend vulkan`)
it might open a blender screen, but nothing should be visible as
none of the functions are implemented or otherwise crash on a nullptr.
This is expected as this is just a placeholder. The goal is to add shader compilation
+validation to this backend as one of the next steps so we can validate
changes to existing shaders on OpenGL, Metal and Vulkan at the same time.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D16338
Add command line argument to switch gpu backend. Add `--gpu-backend` option to
override the gpu backend selected by Blender.
Values for this option that will be available in releases for now are:
* opengl: Force blender to select OpenGL backend.
During development and depending on compile options additional values can exist:
* metal: Force Blender to select Metal backend.
When this option isn't provided the internal logic for GPU backend selection will be used.
Note that this is at the time of writing the same as always selecting the opengl backend.
Reviewed By: fclem, brecht, MichaelPW
Differential Revision: https://developer.blender.org/D16297
Even though individual USER/SYSTEM paths could be set using environment variables,
it wasn't possible to override the USER or SYSTEM paths.
This meant the result of `bpy.utils.resource_path('USER')` &
`bpy.utils.resource_path('SYSTEM')` could still be used by scripts,
making the Blender session potentially the default USER directory
(even when `BLENDER_USER_CONFIG`, `BLENDER_USER_SCRIPTS` &
`BLENDER_USER_DATAFILES` all point elsewhere).
Resolve by adding environment variables:
- BLENDER_USER_RESOURCES
- BLENDER_SYSTEM_RESOURCES
These will be used for `bpy.utils.resource_path('USER')` &
`bpy.utils.resource_path('SYSTEM')`, as well as a basis for user &
system directories, unless those environment variables are
set (`BLENDER_USER_*` or `BLENDER_SYSTEM_*`).
Resolves issue raised by T101389.
Example usage & output:
{P3225}
Reviewed By: brecht
Ref D16111
In heavy scenes containing many hairs/curves and volumetrics
using SSBO can overwrite the binding information of the volumetric
resolve shader. This has been detected during project Heist and is
only reproducable on NVIDIA platform.
This patch adds an debug option to disable SSBOs from the command
line to replace the --debug-gpu-force-workarounds that has been
used as a workaround on the render farm. Reason is that
force workarounds will also add other limitations as well (number
of texture binds for example)
Also fixes missing code to read/write/free/copy color management settings
in various places. This can't be set through the UI currently, but still
should be handled consistently.
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
In almost all cases there is no difference between `G.relbase_valid`
and checking `G.main->filepath` isn't an empty string.
In many places a non-empty string is already being used instead of
`G.relbase_valid`.
The only situation where this was needed was when saving from
`wm_file_write` where they temporarily became out of sync.
This has been replaced by adding a new member to `BlendFileWriteParams`
to account for saving an unsaved file for the first time.
Reviewed By: brecht
Ref D13564
The difference between G.save_over and G.relbase_valid was minor.
There is one change in functionality. When saving the default-startup
file from an already loaded blend file - future save actions will
continue to write to the originally loaded file instead of prompting
the user to select a location to save the file.
This change makes saving the startup file behave the same way
"Save a Copy" does.
Reviewed By: brecht
Ref D13556
Use "filepath" which is the current convention for naming full paths.
- Main use "name" which isn't obviously a file path.
- BlendFileData & FileGlobal used "filename" which is often
used for the name component of a path (without the directory).
Suppressing the splash was only done when passing in an argument from
the command line.
Remove G.file_loaded, as it is misleading, only set once on startup,
replace with G.relbase_valid which is used everywhere else to check
if the file path should be used.
Changed doc string for Blender `--addons` command line argument
to explain what it does rather than just describing what it expects.
Reviewed By: Blendify
Ref D12445
This patch allows Windows users to specify that their current blender
installation should be used to create thumbnails and be associated
with ".blend" files. This is done from Preferences / System. The only
way to do this currently is from the command-line and this is sometimes
inconvenient.
Differential Revision: https://developer.blender.org/D10887
Reviewed by Brecht Van Lommel
When using non-default system separator in filename path, code would end up
with an absolute path mixing regular and alternative separator,
confusing the rest of the path manipulations later on.
So this commit add proper replacements of alternative separators, and
path normalization.
Partial fix for T81751 which exposes multiple playback performance
issues. Previously the cache was limited to 30 frames, without a way to
increase the cache for smooth playback with files that are slow to load.
Now the animation plays back smoothly once loaded into cache.
The cache limit from the system preference is used
when the player is launched from Blender.
A new player argument `-c <cache_limit>` was added to support this.
Add a CLI argument `--open-last` that opens the most recent file,
effectively doing the same as {key Ctrl Shift O}, {key Enter} after
starting Blender.
When there are no known recent files, print a warning and do nothing,
showing the startup file instead.
Note that this does not try to be smart about restoring the last Blender
session. It just opens the file from disk, as if the user had typed
`blender $(head -n1 ~/.config/blender/2.93/config/recent-files.txt)`.
There is also no smartness when that file cannot be opened; it behaves
exactly the same as typing the most recent filename on the CLI.
Reviewed by: mont29, campbellbarton
Differential Revision: https://developer.blender.org/D10563
Removes two unused --debug-gpu command line flags (unused as in, does nothing):
* `--debug-gpumem`: Unused since c08d84748804, the info is now available in
the status-bar if enabled in the Preferences. Initially added in
fec317de8d57.
* `--debug-gpu-shaders`: Unused since 216d78687d2b, double checked with
Clément, he says it's not that useful nowadays. Initially added in
fec317de8d57.
Addresses T83954 and T83953.
Differential Revision: https://developer.blender.org/D10244
Reviewed by: Clément Foucault
Approximately 138 changes in the spelling of compound words
and proper names like "Light Probe", "Shrink/Fatten", "Face Map".
In many cases, hyphens were used where they aren't correct, like
"re-fit". Other common changes include:
- "Datablock" -> "data-block"
- "Floating point" -> "floating-point"
- "Ngons" -> "n-gons"
These changes help give the language used in the interface
a consistent, more professional feel.
Differential Revision: https://developer.blender.org/D9923
This was added when Linux's audio support
often needed to be manually configured.
Further 3rd party libraries have their own environment variables & docs
these need not be part of Blender's help message unless they're likely
to be needed to properly run Blender.