Commit Graph

107429 Commits

Author SHA1 Message Date
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
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
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
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
Jesse Yurkovich
833791772c Merge branch 'blender-v4.1-release' 2024-03-01 13:15:42 -08:00
Jesse Yurkovich
1597e9386f Fix #118602: Build depsgraph on main thread for Alembic
Building the depsgraph from a worker thread is unsafe currently, as it
may trigger some deferred processing on the Main data itself.

Mimic what was already done for USD (from `5cf3654d9d`) and build the
graph before launching `export_startjob`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118974
2024-03-01 22:14:12 +01:00
Sean Kim
8791153a7b Cleanup: Extract sculpt gesture functionality to separate file
This PR extracts the common sculpt gesture code from paint_mask.cc into
a separate file in preparation for further changes to use it within the
existing `PAINT_OT_hide_show` box gesture operator and later for adding
a new *Lasso Hide* operator for #80390

Pull Request: https://projects.blender.org/blender/blender/pulls/118881
2024-03-01 22:07:25 +01:00
Sean Kim
c60d793bbf Fix #103013: Add default cavity curve
This PR initializes all brushes with the default automasking cavity
curve when a `startup.blend` file is loaded. Because there exists a
series of brushes that are added if they are not found in the
`startup.blend` file (e.g. "Paint") **after** the file is already
loaded, the existing fallback code to handle `nullptr` in the loader
code does not run.

Pull Request: https://projects.blender.org/blender/blender/pulls/118943
2024-03-01 22:06:35 +01:00
Hans Goudey
95fb695195 Fix: Missing experimental option check for volume grid nodes search 2024-03-01 15:53:55 -05:00
Hans Goudey
600a4fff39 Cleanup: Remove unused opensubdiv compute type enum 2024-03-01 15:14:00 -05:00
Hans Goudey
840307c59a Fix: Build error on MSVC after recent cleanup, make format
captured structured bindings are a C++20 extension [-Wc++20-extensions]
2024-03-01 14:54:01 -05:00
Hans Goudey
d29ce3d531 UI: Remove uiBut a1 and a2 values
Over the last couple years (!) UI buttons have moved to derived classes,
meaning we don't need to use the same "a1" and "a2" variables to store
different information. At this point, that information is set specifically
by internal UI code, or functions like `UI_but_*_set`.

These values are only set to their default 0 values now (or -1 in some
non-meaningful cases). This commit removes the values from buttons
and removes the remaining a1 and a2 arguments from the UI API.
2024-03-01 14:27:57 -05:00
Hans Goudey
8c63889241 Cleanup: UI: Use derived struct for list scroll bars, remove a1, a2 usage 2024-03-01 14:27:57 -05:00
Hans Goudey
365966d51d Cleanup: UI: Use derived struct for label buttons, remove a1, a2 usage 2024-03-01 14:27:56 -05:00
Hans Goudey
7053aef448 Cleanup: Correct comments about uiBut a1 and a2 2024-03-01 14:27:56 -05:00
Hans Goudey
f4e670af2c Refactor: UI: Use regular button callbacks for curve, color ramp templates
Previously these used a special "menu func" that used an argument value
passed through each menu button's a2 value. This was more complex than
necessary given the existence of generic button callbacks.

So use std::function in these remaining cases, and remove the now-unused
`butm_func` and `butm_func_arg` values in the uiBlock.
2024-03-01 14:27:56 -05:00
Miguel Pozo
2223130b16 Fix: EEVEE-Next: Shadow debug shader
Make the implementation functional again.

Pull Request: https://projects.blender.org/blender/blender/pulls/118923
2024-03-01 20:13:12 +01:00