Commit Graph

125181 Commits

Author SHA1 Message Date
Julian Eisel
e76d2a241c Fix missing mouse hover highlight for UI view items in menus
The hover highlight is done with some special handling that wasn't
called for buttons in menus. There's actually no case where this happens
in the main branch but it's needed for #104831.
2023-06-16 11:49:04 +02:00
Julian Eisel
962fca47d9 UI: Draw tree-view hover highlight even when emboss is disabled
No user visible changes expected.

It makes sense to disable embossing for drawing the tree view (so it
doesn't have to be disabled for every item individually), but then the
mouse hover highlight should still work.
2023-06-16 11:42:11 +02:00
Julian Eisel
6e5559ab4a Fix UI tree-view item collapsing not working in popups
Tree-views are currently not used in popups in the main branch, but will
be with #104831 merged.
2023-06-16 11:34:01 +02:00
Jacques Lucke
5869e88f94 Nodes: improve node zone analysis
The makes the zone analysis result a bit more well defined.
For example, `child_nodes` now never contains nodes that belong
to child zones.

Also, one can now easily access the set of top level nodes and zones.
2023-06-16 10:53:11 +02:00
Jacques Lucke
201a442750 Functions: improve default debug names in lazy function graph executor 2023-06-16 10:53:11 +02:00
Jacques Lucke
445db4bed0 Cleanup: add missing file entry in cmakelists 2023-06-16 10:53:11 +02:00
Jacques Lucke
ef26519880 Nodes: add utilities to access all node links and toposort index 2023-06-16 10:53:11 +02:00
Sybren A. Stüvel
8c8e1ebdd2 CMake: Use lld when using Clang compiler
When using the `WITH_LINKER_LLD` option, the logic to find the `ld.lld`
binary and actually tell the build system to use it was specific to GCC.

I've copied the Clang-specific logic for Mold and adjusted it to find
LLD.

Not entirely sure why this is necessary, as LLD is actually Clang's
linker. However, without this change, CMake would use regular old slow
`ld` to link.

Pull Request: https://projects.blender.org/blender/blender/pulls/108884
2023-06-16 10:34:01 +02:00
Sergey Sharybin
4a0468c1ed Fix #109019: Crash when creating a new collection for light linking
A wrong DNA struct was used for writing light linking data.

Pull Request: https://projects.blender.org/blender/blender/pulls/109049
2023-06-16 10:33:01 +02:00
Lukas Tönne
e32f85c03e Cleanup: Removed unused variables in bNodePanel
The flag in bNodePanel is anticipated to store settings such as whether
a panel is open or closed by default. It's not currently used, so for
now the flag is removed.

The next_panel_identifier in bNodeTree is also not needed any more. It
was used to set a unique identifier for each panel, which isn't needed.

Added comments to remaining fields in bNodePanel.

Pull Request: https://projects.blender.org/blender/blender/pulls/109028
2023-06-16 10:12:21 +02:00
Jacques Lucke
9535248911 Tests: support simulation nodes regression tests
Geometry nodes supports simulation nodes which allows later frames to depend
on previous frames. The existing geometry nodes regression tests only evaluated
the node tree at a single frame and therefore couldn't test the correct behavior of
simulations.

This adds a new kind of regression test that evaluates the scene at multiple
consecutive frames and then checks if the last frame matches.

Pull Request: https://projects.blender.org/blender/blender/pulls/109046
2023-06-16 10:00:55 +02:00
Campbell Barton
9b1e518d4a Cleanup: quiet Clang compiler warnings 2023-06-16 13:52:31 +10:00
Campbell Barton
0103736005 Cleanup: rename string to filepath, remove local path separator define 2023-06-16 13:51:41 +10:00
Campbell Barton
f4556003a6 Cleanup: spelling in funciton name 2023-06-16 12:20:40 +10:00
Campbell Barton
57cd40e622 Cleanup: rename corners to corner_verts
Be specific as there are corner edges too.
2023-06-16 12:20:34 +10:00
Campbell Barton
24fef21bf8 Cleanup: cmake indentation 2023-06-16 12:20:33 +10:00
Campbell Barton
6a75ff7afa Cleanup: use function style casts, trailing space 2023-06-16 12:20:31 +10:00
Campbell Barton
25e25486d7 License headers: use SPDX-FileCopyrightText for newly added files
Also trim trailing comments.
2023-06-16 11:43:09 +10:00
Chris Blackbourn
b8d263ee5a UV: Improve layout when alpaca is tighter than slow packers
When packing the largest islands, if the alpaca turns out to be tighter
than all of the other packers, then use alpaca on the large islands
and small islands together in one pass instead of two.
2023-06-16 13:11:05 +12:00
Lukas Stockner
a783fe8198 Cycles: Fix some direct lighting leaking into indirect-only bakes
When baking only indirect lighting, light sampling is skipped at the
first bounce. However, light evaluation is still done, so depending
on how the MIS weights end up more or less of the direct lighting
still ends up in the bake.

This is most noticeable with background lighting, but can also be
reproduced with e.g. point lights with a large radius.

Pull Request: https://projects.blender.org/blender/blender/pulls/108955
2023-06-16 03:03:22 +02:00
Campbell Barton
7169fe65dd Fix build error on Linux 2023-06-16 09:49:58 +10:00
Campbell Barton
3331aaaf16 CMake: add missing headers 2023-06-16 09:49:56 +10:00
guishe
75c2374565 Cleanup: Replace linked list with Vector io_alembic.cc
No visible changes expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/108686
2023-06-15 23:00:24 +02:00
Germano Cavalcante
fa31f8a0fb Fix snap being incorrectly occluded
Regression in 338c4ff03d.
2023-06-15 18:01:37 -03:00
Germano Cavalcante
338c4ff03d Fix error in 3df2110abd
Threshold was being lowered incorrectly.

This could cause occlusion errors.
2023-06-15 17:31:27 -03:00
Hans Goudey
f4124ee02d Cleanup: Move GeometrySet and components to proper namespace
Move `GeometrySet` and `GeometryComponent` and subclasses
to the `blender::bke` namespace. This wasn't done earlier since
these were one of the first C++ classes used throughout Blender,
but now it is common.

Also remove the now-unnecessary C-header, since all users of
the geometry set header are now in C++.

Pull Request: https://projects.blender.org/blender/blender/pulls/109020
2023-06-15 22:18:28 +02:00
Germano Cavalcante
2b4930a38f Merge branch 'blender-v3.6-release' into main 2023-06-15 16:53:16 -03:00
Germano Cavalcante
1c5201b23a Fix bvhtree utilities ignoring empty masks
Fixed an issue where meshes without loose elements or hidden triangle
faces were not taking into account the relevant masks.

From the user's perspective, this might not have seemed like a
significant problem. However, hidden faces in edit mode were
occasionally still snappable.
2023-06-15 16:52:40 -03:00
Christoph Lendenfeld
c3a2de470d Refactor: draw fcurve bezt function
No functional changes

In preparation to tackle the following 2 Todos
*  TODO: view scale should factor into this someday too...
* TODO: optimize this to not have to calc stuff out of view too?

I did the following cleanup
* extracted drawing code for `BEZT_IPO_BEZ` into a separate function
* extracted code that calculates the resolution between 2 points into a separate function
* cleaned up comments
* renamed variables to have a more telling name
* moved variables closer to where they are used
* added `const` where possible

Pull Request: https://projects.blender.org/blender/blender/pulls/108748
2023-06-15 18:20:17 +02:00
Lukas Tönne
8fa56a4d19 Clear the cache bake directory when duplicating a modifier
Duplicating will otherwise keep the same bake directory, which causes
a path conflict and requires manual fixing by users. Clearing the path
on copy makes it so the default path is generated on baking.

This does not change the path when doing internal copies, like
- Depsgraph "evaluated" object vs "original"
- Appending or linking objects
- Making a linked object local

Pull Request: https://projects.blender.org/blender/blender/pulls/109014
2023-06-15 17:40:38 +02:00
Germano Cavalcante
3df2110abd Cleanup: various tweaks to the transform_snap_object code
This commit implements several changes aimed at enhancing the
readability of the transform snap object code.

The changes are:
- Reduce number of parameters in functions;
- Unify functions;
- Replace enum `eViewProj` with a bool;
- Remove unused members;
- Deduplicate code;

Pull Request: https://projects.blender.org/blender/blender/pulls/109012
2023-06-15 17:29:50 +02:00
Brecht Van Lommel
45b9542e6c Merge branch 'blender-v3.6-release' into main 2023-06-15 16:45:15 +02:00
Brecht Van Lommel
0ab58864f3 Fix Cycles Metal AMD crash with shadow caustics, by disabling it
Better to disable than crashing, as we are not expecting a quick fix. The cause
is likely similar to issues with the light tree, which was already disabled.

Ref #104013
2023-06-15 16:33:21 +02:00
Germano Cavalcante
e918cf343c Fix isolated Snap to Edge Perpendicular not working
Caused by 5621154185.

The Perpendicular Snap needs a `prev_co` to work.
But in `Snap With` `Closest` mode the `prev_co` is not calculated.
Thus, when isolated, the snap to Perpendicular is never done.

So this commit puts the `center_global` fallback back to `prev_co`.

Also, if `Snap Base Edit` is used when only the snap to
`Edge Perpendicular` is enabled. `Snap To` will be temporarily set to
`Vert`, `Edge`, `Face` and `Edge Midpoint`.
2023-06-15 11:30:16 -03:00
Iliya Katueshenock
1571be0a47 Cleanup: Use float2 in nodeToView and nodeFromView
Use 2D float to represent node positions.

Pull Request: https://projects.blender.org/blender/blender/pulls/108956
2023-06-15 16:04:23 +02:00
Miguel Pozo
4cf644939a EEVEE Next: Subsurface Scattering
Port of subsurface scattering from the eevee-rewrite branch to EEVEE Next.
https://projects.blender.org/fclem/blender/src/branch/eevee-rewrite

Other changes:
* Fix gbuffer normal and ior packing.
* Write the material eClosureBits to the gbuffer stencil.

Known Issues:
* Transmittance profile pre-computation is wrong.

Pull Request: https://projects.blender.org/blender/blender/pulls/107407
2023-06-15 15:49:05 +02:00
Nate Rupsis
01726de71f Merge branch 'blender-v3.6-release' 2023-06-15 09:36:59 -04:00
Nate Rupsis
f78aa6c034 Fix #108527: Fixing Vertex Group operators to default back to Active Vertex Group
Reverting changes made in [D14961](https://archive.blender.org/developer/D14961) to default to `Deform Bone` for objects with armatures. Instead explicitly update RNA enum to set default subset for just the normalize all operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/108902
2023-06-15 15:36:00 +02:00
Miguel Pozo
524e320327 EEVEE Next: Improved sampler indices
Reserve the first sampler indices for the engine,
and remap image node indices so they go in reverse order
starting from the last one (usually 31).

Pull Request: https://projects.blender.org/blender/blender/pulls/108984
2023-06-15 15:15:05 +02:00
Sergey Sharybin
fb25ba2378 Merge branch 'blender-v3.6-release' 2023-06-15 14:45:25 +02:00
Sergey Sharybin
7fca0ee76a Cycles: Increase the compute model for the PTX kernel
Keep the PTX compute capability at the same level as the latest
architecture-optimized CUDA kernel.

Should help performance of the future cards when running older
Blender, and maybe will allow to perform JIT optimization faster.

Pull Request: https://projects.blender.org/blender/blender/pulls/109007
2023-06-15 14:44:57 +02:00
Guillermo Venegas
dd648b5942 Cleanup: Move space nla files to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/108998
2023-06-15 14:10:43 +02:00
Kévin Dietrich
973562ec0c Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-15 14:01:29 +02:00
Kévin Dietrich
61efaec173 Fix Alembic crash when importing a SubD mesh
The counters for polygons count and face corners count were inverted,
leading to various out of bounds accesses due to wrong data size
allocation.

Not sure where the bug comes from, whether it's original, or a typo from
some refactor.
2023-06-15 14:00:24 +02:00
Sergey Sharybin
4f9a9abcf1 Merge branch 'blender-v3.6-release' 2023-06-15 13:40:38 +02:00
Sergey Sharybin
2d3c9bcee8 Benchmark: Pack python expression into a single line
There should be no functional changes for the typical usecase,
but it allows to have more tricky setups like pointing to a
BAT script to override some configuration.

The issue is that BAT scripts do not support new lines in the
command line arguments. That's where single-line python expression
helps.

For example, it is possible to point benchmark script to a blender.bat
which contains

    blender.exe --python-expr "import bpy; bpy.context.preferences.addons['cycles'].preferences.use_oneapirt = False" %*

to have side-by-side numbers of oneAPI with and without HW RT.

Without this change the %* is which did not work: the BAT
script did not "see" part of the command line past the new line.

Pull Request: https://projects.blender.org/blender/blender/pulls/109006
2023-06-15 13:40:17 +02:00
Philipp Oeser
9efd2c9ab6 Merge branch 'blender-v3.6-release' 2023-06-15 11:18:38 +02:00
Philipp Oeser
da052ab9f6 Fix #105942: Wrong text in MeshSequenceCache and Transform Cache
The Alembic procedural was refrenced here even if USD was loaded.

Now check the CacheFile type and let the user know Render Procedurals
are only supported for Alembic atm.

Pull Request: https://projects.blender.org/blender/blender/pulls/108701
2023-06-15 11:16:03 +02:00
Jeroen Bakker
0809377789 Cleanup: Make format 2023-06-15 10:01:53 +02:00
Philipp Oeser
1097e33032 Merge branch 'blender-v3.6-release' 2023-06-15 09:46:27 +02:00