Commit Graph

120055 Commits

Author SHA1 Message Date
Brecht Van Lommel
94e2973f0b Build: support OpenColorIO 2.3
For Linux distributions or others that upgrade before we do.

Ref #113157

Pull Request: https://projects.blender.org/blender/blender/pulls/113163
2023-10-02 19:31:19 +02:00
Jacques Lucke
287bcb1b29 Merge branch 'blender-v4.0-release' 2023-10-02 18:20:24 +02:00
Arye Ramaty
d0b4f4f334 UI: Add descriptions to a few geometry nodes
Some geometry nodes were missing descriptions.

Pull Request: https://projects.blender.org/blender/blender/pulls/113164
2023-10-02 18:17:47 +02:00
Jacques Lucke
9a8f65ef13 Fix #113159: improve best word match heuristic in string search
That was accidentally broken as side effect of 56e98f8ba6.
2023-10-02 18:12:41 +02:00
Jacques Lucke
768ced88dd Fix: String Search: avoid casting match scores to int 2023-10-02 18:12:40 +02:00
Jacques Lucke
17f465f775 Fix: Geometry Nodes: dangling pointer in geometry after modifier evaluation
This case probably hasn't been triggered before because we rarely move individual
const-components around between geometry sets. This happened in #113083 in the
optimization when all elements are in the same group.

Pull Request: https://projects.blender.org/blender/blender/pulls/113160
2023-10-02 17:43:22 +02:00
Miguel Pozo
641dff8bf4 EEVEE-Next: Fix DupliObject ObjectKey
`DRW_drawdata_get` reuses the same `DrawData` for all duplis,
so they all end up using the same `ObjectHandle` and `ObjectKey`,
which breaks motion vectors.

* Don't use `DRW_drawdata_get`.
* Simplify `ObjectKey`.

This also solves the issue of objects created "on the fly" always having
the `ID_RECALC_ALL` flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/112544
2023-10-02 16:52:56 +02:00
Miguel Pozo
68c69a99d3 Merge branch 'blender-v4.0-release' 2023-10-02 16:45:55 +02:00
Miguel Pozo
0ed6172833 Fix #112164: Draw: Circle select tool low performance
Since garbage collection of texture pools happens every time
`drw_manager_init` is called, interleaved calls to different
`DRW_draw`/`DRW_render` functions can result in a constant cycle of
creating/releasing textures.

This PR changes texture pools to only release textures that have not
been used for N garbage collection cycles.
I chose 8 as default since I think is high enough to avoid the issue
while it's unlikely to cause any major spike in memory consumption.

Pull Request: https://projects.blender.org/blender/blender/pulls/113024
2023-10-02 16:43:48 +02:00
Brecht Van Lommel
43b8560066 Merge branch 'blender-v4.0-release' into main 2023-10-02 16:42:05 +02:00
Charles Wardlaw
f536513952 Fix #112463: crash or invalid results importing USD uniform colors
The code assumed quads and failed with triangles

Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112589
2023-10-02 16:32:00 +02:00
Sergey Sharybin
a21112d7d8 Merge branch 'blender-v4.0-release' 2023-10-02 16:21:06 +02:00
Sergey Sharybin
0e01667e25 Fix Split Strips operator not showing shortcut
This is because the menu entry was using different operator
properties from what the shortcut is defined for. It was needed
to make it so an operator which is called from the menu does not
have dependency on the mouse location.

Now it is achieved by resolving MOUSE side to RIGHT from the
operator's exec().

Ref #112598

Pull Request: https://projects.blender.org/blender/blender/pulls/113143
2023-10-02 16:20:31 +02:00
Sybren A. Stüvel
eee51b90a2 Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-10-02 12:42:35 +02:00
Sybren A. Stüvel
6ed12635cf Anim: Warn when a bone is added to a hidden bone collection
New bones (Shift+A in armature edit mode) are added to the active bone
collection. This collection can be hidden, causing the newly added bone
to be invisible. This is consistent with adding objects to hidden scene
collections, but can be confusing nonetheless. Now a warning is issued,
at least for the armature/bone case.
2023-10-02 12:38:44 +02:00
Jacques Lucke
783058ed6d RNA: don't generate declarations for templated functions
This reverts 690a3ddf7e and makes it so that we don't even try
to generate the correct declaration for templated functions instead.
The reason for generating these declarations was to detect errors
when calling functions with the wrong signature. However, we still
get compile time errors when trying to call the function with wrong
parameters.

This helps simplifying the code in #113114 even more.
2023-10-02 12:16:58 +02:00
Sybren A. Stüvel
a2613e0318 Anim: remove bone group operators
Remove the Pose mode operators that manipulate bone groups.

Bone groups were removed in Blender 4.0 and replaced with Bone Collections.
2023-10-02 12:02:06 +02:00
Clément Foucault
7f7e1ab088 GL: Remove Apple platform specific workarounds
We don't ship with OpenGL anymore on Mac platform.
The build option is not even available anymore.

This removes any reference to Apple or Mac in the
Opengl module.

Note that I left the depth_blitting_workaround
even if it originaly meant for Mac because it
might be still useful for other hardware.

Pull Request: https://projects.blender.org/blender/blender/pulls/113126
2023-10-02 10:29:57 +02:00
Sergey Sharybin
732bfba6b8 Cleanup: Strict compiler arning
Unused function argument in the Metal framebuffer.
2023-10-02 09:51:56 +02:00
Campbell Barton
4c37a962e3 Merge branch 'blender-v4.0-release' 2023-10-02 12:14:33 +11:00
Campbell Barton
883033a096 Curve: adjust behavior of invert selection for bezier handlers
Since [0] picking a bezier knot doesn't pick the handles,
this meant picking a vertex, then inverting the selection would
delete that vertex, which isn't useful/expected behavior.

Invert selection now considers knots selected whenever any of it's
handles are selected (matching the graph editor).

This change has also been made for grease-pencil bezier editing.

[0]: 618f39fca2
2023-10-02 12:10:08 +11:00
Jacques Lucke
690a3ddf7e RNA: support passing template arguments to functions
The goal is to allow passing template parameters in the string that is passed
to `RNA_def_function` in rna code. This can reduce redundancy (e.g. when used
together with #113114). Only "simple" template parameters are supported,
i.e. only ones that do not contain a nested `,`.

Function names passed to e.g. `RNA_def_property_pointer_funcs` and
`RNA_def_property_update` happen to support this already without further changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113121
2023-10-01 23:24:19 +02:00
Harley Acheson
4d35344010 UI: UI: Anchor Right When Double-Clicking Last Word
Merging #113125 into blender-v4.0-release. Accidentally
committed to main first.
2023-10-01 09:56:12 -07:00
Harley Acheson
8a2e81b16b UI: Anchor Right When Double-Clicking Last Word
In UI text inputs, when double-clicking to select words, anchor (set
initial selection position) to the right if on the last word. This
aids in some combined double-click-drag operations.

Pull Request: https://projects.blender.org/blender/blender/pulls/113125
2023-10-01 18:51:10 +02:00
Clément Foucault
eda7926834 DRW: Add SubPassTransition pass command 2023-10-01 18:01:15 +02:00
Clément Foucault
8fe0ffed4e GL: Subpass transition fix with GPU_ATTACHEMENT_IGNORE
GPU_ATTACHEMENT_IGNORE should work on slots that
contain no attachments.
2023-10-01 18:01:15 +02:00
Clément Foucault
8b7bbee14f GL: Add support for loadop
This just do a clear in place for the clear load op.
At least it allows for same result accross backend as
the other op types are only here for performance.
2023-10-01 18:01:15 +02:00
Clément Foucault
9c6e3c80c7 GL: Fix depth clearing with clear_attachment
The depth write mask was no always set to true.
2023-10-01 18:01:15 +02:00
Harley Acheson
f30280a1d1 Cleanup: Make format
Formatting changes resulting from Make Format.
2023-10-01 08:50:28 -07:00
Harley Acheson
4b16fad2ec Merge branch 'blender-v4.0-release' 2023-10-01 08:46:12 -07:00
Harley Acheson
fef8b38acb UI: Less Cursor Changes While Loading Files
Less changes of mouse cursor while loading blend files. And no changes
to it while reading the homefile.

Pull Request: https://projects.blender.org/blender/blender/pulls/113123
2023-10-01 17:44:53 +02:00
Clément Foucault
4a4b1482cd GL: Add subpass input emulation
This adds basic emulation of the subpass input feature
of vulkan and to a lower extend Raster Order Group on Metal.

This help test paths that might use this feature in the future
(like shadow rendering) on all platform and or simplify higher
level code for supporting older hardware.

This add clear description to the load/store ops and to the
new `GPUAttachementState`.

The OpenGL backend will correctly mask un-writable
attachments and will bind as texture readable attachments.

Even if possible by the vulkan standard, the GPU API prohibit
the read and write to the same attachment inside the same
subpass.

In the GL backend, this is implemented using `glTextureBarrier`
and `texelFetch` as it is described in the ARB_texture_barrier
extension.
https://registry.khronos.org/OpenGL/extensions/ARB/ARB_texture_barrier.txt

Pull Request: https://projects.blender.org/blender/blender/pulls/112051
2023-10-01 15:27:21 +02:00
Campbell Barton
6f9fb776de Merge branch 'blender-v4.0-release' 2023-10-01 14:49:42 +11:00
Campbell Barton
5ade0c4dac Merge branch 'blender-v4.0-release' 2023-10-01 14:49:39 +11:00
Campbell Barton
c2ff509159 Fix incorrect function name in foreach_get/foreach_set exceptions 2023-10-01 14:19:44 +11:00
Campbell Barton
18f8579e38 Follow up to fix for #111117, remove array/collection length lookup
Revert a change from [0]. There is no need to count items in the
collection/array as the property iterator can detect this.

[0]: a280e8a68c
2023-10-01 14:07:56 +11:00
Martijn Versteegh
995aa08c79 Merge branch 'blender-v4.0-release' 2023-10-01 00:20:24 +02:00
Martijn Versteegh
3f633503d3 Fix #111117: Partially revert a280e8a6
The size check was incorrect for mixed triangle/ngon/quad meshes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112879
2023-10-01 00:17:46 +02:00
Clément Foucault
ad50ded7b5 Metal: Fix texture atomic wrapper
GLSL imageAtomic operations operate on single components.
2023-09-30 21:37:44 +02:00
Jacques Lucke
63e1d06233 Geometry Nodes: add utility for debug randomization of instances
Also see cc7da09c1b.
2023-09-30 16:29:08 +02:00
Jacques Lucke
bafc952f97 Cleanup: Geometry Nodes: pass selection by varray instead of field 2023-09-30 16:27:25 +02:00
Jacques Lucke
08aa71bfc9 Merge branch 'blender-v4.0-release' 2023-09-30 12:40:25 +02:00
Germano Cavalcante
90ec11b823 Revert "3D View: Do not recalculate the depth buffer for 'Auto Depth'"
This reverts commit d33eb78de3 and c26efccf61

They came in without a review.
2023-09-29 17:55:50 -03:00
Germano Cavalcante
c26efccf61 Use bool for each condition 2023-09-29 17:38:56 -03:00
Germano Cavalcante
7c772cc93e Merge remote-tracking branch 'origin/main' into zoom_optimize 2023-09-29 17:19:15 -03:00
Jacques Lucke
cc7da09c1b Geometry: add utility to check for bad geometry element index dependence
Sometimes .blend files have compatibility issues between Blender versions,
because .blend files depended on the specific order of geometry elements
generated by some nodes/modifiers (#112746, #113018). While we make
guarantees about the order in some places, that is relatively rare, because it
makes future improvements much harder. The functionality in this patch
makes it easier for users to notice when they depend on things that are not
expected to be stable between Blender builds.

This is achieved by adding a new global flag which indicates whether some
algorithms should randomize their output. The functionality can be toggled
on or off by searching for `Set Geometry Randomization`. If there are no
differences (or acceptable minor ones) when the flag is on or off, one can
be reasonably sure that one does not on unspecified behavior (can't be 100%
sure though, because randomization might be missing in some places). If
there are big differences, one should consider fixing the file before it comes
to an actual breakage in the next Blender version.

Currently, the setting is only available when `Developer Extras` is turned on,
because the setting is in no menu.

With this patch, if we get bug reports with compatibility issues caused by
depending on indices, one of the following three cases should always apply:
* We actually accidentally broke something, which requires a fix commit.
* Turning on geometry randomization shows that the .blend file depends on
  things it shouldn't depend on. In this case the user has to fix the file.
* We are missing geometry randomization somewhere, which requires a fix
  commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/113030
2023-09-29 21:44:36 +02:00
Iliya Katueshenock
1c4c76ccbf Fix #113011: delete unused anonymous attributes in capture attribute node
A lot of Capture Attribute nodes in sequence can create a huge number of attributes.
If these attributes are not used, they should be removed.

The speed of the Capture Attribute and Store Named Attribute nodes is now identical
(for the better). There are also no extra RAM usage now.

Pull Request: https://projects.blender.org/blender/blender/pulls/113053
2023-09-29 21:23:15 +02:00
Hans Goudey
73471b4e52 Merge branch 'blender-v4.0-release' 2023-09-29 13:19:13 -04:00
Hans Goudey
54ca0c93f9 Fix: Set node interface item active when added with link-drag-search 2023-09-29 13:18:45 -04:00
Harley Acheson
1b77fcf6d0 Merge branch 'blender-v4.0-release' 2023-09-29 10:05:47 -07:00