Commit Graph

120055 Commits

Author SHA1 Message Date
Campbell Barton
b8cc85f602 Unbreak build with precompiled headers disabled 2024-03-05 11:25:35 +11:00
Hans Goudey
6479dc50fa Refactor: Mesh: Use C++ threading API for tessellation
This allows deleting a bunch of duplicate code, since there doesn't
need to be a special single-threaded case anymore. It also just
reduces the necessary boilerplate.

Also change naming a bit and use signed integers instead of unsigned.

I didn't notice any performance difference.

Pull Request: https://projects.blender.org/blender/blender/pulls/119069
2024-03-05 01:03:45 +01:00
Campbell Barton
5fdd684550 Merge branch 'blender-v4.1-release' 2024-03-05 10:20:52 +11:00
Campbell Barton
8842982dbd Docs: note the temporary directory will be ignored unless it exists
Other minor changes:

- Remove reference to `TMP` environment variable in the `--help` text
  as this isn't a posix standard and is noted as something that may be
  removed in the future.
- Show WIN32 `TEMP` when showing all help text so it will be included
  in the user manual.
2024-03-05 10:19:16 +11:00
Campbell Barton
c789a938d9 Cleanup: remove temporary directory creation 2024-03-05 09:54:49 +11:00
Hans Goudey
ce80cc1526 Cleanup: Remove unused UI button creation function
Last used over 11 years ago apparently.
2024-03-04 12:22:50 -05:00
Omar Emara
82448c1e4d Fix: Typo in latest commit
The named identity constructor was mistyped.
2024-03-04 19:19:06 +02:00
Omar Emara
4ab6feb5bd Fix: GPU Compositor results are sometimes clipped
Compositor outputs are sometimes clipped. That's because consecutive
shader operations in the GPU compositor were assumed to have the same
domain. So make sure to reset the domain during compile unit resets.
2024-03-04 19:16:07 +02:00
Omar Emara
19188582b0 Cleanup: Remove unused return 2024-03-04 19:15:06 +02:00
Sybren A. Stüvel
a1b10f85cd Refactor: Anim, split up FCurve-reading/writing code
Split `BKE_fcurve_blend_write(writer, listbase)` into two functions:
- `BKE_fcurve_blend_write_data(writer, fcurve)` for the data of a single
  F-Curve, and
- `BKE_fcurve_blend_write_listbase(writer, listbase)` for writing a list
  of F-Curves.

And the same for `BKE_fcurve_blend_read_data()`.

This is necessary for the upcoming Animation data-block, which will
store F-Curves as arrays instead of `ListBase`s.

No functional changes.
2024-03-04 17:50:14 +01:00
Iliya Katueshenock
fa229c5753 Fix #119019: Geometry Nodes: Split to Instances wrong field interface
Input fields should propagated on input geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/119032
2024-03-04 16:57:28 +01:00
Lukas Tönne
d6aadd6692 GPv3: Outline modifier
Port of GPv2 outline modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/118911
2024-03-04 16:54:07 +01:00
Sebastian Parborg
6290ead143 Merge branch 'blender-v4.1-release' 2024-03-04 16:53:54 +01:00
Sebastian Parborg
a8cc2e4d96 Fix: Add missing iostream include
Without this include compilation would sometimes fail
2024-03-04 16:50:47 +01:00
Hans Goudey
5f16d23971 Fix: Null pointer dereference in node editor ID remapping
This didn't cause a crash because `offsetof(bNodeTree, id) == 0`.
But still, it is wrong.
2024-03-04 10:36:21 -05:00
Raul Fernandez
3c6a9cb5a5 Fix #117824: Sculpt color filter crash
Fix for Sculpt: Color Filter crash #117824

This change fixes the crash due to invalid active color layer
in the Undo/Redo stack when redoing from the original state.

Previously when performing a redo to a filter color state from the
original state, it cased a crash because
&((SculptUndoStep *)us_iter)->active_color_start did not contain valid
color data in the original state.
In this PR we check if is the original state and use the
&((SculptUndoStep *)us_iter)->active_color_end instead which is
de correct data to use.

- [x] Fix color update  when redo from initial state

Pull Request: https://projects.blender.org/blender/blender/pulls/118885
2024-03-04 16:31:52 +01:00
Hans Goudey
31f6d4db89 Fix: Incorrect assert in OBJ mesh edge creation
Typo in 2a4323c2f5
2024-03-04 10:11:38 -05:00
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
Bastien Montagne
afb5cb440b Fix/tweak UI messages (typos etc.). 2024-03-04 11:17:55 +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
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