Commit Graph

105785 Commits

Author SHA1 Message Date
Clément Foucault
b24591baed EEVEE-Next: Split lightprobe volume eval to its own file
Simple cleanup to reduce dependencies in code.
2024-01-10 22:46:42 +13:00
Aras Pranckevicius
19b33496b2 Tests: add IMB_transform tests
Related to PR #116628, ensure the behavior is covered by tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/116959
2024-01-10 08:56:25 +01:00
Pratik Borhade
edd9b377dd Fix #116924: Sculpt undo crash and missing update
Crash is due to accessing higher index of 0 sized array. Fix this by
changing the size of vector.
Missing update seems to be due to wrong PBVH node flags and typo.

Pull Request: https://projects.blender.org/blender/blender/pulls/116935
2024-01-10 08:23:25 +01:00
Campbell Barton
5b9dcbdb8c Cleanup: remove use of scoped defer to ensure memory is freed
Using a single free call is simple and reduces the generated code side.
2024-01-10 14:21:04 +11:00
Campbell Barton
15843b46ab Fix #116854: context.property access crashes when properties have no ID
Missing checks in [0] which didn't account for UI properties without an
ID or failure to create the property path.

[0]: 6ba0346797
2024-01-10 13:46:22 +11:00
Campbell Barton
60e74d1ef7 UV: restore axis alignment support for Smart UV Project
Regression from porting "Smart UV Project" from Python to C
[0] which removed UV island alignment support.

Restore support by adding X/Y aligned rotation to UV pack. Vertical axis
alignment is the default for smart project matching previous behavior.

Resolves #116355.

[0]: 850234c1b1
2024-01-10 12:31:38 +11:00
Campbell Barton
7dce0d7768 Cleanup: suppress invalid warning from GCC 2024-01-10 10:10:47 +11:00
Campbell Barton
65b82c617a Cleanup: use colon after doxygen parameters 2024-01-10 10:04:14 +11:00
Campbell Barton
7020b33e14 Cleanup: remove outdated comment 2024-01-10 10:04:13 +11:00
Campbell Barton
e1f04aee4b PyAPI: remove code for Python 3.10 2024-01-10 10:04:10 +11:00
Campbell Barton
4d9063739c Cleanup: use RNA_STACK_ARRAY define, avoid extra loop 2024-01-10 10:01:40 +11:00
Campbell Barton
edfc566ab9 Unbreak debug build 2024-01-10 10:00:38 +11:00
Thomas Barlow
904b572487 Fix #116807: Crash for large multidimensional bpy property default value
The functions for creating bpy vector properties used fixed size
`default_value` arrays on the stack. The array was not large enough to
store all the default values for larger multidimensional properties,
which would write past the end of the array and start corrupting the
stack, leading to crashes.

The maximum total length of a bpy vector property is 32768 (32x32x32)
which is a little large of an array to be putting on the stack, so the
`default_value` array now uses `blender::Array` and allocates additional
memory if the number of `default_value` elements exceeds its inline
buffer size of 64.

To simplify allocating arrays of the correct size,
#bpy_prop_array_length_parse now fills in `array_len_info->len_total`
when parsing a sequence.

Pull Request: https://projects.blender.org/blender/blender/pulls/116811
2024-01-09 22:40:13 +01:00
Hans Goudey
46f9b7f222 Fix #116961: UV project modifier always adds attribute
Caused by 2396d07f4e
2024-01-09 16:32:53 -05:00
Hans Goudey
339275507d Cleanup: Use math vector types in delaunay triangulation code
Rather than defining a separate vector type just for use here.
2024-01-09 16:21:31 -05:00
Jacques Lucke
2be41131fa Fix: memory leak
Previously, the `ZoneBuildInfo` values were never destructed. That worked, because
it rarely contained any allocations. This changed in b6f8e1396b.
2024-01-09 22:10:11 +01:00
Richard Antalik
f37b2d1907 VSE: Hide retiming keys, when retiming is reset
This prevents making new keys without user input by
`SEQ_retiming_data_ensure()`.
2024-01-09 20:41:49 +01:00
Richard Antalik
3bb6fa9391 VSE: Don't draw unused properties in redo panel
Property `delete_data` was drawn in redo panel, when retiming key is
deleted, but this property is useful only when deleting strips.
2024-01-09 20:37:19 +01:00
Bastien Montagne
f88595e428 RNA/BPY API: Add clear_liboverride option to ID.make_local.
This function had the exacyt same behavior as the 'UI' operators, make
local invoqued on a linked liboverride would make the data local, but
would not clear the liboverride data from it. User then needs to call
this operation again if they want to remove that liboverride data.

The new `clear_liboverride` parameter to `ID.make_local` forces always
clearing any liboverride data, and allows to make a linked liboverride
fully local with a single call.

This option is kept disabled by default, to ensure default behavior
remains unchanged.
2024-01-09 19:49:18 +01:00
Hans Goudey
e6da277918 Fix #116504: Node group assets in "Instance" catalog show twice
That name was missing from the builtin menus list
2024-01-09 13:44:11 -05:00
Falk David
1b65faddd0 Cleanup: GPv3: Require layer when retrieving a drawing
This cleanup changes the `layer` parameter in `get_drawing_at` and `get_editable_drawing_at` to a reference.
This makes it clear that the layer is required for this function.
2024-01-09 18:34:36 +01:00
Lukas Tönne
7981b35064 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.

This is a revised version of the initial attempt in #114803.
Doing the node type fix in the after-linking stage ensures that
versioning code can change outdated node types which might otherwise get
removed by this type check.

Pull Request: https://projects.blender.org/blender/blender/pulls/116908
2024-01-09 18:29:33 +01:00
Iliya Katueshenock
b6f8e1396b Geometry Nodes: refactor indices for zone socket mapping
This simplifies the code that creates the zone socket mappings at the cost of
slightly more memory per zone, which is not significant.

Previously, `IndexRange` was used where it now uses `Vector<int>`.

Pull Request: https://projects.blender.org/blender/blender/pulls/116939
2024-01-09 18:16:43 +01:00
Hans Goudey
9704d5e468 BLI: Add "numbers" math header, decouple C API
Adds a header that defines the same constants as the C++ 20
<numbers> header.

Benefits:
- Decouple our C++ and C math APIs
- Avoid using macros everywhere, nicer syntax
- Less header parsing during compilation
- Can be replaced by `std::numbers` with C++ 20

Downsides:
- There are fewer numbers defined in the C++ standard header
- Maybe we should just wait until we can use C++ 20

Pull Request: https://projects.blender.org/blender/blender/pulls/116805
2024-01-09 18:05:12 +01:00
Thomas Barlow
96f93ff42e Fix: False positives/negatives in curves_selection.cc#contains
The last element of each 2048-element section was being skipped because
the size of an `IndexRange` was being calculated like
`range.last() - range.start()`, but it should have been like
`range.one_after_last() - range.start()`. For example, the `IndexRange`
starting at `0` with a size of `3` contains the values `0`, `1` and `2`,
so `.start() == 0`, `.last() == 2` and `.one_after_last() == 3`.

False positives could occur because the entirety of the `values` array
was always being checked, even when only the first few elements were
initialized. An end iterator matching the end of the initialized
elements is now used instead of the end of the array itself.

The `value` argument was ignored by some code paths, which instead
always checked for `true`. This didn't cause any issues currently,
because all uses of #contains are searching for `true`, but this may not
be the case in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/116834
2024-01-09 17:40:14 +01:00
Thomas Dinges
e2945cb671 Versioning: Update comments how to handle subversioning
These should be done directly with the code submission from now on.

Pull Request: https://projects.blender.org/blender/blender/pulls/116945
2024-01-09 17:38:18 +01:00
Sybren A. Stüvel
799a6ecd24 Cleanup: Constraints, update documentation of some flags
Update the documentation of `CONSTRAINT_DISABLE` and `CONSTRAINT_OFF`
flags to clearly distinguish them from each other.

- `CONSTRAINT_OFF`: The eye icon in the interface. Managed by the user,
  maybe indirectly via the animation system or drivers. Maps to both the
  `mute` (positive) and `enabled` (negative) properties in RNA.
- `CONSTRAINT_DISABLE`: The red color in the interface that indicates
  invalid settings. Set by Blender when a constraint is considered to be
  invalid, for example a 'Copy Location' constraint without a target.
  Maps to `is_valid` (negative) in RNA.

No functional changes.
2024-01-09 16:49:06 +01:00
Miguel Pozo
8d74af164e Fix: EEVEE-Next: Update gbuffer_fb bind_ex
Ensure it's in sync with the framebuffer configuration
2024-01-09 16:25:24 +01:00
Miguel Pozo
5e848c9956 Fix: EEVEE-Next: Use uint for header_tx.clear
Make sure it matches the texture format to fix assertions.
2024-01-09 16:20:31 +01:00
Thomas Dinges
1229ffa859 Versioning: Bump subversion and move code into block 2024-01-09 15:29:40 +01:00
Jacques Lucke
ca149d8695 Cleanup: formatting 2024-01-09 15:08:11 +01:00
Jeroen Bakker
5b969f54ca Vulkan: Fix Shader Compilation Issue
The Specialization Shader workaround generated code that wasn't Vulkan
GLSL compliant. The uintBitsToFloat cannot be used during global const
initialization.

This is a temporary work around until we implement the Specialization
Constants for Vulkan.

Pull Request: https://projects.blender.org/blender/blender/pulls/116942
2024-01-09 14:55:02 +01:00
Christoph Lendenfeld
311589ce23 Refactor: simplify arguments for make_new_fcurve_cyclic
No functional changes.

Simplifies the function `make_new_fcurve_cyclic` so it is easier to call.

Pull Request: https://projects.blender.org/blender/blender/pulls/116941
2024-01-09 14:38:38 +01:00
Jacques Lucke
d19e7cbb5a Fix #115540: nodes with sockets only on one side are hard to resize
This was caused by 74dd1e044b.

The fix implemented here disables socket picking in the header region of
non-collapsed nodes. This way, resizing always works when on the left
and right side of the header.
2024-01-09 13:19:48 +01:00
Sybren A. Stüvel
c4376c58e9 Refactor: Anim, remove unnecessary method override
Remove the `BoneCollectionItem::supports_collapsing()` method, as the
parent class already does exactly the same thing. No need to override that.

No functional changes.
2024-01-09 12:59:39 +01:00
Sybren A. Stüvel
e5b6126961 Cleanup: add missing const
Just a missing `const`, no functional changes.
2024-01-09 12:55:30 +01:00
Sybren A. Stüvel
9aa4f28921 UI: use std::abs() to ensure floating point values are handled properly
Explicitly use `std::abs()` instead of `abs()`, so that it returns
`float` when its argument is `float`.

Clang was warning: using integer absolute value function 'abs' when
argument is of floating point type.
2024-01-09 12:50:48 +01:00
Sybren A. Stüvel
015555b07a Anim: library override support for bone collection visibility
Support tracking the `bone_collection.is_visible` property via library
overrides.

This requires an RNA change. Instead of exposing all bone collections as
`armature.collections.all` (i.e. a sub-property of `.collections`) it is
now exposed as `armature.collections_all` (an armature property).

There is still the limitation that insertion operations are only
supported on `armature.collections`, so only new roots + their sub-trees
can be added via library overrides.

Overrides on `armature.collections_all` are limited to overriding
property values. The `parent`, `index`, and `child_number` properties
are excluded from this, as reorganising the hierarchy itself via
overrides is not possible.
2024-01-09 12:50:48 +01:00
Jacques Lucke
653e01092f Fix #115782: crash when dangling reroute has outgoing link into repeat zone
Now, such links are treated similar to muted links. Links coming from dangling
reroutes are not added to the set or border links anymore. They should be
ignored by evaluation systems.
2024-01-09 12:43:35 +01:00
Philipp Oeser
a7f4f86fe5 Fix: Node Editor overlay settings cannot be added to Quick Favourites
Add support for the needed node editor "spacedata.overlay" in
WM_context_path_resolve_full.

Part of #113489 (VSE overlay settings require a bit more work, this is
for a later commit).

Pull Request: https://projects.blender.org/blender/blender/pulls/116604
2024-01-09 12:29:28 +01:00
Campbell Barton
5afd33d129 PyAPI: drop support for Python 3.10
All platforms have been updated to support 3.11
so supporting 3.10 is no longer needed.
2024-01-09 22:23:41 +11:00
Christoph Lendenfeld
f11ec3eb14 Cleanup: Remove unused include
`#include "ED_keyframing.hh"` was no longer needed.
This is in an effort to remove the dependency
to the editor code from animrig.
2024-01-09 12:09:19 +01:00
Marcelo Mutzbauer
d16543a155 Fix #116418: Stroke direction wrong on curved surfaces
Even though the brush rotation is computed as a 2D angle (based on the mouse
movement), it currently gets applied by rotating the projected X direction
around the the normal in 3D.

This patch ensures that rotation gets applied first, and only then does the
motion direction get projected into the tangent plane. A potential issue with
the current approach is that the random perturbations will also be applied in
2D, but this seems to be fine from discussions with @JulienKaspar and @Sergey.

Also, there was an error where the location should probably be converted *to*
world coordinates.

All these changes seem to fix the issue described in #116418.

I also noticed some minor "inconsistencies" with how the rotation is applied:
For curve strokes, the direction of the curve corresponded to the upward
direction of the brush. For view plane, area plane mapping and anchored strokes,
the mouse motion indicated the downward direction of the brush.
For compatibility, I tried my best to enforce the latter conventions throughout,
but I'm not so confident about oversights.

Pull Request: https://projects.blender.org/blender/blender/pulls/116539
2024-01-09 11:58:42 +01:00
Jacques Lucke
c5688e619e Fix #116369: missing dependency on time when there is a bake animation node 2024-01-09 11:07:52 +01:00
Jacques Lucke
ffcc0e3e5f Fix #116515: Single Value Only applies to wrong input in geometry nodes modifier
The counting of input sockets did not take closed panels into account correctly.
2024-01-09 11:01:12 +01:00
Iliya Katueshenock
79a56dd764 Fix #116671: update socket availability after node declaration update
Pull Request: https://projects.blender.org/blender/blender/pulls/116672
2024-01-09 10:52:46 +01:00
Jacques Lucke
59b3a4ed0c Fix #116691: repeat zone does not propagate anonymous attributes correctly
Field sources that come into the repeat zone from the outside need some
special handling at the repeat output node.

Pull Request: https://projects.blender.org/blender/blender/pulls/116915
2024-01-09 10:45:50 +01:00
Prikshit singh
40fbc60ef7 Fix #116727: crash when deleting geometry node group in node editor
Pull Request: https://projects.blender.org/blender/blender/pulls/116757
2024-01-09 10:43:45 +01:00
Jacques Lucke
5c3596e9ed Fix #116806: IndexMask.find returns wrong result when mask has offset
`IndexMask.find` did not take `begin_index_in_segment_` into account properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/116891
2024-01-09 10:42:09 +01:00
Clément Foucault
e578678290 EEVEE-Next: Fix incorrect lighting on refraction closures
Add placeholder code for when we support it.
For now, we just use the indirect lighting.
2024-01-09 16:39:17 +13:00