Commit Graph

130221 Commits

Author SHA1 Message Date
Clément Foucault
3ead36a8ba GHOST: Cleanup: Remove GHOST_OPENGL_ALPHA
This is never define and has no use in current blender.

If we want to keep this functionality, we should
at the very least rename it to `GHOST_WINDOW_ALPHA`.

Pull Request: https://projects.blender.org/blender/blender/pulls/114815
2023-11-14 20:24:55 +01:00
Christoph Lendenfeld
dac896edd6 Refactor: code style in keyframes_keylist.cc
No functional changes.

Clean up the code by
* returning early where possible
* removing comments that just repeat what the code does
* Make sure comments follow the style guidelines

Pull Request: https://projects.blender.org/blender/blender/pulls/114851
2023-11-14 16:48:04 +01:00
Hans Goudey
1a8b5bcd43 Fix #114841: Sculpt Multires drawing broken with no mask
The GPU buffer type was replaced with `float` in 4151691552413785cc7a,
but the "no mask" case wasn't changed. We still assigned a `uchar` value
to a `float` pointer, which made the drawing look random. Instead do the
same fill we use for other PBVH types.

Pull Request: https://projects.blender.org/blender/blender/pulls/114846
2023-11-14 16:28:46 +01:00
Jeroen Bakker
0bec7f7360 Fix: Vulkan Texel Buffers Texture Format
Due to recent changes texel buffers could not be attached as the texture
format wasn't set.

Pull Request: https://projects.blender.org/blender/blender/pulls/114844
2023-11-14 15:36:52 +01:00
Thomas Dinges
f27dd74986 Fix syntax error in last commit 2023-11-14 13:57:29 +01:00
Jeroen Bakker
0a0689b0b7 Cleanup: Reduce overloaded-virtual warnings
Pull Request: https://projects.blender.org/blender/blender/pulls/114836
2023-11-14 13:55:37 +01:00
Thomas Dinges
f0f5d69516 Release: Update company credits and sort alphabetically 2023-11-14 13:54:04 +01:00
Pratik Borhade
920d9a9165 Fix #114758: keep text field empty for global search
Revert cea02c15f810beba5dd65a300a6389ccc29970ad. This will fix the issue
mentioned in #114758 and it will also allow user to see recent
searches in the list below the search box (F3).

Pull Request: https://projects.blender.org/blender/blender/pulls/114774
2023-11-14 12:31:55 +01:00
Jeroen Bakker
4ecd6abf78 Vulkan: Make Anisotropy Sampling Optional
Anisotropy samplers are optional in Vulkan. This change will disable
anisotropy samplers when the feature isn't available on the device.

The support for anisotropy samplers is around 90% so would not expect
any compatibility issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/114833
2023-11-14 12:24:46 +01:00
Hans Goudey
fdae173ed4 Cleanup: Fix debug build error after recent commit 2023-11-14 12:03:52 +01:00
Douglas Paul
90de0368cd Geometry Nodes: Add a Group ID input to the Fill Curve node
This adds a "Group ID" input to the Fill Curve node, per #102285.

The curve filling operation is performed separately for each group,
so curves associated with different Group IDs do not intersect.

This implementation also supports Grease Pencil 3 curves.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114048
2023-11-14 11:23:19 +01:00
Jeroen Bakker
00f5ae2a8f Vulkan: Implement Samplers
Until now the Vulkan backend supported a single pre-configured sampler.
This PR realizes creation, caching and freeing of samplers based on what
is required by the state manager.

The implementation is similar to OpenGL or Metal. This fixes many issues
including:

- Textures in workbench and eevee use the correct extend and filtering
- Custom icons render correctly
- Depth sampling issues
- Removes artifacts using EEVEE world shader, lighting and indirect lighting.

Pull Request: https://projects.blender.org/blender/blender/pulls/114827
2023-11-14 11:12:19 +01:00
Sergey Sharybin
2020f35981 Cleanup: Avoid shallow copy in PLY exporter
It is not clear why shallow copy needs to be created to access
some fields which are copied from the input object. Just use that
object directly.

Shallow copying is a weird and legacy concept, it should not be
used without huge disclaimer why it is unavoidable in the new
code.

Pull Request: https://projects.blender.org/blender/blender/pulls/114791
2023-11-14 10:59:22 +01:00
Hans Goudey
932f20135d Cleanup: Avoid shallow copy in OBJ exporter
Similar to #114791, but a bit more complex since the object
was also used to access materials and vertex groups later on.

Pull Request: https://projects.blender.org/blender/blender/pulls/114796
2023-11-14 10:58:58 +01:00
Hans Goudey
8f5ff2c5dd Cleanup: Use C++ types for modifier type deform callbacks 2023-11-14 10:54:57 +01:00
Hans Goudey
805e6b7525 Cleanup: Use enum class for ModifierTypeType 2023-11-14 10:03:56 +01:00
Hans Goudey
f2aab07760 Cleanup: Remove unused CustomData function 2023-11-14 09:57:26 +01:00
Hans Goudey
2b1b600456 Cleanup: Remove unused old sequencer iterator
Unused after 3fccfe0bc63788483b2d6665597083afb760f672.
The functions weren't implemented anymore.
2023-11-14 09:55:39 +01:00
Hans Goudey
0c1bb82fc4 Cleanup: Remove unnecessary struct and typedef keywords from C++ headers 2023-11-14 09:51:41 +01:00
Hans Goudey
7b51d32dd9 Cleanup: Move BKE_modifier.h to C++ 2023-11-14 09:30:40 +01:00
Charles Wardlaw
7e8557e6c6 Fix: Building with WITH_OPENVDB=OFF and WITH_LZMA=ON
This caused NOMINMAX not to be defined when `LzmaLib.h` includes
`windows.h` which causes a definition of min which upsets `std::min`

By moving BLI_winstuff.hh up, it will take care of this define for
us in case it was not yet defined regardless of openvdb being on or
off

Pull Request: https://projects.blender.org/blender/blender/pulls/114816
2023-11-14 00:46:24 +01:00
Germano Cavalcante
f74ed4d45d Fix memory being written after the end of the heap buffer
`target_snap_points` could have size 0, but even so
`memset(snap_data->target_snap_points, 0, sizeof(int));` was always
called.

Avoid writing to unallocated memory. And use C++ arrays.
2023-11-13 19:35:55 -03:00
Germano Cavalcante
9dcf73c715 Fix #114787: VSE: canceling move does not reset strip channel
Probably caused by ad01cdd7fc.

Once again, problems resetting values due to `td->val` and `td->loc`
sharing the same pointer.

This needs to be avoided, as when resetting it is always expected that
one will be 1D and the other 3D.
2023-11-13 19:30:12 -03:00
Hans Goudey
8f362a175d Cleanup: Combine crazyspace C header with C++ header
The distinction would start to become meaningless when we use C++
features in the older C header. The naming and lack of a proper
namespace should be enough to clarify the separation for now.
2023-11-13 19:35:36 +01:00
Hans Goudey
5371f5516c Cleanup: Add const to MutableSpan methods
Since the span is just a reference to data owned elsewhere, changing the
values doesn't change the span itself.
2023-11-13 19:09:09 +01:00
Brecht Van Lommel
8e82c82074 Revert "Fix #114582: Replace unknown node types with an 'undefined' node"
This breaks versioning because it runs beforehand, giving no time for
versioning to change to the new node type.

This reverts commit 2bf46b3189c7f8181cc89812e38ee6fcf839fa1b.

Ref #114803
2023-11-13 18:55:07 +01:00
Iliya Katueshenock
a1a31659ea Mesh: Make edge_other_vert function branchless
This function shouldn't return invalid index. Instead assertion in used.
While the branchless code path may not be observably faster in current
code, it should work better with instruction level parallelism in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/114682
2023-11-13 18:46:04 +01:00
Harley Acheson
3f5654b491 Fix #114080: Add Khmer Font
Add Noto Sans Khmer (variable) font, needed for new translation.
2023-11-13 17:38:03 +01:00
Miguel Pozo
f1c7089a2f Fix #114001: EEVEE-Next: Wrong compositing with volumes+transparency
Ensure the correct framebuffer is bound in transparent_ps.
2023-11-13 16:52:58 +01:00
Lukas Tönne
2bf46b3189 Fix #114582: Replace unknown node types with an 'undefined' node
When loading an unknown node type from a newer Blender version, the node
storage data cannot be properly loaded. Re-saving the file will then
crash if saving with the same node type idname, since new Blender
versions cannot find the expected storage data.

Loading in older versions should replace unknown node types with a dummy
"Undefined" node that will get loaded as `NodeTypeUndefined` in newer
versions as well. Custom node types are exempted from this since they
store all data as generic ID properties and can always be fully
serialized.

Pull Request: https://projects.blender.org/blender/blender/pulls/114803
2023-11-13 16:36:42 +01:00
Thomas Dinges
3cac5c83ec Merge branch 'blender-v4.0-release' 2023-11-13 16:32:30 +01:00
Thomas Dinges
905c0b84f2 Release: Update manual references for 4.0. 2023-11-13 16:31:41 +01:00
Hans Goudey
00551a3ed2 Fix: Auto smooth versioning node group doesn't show in data-block picker
The group needs to be explicitly marked as a modifier.
2023-11-13 16:15:58 +01:00
Miguel Pozo
f32699369d Merge branch 'blender-v4.0-release' 2023-11-13 15:36:27 +01:00
Miguel Pozo
aef7a17aa5 Fix #114189: Workbench: VR Session crashes on exit
Ensure there's a valid GPU context when freeing a wm_surface.

Pull Request: https://projects.blender.org/blender/blender/pulls/114795
2023-11-13 15:35:11 +01:00
Bastien Montagne
d94281d7af Fix rare crashes when reading files with multi-levels of libraries.
Some left-over code from old refactoring/improvements of old addresses
remapping in library reading code was causing some wrong remapping
between different IDs.

The code was actually not doing what its comment was describing, since
it would cause a random remapping to a different new address than the
expected one:

Initial state, before removed buggy line:
`old_addr_1 -> new_addr_1`
`old_addr_2 -> new_addr_2`

End state, if `old_addr_2` == `new_addr_1`:
`old_addr_1 -> new_addr_2`
`old_addr_2 -> new_addr_2`

From the description of the removed line, that behavior was actually
already covered by adding the remapping rule in the line above, since
adding a remapping overwrite an existing one if needed, so the line
above would do (in case a placeholder ID existed before the actual ID
got read):

Initial state, before adding new remapping rule:
`old_addr_1 -> new_addr_placeholder_1`

End state, after adding remapping to newly read ID:
`old_addr_1 -> new_addr_1`

NOTE: Noticed thanks to rare failures of the liboverride tests on
buildbots. The issue was less than 1%-reproducible with a debug build
and ASAN, but had about 2-4% repducibility with release builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/114784
2023-11-13 15:01:58 +01:00
Germano Cavalcante
b98bc26173 Fix #114714: Rotating the View can drastically change the view's position when Auto Depth or Orbit Arround Select is set
Caused by 6faa39edb7

In that commit it was assumed that the view offset does not need to be
updated if the operator is `V3D_OP_MODE_ROTATE` instead of simply
checking `this->use_dyn_ofs`.

Since `use_dyn_ofs` is always `True` when using Auto Depth or Orbit
Arround Select, the offset should always be updated in these cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/114726
2023-11-13 14:30:14 +01:00
georgiy.m.markelov@gmail.com
08bd7e29df MaterialX: add clamp, steps, smooth step for Map Range node
Co-authored-by: Bogdan Nagirniak <bodyan@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114635
2023-11-13 14:27:44 +01:00
Jeroen Bakker
7813c94461 Vulkan: Initialize Pipeline State
The initial pipeline state was not set and could lead to undetected
state changes.

This fixes several issues, including:
* Fix incorrect colors in the UI, that would be used everywhere, and
  could be fixed by restarting Blender.
* Overlay extra objects where drawn below the grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/114792
2023-11-13 14:02:13 +01:00
Germano Cavalcante
c6db3f98bb Fix modal key assignment for "Rotate Normals" in keymap versioning
Error in 78943edc5d

The key was not included in the appropriate condition block, leading to
an error.
2023-11-13 09:47:10 -03:00
Bastien Montagne
523ea86b93 Merge branch 'blender-v4.0-release' 2023-11-13 12:57:00 +01:00
Bastien Montagne
ff82b25c55 I18N: Updated UI translations from git/weblate repo (548bcaeb28eba). 2023-11-13 12:56:24 +01:00
Hans Goudey
e7cee02e4d Merge branch 'blender-v4.0-release' 2023-11-13 12:50:34 +01:00
Hans Goudey
5b094ee770 Fix #114623: Node group asset added with wrong position from header
We need to make sure the operator is invoked from the main
region, not the header region which gives the wrong location.

Pull Request: https://projects.blender.org/blender/blender/pulls/114789
2023-11-13 12:49:42 +01:00
Hans Goudey
e10ac17fdb Fix #114737: Curves: Random selection crash in curve select mode
Inverting an index mask needs to use the correct "full" index range.

Pull Request: https://projects.blender.org/blender/blender/pulls/114785
2023-11-13 12:45:28 +01:00
Bastien Montagne
89d67df37b Merge branch 'blender-v4.0-release' 2023-11-13 12:44:59 +01:00
Michael Kowalski
f2d15d4fd1 Fix: USD: Wrong UsdUVTexture rgb output type.
This fixes a bug where the rgb UsdUVTexture shader output
attributes were created with incorrect type color3f when
connected to UsdPreviewSurface diffuseColor and emissiveColor
inputs. The UsdPreviewSurface specification requires the
UsdUVTexture rgb output to be of type float3.

This was happening because the UsdUVTexture outputs were created
implicitly by the call to UsdShadeInput::ConnectToSource().  I.e.,
because the diffuseColor and emissiveColor inputs are of type
color3f, this was the type assigned by default to the rgb source
attributes as well.

Now explicitly creating the UsdUVTexture shader output attributes
with the correct types.

Pull Request: https://projects.blender.org/blender/blender/pulls/114728
2023-11-13 12:44:21 +01:00
Omar Emara
c98308a77e Fix #113653: Compositor superfluously executes on scene changes
The compositor executes superfluously on scene changes when adding or
removing objects.

This was due to an explicit handling of a certain notifier, which was
introduced in commit 1e948b251d. The exact reasoning behind the
addition is unknown, so this patch removes it until we have an informed
decision to keep it.
2023-11-13 13:33:22 +02:00
Jeroen Bakker
99d97d9993 Vulkan: Fix Depth Texture Data Conversion
Devices that don't support GPU_DEPTH_COMPONENT24 natively will use
GPU_DEPTH_COMPONENT32F in stead. When done the current code path raised
an error as the conversion type wasn't set.

Issue detected on AMD RX5700 device.

Pull Request: https://projects.blender.org/blender/blender/pulls/114786
2023-11-13 12:26:45 +01:00
Sergey Sharybin
0746435cdd Depsgraph: Remove misleading FPS counter
It was weird concept which was calculating scene FPS, but from
the depgraph side. It was misleading, especially for the initial
evaluation of FPS of nan.

If we want FPS counters this needs to be done on a higher level
in the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/114782
2023-11-13 11:54:40 +01:00