Commit Graph

106697 Commits

Author SHA1 Message Date
Miguel Pozo
7ca46bb25d Merge branch 'blender-v4.1-release' 2024-02-12 18:35:31 +01:00
Miguel Pozo
1323b9912c Cleanup: Remove outdated comment
gl_InvocationID is always available now.
2024-02-12 18:34:54 +01:00
Miguel Pozo
7821cf068c Fix: Workbench: Shadows
Broken shadows after c0c3565714
GPU_ARB_gpu_shader5 is never defined,
since gl_InvocationID is always available.
2024-02-12 18:34:12 +01:00
Michael Kowalski
e4c45cbce1 Merge branch 'blender-v4.1-release' 2024-02-12 11:58:02 -05:00
Hans Goudey
d434ef6566 Docs: Add comments to node tree runtime struct clarifying design
Currently we have some old code from shader/compositor/texture nodes
that stores runtime data during and after evaluation on the node tree
itself. This is meant to be avoided, since the node tree is just meant
to be evaluation _instructions_.

Pull Request: https://projects.blender.org/blender/blender/pulls/118056
2024-02-12 17:44:12 +01:00
Hans Goudey
b0b6bc86ab Cleanup: Use more standard face corner naming in mesh normals code
Mostly replace "ml" with "corner"
2024-02-12 11:15:01 -05:00
Hans Goudey
f3c55b9f9c Cleanup: Remove unused DerivedMesh function 2024-02-12 10:45:02 -05:00
Hans Goudey
e9b8460ebe Cleanup: Use blender::int2 instead of vec2i 2024-02-12 10:45:02 -05:00
Lukas Tönne
a4051b31d5 Fix #118135: Make sure the new active index is always valid
When deleting all the segments the active index is generally 0. Adding a
new segment increments the active index, which pushes it out of range.
The code should not expect active index to be inside the current range.

Pull Request: https://projects.blender.org/blender/blender/pulls/118143
2024-02-12 16:44:28 +01:00
Michael Kowalski
5dd48265bb USD: Fix duplicate shader nodes on import
Fixed duplicate nodes when converting texture scale/bias and
channel names on material import.  This required extending
the node caching to handle cases where a USD shader is converted
to multiple Blender nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/118002
2024-02-12 16:42:26 +01:00
Omar Emara
98c0802ab0 Merge branch 'blender-v4.1-release' 2024-02-12 17:01:33 +02:00
Omar Emara
50d7f5a30f Fix #118096: Compositor Displace node produce NaN pixels
The GPU compositor Displace node produces NaN pixels if connected to the
Image node. That's because the Displace node access the MIP levels of
the texture produces by the Image node, but those levels were never
initialized, so fix this by completing the levels.
2024-02-12 16:58:23 +02:00
Clément Foucault
16c1e84c6c Fix: GPU: Fix shader builder option not building
This was caused by the recent change in DNA headers
making all extern data C++.
2024-02-12 15:04:53 +01:00
Campbell Barton
fb81bbaa60 Tests: disable BLI_convexhull_2d_test which fails on macOS 2024-02-13 00:34:44 +11:00
Germano Cavalcante
4618db7f5a Merge branch 'blender-v4.1-release' 2024-02-12 09:52:54 -03:00
Campbell Barton
ee0c5e28ad Cleanup: resolve missing declaration warning 2024-02-12 23:26:39 +11:00
Sergey Sharybin
18b594075c Fix #118034: Cycles: Driven View Layer property not considered in realtime
The issue was caused by Cycles doing dependency tracking on its
side, relying on the fact that view layer needs to be tagged as
modified when its properties change.

This was not the case when custom property on the a view layer is
modified via a driver.

Now the dependency graph will tag IDs which generic properties did
change as ID_RECALC_PARAMETERS, giving it a chance to render engines
to react to it.

Since this is quite generic code which might have unforeseen side
effects the change is not targeted to the current release branch.

Note that this chaneg does not fix the #103140, as the issue there
is use of RNA path to another data-block, without the node tree
registering relation to that data-block.

Pull Request: https://projects.blender.org/blender/blender/pulls/118134
2024-02-12 12:52:43 +01:00
Sean Kim
a2d96b0879 Sculpt: Disable sculpt sample detail size on invisible objects
Addresses part of #112371

Pull Request: https://projects.blender.org/blender/blender/pulls/118075
2024-02-12 12:27:53 +01:00
Sean Kim
ca6b75b106 Sculpt: Disable sculpt trim operators on invisible objects
Disables trim lasso and box gesture operators and the following
tools when attempting to operate on invisible objects:
* Lasso Trim
* Box Trim

Addresses part of #112371

Pull Request: https://projects.blender.org/blender/blender/pulls/118072
2024-02-12 12:27:05 +01:00
Sean Kim
be4a8e5a48 Sculpt: Disable sculpt expand operator on invisible objects
Affects:
* Expand Mask by Topology
* Expand Mask by Normals
* Expand Face Set by Topology
* Expand Active Face Set

Addresses part of #112371

Pull Request: https://projects.blender.org/blender/blender/pulls/118070
2024-02-12 12:25:36 +01:00
Bastien Montagne
0bf9b10a93 Merge branch 'blender-v4.1-release' 2024-02-12 12:09:32 +01:00
Bastien Montagne
9b5f01d00e I18N/UI Messages fixes. 2024-02-12 12:01:02 +01:00
Campbell Barton
8f09fffef7 Cleanup: replace qsort with std::sort
Also replace the PointRef struct with an integer array as this was
a workaround for `qsort` not taking additional arguments.
2024-02-12 20:17:21 +11:00
Campbell Barton
f4f97ea979 Cleanup: comments in convexhull_2d, correct variable name
Also remove BLI_ prefix from static function.
2024-02-12 20:17:20 +11:00
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
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
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
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