Commit Graph

1980 Commits

Author SHA1 Message Date
Hans Goudey 8b514bccd1 Cleanup: Move remaining GPU headers to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/119807
2024-03-23 01:24:18 +01:00
Campbell Barton 44defbd2c7 Extensions: add BLENDER_USER_EXTENSIONS user directory
Replace: `{BLENDER_RESOURCE_PATH_USER}/extensions`
With:    `{BLENDER_USER_EXTENSIONS}`

This follows BLENDER_USER_CONFIG & BLENDER_USER_SCRIPTS conventions.
Reading the environment variable and accessible via
`bpy.utils.user_resource('SCRIPTS')`
2024-03-22 16:08:25 +11:00
Campbell Barton 57dd9c21d3 Cleanup: spelling in comments 2024-03-21 10:02:53 +11:00
Campbell Barton 116264c310 Cleanup: use full scentences for code-comments & minor corrections 2024-03-21 09:49:19 +11:00
Campbell Barton 8ac9b4ca46 Cleanup: use full sentences for code-comments
Also correct references source files.
2024-03-19 13:57:00 +11:00
Campbell Barton 076b2ecf70 Fix debug argument detection reading arguments after `--command` 2024-03-19 13:49:25 +11:00
Campbell Barton eabff7334d Merge branch 'blender-v4.1-release' 2024-03-08 20:58:33 +11:00
Campbell Barton 738c1b6ca9 Docs: correct typo & terms in --help text 2024-03-08 20:57:56 +11:00
Campbell Barton 8cbb57ee0a CLI: suppress noisy prints when running commands
Messages such as "Blender quit" get in the way of custom commands,
add G.quiet to suppress noisy "info" prints.
2024-03-08 13:27:29 +11:00
Campbell Barton ba3c9e1661 Cleanup: de-duplicate logic for setting background mode 2024-03-08 12:57:34 +11:00
Campbell Barton 9372e0dfe0 CLI: support defining custom commands via C++ & Python API
Add support for add-ons to define commands using the new argument
`-c` or `--command`.

Commands behave as follows:

- Passing in a command enables background mode without the need to pass
  in `--background`.
- All arguments following the command are passed to the command
  (without the need to use the `--` argument).
- Add-ons can define their own commands via
  `bpy.utils.register_cli_command` (see examples in API docs).
- Passing in `--command help` lists all available commands.

Ref !119115
2024-03-08 11:10:13 +11:00
Campbell Barton 6549019ae1 Cleanup: use STREQUAL instead of MATCHES for exact comparisons
MATCHES takes a REGEX and searches the input for a match,
this isn't necessary for CMAKE_SYSTEM_PROCESSOR & CMAKE_*_COMPILER_ID.
2024-03-07 17:56:41 +11:00
Anthony Roberts 445fd42c61 Windows: Add ARM64 support
* Only works on machines with a Qualcomm Snapdragon 8cx Gen3 or above.
  Older generation devices are not and will not be supported due to
  some driver issues
* Requires VS2022 for building.
* Uses new MSVC preprocessor for sse2neon compatibility.
* SIMD is not enabled, waiting on conversion of blenlib to C++.

Ref #119126

Pull Request: https://projects.blender.org/blender/blender/pulls/117036
2024-03-06 16:14:34 +01:00
Campbell Barton 5fdd684550 Merge branch 'blender-v4.1-release' 2024-03-05 10:20:52 +11:00
Campbell Barton 8842982dbd Docs: note the temporary directory will be ignored unless it exists
Other minor changes:

- Remove reference to `TMP` environment variable in the `--help` text
  as this isn't a posix standard and is noted as something that may be
  removed in the future.
- Show WIN32 `TEMP` when showing all help text so it will be included
  in the user manual.
2024-03-05 10:19:16 +11:00
Campbell Barton ca8dc11a85 Merge branch 'blender-v4.1-release' 2024-03-01 16:25:29 +11:00
Campbell Barton 65f5e8b775 Cleanup: undefined defined variable warnings with CMake 2024-03-01 16:22:06 +11:00
Jacques Lucke e90f5d03c4 Core: remove support for writing crash.blend file
This was a debug feature for developers that allowed writing the last MemFile
undo step as a .blend file when Blender crashed. This was rarely/never used
nowadays and is now removed.

This is in preparation for #106903 which removes support for writing `MemFile`
undo steps as .blend files.
2024-02-29 17:04:44 +01:00
Ray Molenkamp cfb60c98be CMake: MSVC: Add natvis file for blender's native types
This currently contains some types I personally needed
more types can be added if people desire them.

Due to the .natvis being added to creator, Visual Studio
will automatically pick up on these types and show the
improved visualizers while debugging.

vscode can also use this file, but you'll have to check
its documentation on how to set that up.

Pull Request: https://projects.blender.org/blender/blender/pulls/118576
2024-02-27 01:02:42 +01:00
Sergey Sharybin 396348eea9 Merge branch 'blender-v4.1-release' 2024-02-22 13:51:48 +01:00
Sergey Sharybin 3dc832a904 Switch SVN to Git submodules using Git-LFS
This change makes it so build system and update utilities for Blender builds
are using pre-compiled libraries and other resources attached as Git modules
instead of using checkout of SVN repositories in the parent folder.

The directory layout:
```
  * release/datafiles/
    * assets/        -> blender-assets.git
      * publish/
      * ...
      * README.txt
  * lib/
    * darwin_x64/    -> lib-darwin_x64.git
    * darwin_arm64/  -> lib-darwin_arm64.git
    * linux_x64/     -> lib-linux_x64.git
    * windows_x64/   -> lib-windows_x64.git
  * tests/
    * data/         -> blender-test-data.git
```

The changes about configuring the actual Git sub-modules are not included
into this patch, as those require repository to actually exist before it
can be used.

The assets submodule is enabled by default, and the rest of them are
disabled. This means that if someone runs `git submodule update --init`
they will not get heavy libraries. The platform-specific and tests
related submodules are enabled when using `make update` or `make test`.

All the submodules are tracked: this means that when new commits are
done to the submodule, the blender.git repository is to be updated to
point them to the new hash. This causes some extra manual work, but it
allows to more easily update Blender and its dependencies to known good
state when performing operations like bisect.

Ref #108978

Pull Request: https://projects.blender.org/blender/blender/pulls/117946
2024-02-22 13:50:55 +01:00
Campbell Barton b6b00b61cb Cleanup: various non-functional changes for C++ 2024-02-21 10:33:56 +11:00
Ray Molenkamp 0326b29899 Creator: Add CPU check on startup
This adds an sse42 cpu check on startup for both linux and windows,
mac has been excluded, since there are no intel based macs that do
not support SSE42.

The way this works is, we count on the OS to initialize the shared
libraries in the order they are linked (which currently holds true)
before calling the initialization code in the main executable. This
allows us to check the CPU before running any of the code in the main
executable that might not be supported by the current isa.

Changing those build flags is for a future PR, but for now and for
future reference: blender_cpu_check must be build without optimized CPU
flags so it'll be able to run on older CPUs.

some code has been duplicated from blenlib, there's really no way around
that since we cannot link blenlib as it may be build with optimized cpu
flags.

Windows currently gives a popup to inform the user, while linux reports
to the console, there may be better ways to communicate with linux users
with perhaps some generic GUI popup, but I'm unaware of these and will
leave this for the linux platform maintainer to polish.

Part of #116592

Pull Request: https://projects.blender.org/blender/blender/pulls/118054
2024-02-19 18:11:57 +01:00
Brecht Van Lommel 0f2064bc3b Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was 4bf6a2e564.
2024-02-19 15:59:59 +01:00
Hans Goudey 81a63153d0 Despgraph: Rename "copy-on-write" to "copy-on-evaluation"
The depsgraph CoW mechanism is a bit of a misnomer. It creates an
evaluated copy for data-blocks regardless of whether the copy will
actually be written to. The point is to have physical separation between
original and evaluated data. This is in contrast to the commonly used
performance improvement of keeping a user count and copying data
implicitly when it needs to be changed. In Blender code we call this
"implicit sharing" instead. Importantly, the dependency graph has no
idea about the _actual_ CoW behavior in Blender.

Renaming this functionality in the despgraph removes some of the
confusion that comes up when talking about this, and will hopefully
make the depsgraph less confusing to understand initially too. Wording
like "the evaluated copy" (as opposed to the original data-block) has
also become common anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/118338
2024-02-19 15:54:08 +01:00
Iliya Katueshenock 9e12a675b5 Cleanup: Merge BKE_node.h into BKE_node.hh
Trivial change, just move all the code from `BKE_node.h` to `BKE_node.hh` header top.
No mixing code from different headers or namespace changes. Part of #117773

Pull Request: https://projects.blender.org/blender/blender/pulls/118407
2024-02-19 15:26:10 +01:00
Campbell Barton 7582b15c4c Cleanup: spelling in comments 2024-02-16 14:26:46 +11:00
Hans Goudey 1bf6d8b0b9 WM: Move report list to runtime struct
These reports were embedded in the window manager DNA,
but they were always cleared when reading it from files. It's clearer
to just not store the reports in files at all. I also moved the reports
initialization and freeing to the constructor and destructor of the
runtime class.

This is the only place `ReportList` was embedded in DNA, so
after this we can move that to use C++ features if we want.

Pull Request: https://projects.blender.org/blender/blender/pulls/118329
2024-02-15 16:42:35 +01:00
Campbell Barton 55adfdc7af Merge branch 'blender-v4.1-release' 2024-02-15 21:22:52 +11:00
Jeroen Bakker f72fdcf4ae GPU: Validate All Statically Defined Shaders As Argument
This PR adds a new command line argument to validate all statically
defined shaders. It is useful for platform support to understand
what isn't working.

It only checks statically defined shaders. Dynamic shaders (EEVEE/Compositor)
can still be fail.

The report is printed to console. After checking with windows platform and
triaging we could also add it to gpu debug script. There is a risk of adding it there
as it might crash and don't store any output.

Pull Request: https://projects.blender.org/blender/blender/pulls/117326
2024-02-15 08:13:44 +01:00
Campbell Barton 7c90018f23 CLI: make "-noaudio" implicit with "-b/--background"
Running background mode now behaves as if the "-noaudio" was passed in.

The -setaudio command now has a "Default" option which can be used
in the rare cases audio playback is desired in background mode. e.g.

  blender --background -setaudio Default

Ref !118192
2024-02-14 00:13:37 +11:00
Campbell Barton 903a76031a Cleanup: unused includes in source/creator
Remove 7 includes.
2024-02-13 19:14:48 +11:00
Bastien Montagne 5aaadebbe4 Cleanup: Make `BKE_scene.h` a full Cpp header. 2024-02-10 19:16:25 +01:00
Bastien Montagne 29fe777445 Cleanup: Make `BKE_report.h` a full Cpp header. 2024-02-10 18:34:29 +01:00
Bastien Montagne 54618dbae3 Cleanup: Make `BKE_global.h` a Cpp header. 2024-02-10 18:25:14 +01:00
Bastien Montagne deab8c085a Cleanup: Move `BKE_callbacks.h` and `BKE_cachefile.h` to CPP headers. 2024-02-09 19:29:34 +01:00
Bastien Montagne b21ceece05 Cleanup: Move `BKE_blender.h` to CPP header.
Also fix comment in `build_files/cmake/macros.cmake`, CMake blender version
parsing depends in the (still C) `BKE_blender_version.h` header now.
2024-02-09 19:12:23 +01:00
Ray Molenkamp 95a863a7e7 CMake/MSVC: deploy cuda support for oidn if available 2024-02-06 13:51:58 -07:00
Damien Picard fa77e9142d UI: fix and improve a few messages
- "can not" -> "cannot" in many places (ambiguous, also see
  Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
  everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.

Some issues reported by Joan Pujolar and Tamar Mebonia.

Pull Request: https://projects.blender.org/blender/blender/pulls/117856
2024-02-05 17:08:17 +01:00
Brecht Van Lommel 0e824c5f8d Fix: blender-softwaregl on Linux not working
Files were installed to the wrong directory after 282944caac.
2024-01-29 14:47:44 +01:00
Jacques Lucke 311ca3e6af Core: rename Session UUID to Session UID
`UUID` generally stands for "universally unique identifier". The session identifier that
we use is neither universally unique, nor does it follow the standard. Therefor, the term
"session uuid" is confusing and should be replaced.

In #116888 we briefly talked about a better name and ended up with "session uid".
The reason for "uid" instead of "id" is that the latter is a very overloaded term in Blender
already.

This patch changes all uses of "uuid" to "uid" where it's used in the context of a
"session uid". It's not always trivial to see whether a specific mention of "uuid" refers
to an actual uuid or something else. Therefore, I might have missed some renames.
I can't think of an automated way to differentiate the case.

BMesh also uses the term "uuid" sometimes in a the wrong context (e.g. `UUIDFaceStepItem`)
but there it also does not mean "session uid", so it's *not* changed by this patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/117350
2024-01-22 13:47:13 +01:00
Bastien Montagne d8d44a62f7 Cleanup: Move `BKE_appdir.h` to full Cpp header `BKE_appdir.hh`. 2024-01-21 19:42:13 +01:00
Bastien Montagne af5731ce03 Cleanup: Move `BKE_idtype.h` to Cpp header `BKE_idtype.hh` 2024-01-20 19:17:36 +01:00
Aras Pranckevicius a705259b4b Cleanup: move imbuf .h files to .hh 2024-01-19 20:29:38 +01:00
Thomas Dinges 64fc6d7890 Docs: Replace most wiki links with links to new developer docs
Exceptions:
* Links to personal wiki pages
* Pages that are not in the new developer docs yet (like Human Interface Guidelines)
* tools\check_wiki\check_wiki_file_structure.py needs a refactor
2024-01-18 16:49:38 +01:00
Hans Goudey 3e76a1a6c2 Cleanup: Move BKE_lib_id.h to C++ 2024-01-15 12:44:14 -05:00
Hans Goudey ca560cd15e Cleanup: Move BKE_undo_system.h to C++ 2024-01-15 12:44:13 -05:00
Damien Picard a1efde2727 Creator: update image formats shown in the CLI help
Update the command line help message to reflect the actual image output
formats available.  Remove  mention of IRIZ and DDS, rename MPEG to
FFMPEG. HDR and TIFF are always valid now.

Pull Request: https://projects.blender.org/blender/blender/pulls/115987
2024-01-09 01:49:16 +01:00
Hans Goudey 15ae8c3064 Cleanup: Move remaining window manager headers to C++ 2024-01-04 14:30:21 -05:00
Brecht Van Lommel d377ef2543 Clang Format: bump to version 17
Along with the 4.1 libraries upgrade, we are bumping the clang-format
version from 8-12 to 17. This affects quite a few files.

If not already the case, you may consider pointing your IDE to the
clang-format binary bundled with the Blender precompiled libraries.
2024-01-03 13:38:14 +01:00