Commit Graph

131489 Commits

Author SHA1 Message Date
Pratik Borhade 239d3bb04b Fix #116320: Crash assigning bone to collection of other armature
`Move to collection` popup shows collections of active armature. So when
bone of "non-active" armature is selected, crash will be triggered after
assigning it a bone-collection of active armature.
To fix the crash, remove multi-object editing code since it's only
possible to operate on active armature/object

Pull Request: https://projects.blender.org/blender/blender/pulls/116328
2023-12-22 12:31:52 +01:00
Omar Emara 7a8e349b73 Compositor: Support viewer offset in GPU compositor
This patch adds support for viewer offsets in the experimental GPU
compositor.
2023-12-22 13:12:17 +02:00
Jeroen Bakker 45582662a1 EEVEE-Next: Fix Pointshader Requirements
The Metal and Vulkan backend checks if the vertex shader uses
`gl_PointSize` in order to set the correct parameters for point
rendering. The `eevee_deferred_tile_compact` shader uses point
rendering, but is only used as dummy geometry. The vertex
shader ignored the incoming input data, but didn't set the
`gl_PointSize` which generated incorrect shader pipelines.

It was detected on Vulkan, but Metal uses a similar workaround.

Pull Request: https://projects.blender.org/blender/blender/pulls/116463
2023-12-22 11:48:47 +01:00
Campbell Barton 248d7d8340 Fix use of undefined IMATH_INCLUDE_DIRS
New include directory variable from [0] was only set for WIN32,
causing openimageio to fail to build with libraries updated for 4.1.

[0]: 802ac5ba5a
2023-12-22 21:27:51 +11:00
Sybren A. Stüvel 3e6139cc30 Anim: RNA, mark `armature.collections` as editable
By setting the RNA property flag `PROP_EDITABLE` on `armature.collections`,
the UIList understands that it's editable and will show "Double click to
rename" in the tooltip.

Note that this does not make the array itself editable; assignment like
`collections[0] = collections[1]` will still be refused.
2023-12-22 09:06:49 +01:00
Brecht Van Lommel 3443ded9df Fix: bf_animrig_tests test failure
Zero initialize mock data to avoid uninitialized variable access.

Pull Request: https://projects.blender.org/blender/blender/pulls/116451
2023-12-21 23:31:36 +01:00
Hans Goudey 78c3253553 Fix #116069: Incorrect data transfer custom normals behavior
Mistake in 89e3ba4e25 and 451c054d9b. Though I'm not
exactly sure why, it looks like the result layer needs to be filled with
"default" values before the transfer.
2023-12-21 14:54:22 -05:00
Hans Goudey 48b0a504b4 Cleanup: Remove unnecessary argument in mesh normals code
This function is only used in one place, and the argument was constant.
2023-12-21 14:54:22 -05:00
Harley Acheson 341c54ce21 Fix #116415: Show Empty text for Current Asset Library
Show "No items" if item count is less than one, to include situations
where it is -1

Pull Request: https://projects.blender.org/blender/blender/pulls/116446
2023-12-21 20:09:29 +01:00
Christoph Lendenfeld bf96f6cda9 Fix: failing unit tests due to "stack-use-after-scope"
The return value of `get_rotation_mode_path` was stored in a
`blender::StringRef` which caused the memory of the string to
be freed to early.

Fix by returning a `blender::StringRef`

Interestingly this seems to be only an issue on ASAN builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/116434
2023-12-21 19:40:45 +01:00
Omar Emara 9bbe81b630 Fix #116432: Crash when changing source of image node
Blender crashes when changing the source of the image node to Generated
then to something else, then making any changes to the image. This is
just due to a nullptr GPU texture.

This is because Blender resets the path of the image when changed to
Generated source.
2023-12-21 20:20:37 +02:00
Brecht Van Lommel 802ac5ba5a Build: Library updates for 4.1
Update libraries to match VFX platform 2024, and a few other upgrades to
latest versions.

boost 1.82.0
deflate 1.18 (new)
ffi 3.4.4
freeglut (deleted)
ispc 1.12.1
llvm 17.0.6
materialx 1.38.8
mesa 23.3.0
numpy 1.24.3
opencolorio 2.3.0
openexr 3.2.1
openimageio 2.5.6.0
opensubdiv 3.6.0
openvdb 11.0.0
osl 1.13.5.0 (now dynamic)
python 3.11.6
sqlite 3.42.0
sse2neon 0d6e9b3dd4
usd 23.11
vulkan 1.3.270
xm2 2.12.3

This only updates the build scripts, the precompiled libraries for each
platform will land over the coming weeks.

Ref #113157

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/116420
2023-12-21 19:16:11 +01:00
Miguel Pozo e8c5f8dddf Fix #116424: GPU Nodes: UDIM texture user count
Count texture and mapping as a single user.
2023-12-21 18:55:32 +01:00
ok_what 04efca91f9 Fix: VSE Slip Strips operator doesn't move effect strips inside of a meta strip.
When slipping meta strip, effect position was not updated. These updates
are limited to VSE core code, so function `SEQ_time_slip_strip()` was
added to resolve this issue.

This also simplifies operator code, so it does not have to deal with
recursion and doesn't need to hold quite detailed strip state for when
operator is cancelled.

Pull Request: https://projects.blender.org/blender/blender/pulls/113200
2023-12-21 18:04:56 +01:00
Harley Acheson 548b45d13b Revert #116228: Check Interactivity in button comparisons
Revert of 5741f7b8a9 as this has caused issues as reported in #116384
and #116426.

Pull Request: https://projects.blender.org/blender/blender/pulls/116437
2023-12-21 17:08:47 +01:00
Hans Goudey 66409b3860 Fix #116372: Crash in boolean triangulation after recent cleanup
Missing array initialization in 34bf1f6c0c.
2023-12-21 11:00:32 -05:00
Hans Goudey ebb9cf21ec Fix: Incorrect curves asset in recent commit
Mistake in f63a7c1ee9
2023-12-21 10:54:26 -05:00
Hans Goudey da6867ca3b Cleanup: Use dynamic declaration for sample curve node
Change the attribute "value" sockets to use dynamic declarations, but
not the others. See 8149678d5e, f7383cfe9b.
2023-12-21 10:34:55 -05:00
Christoph Lendenfeld 84c65732fe Refactor: extract code from ANIM_keying_sets_enum_itemf
No functional changes.

Split off from: #116189

Extract code to build the keying set menu from
`ANIM_keying_sets_enum_itemf`
to be able to later use the same code from a different menu
function so the label can be changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/116332
2023-12-21 16:15:42 +01:00
Sybren A. Stüvel eac4a6c697 Anim: add checks for system overrides to bone collection operators
Editability checks shouldn't just check for linked data & library
overrides, but also for the type of library override. A "system
override" should still not be editable by users.

This fixes #115310: Bone collections can be added to system-overridden
(i.e. non-user-editable) armatures
2023-12-21 14:58:30 +01:00
Omar Emara dea7d65ee7 Fix: Crash in single value input to Glare node
The Glare node crashes in the full-frame compositor when its input is a
single value. Since the Glare node is constant foldable, do not inflate
its input and instead output a single value.
2023-12-21 14:48:33 +02:00
Omar Emara e055db6605 Realtime Compositor: Implement Defocus node
This patch implements the defocus node for the Realtime Compositor. The
implementation does not match the CPU compositor implementation, but
uses a new formulation that is more physically accurate and consistent
with Blender's render engines.

The existing CPU implementation is questionable starting from its circle
of confusion calculation, to the morphological operations applied on the
CoC radius, to ignoring the maximum CoC radius in the search kernel, and
ending with the threshold parameter used to reduce artifacts. Therefore,
it should be reimplemented along with this same implementation using a
more consistent methodology.

EEVEE and Workbench already have a GPU defocus method, which can be
ported to the compositor and used as the preview defocus algorithm.
While this implementation will be updated to be a more accurate method
that produces the same structure as the ported EEVEE implementation.

The new formulation ignores the threshold parameter for now, as well as
the preview parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/116391
2023-12-21 12:20:38 +01:00
Falk David da78dd47e3 Fix #116343: Drawing on frame with auto-keying off gives error
When drawing on a frame that didn't have a keyframe, but did have a drawing,
Blender would report that there was no drawing to draw on.
The issue was some faulty logic on the invoke of the drawing code.

Now, this properly checks if a new frame needs to be inserted and
only reports an error in case auto-key is off and there is no drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/116417
2023-12-21 12:10:50 +01:00
Falk David 89947aac1c Cleanup: Non-const version of `get_active_layer` 2023-12-21 11:09:23 +01:00
Christoph Lendenfeld 614d7749df Fix: Autokeyframe with Insert Needed with no keyframes
The issue occurs when auto-keyframe AND "Only Insert Needed" enabled.
And only when no keyframes have been added yet.

Before the commit that caused the issue, moving an object with `G` would
create only location keyframes. After it would key all.
That is because that commit removed the logic that checks the
`eTfmMode` (Transform mode). That only works as long as there are already
keyframes on the object/bone because the logic needs an
existing value to compare against. In the case where the first keyframe is set,
it would always key everything.

The fix is to bring back the logic that checks the Transform mode and pass
a `Span` of rna paths to the autokeyframe function. This restores the behavior.

This still has the issue that "Only Insert Needed" behaves differently if
keys exist vs inserting the first keys. While this isn't ideal, I don't see a way
to get values of an object/bone before and after the transformation.
We might be able to fix this in a future PR, but for now we restore the
old behavior.

Caused by #115522

Pull Request: https://projects.blender.org/blender/blender/pulls/116219
2023-12-21 10:50:17 +01:00
Jeroen Bakker d37f9e6587 Cleanup: Make format 2023-12-21 10:47:42 +01:00
Christoph Lendenfeld b27718a9e7 Anim: Graph Editor Scale From Neighbor
Combination of two operators by Ares Deveaux
#106524 and #106523

Introduces a new operator "Scale from Neighbor"
that scales selected keyframe segments from either
the left or right keyframe neighbor.

Pressing "D" during modal operation will switch
from which end of the segment the scaling happens.

This is useful to make a section of animation closer to a pose on either side.

Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112387
2023-12-21 10:46:43 +01:00
Omar Emara e165624885 Compositor: Only execute compositor if result is viewed
This patch makes it such that the compositor only executes when its
result is viewed either through the backdrop or through an image editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/116326
2023-12-21 10:22:51 +01:00
Christoph Lendenfeld de61ec3e6f Anim: Unit Tests for "Insert Available"
In preparation to the upcoming refactor of the keying set code,
extend the unit tests with more sophisticated
tests for "Insert Available".

This PR tests
* key available using the preference setting with autokeying on an object and a bone
* key available using the keyingset "Available"

Pull Request: https://projects.blender.org/blender/blender/pulls/116327
2023-12-21 10:22:21 +01:00
Aras Pranckevicius fec8461365 Cleanup: move BKE_colorband.h and BKE_colorcools.h to .hh
Also remove includes of those where not needed

Pull Request: https://projects.blender.org/blender/blender/pulls/116416
2023-12-21 10:10:53 +01:00
Nikita Sirgienko 3cadec1892 Cycles: Log number of scheduled tiles
Pull Request: https://projects.blender.org/blender/blender/pulls/116379
2023-12-21 09:39:16 +01:00
Jeroen Bakker 3261508e82 Cleanup: Make format 2023-12-21 09:03:53 +01:00
Aras Pranckevicius a9aaf0bc26 Cleanup: Inconsistent struct vs. class declaration warning 2023-12-21 09:55:52 +02:00
Hans Goudey f63a7c1ee9 Curves: Add basic custom normals support
Add a new normal mode called "Custom" which directly interpolates
a "custom_normal" attribute to the evaluated points for the final
normal. Extend the "Set Curve Normal" node with this mode and
give it the ability to set the custom normal value.

This is intentionally a very basic implementation of custom normals.
In particular, the storage is not rotation invariant. So the normals
are expected to be set procedurally at the end of the modifier stack.
On the other hand, it is very easy to understand and explain.

Pull Request: https://projects.blender.org/blender/blender/pulls/116066
2023-12-21 03:29:18 +01:00
Hans Goudey 8e30dc12da Cleanup: Debug build error, unused variable warnings 2023-12-20 21:24:53 -05:00
Hans Goudey 7132c7a53c Cleanup: Replace MVertTri type with C++ vector
Similar to 7c69c8827b. Remove more unused includes.
2023-12-20 20:59:11 -05:00
Hans Goudey b9b47088bc Cleanup: Remove unnecessary DNA_meshdata_types.h includes
Except for vertex groups and a few older color types, these
are generally replaced by newer generic attribute types.
Also remove some includes of DNA_mesh_types.h, since it's
included indirectly by BKE_mesh.hh currently.
2023-12-20 20:58:38 -05:00
Hans Goudey 2c43a9eed9 Cleanup: Move BKE_mesh_calc_edges to bke namespace
Also use reference for mesh argument, and move edges calculation
from legacy faces to "legacy" file.
2023-12-20 20:47:10 -05:00
Lukas Tönne e470edf3e1 Geometry Nodes: initial Volume Grid socket support
This is the initial implementation for the volume grid sockets that has been
discussed during the November 2023 geometry nodes workshop.

It adds initial support for passing volume grids around in sockets. Furthermore,
it adds two new nodes. Both are initially hidden under the "New Volume Nodes"
experimental option until we have a few mode nodes.
* **Get Named Grid**: Gets or extracts a volume grid from a volume geometry
  based on the grid's name.
* **Store Named Grid**: Puts a volume grid back into a volume with a name.

`SocketValueVariant` is extended to support grids besides single values and fields.

Next steps:
* Implement grid socket shape and inferencing (currently, they just look like
  single values).
* Add implicit conversions between grid types.
* Implement nodes that operate on the grids (#116021).
* Improved spreadsheet and viewer support.

Links:
* https://devtalk.blender.org/t/volumes-in-geometry-nodes-proposal/31917
* https://devtalk.blender.org/t/2023-11-06-geometry-nodes-workshop-notes/32007#volumes-3

Co-authored-by: Jacques Lucke <jacques@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/115270
2023-12-20 22:33:17 +01:00
Jacques Lucke 17e2186dd9 Cleanup: fix missing include 2023-12-20 21:32:59 +01:00
Hans Goudey 19b46e0816 Cleanup: Make format 2023-12-20 14:54:50 -05:00
Harley Acheson 13208038da UI: Show "No results found" for empty searches
For menu and operator searches, and for File and Asset Browser
filtering, show "No Results Found" when there is nothing to show.

Pull Request: https://projects.blender.org/blender/blender/pulls/116201
2023-12-20 20:53:48 +01:00
Hans Goudey 4f8d584325 Cleanup: Inconsistent struct vs. class declaration warning 2023-12-20 14:14:11 -05:00
Miguel Pozo 7288201e96 EEVEE-Next: Partial World LightPath node support 2023-12-20 20:04:44 +01:00
Aras Pranckevicius 1be8b51b11 VSE: display audio waveforms by default
As outlined in #115274 design task, at this point VSE timeline audio
waveform processing/rendering is no longer a performance issue,
so make it on by default.

Pull Request: https://projects.blender.org/blender/blender/pulls/116334
2023-12-20 19:51:23 +01:00
Hans Goudey edf8a776ac Cleanup: Use forward declarations to replace includes of BKE_attribute.hh
Remove most includes of this header inside other headers, to remove unnecessary
indirect includes which can have a impact on compile times. In the future we may
want more dedicated "_fwd.hh" headers, but until then, this sticks with the
solution in existing code.

Unfortunately it isn't yet possible to remove the include from `BKE_geometry_set.hh`.
2023-12-20 13:25:28 -05:00
Hans Goudey 7f24972911 Cleanup: Use accessor functions for point cloud positions 2023-12-20 13:25:28 -05:00
Hans Goudey 19001c9e6c Cleanup: Move attribute domain enum to C++ header, use enum class
Each value is now out of the global namespace, so they can be shorter
and easier to read. Most of this commit just adds the necessary casting
and namespace specification. `enum class` can be forward declared since
it has a specified size. We will make use of that in the next commit.
2023-12-20 13:25:28 -05:00
Hans Goudey 2618c1d71d Cleanup: Use utility to fill default attribute values
See f5adfa6acd
2023-12-20 13:25:28 -05:00
Bastien Montagne 25ab53a4af Cleanup: Remove LibOverride Template experimental feature.
This was added at the start of the project, as a way for the source
library to control what would be overridable by the user of the data
(production files).

The implementation never went beyond the experimental area, and only
exposed in the python API then. The idea has been superseeded by the
'cherry-pick' design, so there is no point in keeping this code any
longer.
2023-12-20 17:57:24 +01:00