Commit Graph

132969 Commits

Author SHA1 Message Date
Campbell Barton b91918564d Tests: add tests for convexhull_2d
Move BLI_convexhull_aabb_fit_points_2d to a public function to be able
to compare compare fitting one convex hull with a simple reference
method.

One test is disabled as it exposes an error in convex hull calculation
which needs further investigation.
2024-02-12 20:17:19 +11:00
Thomas Dinges 34feee3499 Cleanup: Remove unused internal FFMPEG presets
Formats like VCD and SVCD are obsolete, others are done via Python.

Pull Request: https://projects.blender.org/blender/blender/pulls/118069
2024-02-12 09:45:13 +01:00
Campbell Barton 835b9a506d Merge branch 'blender-v4.1-release' 2024-02-11 17:19:27 +11:00
Campbell Barton 835651cfdd Fix cross_poly_v2 returning a negated value, add tests
The result of cross_poly_v2 was flipped compared with cross_tri_v2 &
cross_poly_v3 (with the Z values zeroed).

Ensure cross_poly_v2/3, cross_tri_v2/3 return compatible results and
updating the doc-strings noting that a negative Z is for clock-wise
polygons.
2024-02-11 17:16:17 +11:00
Brecht Van Lommel 3e0d77c80f Build: macOS support for "make source_archive" 2024-02-11 02:50:23 +01:00
Bastien Montagne 5146e118c5 Fix broken MacOS builds after recent refactor.
For some reasons IDE did not search in MTL OSX files...
2024-02-10 19:49:12 +01:00
Bastien Montagne 5aaadebbe4 Cleanup: Make `BKE_scene.h` a full Cpp header. 2024-02-10 19:16:25 +01:00
Bastien Montagne 29fe777445 Cleanup: Make `BKE_report.h` a full Cpp header. 2024-02-10 18:34:29 +01:00
Bastien Montagne 54618dbae3 Cleanup: Make `BKE_global.h` a Cpp header. 2024-02-10 18:25:14 +01:00
Jacques Lucke c3b7f76e5f BLI: support repeating index masks
This adds two new constructors to `IndexMask`:
* `from_repeating(mask_to_repeat, repetitions, stride, initial_offset, memory)`:
  It allows repeating an existing index mask with a stride.
* `from_every_nth(n, indices_num, initial_offset, memory)`: Creates an index
  mask like `{0, 2, 4, 6, ...}`.

`from_every_nth` is implemented in terms of `from_repeating` which is optimized
to handle this case (and other cases) very efficiently.

Pull Request: https://projects.blender.org/blender/blender/pulls/118084
2024-02-10 16:58:59 +01:00
Iliya Katueshenock bb5b4b1f2f BLI: add comparison operators for IndexMask
Support `==` and `!=` operators for `IndexMask`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117814
2024-02-10 15:32:36 +01:00
Campbell Barton 3b809ac99b Cleanup: minor changes to convexhull_2d
- Function style casts.
- Use reduce indentation, use continue.
- Replace argument "n" with "points_num".
2024-02-10 23:34:36 +11:00
Campbell Barton 727d47c015 Cleanup: move convexhull_2d to C++ 2024-02-10 22:40:46 +11:00
Campbell Barton 28e771372b Cleanup: wrap lines for in CMake's build-environment for readability
- Commands which have arguments split over multiple lines use
  indented lines.
- Wrap lines where multiple commands run using "&&".
- Blank lines between multiple commands helps the text from becoming
  too dense.
2024-02-10 22:36:36 +11:00
Campbell Barton 3dbbc013de Cleanup: spelling in comments 2024-02-10 22:35:35 +11:00
Campbell Barton 2df863287f Cleanup: use UV instead of Uv in code-comments 2024-02-10 22:35:33 +11:00
Campbell Barton 37327a5d84 Cleanup: use "value_or" for optional types instead of ternary operators 2024-02-10 22:35:32 +11:00
casey bianco-davis 567a33ab32 BLI: Fix non-square matrix print (`cout<<`).
The iterations through the rows and columns where flipped.
This would cause invalid memory to be accessed and an assertion
error in debug mode.

Note: This is only fixing an error with non-square matrix printing
and has no effect on square matrices.

Pull Request: https://projects.blender.org/blender/blender/pulls/118076
2024-02-10 10:05:59 +01:00
Harley Acheson 48390d018d Merge branch 'blender-v4.1-release' 2024-02-09 12:23:51 -08:00
Harley Acheson 55882e1fb0 Fix #118061: Tooltip Length Calculation Clipped for Enums
When calculating the width of strings for the tooltip window size, enum
labels were measured using the string from the text_suffix field but
length from the text field. Introduced with std::string changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/118064
2024-02-09 21:22:03 +01:00
Thomas Dinges eaeaf8322c BLI: Bump SSE check from 4.1 to 4.2
This will be the new minimum for Blender 4.2, so check for the SSE4.2 flag and update the function name.

Pull Request: https://projects.blender.org/blender/blender/pulls/118058
2024-02-09 20:28:46 +01:00
Brecht Van Lommel 93e4fa7d36 Build: Disable TIFF sphinx docs for library dependencies 2024-02-09 20:00:30 +01:00
Bastien Montagne 6c6a3b8afc Cleanup: make format. 2024-02-09 19:52:55 +01:00
Bastien Montagne e71ae3b16c Cleanup: Move `BKE_collection.h` to CPP header. 2024-02-09 19:42:38 +01:00
Bastien Montagne deab8c085a Cleanup: Move `BKE_callbacks.h` and `BKE_cachefile.h` to CPP headers. 2024-02-09 19:29:34 +01:00
Hans Goudey d1d3d998ea Fix: LibOverride: Memory leak after recent std::string conversion
An allocated char pointer was reassigned without being freed.
Fix by replacing the error-prone combination of C strings and
std::string with a complete conversion to std::string. Also change
the logic a bit to allow moving the path string in some cases
instead of copying it.

Pull Request: https://projects.blender.org/blender/blender/pulls/118046
2024-02-09 19:29:03 +01:00
Bastien Montagne a9b2cf8ce6 Cleanup: Move `BKE_path.h` to CPP header. 2024-02-09 19:23:03 +01:00
Bastien Montagne b21ceece05 Cleanup: Move `BKE_blender.h` to CPP header.
Also fix comment in `build_files/cmake/macros.cmake`, CMake blender version
parsing depends in the (still C) `BKE_blender_version.h` header now.
2024-02-09 19:12:23 +01:00
Bastien Montagne 45e7827898 Clenup: Move BLT headers to Cpp.
Noisy but fairly straight forward.
2024-02-09 18:59:42 +01:00
Hans Goudey f21b5663e2 Cleanup: Update naming in mesh DNA header comments
Also attempt to improve wording on a few of the descriptions.
2024-02-09 12:25:34 -05:00
Hans Goudey 7e13522a4f Merge branch 'blender-v4.1-release' 2024-02-09 11:43:26 -05:00
Harley Acheson 4c50e6992f UI: Configurable Layout Separators
Ability to create vertical bar separators in horizontal layouts,
horizontal lines in popovers, and vertical (non-line) spacers in menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/117310
2024-02-09 17:38:36 +01:00
Hans Goudey 93e72912e1 Fix #118014: Sculpt: Some brushes don't work with dyntopo
After bb080140c0, `SCULPT_pbvh_calc_area_normal` returned
std::nullopt when it didn't sample any vertices, instead of returning
an ignorable boolean return value. There was a false negative failure
though, because it didn't keep track of when it sampled BMesh "orco"
vertices.
2024-02-09 11:37:40 -05:00
Thomas Dinges 30a22b92ca Cycles: Rename SSE4.1 kernel to SSE4.2
This commit updates all defines, compiler flags and cleans up some code for unused CPU capabilities.

There should be no functional change, unless it's run on a CPU that supports sse41 but not sse42. It will fallback to the SSE2 kernel in this case.

In preparation for the new SSE4.2 minimum in Blender 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/118043
2024-02-09 17:25:58 +01:00
Aras Pranckevicius 6f7ac2be53 VSE: Simplify and speedup sequencer cache drawing
5 years ago (18b693bdbd) part of cache rendering was converted to not
draw one quad at a time. However the other part (drawing strip
backgrounds when cache visualization is on) was left still drawing one
quad at a time.

Now that sequencer timeline drawing code has SeqQuadsBatch that batches
arbitrary number of things for drawing fairly easily, the existing
cache drawing batching code can be simplified to just use that, and
the background code changed from immediate quad drawing to use the
batcher.

Sprite Fright edit, whole timeline visible, all caches visualized and
full: `draw_cache_view` on Windows/Ryzen5950X goes 2.40ms -> 0.16ms.
And there's less code.

Pull Request: https://projects.blender.org/blender/blender/pulls/118027
2024-02-09 17:17:54 +01:00
Bastien Montagne 0fd8f29e88 IDManagement: Update the Purge operator to display an interactive popup.
Make the 'purge' operation show an interactive popup by default, with
a preview of the type and amount of data-blocks to be deleted.

Idea and initial UI/UX design are from @Harley (see PR !117242).

Pull Request: https://projects.blender.org/blender/blender/pulls/117304
2024-02-09 17:01:33 +01:00
Bastien Montagne 09a2688684 Refactor `BKE_lib_query_unused_ids` API.
Add a new `BKE_lib_query_unused_ids_amounts` to query expected amounts
of deleted IDs. This function does not tag IDs in main anymore.

Factorize most parameters (and output data) into a new struct
`LibQueryUnusedIDsData`.

Part of PR https://projects.blender.org/blender/blender/pulls/117304.
2024-02-09 17:01:31 +01:00
Sybren A. Stüvel 899b53e9d8 Cleanup: Anim, add explanation to bone collection code
I had questions about my own code, so I answered them in a comment.

No functional changes.
2024-02-09 16:58:01 +01:00
Lukas Tönne b8bb5a0700 Fix: GPv3: Read/write of the parsubstr (parent bone name)
This is now an allocated string and needs to be mapped on file read.

Pull Request: https://projects.blender.org/blender/blender/pulls/118048
2024-02-09 16:51:32 +01:00
Miguel Pozo 98231ea880 GPU: Optimize GLStorageBuf::read performance
Add a separate persistent mapped buffer where the main SSBO can be
copied, so its contents can be read from the CPU without stalling the
GPU.

Pull Request: https://projects.blender.org/blender/blender/pulls/117521
2024-02-09 16:11:33 +01:00
Bastien Montagne c065ef94ee Readfile: Make 'alloc name' for ID type automatically generated.
Avoids having yet another `switch` case over all ID types.

Note that we could also add a string to the IDTypeInfo, but imho this is
a bit too limited in scope/interest to expose this outside of the readfile
code.

Pull Request: https://projects.blender.org/blender/blender/pulls/117958
2024-02-09 16:04:53 +01:00
Miguel Pozo ee493b3c05 Fix: EEVEE Next: View Layer Motion Blur UI
Outdated properties after
74b8f99b43
2024-02-09 15:45:10 +01:00
Philipp Oeser c5659e56c5 Merge branch 'blender-v4.1-release' 2024-02-09 15:40:01 +01:00
Damien Picard 990c0ad42c Fix #113803: some cloth weight groups change on reordering
When reordering vertex groups on a mesh, some cloth properties would
get affected by another group, because they were based on group index
instead of name.

This issue was already handled by
`BKE_object_defgroup_remap_update_users()` for some properties, but
not all.

This commit extends the function for missing properties: Shrinking,
Shear, Internal Springs, Pressure, Self Colllisions and Object
Collisions.

Pull Request: https://projects.blender.org/blender/blender/pulls/114032
2024-02-09 15:39:09 +01:00
Brecht Van Lommel 01f2c32700 Merge branch 'blender-v4.1-release' into main 2024-02-09 15:16:55 +01:00
Brecht Van Lommel a94ecd47f1 Tests: Reduce threshold on denoising now all platforms use OIDN 2.2
Pull Request: https://projects.blender.org/blender/blender/pulls/117994
2024-02-09 15:16:33 +01:00
Philipp Oeser 568c99d191 Fix #117989: GPv3: Cannot move Node(s) in Geo Node Editor in 'Edit Mode'
The transform system reacts to `CTX_GPENCIL_STROKES` in a special way
that is only useful in `SPACE_VIEW3D`.
There was a similar case fixed in 23e9ebfdbd, but there would be
multiple other places to also check the spacetype.

So now do this more generalized and only ever set `CTX_GPENCIL_STROKES`
if we are in editmode (that check existed before) **and** in
`SPACE_VIEW3D`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118042
2024-02-09 15:11:32 +01:00
Brecht Van Lommel 1e1a8d5c8f Fix: Cycles denoise fails with multi tile render and Use GPU off 2024-02-09 15:11:21 +01:00
Brecht Van Lommel f98468c988 Fix: Cycles uses GPU device for denoise even if disabled for scene 2024-02-09 15:02:46 +01:00
Clément Foucault fc56ae4e30 Fix: EEVEE-Next: Crashing tests caused by new properties 2024-02-09 15:02:03 +01:00