Commit Graph

103405 Commits

Author SHA1 Message Date
Campbell Barton
f5b71e5152 Cleanup: rename Global "lib" & "ima" for clarity
Rename members to make it clear they're for the last used file-paths:

- ima -> filepath_last_image
- lib -> filepath_last_library
2023-10-05 13:33:37 +11:00
Campbell Barton
ed7b7c2cde Merge branch 'blender-v4.0-release' 2023-10-05 13:16:23 +11:00
Campbell Barton
60b2b663cc Merge branch 'blender-v4.0-release' 2023-10-05 13:16:20 +11:00
Campbell Barton
222d7b9184 Merge branch 'blender-v4.0-release' 2023-10-05 13:16:15 +11:00
Campbell Barton
eafceab73b Merge branch 'blender-v4.0-release' 2023-10-05 13:16:12 +11:00
Campbell Barton
9d4dc5376c Fix #112377: Edit Source missing info in the status bar
Reports from the internal operator weren't forwarded to the Python
operator, they were printed in the console instead.

Resolve by moving the operator to C++, use a utility function
to launch the external editor instead of an operator.
2023-10-05 13:09:47 +11:00
Campbell Barton
c9130e38e3 Cleanup: spelling in comments 2023-10-05 13:07:58 +11:00
Campbell Barton
0e1eff96e2 Cleanup: use exec/invoke suffix for operator callbacks 2023-10-05 12:57:31 +11:00
Campbell Barton
291e54abfb Fix building WITH_PYTHON=OFF 2023-10-05 12:57:29 +11:00
Germano Cavalcante
bd6b7088bf Fix #112978: MacOS no longer has a path associated with the window
The problem was introduced in 636f3697ee

MacOS has a different way of handling the title.

In this OS the directory is searched and taken from the title string
which is then formatted.

This limits the title format and makes it prone to errors.

This commit makes the code more generic by splitting each component of
the title beforehand and allowing the associated directory to be informed
with `GHOST_SetTitle`.

Pull Request: https://projects.blender.org/blender/blender/pulls/113227
2023-10-05 02:26:11 +02:00
Germano Cavalcante
d6b2b5d0c5 Fix #112978: MacOS no longer has a path associated with the window
The problem was introduced in 636f3697ee

MacOS has a different way of handling the title.

In this OS the directory is searched and taken from the title string
which is then formatted.

This limits the title format and makes it prone to errors.

This commit makes the code more generic by splitting each component of
the title beforehand and allowing the associated directory to be informed
with `GHOST_SetTitle`.
2023-10-04 21:23:38 -03:00
Brecht Van Lommel
3bbd4294d9 Merge branch 'blender-v4.0-release' into main 2023-10-04 21:32:58 +02:00
Brecht Van Lommel
6f6fd99dbb Fix I/O debug message printed without debugging enabled 2023-10-04 21:30:41 +02:00
Harley Acheson
af91b3dd72 Cleanup: Make format
Just formatting changes from Make Format
2023-10-04 12:12:31 -07:00
Harley Acheson
544ef3baad Merge branch 'blender-v4.0-release' 2023-10-04 12:09:23 -07:00
ChengduLittleA
6d64c6dcd7 UI: Recognize CJK punctuation when selecting text
Add frequently-used Chinese, Japanese, Korean special character
delimiters (punctuation, quote characters, brackets, etc) to aid the
selection of character segments in text operations.

Pull Request: https://projects.blender.org/blender/blender/pulls/112852
2023-10-04 21:08:13 +02:00
Richard Antalik
0a12c5101b Merge branch 'blender-v4.0-release' 2023-10-04 19:51:44 +02:00
Germano Cavalcante
72a52520db Select Engine: Use C++ vector types for arrays
No functional changes.
2023-10-04 14:44:46 -03:00
Richard Antalik
dcf2c11d5e Fix build warning in previous commit 2023-10-04 19:44:14 +02:00
Germano Cavalcante
99a3a4a330 Cleanup: Move select engine headers to C++
See #103343

tmp
2023-10-04 14:34:12 -03:00
Richard Antalik
5daefe30e7 Merge branch 'blender-v4.0-release' 2023-10-04 19:28:57 +02:00
Richard Antalik
1b59571f6b Fix VSE retiming usability issues
Rename Retime Strips -> Toggle Retiming Keys
Gray out items in retiming menu instead of hiding
Remove selection operators from retiming menu
Gray out items in select menu when retiming
Prevent selecting keys, if overlay is disabled
Add show retiming keys toggle to sidebar time panel

ref https://projects.blender.org/blender/blender/issues/112343

Pull Request: https://projects.blender.org/blender/blender/pulls/113211
2023-10-04 19:27:28 +02:00
Jacques Lucke
d1a6b94ab8 Merge branch 'blender-v4.0-release' 2023-10-04 19:23:21 +02:00
Vasilis-Milios
6d1c5790d5 Fix #113194: show the single value for sockets of type field
Pull Request: https://projects.blender.org/blender/blender/pulls/113244
2023-10-04 19:21:07 +02:00
Sergey Sharybin
d7a21d0199 Merge branch 'blender-v4.0-release' 2023-10-04 18:10:50 +02:00
Sergey Sharybin
92647bdbdd Fix light linking state being lost on collection copy and duplicate
This preserves the light linking state when collection is copied manually
via the copy-paste or duplicate functionality, but also should fix the
problem of lost light linking state when adding a collection override.

Pull Request: https://projects.blender.org/blender/blender/pulls/113243
2023-10-04 18:10:09 +02:00
Bastien Montagne
159979a585 Merge branch 'blender-v4.0-release' 2023-10-04 17:06:25 +02:00
Damien Picard
1fa7ba125c I18n: translate bones' 'Move to Collection' operator menu.
Several items are untranslated in the 'Move to Collection' operator
menu (the bone collections one, `ARMATURE_OT_move_to_collection`).
This is because it uses custom callback to allow the menu content
to be dynamically generated.

Because of this, some labels have to be translated manually using
`CTX_IFACE_()`. The translation context is "Operator" because these
messages come from an operator.

On the other hand, the destination collections themselves should not
have their name translated since they are data. The property now uses
the `PROP_ENUM_NO_TRANSLATE` flag for this.

PR: https://projects.blender.org/blender/blender/pulls/113224.
2023-10-04 16:59:57 +02:00
Bastien Montagne
43d7abc31a Merge branch 'blender-v4.0-release' 2023-10-04 14:51:06 +02:00
Bastien Montagne
2d2c7457cf Fix #112548: Assert in object parenting liboverride code.
Dummy mistake in commit(s) a few months ago that fixed/improved handling
of parenting between objects in liboverride context, trying to access an
Enum propoerty as an int one...

This will have to be backported to 3.6LTS as well.
2023-10-04 14:43:42 +02:00
Clément Foucault
9d229aee19 Math: Add from_up_axis matrix creation function
This add the possibility to create a
orthogonal basis around a given unit
vector.

The name was chosen to match the naming
convention already in place and match
the other matrix construction functions.
In other places (ex: renderers), this same
function is commonly named `make_orthonormal`
or `make_basis`.

The function is not given to have a fixed
implementation and might change overtime.
That's why the test only covers the
assumptions and not the raw values.

The implementation is borrowed from
Cycles and adapted to our math API.

Pull Request: https://projects.blender.org/blender/blender/pulls/113218
2023-10-04 14:35:47 +02:00
Campbell Barton
a6ffb82940 Merge branch 'blender-v4.0-release' 2023-10-04 22:24:20 +11:00
Jacques Lucke
beac6599fb Nodes: deduplicate code to create declarations for socket type 2023-10-04 13:01:45 +02:00
Bastien Montagne
c820f9b85c Fix #112649: Crash loading early 2.80 blend file without a scene collection.
Caused by 23835a393c, which removed entirely the transitive
`SceneCollection` struct and associated versioning code. This was used
in very early 2.80 development period (up to 2.80 sub 14 apparently)
instead of the current 'master collection'.

The purpose of this commit is only to fix the crash, not to restore
the support for this old, deprecated and never-released type of data.
2023-10-04 12:42:53 +02:00
Jacques Lucke
eeb77f3d51 Cleanup: deduplicate more socket items code
This is a continuation of 012289b1e7.
2023-10-04 12:22:32 +02:00
Jacques Lucke
32cb2b2334 Cleanup: avoid having to pass in a statically allocated variable
It's easy to forget that this variable has to be static for correctness,
so better allocate it in the function directly instead everywhere where
it is called.
2023-10-04 11:34:25 +02:00
Jacques Lucke
012289b1e7 Geometry Nodes: deduplicate code to deal with dynamic socket amounts
The goal of this refactor is to reduce the amount of boilerplate code that is
necessary to have a dynamic number of sockets on nodes. This is achieved
by making the code more reusable. Currently, only the simulation and repeat
zone nodes make use of this. However, even with just those two, the amount
of code is reduced already. The benefit of this refactor will become even more
significant as more nodes support a dynamic number of sockets. For example,
the bake node and for-each zone will also benefit from this.

We could probably make some of the utility functions non-templates using type
erasure. This could reduce the compilation overhead when the number of nodes
with item arrays increases. The main reason for why everything is templated
now is that it made this refactor easier. Without this patch, all the code was
essentially "manually templated". So the implementations look still similar to
before now, just that concrete types are replaced with template parameters.

No user-visible changes are expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/113114
2023-10-04 11:02:52 +02:00
Omar Emara
17bdf18397 Realtime Compositor: Implement Keying Screen node
This patch implements the Keying Screen node for the Realtime
Compositor. Draw data was introduced to the Movie Clip ID to allow
caching of the keying screen.

Pull Request: https://projects.blender.org/blender/blender/pulls/113055
2023-10-04 07:35:07 +02:00
Omar Emara
75c947a467 Compositor: Use RBF Interpolation in Keying Screen node
This patch changes the interpolation algorithm utilized by the Keying
Screen node to a Gaussian Radial Basis Function Interpolation. This is
proposed because the current Voronoi triangulation based interpolation
has the following properties:

- Not temporally stable since the triangulation can abruptly change as
  tracking markers change position.
- Not smooth in the mathematical sense, which is also readily visible in
  the artists sense.
- Computationally expensive due to the triangulation and naive
  rasterization algorithm.

On the other hand, the RBF interpolation method is temporally stable and
continuous, smooth and infinitely differentiable, and relatively simple
to compute assuming low number of markers, which is typically the case
for keying screen objects.

This breaks backward compatibility, but the keying screen is only used
as a secondary input for keying in typical compositor setups, so one
should expect minimal difference in outputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/112480
2023-10-04 07:07:04 +02:00
Campbell Barton
0b302d2139 Merge branch 'blender-v4.0-release' 2023-10-04 15:25:47 +11:00
Peng Yan
dcb2c0bdf6 BMesh: remove redundant calculation from BMesh bisect
Besides being a redundant calculation,
reducing stack memory usage is generally worthwhile.

Ref !113153.
2023-10-04 15:25:07 +11:00
Campbell Barton
a5049ba8f0 Merge branch 'blender-v4.0-release' 2023-10-04 15:14:04 +11:00
Colin Basnett
46647ed911 Fix typo in documentation for BMVertSeq.new
Ref !113190.
2023-10-04 15:13:06 +11:00
Campbell Barton
2e732328a8 Merge branch 'blender-v4.0-release' 2023-10-04 11:58:32 +11:00
Campbell Barton
30a580bf30 Fix failure to remove temp-dir when initializing GPU backend fails
Call WM_exit() instead of exit() cleanup functions run.
2023-10-04 11:41:59 +11:00
Campbell Barton
b469d9dd7d Merge branch 'blender-v4.0-release' 2023-10-04 10:33:26 +11:00
Campbell Barton
f82e520d22 Cleanup: spelling in comments 2023-10-04 10:31:52 +11:00
Harley Acheson
e1a868df1d Merge branch 'blender-v4.0-release' 2023-10-03 09:46:24 -07:00
Harley Acheson
e44f500be8 Fix #102591: Improvements to Context Menu Path Operators
Improvements to `ui_but_menu_add_path_operators` so that it properly
differentiates between files and directories even if the filepath is
not slash terminated. It will also not add the operators to the menu
if the filepath does not exist.

---

Right-clicking on a pathname input we get a context menu that might contain "Open File Externally" and/or "Open Location Externally".  But the first problem is that it does not check if this location exists, and we do have times where the paths do not exist yet.  This PR makes this function a bool so that can return false if the files do not exist.

The second problem is that the function does not properly differentiate between a file path and directory path. For a directory path that is not slash terminated it will assume it is a file path.  This PR actually checks the path (BLI_is_dir) to see if it really is a directory path.

Pull Request: https://projects.blender.org/blender/blender/pulls/113216
2023-10-03 18:44:56 +02:00
Damien Picard
b05db089af I18n: translate node panel titles
Nodes recently gained the ability to group inputs into collapsible
panels. These were untranslated, so this commit:
- Adds the appropriate regex to extract node panels defined with
  the `add_panel()` callback.
- Adds the `IFACE()` translation macro to the drawing code for the
  nodes, as well as the properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/112968
2023-10-03 18:24:19 +02:00