Commit Graph

133728 Commits

Author SHA1 Message Date
Hans Goudey
0673cd873d Fix: Incorrect viewer preferred domain for some curve fields
Mentioned by https://pvs-studio.com/en/blog/posts/cpp/1106/
2024-03-04 10:11:37 -05:00
Miguel Pozo
fd459ae82c Fix #117977: EEVEE-Next: Broken shadows with 1GB pool size
shadow_page_unpack clamps the result to a valid page range, causing
all pages that shouldn't be rendered to render to the last valid page.

Pull Request: https://projects.blender.org/blender/blender/pulls/118979
2024-03-04 16:01:02 +01:00
YimingWu
4f70190a01 Fix #119026: GPv3: Stack use after scope
The arrays `modified_starts` and `modified_ends` was freed early
due to wrong variable scope, this leads to incorrect randomize length
effect in length modifier. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/119054
2024-03-04 15:30:08 +01:00
Hans Goudey
2fe717df58 Cleanup: Make format 2024-03-04 09:22:32 -05:00
YimingWu
b3e46b65b9 GPv3: Fix: Memory corruption after modifier conversion
The switch branches are not laid out in correct order and without
`break`s between some of them, leading to wrong conversion results.

Pull Request: https://projects.blender.org/blender/blender/pulls/119052
2024-03-04 13:34:21 +01:00
Pratik Borhade
797b9f65e6 GPv3: Select mode in Edit Mode keymap
Keymap to switch between points and stroke edit mode with 1 and 2 key resp.

Pull Request: https://projects.blender.org/blender/blender/pulls/119049
2024-03-04 12:16:25 +01:00
Sietse Brouwer
ad8180c54c GPv3: Copy and Paste operators for copying strokes and points
This PR implements the Copy and Paste operators for GPv3. The operators
are available in Edit Mode. The Copy operator copies the selected strokes/
points to a clipboard. The Paste operator pastes the  strokes/points from
the clipboard to the active layer.

Keyboard shortcuts:
- `Ctrl`-`C` for copy
- `Ctrl`-`V` for paste
- `Ctrl`-`Shift`-`V` for paste in the back (behind all existing strokes)

Pull Request: https://projects.blender.org/blender/blender/pulls/114145
2024-03-04 11:02:25 +01:00
YimingWu
d0c9246fcc Fix #119022: GPv3: Noise modifier seed per stroke
Use seed per stroke for grease pencil v3 noise modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/119024
2024-03-04 10:58:34 +01:00
Lukas Tönne
64bb63dcb0 Fix #118962: Skip setting not taken into account looping over points
The GPv3 envelope modifier was computing the correct number of strokes
to generate, but then not actually skipping over points. Result is that
all envelope strokes got added at the beginning instead of the whole
point range.

Pull Request: https://projects.blender.org/blender/blender/pulls/119023
2024-03-04 10:57:17 +01:00
Casey Bianco-Davis
bb26c3d82f GPv3: Draw tool: Only create caps attributes if needed
This is to stop unneeded attributes from been created.

Pull Request: https://projects.blender.org/blender/blender/pulls/118985
2024-03-04 10:55:42 +01:00
Omar Emara
38caa87b09 Fix: Corner Pin node gizmo is too small
The Corner Pin node gizmo is too small to be used, so increase its size
to match the size of other node gizmos to improve usability.
2024-03-04 10:19:51 +02:00
Omar Emara
983643c78c Fix: Flat filter in Blur node is wrong in bokeh mode
The Flat filter was wrongly assumed to be separable, white it is in fact
not. So compute it as a 2D filter in bokeh mode to fix this.
2024-03-04 10:07:25 +02:00
Prakhar Singh Chouhan
4ce13fe198 Python: Add deprecation warnings to GPUBatch program usage
Calls to `gpu.types.GPUBatch.draw#program` without a program parameter,
or a None as value of the program parameter now raises a deprecation warning.

Implements #103978
2024-03-04 08:32:51 +01:00
Jesse Yurkovich
7bf4247b09 Depsgraph: add a DEG_graph_build_from_collection convenience function
This adds a new `DEG_graph_build_from_collection` function and related
pipeline to more easily build a graph of all relevant IDs from a given
Collection.

It was modeled after the `FromIDsBuilderPipeline` with the difference
being that the list of IDs is gathered from the Collection rather than
passed in. It also slightly differs in that the filtering class shares a
common `Set` rather than building it twice, once for the node builder
and once for the relation builder.

It will eventually be used for the Collection IO project where various
IO exporters will be tied to a Collection and will be limited to just
IDs contained in said Collection.

Pull Request: https://projects.blender.org/blender/blender/pulls/118732
2024-03-04 06:25:33 +01:00
Campbell Barton
8c16b612ca Merge branch 'blender-v4.1-release' 2024-03-04 12:53:37 +11:00
Campbell Barton
7e9a36c1fa Cleanup: suppress undefined variable use warnings 2024-03-04 12:51:24 +11:00
Campbell Barton
5af4987456 Merge branch 'blender-v4.1-release' 2024-03-04 12:21:50 +11:00
Campbell Barton
51126fab33 BLI_tempfile: ensure the temporary directory is absolute
While unreported, there is nothing preventing CWD relative temporary
directories being used. Resolve asserts & errors if the CWD changes at
run-time.
2024-03-04 12:20:44 +11:00
Campbell Barton
1b514659ca Cleanup: minor changes to temp directory API
- Pass null instead of an empty string to BKE_tempdir_init
  because the string isn't meant to be used.
- Never pass null to BLI_temp_directory_path_copy_if_valid
  (the caller must check).
- Additional comments for which checks are performed & why
  from discussion about #95411.
2024-03-04 11:42:02 +11:00
Jesse Yurkovich
b0daa792d3 Merge branch 'blender-v4.1-release' 2024-03-03 13:53:47 -08:00
Guillermo Venegas
8f68dfe0c2 Fix #119000: File handler extension check should be case insensitive
Allows case insensitive extension match.

Pull Request: https://projects.blender.org/blender/blender/pulls/119018
2024-03-03 22:50:51 +01:00
laurynas
bf17fc8d79 Fix: GPU: Ensures length of curves GPUIndexBuf to be multiple of 4
Exception is thrown in gpu_storage_buffer.cc

To reproduce create legacy Bezier curve and convert it to new Curves.
Code is from #116617

Pull Request: https://projects.blender.org/blender/blender/pulls/118951
2024-03-03 16:39:11 +01:00
casey bianco-davis
3d136d0d00 BLI: Add support for non-square matrix multiplication.
Adds support for multiplying non-square non-equal matrices.

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115783
2024-03-03 16:26:04 +01:00
Jacques Lucke
62bb346af9 Merge branch 'blender-v4.1-release' 2024-03-03 00:40:47 +01:00
Pratik Borhade
5f70bd0e46 Fix #116435: Rotate Vector node on a link connects wrong sockets
`sock_rotation` has higher priority (6) than the vector socket (4).
Hence inserting node between vector-vector link joins thorugh "rotation"
socket (`get_main_socket()` / `get_main_socket_priority()`).
This can be fixed by making "vector" input socket as default for link.

But this will break the link creation when node is inserted between
rotation-rotation link. It seems rotation is converted to vectors so
perhaps make sense to make "vector" as default socket for link.

Pull Request: https://projects.blender.org/blender/blender/pulls/116550
2024-03-03 00:38:34 +01:00
Jacques Lucke
fdc9bcf523 Merge branch 'blender-v4.1-release' 2024-03-03 00:35:37 +01:00
Jacques Lucke
cce2b6671e Fix #114110: background dots clipping in node editor
The clipping was introduced because it looked a bit like the dots are
above the scrollbar. However, the clipping looks worse and the dots
are actually below the scrollbar. If we don't want stuff to be visible
through the scrollbar, it should be more opaque.
2024-03-03 00:34:16 +01:00
Jacques Lucke
10b5fe8897 Merge branch 'blender-v4.1-release' 2024-03-03 00:00:48 +01:00
Jacques Lucke
e72bf54791 Fix #118926: missing transform relation when using Object/Collection Info node
This was probably accidentally broken when we moved the rna code into node files.

Pull Request: https://projects.blender.org/blender/blender/pulls/119017
2024-03-02 23:59:48 +01:00
Jacques Lucke
1756ccf809 Merge branch 'blender-v4.1-release' 2024-03-02 23:57:15 +01:00
Jacques Lucke
65083472ec Fix: issue in previous commit
Many tests started failing after 173c41c1c0
due to memory leaks.
2024-03-02 23:56:37 +01:00
Jacques Lucke
434759d333 Merge branch 'blender-v4.1-release' 2024-03-02 21:40:47 +01:00
Jacques Lucke
173c41c1c0 Fix #114946: Mesh.clear_geometry should not clear required built-in attributes
Pull Request: https://projects.blender.org/blender/blender/pulls/119012
2024-03-02 21:40:03 +01:00
Hans Goudey
6db0bee685 Cleanup: Add utility for volume grid nodes search items 2024-03-02 15:06:32 -05:00
Jacques Lucke
b16e4bee1f Merge branch 'blender-v4.1-release' 2024-03-02 20:20:26 +01:00
Jacques Lucke
cc891aa699 Fix #115583: multiple sharing info for same data after reading file
It's possible that multiple custom data layers share the same underlying data.
This data is only written once (per data-block) currently. However, when reading
the data again, two separate `ImplicitSharingInfo` were constructed which
referenced the same underlying memory. The fix is to reuse previously created
`ImplicitSharingInfo` that manage the same data.

Pull Request: https://projects.blender.org/blender/blender/pulls/118991
2024-03-02 20:10:34 +01:00
Harley Acheson
6fd0f384d7 UI: Add Title to Extensions Repo Popover
Just adds a "Repositories" title to the repo popover in
Properties / Extensions.

Pull Request: https://projects.blender.org/blender/blender/pulls/119009
2024-03-02 19:10:20 +01:00
Richard Antalik
c2d8d84cd8 Merge branch 'blender-v4.1-release' 2024-03-02 18:34:38 +01:00
Richard Antalik
58a9acb016 Fix #118486: Prevent emitting error when adding VSE strips
When adding strips that generate image on their own, while 3 or more
strips are selected, it emits error. This was caused by incorrect
handling of this case in `seq_effect_find_selected()`. If effect has no
inputs, function should return early.

Pull Request: https://projects.blender.org/blender/blender/pulls/118866
2024-03-02 18:34:00 +01:00
Richard Antalik
fc32b9c5dd Fix: Crash when multiview movie right view is missing.
Ultimately this was due to missing nullptr check before trying to
process the image, but this should have been caught when loading
ImBufAnims. If any is missing, cancel multiview loading and load
movie as if it was single view only.
2024-03-02 18:12:47 +01:00
Bastien Montagne
015ae2b3a6 Merge branch 'blender-v4.1-release' 2024-03-02 16:29:05 +01:00
Bastien Montagne
da101d8cdb Fix #118300: Broken liboverride data can crash Blender on load.
Second issue reported in the comment was caused by some shapekeys
flagged as embedded liboverride data, when their owner ID (Mesh e.g.)
is not a liboverride at all.

The `BKE_lib_override_library_validate` called on file read was only
covering real liboverride IDs, which where then supposed to take care of
their own embedded data. But since the owner ID is already a full
non-override ID, its embedded data ended up never being properly
sanitized.

Most likely more corruption data from quite old files and/or deprecated
experimental features.
2024-03-02 16:17:41 +01:00
Habib Gahbiche
38b27a9ea9 Cleanup: Compositor: silence warning 'size' is deprecated
Decouple Node data from Operation. This avoids usage of deprecated members, e.g. through copying NodeKuwaharaData.

Pull Request: https://projects.blender.org/blender/blender/pulls/118971
2024-03-02 13:11:16 +01:00
Lukas Stockner
14a8149318 Cleanup: Cycles: Remove unused function 2024-03-02 02:16:54 +01:00
Jacques Lucke
fae16e7454 Merge branch 'blender-v4.1-release' 2024-03-02 01:25:04 +01:00
Jacques Lucke
4a81fe8180 Fix #115755: rename enum from type to rotation_type to resolve name collision
`type` is a built-in property already.

Pull Request: https://projects.blender.org/blender/blender/pulls/118990
2024-03-01 23:57:33 +01:00
Hans Goudey
aab9ecc396 Cleanup: Remove very old hack to fix linking in interface module
Pull Request: https://projects.blender.org/blender/blender/pulls/118988
2024-03-01 23:47:18 +01:00
Hans Goudey
beb92830f9 Geometry Nodes: Add node tools warning when shape keys are removed
For various reasons, node tools don't support some data. Shape keys aren't
supported because their format is entirely different for evaluated and
original data-blocks, and node tools currently work in the "evaluated"
world. Though that would be nice to change, in the meantime users
should at least be warned when this happens.

This PR adds a simple "Mesh shape key data removed" operator warning.

See #113662

Pull Request: https://projects.blender.org/blender/blender/pulls/118986
2024-03-01 22:45:04 +01:00
Jacques Lucke
b879772004 Merge branch 'blender-v4.1-release' 2024-03-01 22:40:23 +01:00
Jacques Lucke
8f36281787 Nodes: expose ordering of links in multi input socket in Python
This fixes #116096 and is based on #115249 with some changes.

This patch contains three changes:
* `NodeSocket.links` in the Python API gives the links in the correct order.
* `NodeLink.multi_input_sort_id` gives read-only access to an id that's used
  for sorting. Note that for historical reasons the highest id is the first link.
* `NodeLink.swap_multi_input_sort_id(other_link)` provides a safe way to
  change the order of links connected to a multi-input socket.

Co-authored-by: Adrian Bibby Walther <adrianbibbywalther@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/118987
2024-03-01 22:36:10 +01:00