Commit Graph

125158 Commits

Author SHA1 Message Date
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
Philipp Oeser
d61d2e5f59 Fix #108911: Fcurve Proportional editing circle draws wrong
Since we scale the GPU matrix a certain way (in order to draw a round
circle even for different UI x/y scaling), we have to also compensate
with GPU matrix translation (instead of drawing the raw
frame/value as coords untranslated).

There might be ways to solve this differently (e.g. manipulating the passed
coords instead of the GPU matrix or having a version of imm_drawcircball
that can do this in a way that compensates UI view scaling), but this seems
to be the most straightforward.

Thx @mano-wii hinting at the way to do this with GPU matrix alone.

Should probably go into 3.3 LTS as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108979
2023-06-15 09:45:22 +02:00
Campbell Barton
d1e63f89bb License checker: quiet false positive for blender_theme_as_c.py 2023-06-15 16:47:51 +10:00
Campbell Barton
1b508de749 License headers: use SPDX-FileCopyrightText in intern/opensubdiv 2023-06-15 16:47:51 +10:00
Campbell Barton
4a93de9cc9 License headers: move copyright statements into SPDX-FileCopyrightText 2023-06-15 16:47:51 +10:00
Jeroen Bakker
bc6027ebaf Vulkan: Initial/Final Renderpass Layout
Until now the initial renderpass layout wasn't set, resulting
in errors/warnings when using the renderpass. This PR sets the
initial and final renderpass to general so the code knows what
to expect.

In future this needs to be designed better as the layout will
change when used in as a framebuffer attachment, or presenting
on the screen.

Pull Request: https://projects.blender.org/blender/blender/pulls/109000
2023-06-15 08:39:35 +02:00
Jeroen Bakker
0c154b6c61 Cleanup: Make format 2023-06-15 08:25:49 +02:00
Jeroen Bakker
d84a64900f Vulkan: Device Context Resource Management
The current Vulkan resource management has some issues as context that
are not active can still use resources that are freed via another
context.

When this happens incorrect data can be read on the GPU and even crash
Blender. When trying to bind something that now contains other memory
pointers.

This change introduces that contexts are tracked via the device.
Context will be registered/unregistered with the device instance.
Unbinding of resources must pass the device and the device will check
all registered contexts. Binding of resources will happen via the active
context only.

On user perspective this now allowes:
- Opening/switching files
- Switching workspaces
- Switching render engines

Pull Request: https://projects.blender.org/blender/blender/pulls/108968
2023-06-15 08:14:37 +02:00
Kévin Dietrich
907e27df51 Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-15 05:47:13 +02:00
Campbell Barton
fbc754131a Cleanup: quiet compiler warnings 2023-06-15 13:46:04 +10:00
Kévin Dietrich
f0cd966750 Fix #100485: Alembic export crash with names containing a forward slash
As Alembic stores hierarchies as paths separated by a forward slash, such
character cannot be used in a name. This resulted in an uncaught thrown
exception. To fix this, replace '/' with '_' like for other illegal
characters.
2023-06-15 05:44:09 +02:00
Campbell Barton
60d90de9a5 Cleanup: remove unused imports, quiet pylint warnings 2023-06-15 13:35:34 +10:00
Campbell Barton
9ddbbbfeae License checker: check for SPDX-FileCopyrightText: in the header 2023-06-15 13:35:34 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Joseph Eagar
2c1a44d1f0 Sculpt: Fix #108267: Broken face set undo
BKE_sculpt_face_sets_ensure now takes an Object
as an argument and updates the internal PBVH's
face sets pointer.
2023-06-14 20:22:17 -07:00
Joseph Eagar
136fcec288 Sculpt: Fix #108267: Broken face set undo
BKE_sculpt_face_sets_ensure now takes an Object
as an argument and updates the internal PBVH's
face sets pointer.
2023-06-14 20:21:50 -07:00
Kévin Dietrich
f509c213d0 Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-15 03:41:07 +02:00
Kévin Dietrich
d2b741bebe Fix #107877: Alembic procedural crashes with point clouds
Somehow the implementation for the main function to load point clouds
data was missing although everything else to support point clouds was
there. Compilers were more than happy to convert the IPointsSchema to
another schema type for the compilation to succeed, and the crash
occurs because the points schema does not contain the same data as the
compiler's chosen schema (in this case an ICurvesSchema).

Another crash was found due to the radius array not being properly
initialized and left with a size of 0, when Cycles expects a full array.
2023-06-15 03:40:15 +02:00
Kévin Dietrich
ae5fc2a7f8 Fix #105409: vertex interpolation corrupts Alembic mesh
The Alembic data streaming can optionally interpolate between vertex of
two adjacent frames in order to smooth out the transition between
frames.

However, the decision to interpolate is only based on the vertex count.
This is not too robust as topology/connectivity can still differ even if
the number of vertices is the same (for example physics simulations and
videogrammetry can be set to output the same vertex count, but optimize
the triangle placement). This lead to vertices of unrelated polygons
being interpolated across frames.

To fix this, we now also check if the connectivity across frames is the
same, instead of just checking the topology counters. Although the bug
is revealed by the vertex interpolation routine, a similar fix is applied
to the check on topology change used to decide if the modifier has to be
evaluated for orco evaluation.

Pull Request: #105867
2023-06-15 03:40:14 +02:00
Iliya Katueshenock
4be143193d Fix #108977: Propagate material from first point cloud by Join Geometry node
Until point clouds support multiple materials, just copy
the material from the first point cloud. This approach is the
same as for texture coordinate of meshes, active color attribute
of custom data, etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/108990
2023-06-14 22:49:37 +02:00
Ray Molenkamp
3d6a99d2aa Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-14 14:37:40 -06:00
Ray Molenkamp
977081d72b DepsBuilder: Update OIIO to include PSD fix
This fixes #108487 by applying upstream OIIO commit 8da473e254

This commit fixes the deps builder to include the patch, the actual
bug will not be fixed until the platform maintainers update the OIIO
library in SVN.
2023-06-14 14:36:22 -06:00
Anthony Roberts
ee1b2f53cc Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC
Currently on Windows some dependencies are built with MinGW/GCC 3.x
this commit removes that, in favor of building them with MSVC
via msys2. This will make it easier in the future to offer Win/Arm64
builds of blender.

Notable changes:

- This change drops support for the external libxvid library in favor
of ffmpegs built in support for this format. This has been done with
permission from the VFX module.

Pull Request: https://projects.blender.org/blender/blender/pulls/108983
              https://projects.blender.org/blender/blender/pulls/105502
2023-06-14 21:57:48 +02:00
Hans Goudey
41f5ed970d Fix: Fix two small link drag search issues, small cleanup
The named attribute node gave connections from the "Exists" socket
to the new rotation socket type, and the sample volume node set its
type to unsupported values, causing a crash.
2023-06-14 15:42:06 -04:00