Commit Graph

103283 Commits

Author SHA1 Message Date
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
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
Harley Acheson
82bfc41d0c UI: Allow Separate Configuration of Subpixel Antialiasing
Separate user configuration of subpixel antialiasing from the hinting
options. For example, this allows turning this on while hinting is
"None", or off when hinting is "Full".

Pull Request: https://projects.blender.org/blender/blender/pulls/113027
2023-09-29 19:02:25 +02:00
Philipp Oeser
9cbcff97f9 Merge branch 'blender-v4.0-release' 2023-09-29 17:12:56 +02:00
Philipp Oeser
cfde3973d1 Fix: Theme color for sub-channels not exposed in NLA Preferences
Subchannel (mesh, shapekey, lattice, speaker, ...) color could not be
changed from NLA Preferences, `ds_subchannel` was only initialized in
userdef_default_theme.c [making it more or less hardcoded].

Now expose this in Preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/113045
2023-09-29 17:12:17 +02:00
Iliya Katueshenock
6c14764f32 Fix #112933: Fix codegen issue on MSVC 17.7
MSVC 17.7 generates bad code in some lambda's, this has been reported
upstream [1], and a workaround has been suggested by MS in the form of
turning the inliner off. In consultation with the geo nodes people this
was deemed a passable solution, there was only a single call to this
method so performance wasn't a concern, so no special care had to be
taken to single out just the problematic MSVC versions.

If this bug pops up in other parts of our code where performance IS a
concern a more delicate approach may be required.

[1] https://developercommunity.visualstudio.com/t/10448291

Pull Request: https://projects.blender.org/blender/blender/pulls/112616
2023-09-29 16:57:02 +02:00
Lukas Tönne
7340bdaa92 Merge branch 'blender-v4.0-release' 2023-09-29 16:29:59 +02:00
Lukas Tönne
d1435f6729 Node groups: Add undo steps after drag and drop of interface items
These have to be added manually by the drop targets.

Pull Request: https://projects.blender.org/blender/blender/pulls/113061
2023-09-29 16:29:26 +02:00
Nate Rupsis
dc453d4482 Merge branch 'blender-v4.0-release' 2023-09-29 08:34:57 -05:00
Nate Rupsis
d1f250c0bc FIX #110946: vgroup normalize all check if armature is deforming before normalizing
If an armature is present, but not active the group_select_mode defaults to WT_VGROUP_BONE_DEFORM, and throws an error because it can't find any active vertex groups.  we're now checking to see if any bone is actively deforming before switching to WT_VGROUP_BONE_DEFORM (else defaulting to WT_VGROUP_ALL)

Pull Request: https://projects.blender.org/blender/blender/pulls/112648
2023-09-29 15:31:57 +02:00
Germano Cavalcante
112d6f1828 Merge remote-tracking branch 'origin/main' into zoom_optimize 2023-09-29 09:12:31 -03:00
Philipp Oeser
9e25ac676b Merge branch 'blender-v4.0-release' 2023-09-29 13:18:33 +02:00
Philipp Oeser
2d1cbac809 Fix #113052: Node panel state change not updating Node Editor
When collapsing/expanding panels from the Properties Editor, the Node
Editor was not updated immediately.

Now add notifier for this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/113054
2023-09-29 13:17:52 +02:00
Sybren A. Stüvel
d6b86f278b Anim: keymap, replace 'show all layers' with 'show all collections'
Make the Ctrl+ACCENT_GRAVE hotkey call the 'show all bone collections'
operator (`armature.collection_show_all`), instead of 'show all armature
layers' (`armature.layers_show_all`).

This was the last reference to `armature.layers_show_all`, and the operator
has been removed.
2023-09-29 11:52:44 +02:00
Jeroen Bakker
f97a56eedd Vulkan: Fix Blitting Extents
During Blitting it is not allowed to read/write outside
the texture bounds. This patch ensures that the bounds
(called extents in Vulkan) are inside the expected range.

Pull Request: https://projects.blender.org/blender/blender/pulls/113050
2023-09-29 11:44:50 +02:00
Lukas Tönne
0afdd5c248 Merge branch 'blender-v4.0-release' 2023-09-29 10:31:31 +02:00
Lukas Tönne
164fbc2863 Fix #113013: Make in_out socket property read-only and remove the button
Pull Request: https://projects.blender.org/blender/blender/pulls/113048
2023-09-29 10:29:57 +02:00
Campbell Barton
42bd9cd1e6 Merge branch 'blender-v4.0-release' 2023-09-29 17:15:16 +10:00
Peng Yan
26b2cc3ffb Fix error in area calculation for polyfill beautify calculation 2023-09-29 17:13:17 +10:00
Campbell Barton
3111ac4e96 Merge branch 'blender-v4.0-release' 2023-09-29 13:57:24 +10:00
Campbell Barton
ea054d9c4c Merge branch 'blender-v4.0-release' 2023-09-29 13:57:20 +10:00
Campbell Barton
655c639cf3 Merge branch 'blender-v4.0-release' 2023-09-29 13:57:18 +10:00
Campbell Barton
74c56f2b8f Merge branch 'blender-v4.0-release' 2023-09-29 13:57:15 +10:00
Campbell Barton
f6b73a2998 Merge branch 'blender-v4.0-release' 2023-09-29 13:57:12 +10:00