Commit Graph

127134 Commits

Author SHA1 Message Date
Zijun Zhou a9053f7efb Color management: Add AgX view transform and make it default
On a user level this view transform provides much better handling of colors in
the over-exposed areas.

With this configuration the following display devices are available, including
AgX view transform for them:
* sRGB
* Display P3
* Rec.1886
* Rec.2020

NOTE: There is no Filmic view transform available for the newly added display
devices.

AgX also brings an implementation of False Colors view transform, which replaces
Filmic-based, and is available for all display devices.

The backward compatibility is preserved. The new files will default to AgX view
transform, which makes it non-forward compatible.

More technical details is available in the original PR #106355.
Please note that the PR has been split into more incremental changes when
was landing.

Pull Request: https://projects.blender.org/blender/blender/pulls/111099
2023-08-22 12:53:15 +02:00
Bastien Montagne fa3dd4bdb5 I18N: Add back wrongly removed translation marker in recent cleanup.
7d9214d30f was a tad over enthousiastic in that case. ;)

Thanks to @mod_moder for noticing this!
2023-08-22 11:30:32 +02:00
Jeroen Bakker 2af2a11651 Vulkan: Use Correct Image Aspects
Depending on the usage of an image/image view different image aspect
requirements need to be used. When changing the layout of an image
all aspects needs to be included. When using it as a sampler or
framebuffer attachment only one aspect can be used.

This change also remove duplicated code when creating image views.

Pull Request: https://projects.blender.org/blender/blender/pulls/111349
2023-08-22 11:00:43 +02:00
Philipp Oeser 8bae4427ed Fix #111238: Arrow keys in some menus work in the opposite direction
Since menus are created flipped (from event handling point of view), the
root layout block needs to be flagged `UI_BLOCK_IS_FLIP`.
This was missing for a couple of `uiMenuCreateFunc`, namely:
- creating worspaces menu
- modifiers extra ops
- constraints extra ops
- GP modifiers extra ops
- GP Shader FX extra ops

Same fix as f51de2246c.

Not crtitcal, but could go into LTS I guess.

Pull Request: https://projects.blender.org/blender/blender/pulls/111341
2023-08-22 09:35:10 +02:00
Campbell Barton 7d688edbd3 Fix tool-tip memory leak
Error in [0] duplicated the tool-tip string twice.

[0]: f0467b4615
2023-08-22 17:22:03 +10:00
Campbell Barton f58d596c36 GHOST/Wayland: print the exception message on failure
When GHOST_SystemWayland can't be created, print the run-time error
unless X11 is available as a fallback.
2023-08-22 16:08:55 +10:00
Julien Kaspar 920271da42 Keymap: Left and Right Click consistency improvements
Fix some remaining consistency issues for selection shortcuts for both
left and right click select.

Based on design of #105298

Grease Pencil:

Instead of using `Alt Select` shortcuts for selecting whole strokes,
these are now following existing standards with `L` and `Shift L` from
select linked pick operations.

`Alt Select` keys are instead used for selecting individual components
in modes that use brushes just like [0].

Regular selection like `Select` and `Shift Select` are now always mapped
to ensure that all keymap configurations are able to select individual
components in every mode.
This does not cause conflicting behavior with brushes.

Lasso Select shortcuts on `Ctrl Alt` and `Shift Ctrl Alt` have been
removed. These were duplicates and are not needed.

Mesh Sculpt Mode:

Mesh sculpt mode uses correct lasso masking shortcuts in both right and
left click select. These are now the same as lasso selection shortcuts
in other modes.

Ref !110960.

[0]: fb54d3f865
2023-08-22 15:47:07 +10:00
Campbell Barton e611ef4312 Cleanup: use term even_xy for window relative coordinates, not mval
The term `mval` is reserved for region-relative coordinates
(see wmEvent::mval).
2023-08-22 13:57:58 +10:00
Campbell Barton 6a169cfe73 Cleanup: use rna_idprop_quote_path utility function in rna_prop_ui 2023-08-22 13:34:25 +10:00
Campbell Barton 8df5205028 Fix RNA path resolving failing to lookup empty string properties
An empty string is a valid ID property name, when set, RNA's
internal lookup function (rna_path_token_in_brackets), considered
the path invalid.

Now quoted tokens are allowed to be empty.

This fixes Python exceptions being thrown in the custom property editor
with empty custom property names.
2023-08-22 13:31:26 +10:00
Campbell Barton e044c5f12b Tests: add ID-property TestRNAData.test_custom_properties_access
Ensures RNA/ID-property key lookups are compatible.
2023-08-22 13:31:05 +10:00
Jesse Yurkovich f30ac938de Cleanup: Reduce unnecessary mesh position copying
Continuation of #103789 to remove/reduce the copying of mesh position
data.

Pull Request: https://projects.blender.org/blender/blender/pulls/111313
2023-08-22 03:51:53 +02:00
Harley Acheson d45f47a809 Cleanup: Make format
Formatting changes resulting from "make format"
2023-08-21 15:52:36 -07:00
Guillermo Venegas 4f6785774a UI: Fix scrollbar highlighting outside of regions
Remove scrollbar influence when the mouse cursor is outside
of that region.

Pull Request: https://projects.blender.org/blender/blender/pulls/105973
2023-08-22 00:47:11 +02:00
Germano Cavalcante c02f2f4947 Fix #109454: Snapping from Tools doesn't work if Depth option is not `Surface`
Regression introduced in 69d6222481.

In that commit the `Depth` option of the placement started to override
the snap toggle. So only the `Suface` value had snap.

This commit also changes the behavior when triggering Placement.
Previously, snapping was forcefully enabled (in the case of `Surface`)
and snapping elements other than Face were used.

Now snap is only enabled if toggle is enabled.
2023-08-21 15:24:47 -03:00
Jesse Yurkovich baa8f663a2 Fix (unreported) nullptr access in BKE_fcurve_handles_recalc_ex
Don't access fields of the potentially null `FCurve` struct before it's
been validated.

Pull Request: https://projects.blender.org/blender/blender/pulls/111315
2023-08-21 20:15:22 +02:00
Germano Cavalcante 5da64ff596 Fix #111355: Crash when calling operator 'TEXT_OT_save'
Crash occurs when calling with `EXEC_DEFAULT` context.

In this case `text->filepath` might be `nullptr` and cause a crash.

Fix by raising a Python error message in this case.
2023-08-21 15:10:42 -03:00
Richard Antalik 9269afda59 Fix VSE strip text crashing on assert
Rectangle of text drawn on strip could be inverted, which triggered
assert in `UI_view2d_view_to_region_rcti_clip()`.

This was because scrollbar width was added to left side of rectangle.
Since now scrollers are drawn on right side, this offset is replaced
with same offset as is used for strip handles. Both sides of rectangle
are clamped to same range, so it will not get inverted.
2023-08-21 18:26:09 +02:00
Habib Gahbiche 7d9214d30f Cleanup: i18n: remove extraction macro from some geometry nodes
Followup to #107258. Change was missed because development of
Kuwahara filter started before #107258 landed.

Pull Request: https://projects.blender.org/blender/blender/pulls/111151
2023-08-21 16:48:24 +02:00
Germano Cavalcante f1c6d61854 Fix #111342: Auto Perspective locks viewport into camera
In 384c2e1f36 it was assumed that `VIEWOPS_FLAG_PERSP_ENSURE` only
takes effect if Auto Perspective is enabled in preferences.

But that option is still required in camera view mode.

Therefore always set `VIEWOPS_FLAG_PERSP_ENSURE` if a navigation mode
requires it.

And add a comment explaining the reason.
2023-08-21 11:19:02 -03:00
Miguel Pozo f57a8f07c0 Fix: EEVEE-Next: World Volume compilation error
Add missing model matrix.
2023-08-21 15:48:48 +02:00
Lukas Tönne ea3d85b9d7 Node panels: RNA for node group interfaces
Part 2/3 of #109135, #110272

Defines the RNA API for the new node tree interfaces.

The bulk of the RNA definition lives in `rna_node_tree_interface.cc`. The legacy socket interfaces remain in place and will be removed later.

Since the socket items share the `bNodeSocketValueXXX` structs with the `bNodeSocket` types they also use the same RNA. The `rna_def_node_socket_interface_subtypes` function is exposed so that when defining the interface RNA it can use the same code as the regular socket RNA.

Pull Request: https://projects.blender.org/blender/blender/pulls/110952
2023-08-21 15:40:19 +02:00
Bastien Montagne f052b18a65 Always clear 'fake user' flag from linked data.
Using this flag from linked data is always a double-edge sword, in one
end some user have been relying on it to keep around data that is not
really used as ID (like e.g. text data-blocks, node trees, see
e.g.  #103687, #105687). On the other end, it often causes over-keeping
of linked data reference in production files.

From now on, when an unused linked data is to be kept around, users
should create an ID property to reference it.

Implements #106321.

Pull Request: https://projects.blender.org/blender/blender/pulls/111042
2023-08-21 15:33:25 +02:00
Alaska 7f65080ab4 Fix #111277: NaN in Vector Displacement leading to render errors
Fixes NaN in Vector Displacement node caused by the normalization of
0, 0, 0 vectors.

This fixes both visual rendering issues and an "illegal address" error
on the GPU. The "illegal address" error came from the Light Tree
Sampling code not handling the NaN normals well, leading to weird code
paths being taken, eventually leading to a kernel_assert and a
user facing illegal address error.

Pull Request: https://projects.blender.org/blender/blender/pulls/111294
2023-08-21 15:22:03 +02:00
Jeroen Bakker 8b311daf0a Cleanup: Make format 2023-08-21 15:03:43 +02:00
Jeroen Bakker 785e03b13f Cleanup: Reduce VKDebug Messenger Complexity
Reduces the complexity of VKDebug messenger_callback.
2023-08-21 15:03:33 +02:00
Bastien Montagne b3c7f3c8a9 UI: Add initial UI support for ID pointers custom properties.
Customprops to IDs are supported since years through code, but were
never exposed directly in the UI of customporperties.

This commit mainly:
* Adds a new `DATA_BLOCK` type to UI customprops types.
* Exposes the existing `id_type` settings to python API.

Pull Request: https://projects.blender.org/blender/blender/pulls/110458
2023-08-21 14:14:26 +02:00
Bastien Montagne b404df6989 Further tweaks to LSAN suppression rules.
Mainly add more python-related suppressions.

Also suppressed some reports from `pxr` (usd) libraries.

Now most tests are passing again with ASAN/LSAN on on my machine,
besides modifiers and geometry nodes ones, which often fail on a
mysterious `libstdc++.so.6+0xb259a` leak.
2023-08-21 14:07:16 +02:00
Sergey Sharybin f0a8c19461 Compositor: Increase tolerance for matte tests
The test is very susceptible to exact input values, and recent
change from Filmic to Standard view for those test changed values.

This change is similar to #110897

Pull Request: https://projects.blender.org/blender/blender/pulls/111339
2023-08-21 12:12:12 +02:00
Bastien Montagne 12b261545f I18N: Updated UI translations from SVN trunk (r6668). 2023-08-21 11:41:47 +02:00
Amelie Fondevilla 3dc93d6e38 GPv3: Display layer groups in grease pencil dopesheet
This patch adds a new type of channel for grease pencil layer groups, which works as an expandable summary channel of layers inside the group.

Pull Request: https://projects.blender.org/blender/blender/pulls/111015
2023-08-21 10:51:00 +02:00
Jeroen Bakker 9df5f2c495 Vulkan: Indirect Drawing
This PR implements indirect drawing for the Vulkan backend. Indirect
drawing is a requirement for workbench-next.

NOTE: that this is one of multiple changes needed to get to the same
support level. With this patch only objects at the center of the world
are drawn correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/111334
2023-08-21 08:55:55 +02:00
Campbell Barton 4760908b6e Fix potential buffer overflow & un-terminated strings on macOS
- GHOST_SystemPathsCocoa::getUserSpecialDir
  used `strncpy` without ensuring the string was null terminated.
- GHOST_SystemPathsCocoa::getBinaryDir
  used `strcpy` without checking the destination buffer size.
2023-08-21 11:53:22 +10:00
Campbell Barton eee33ce2df Cleanup: replace strcpy with BLI_strncpy 2023-08-21 11:09:18 +10:00
Campbell Barton 1c7adc61ae Cleanup: de-duplicate comments & expand on why UV's are clipped 2023-08-21 10:36:41 +10:00
Campbell Barton 33a05725be Cleanup: spelling in comments 2023-08-21 10:05:45 +10:00
Clément Foucault 65f91bd53a Fix: DRW: Broken debug decimal display
This is a temporary fix. A better fix
that display the non-scientific notation
would be better.
2023-08-20 17:52:48 +02:00
Clément Foucault b4b5977aed DRW: Guard debug lib using defines
This allows adding debug calls to library
sources and not trigger an error for
all shaders that reference the lib.
The particular shader that need to use
it can set `drw_debug_print_enable` and
`drw_debug_draw_enable` in their main file
and it will trigger the injection of the
debug functions.
2023-08-20 17:52:48 +02:00
Hans Goudey 39a40d6f84 Cleanup: Subdiv: Replace "stack or buffer" storage with C++ classes
Blender's C++ data structures have configurable inline buffers used to
avoid allocation when the needed size is small. Use them in multires
code instead of an uglier C solution.

Pull Request: https://projects.blender.org/blender/blender/pulls/111070
2023-08-20 00:25:45 +02:00
Harley Acheson b25b13a90b Fix #111278: UI Text Extension of Selection
Recent refactors could cause movement of selection endpoints when
extending (holding shift). This ensures that only the cursor side moves
during selection extension.

Pull Request: https://projects.blender.org/blender/blender/pulls/111288
2023-08-19 19:19:57 +02:00
Campbell Barton 5a8cb665e0 Cleanup: various non-functional C++ changes 2023-08-19 23:52:47 +10:00
Campbell Barton faa3ef6ad5 Cleanup: format 2023-08-19 23:52:47 +10:00
Habib Gahbiche 9d08be1eec Realtime Compositor: add regression tests
Tests must be enabled manually using the CMake flag `WITH_COMPOSITOR_REALTIME_TEST`. Reasons are F12 for realtime compositor is experimental and buildbots have no GPU. Failing tests are excluded.

Pull Request: https://projects.blender.org/blender/blender/pulls/109878
2023-08-19 15:00:54 +02:00
Campbell Barton 4f72240c1d Cleanup: spelling (correct correction), update dictionary 2023-08-19 20:19:13 +10:00
Campbell Barton 20b4a77872 datatoc: exclude the initial C-style comment from GLSL/MSL/Cuda files
Add optional argument `STRIP_LEADING_C_COMMENTS` to CMake macros:
data_to_c_simple & data_to_c.

Strip leading C-style comments that don't bloat binary size.
Comments are replaced with blank lines so line numbers in error messages
match. Reduces Blender's binary size by ~70kb.
2023-08-19 17:57:12 +10:00
Campbell Barton 63c1a26069 Cleanup: move GLSL comments to the file start
This has the benefit that leading comments may be stripped,
reducing the binary size (not yet supported).
2023-08-19 17:56:48 +10:00
Campbell Barton 04bf0f3eb6 License headers: add SPDX copyright entries for '*.msl' files 2023-08-19 17:41:14 +10:00
Campbell Barton add2a656da Cleanup: spelling, use C-style in GLSL 2023-08-19 17:13:05 +10:00
Ray Molenkamp e7c94b35b8 Fix: Missing PDB on windows
Missed one cmake check in 0df3aedfa8
2023-08-19 00:09:19 -06:00
Campbell Barton b903ce04d8 AUTHORS: add new developers 2023-08-19 14:58:05 +10:00