Commit Graph

150077 Commits

Author SHA1 Message Date
Campbell Barton
9ffc973918 Fix missing check for debug print 2024-07-11 14:22:49 +10:00
Campbell Barton
c9df309f1f Merge branch 'blender-v4.2-release' 2024-07-11 14:18:34 +10:00
Campbell Barton
d13da71db4 Fix the extension add-on reloading when caching the extensions state
When the extensions add-on module was loaded before the add-on was
enabled, the module was detected as having changed since it had no
`__time__` member. Loading the add-on would then reload the module.

Resolve by setting the __time__ when first importing.
2024-07-11 14:12:36 +10:00
Richard Antalik
d0cf4a4a8b Fix: Retiming keys do not respect strip drawing order
Retiming was drawn for all strips in one draw call. During strip
transformation, if strips overlap, one strip should cover the other.
But all keys were drawn on top.

Retiming drawing API was changed to draw 1 strip, so overlapped strips
can be drawn first, followed by overlapping strips.
Since retiming drawing is also layered, single draw call was split into
drawing continuity line, keys and speed text.
2024-07-11 06:08:21 +02:00
Hans Goudey
b8a1e41dc2 Cleanup: Sculpt: Use utility function to restore positions from undo step 2024-07-10 22:28:25 -04:00
Campbell Barton
dffbd44631 Merge branch 'blender-v4.2-release' 2024-07-11 11:23:39 +10:00
Campbell Barton
69fd60b41a Extensions: update tests from changes to repo-list 2024-07-11 11:22:30 +10:00
Campbell Barton
3d87112bbd Merge branch 'blender-v4.2-release' 2024-07-11 11:13:06 +10:00
Campbell Barton
3c567ce171 Merge branch 'blender-v4.2-release' 2024-07-11 11:13:03 +10:00
Campbell Barton
1ff66501b4 Merge branch 'blender-v4.2-release' 2024-07-11 11:12:59 +10:00
Campbell Barton
e8580f8558 Merge branch 'blender-v4.2-release' 2024-07-11 11:12:55 +10:00
Campbell Barton
0c01a01133 Extensions: add command line "repo-add --access-token" support 2024-07-11 11:06:57 +10:00
Campbell Barton
f59e872b3b Extensions: show "source" & access-token in the repo-list sub-command 2024-07-11 11:06:21 +10:00
Campbell Barton
375b173d67 Extensions: correct help text for the "build" command 2024-07-11 10:18:45 +10:00
Harley Acheson
cfe77fbafd UI: Use Official Blender Logo As Blender Icon
Our icon sources currently include two versions of the Blender logo,
the official one and one that is modified to align better to our
smallest pixel grid. But with our recent change to SVG icons, and
alignment tweaks to the official version this can be used in all
cases. This PR does so, removes BLENDER_LARGE, and also slightly
tweaks FILE_BACKUP and FILE_BLEND to use the official form.

Pull Request: https://projects.blender.org/blender/blender/pulls/124179
2024-07-11 01:15:07 +02:00
Jesse Yurkovich
e4bf3015a1 Fix #124470: MEM_new/MEM_freeN mismatch for uiEditSourceStore
Pull Request: https://projects.blender.org/blender/blender/pulls/124487
2024-07-11 00:03:51 +02:00
Jesse Yurkovich
57544887d0 CMake: Add WITH_TBB definition to prevent ODR violation for BLI_spin API
The BLI_spin APIs use a `SpinLock` typedef whose underlying type is
contingent on the precense of `WITH_TBB`. Since our projects did not
consistently define the `WITH_TBB` definition, multiple `SpinLock` types
would end up in our final binary creating ODR violations.

Pull Request: https://projects.blender.org/blender/blender/pulls/124285
2024-07-10 23:02:17 +02:00
Jesse Yurkovich
05241f47f5 CMake: Add WITH_TBB definition for the projects that require it
The `WITH_TBB` define needs to be set in order for code using the
various parallel threading helpers [1][2] to actually be multi-threaded.

The affected projects did not have `WITH_TBB` defined and were using the
single-thread variant of all affected APIs.

Additionally, in the case of `EnumerableThreadSpecific`, this results in
an ODR violation where there are 2 versions of the same class linked
into our final binary. One with TBB members and one without.

--------
[1] Namely code using the `BLI_task.hh`, `BLI_sort.hh`, and `BLI_enumerable_thread_specific.hh` headers
[2] `EnumerableThreadSpecific`, `parallel_for_each`, `parallel_reduce`, `parallel_invoke`, `isolate_task`, `parallel_sort`

Pull Request: https://projects.blender.org/blender/blender/pulls/124283
2024-07-10 23:01:38 +02:00
Jeroen Bakker
c929e251db Fix 102994: GHOST: Fix transparent viewports
On specific platforms the viewport could be rendered transparent on
top of the OS desktop. Mesa adviced us to enable a `EGL_PRESENT_OPAQUE`
when its extension exists.

Partially fixes #102994; mesa-zink (https://docs.mesa3d.org/drivers/zink.html)
still shows transparent viewports. As this PR already improves the situation we
it will be merged.

Pull Request: https://projects.blender.org/blender/blender/pulls/124395

Pull Request: https://projects.blender.org/blender/blender/pulls/124485
2024-07-10 22:02:24 +02:00
Jeroen Bakker
a2ba481c71 Fix 102994: GHOST: Fix transparent viewports
On specific platforms the viewport could be rendered transparent on
top of the OS desktop. Mesa adviced us to enable a `EGL_PRESENT_OPAQUE`
when its extension exists.

Partially fixes #102994; mesa-zink (https://docs.mesa3d.org/drivers/zink.html)
still shows transparent viewports. As this PR already improves the situation we
it will be merged.

Pull Request: https://projects.blender.org/blender/blender/pulls/124395
2024-07-10 21:59:13 +02:00
Jeroen Bakker
615f4a7d4e Cleanup: Vulkan: Remove unused variable
Detected when compiled with clang.

Pull Request: https://projects.blender.org/blender/blender/pulls/124480
2024-07-10 21:44:19 +02:00
Sean Kim
0ee46f1208 Refactor: Sculpt: Expose per-pbvh type unique face set methods
Part of #118145

Pull Request: https://projects.blender.org/blender/blender/pulls/124478
2024-07-10 20:36:43 +02:00
Richard Antalik
41430ed4bd Cleanup: Split strip foreground drawing function
Pull Request: https://projects.blender.org/blender/blender/pulls/124441
2024-07-10 20:13:40 +02:00
Sean Kim
7a6a2519c5 Refactor: SubdivCCG: Extract utility method for boundary calculation
Pull Request: https://projects.blender.org/blender/blender/pulls/124476
2024-07-10 19:48:00 +02:00
Hans Goudey
7fea77992c Fix: Sculpt: Restore transform symmetry clipping lost in refactor
Restore fix 5a8003091c which was lost in e9318360f1.
2024-07-10 13:07:16 -04:00
Hans Goudey
39c334582b Sculpt: Data oriented refactor for nearest vertex search
Part of #118145.
2024-07-10 12:30:00 -04:00
Hans Goudey
e9318360f1 Sculpt: Data oriented refactor for transform tool
Part of #118145.
2024-07-10 12:30:00 -04:00
Hans Goudey
9b43b9feec Cleanup: Sculpt: Use utility function for building translations 2024-07-10 12:30:00 -04:00
Hans Goudey
59442dda91 Refactor: Sculpt: Tweak restore from undo step functions, expose publicly
- Put them in the undo namespace, since they're quite tied to the undo system.
- Retrieve the nodes inside the functions, since they always need to act on
  all leaf nodes conceptually anyway.
- Expose the position restore function publicly for use in the transform tool.
2024-07-10 12:30:00 -04:00
Hans Goudey
9d6599db25 Refactor: Sculpt: Separate functions for retrieving area sampling radii
Makes future optimizations to this area simpler.
2024-07-10 12:30:00 -04:00
Hans Goudey
410f7cab78 Cleanup: Mesh: Corner naming in mesh normals code 2024-07-10 12:30:00 -04:00
Jacques Lucke
8fbdc39ff2 Fix: show correct number of grease pencil layers in socket tooltip 2024-07-10 18:25:25 +02:00
Jacques Lucke
259af59e17 Merge branch 'blender-v4.2-release' 2024-07-10 18:01:26 +02:00
Jacques Lucke
6390f2e4c6 Fix #124391: crash in complex node setup with multi-threading
The lazy-function for a logical-or made the wrong assumption that
`try_get_input_data_ptr_or_request` returns null when `try_get_input_data_ptr`
returns null for the same input right before that. That's not true, because the
input might have been computed by another thread in the mean-time.

This wrong assumption lead to a bug because lazy-functions are always assumed to
either request more unavailable inputs, or compute all requested outputs. Here,
the lazy-function did neither. It wanted to request a new input, but it was
available already.

The solution is to handle the return value of
`try_get_input_data_ptr_or_request` properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/124465
2024-07-10 18:00:48 +02:00
Julian Eisel
1ed408fdd9 Cleanup: Remove wrong/unnecessary type cast in UI function 2024-07-10 17:53:44 +02:00
Jacques Lucke
9816dba416 Fix: compilation with clang on linux 2024-07-10 17:47:26 +02:00
Sean Kim
d0ebd8e1a7 Cleanup: SubdivCCG: Prevent copying of SubdivCCG
We generally do not want this struct to be copied due to its size. To
assist in finding development errors earlier, disable the copy
constructor entirely, as the destructor puts its resources into an
invalid state.

Pull Request: https://projects.blender.org/blender/blender/pulls/124439
2024-07-10 17:06:55 +02:00
Jacques Lucke
24dc9a21b1 Geometry Nodes: support attaching gizmos to input values
This adds support for attaching gizmos for input values. The goal is to make it
easier for users to set input values intuitively in the 3D viewport.

We went through multiple different possible designs until we settled on the one
implemented here. We picked it for it's flexibility and ease of use when using
geometry node assets. The core principle in the design is that **gizmos are
attached to existing input values instead of being the input value themselves**.
This actually fits the existing concept of gizmos in Blender well, but may be a
bit unintutitive in a node setup at first. The attachment is done using links in
the node editor.

The most basic usage of the node is to link a Value node to the new Linear Gizmo
node. This attaches the gizmo to the input value and allows you to change it
from the 3D view. The attachment is indicated by the gizmo icon in the sockets
which are controlled by a gizmo as well as the back-link (notice the double
link) when the gizmo is active.

The core principle makes it straight forward to control the same node setup from
the 3D view with gizmos, or by manually changing input values, or by driving the
input values procedurally.

If the input value is controlled indirectly by other inputs, it's often possible
to **automatically propagate** the gizmo to the actual input.

Backpropagation does not work for all nodes, although more nodes can be
supported over time.

This patch adds the first three gizmo nodes which cover common use cases:
* **Linear Gizmo**: Creates a gizmo that controls a float or integer value using
  a linear movement of e.g. an arrow in the 3D viewport.
* **Dial Gizmo**: Creates a circular gizmo in the 3D viewport that can be
  rotated to change the attached angle input.
* **Transform Gizmo**: Creates a simple gizmo for location, rotation and scale.

In the future, more built-in gizmos and potentially the ability for custom
gizmos could be added.

All gizmo nodes have a **Transform** geometry output. Using it is optional but
it is recommended when the gizmo is used to control inputs that affect a
geometry. When it is used, Blender will automatically transform the gizmos
together with the geometry that they control. To achieve this, the output should
be merged with the generated geometry using the *Join Geometry* node. The data
contained in *Transform* output is not visible geometry, but just internal
information that helps Blender to give a better user experience when using
gizmos.

The gizmo nodes have a multi-input socket. This allows **controlling multiple
values** with the same gizmo.

Only a small set of **gizmo shapes** is supported initially. It might be
extended in the future but one goal is to give the gizmos used by different node
group assets a familiar look and feel. A similar constraint exists for
**colors**. Currently, one can choose from a fixed set of colors which can be
modified in the theme settings.

The set of **visible gizmos** is determined by a multiple factors because it's
not really feasible to show all possible gizmos at all times. To see any of the
geometry nodes gizmos, the "Active Modifier" option has to be enabled in the
"Viewport Gizmos" popover. Then all gizmos are drawn for which at least one of
the following is true:
* The gizmo controls an input of the active modifier of the active object.
* The gizmo controls a value in a selected node in an open node editor.
* The gizmo controls a pinned value in an open node editor. Pinning works by
  clicking the gizmo icon next to the value.

Pull Request: https://projects.blender.org/blender/blender/pulls/112677
2024-07-10 16:18:47 +02:00
Thomas Dinges
eff7d02c65 Merge branch 'blender-v4.2-release' 2024-07-10 16:15:31 +02:00
Thomas Dinges
e02c6fd130 Release: Bump 4.2 to rc 2024-07-10 16:13:17 +02:00
Bastien Montagne
131d61b534 Fix crash after uiLayout refactor.
Fact that `vector.last()` is undefined when the container is empty is a
bit annoying, forces to check for emptyness everywhere :|
2024-07-10 16:03:48 +02:00
Sergey Sharybin
ec9ce22315 Merge branch 'blender-v4.2-release' 2024-07-10 15:59:11 +02:00
Sergey Sharybin
ec0221e26b Cleanup: Style 2024-07-10 15:58:09 +02:00
Bastien Montagne
a3f0d81a5e Refactor: UI: Make uiItem layout hierarchy use C++ inheritance.
This commit turns the base struct `uiItem` and all of its descendants
(including `uiButtonItem`, uiLayout`, etc.) into a C++ polymorphic
hierarchy of types.

This allows to use C++ type of memory management, and use non-trivial
types (which will be required to make `PointerRNA` non-trivial).

It also moves the storage of these `uiItems` from `BLI_listbase` to
`blender::Vector`, as our C-based listbase implementation is
incompatible with C++ polymorphism.

This also lead to making `uiItem` parameters of a few utils functions
`const`, to allow passing around `blender::Span` instead of vectors to
some internal helpers.

Pull Request: https://projects.blender.org/blender/blender/pulls/124405
2024-07-10 14:46:06 +02:00
YimingWu
96cc9109fd Fix #124431: Division by zero in Resample Curves
`get_count_input_from_length()` did not check whether length is zero,
this would cause division by zero exception. Now will return a segment
count of 1 when a zero length is given.

Pull Request: https://projects.blender.org/blender/blender/pulls/124440
2024-07-10 14:23:35 +02:00
Thomas Dinges
8025cd3933 Merge branch 'blender-v4.2-release' 2024-07-10 14:09:01 +02:00
Thomas Dinges
f069692caf Release: Update license documents to reflect library updates. 2024-07-10 14:05:46 +02:00
Campbell Barton
41fe7b0d27 Merge branch 'blender-v4.2-release' 2024-07-10 17:42:42 +10:00
Campbell Barton
a69ff0e3da Merge branch 'blender-v4.2-release' 2024-07-10 17:42:39 +10:00
Campbell Barton
f7382a2de1 Merge branch 'blender-v4.2-release' 2024-07-10 17:42:37 +10:00