Commit Graph

150077 Commits

Author SHA1 Message Date
Sebastian Parborg
cfbb6b5627 Fix: Remove unused typedefs from the legacy armature overlay 2024-09-04 16:13:42 +02:00
Jacques Lucke
89ae1ba38a Attributes: remove AttributeIDRef in favor of just using strings
Previously, the `AttributeIDRef` wrapper was needed because it also had to
contain a pointer to an `AnonymousAttributeID`. However, since
b279a6d703 this is not necessary anymore.
Therefore we can use "raw" `StringRef` now which reduces the mental overhead
when working with attributes and also simplifies code.

Pull Request: https://projects.blender.org/blender/blender/pulls/127140
2024-09-04 16:13:03 +02:00
Clément Foucault
3ab60972b5 Fix: Overlay-Next: Missing select_bind call 2024-09-04 14:35:18 +02:00
Laurynas Duburas
e310e0450f Overlay-Next: add selection mode to relations
Adds selection mode to relations.
Fixes `overlay_extra_wire_vert.glsl` to support `drw_CustomID` and `in_select_buf` for `select_id_set`.

Pull Request: https://projects.blender.org/blender/blender/pulls/127082
2024-09-04 14:29:35 +02:00
Clément Foucault
05deb10405 Fix: Overlay: Intel driver hang caused by shader compilation
Thanks @xavierh for the fix.

Fix #126812
2024-09-04 13:44:42 +02:00
Campbell Barton
36415cfaad Fix memory leak loading legacy meshes without any edges 2024-09-04 21:28:16 +10:00
Jacques Lucke
8fd1a6d094 Fix: Geometry Nodes: don't allow accessing anonymous attributes from named attribute nodes 2024-09-04 13:07:25 +02:00
Jacques Lucke
d38b7286e9 Cleanup: use StringRef instead of std::string in a few places 2024-09-04 13:07:25 +02:00
Pratik Borhade
0bfad6cc5a GPv3: Wrong radius property in draw context menu
Mistake in 9ca6e049a7
Adjust draw brush properties based on `use_locked_size` status

Pull Request: https://projects.blender.org/blender/blender/pulls/127070
2024-09-04 12:58:49 +02:00
Clément Foucault
508b39661d Overlay-Next: Armature
Functional Changes:
- Custom shapes using empties now supports line width.
- Line width is supported on MacOS.
- Fixed Stick bone drawing on MacOS.

Some shaders are duplicated and ported to the new
primitive expansion API.

The legacy code inside `overlay_armature.cc` have been
guarded behind `NO_LEGACY_OVERLAY` which can
be enabled to make sure no legacy code is used unnoticed.
This allows for spotting more easily code that needs to be
ported. Moreover, it is easier to remove this legacy code
when the time comes.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/126474
2024-09-04 12:56:37 +02:00
Campbell Barton
5ec49b61e9 Fix crash linking legacy animation data
Resovle regression in [0].

Pointers in `action.chanbase` were used without first loading the
list-base. In this case the intention was to skip loading legacy
data, so clear the list instead.

[0]: c7bf1a697e
2024-09-04 20:43:44 +10:00
Miguel Pozo
d3909d42c6 Fix #125506: GP flicker in Video Sequencer
`gpencil_engine_enabled` is uninitialized at `Film::init` time,
so this replaces the check to rely on the DepsGraph instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/127113
2024-09-04 12:13:40 +02:00
Campbell Barton
8db8185276 Fix crash reading files from v2.66
Old files can contain names without any name part (`*` in this case).

Resolve the buffer overflow by checking for nil before the name begins.
2024-09-04 20:12:06 +10:00
Aras Pranckevicius
76f7c19c8d Fix: Scene copy does not copy VSE cache/proxy flags
Copying an existing scene was creating a new scene where all the
caches were off. Likewise, "show missing media" flag and proxy
settings was not copied either.

Pull Request: https://projects.blender.org/blender/blender/pulls/126876
2024-09-04 11:57:54 +02:00
Campbell Barton
ad00f9657b GHOST/Wayland: update the cursor scale even when hidden
When the output scale changes, the theme scale wasn't updated
when the current cursor had no surface.
2024-09-04 19:34:15 +10:00
Campbell Barton
ad67ad63fe Cleanup: spelling in comments 2024-09-04 19:34:15 +10:00
Campbell Barton
842f87d1de Cleanup: unused parameter warnings 2024-09-04 19:34:15 +10:00
Campbell Barton
9d3ddf6a04 Fix crash entering edit-mode for text objects from old blender versions 2024-09-04 19:34:15 +10:00
Campbell Barton
de7fced7eb Fix #126990: Changing editors doesn't set the default tool
Regression in [0].

[0]: 83fe5712ab
2024-09-04 19:34:15 +10:00
Nikita Sirgienko
94c9898f41 Fix #124811: Cycles: oneAPI: no hair strands in viewport with Embree
oneAPI kernels preloading logic was letting un-needed kernels to be
compiled without features, which would then miss when these kernels
were needed later.

Pull Request: https://projects.blender.org/blender/blender/pulls/127114
2024-09-04 11:08:00 +02:00
Richard Antalik
23f2db9eed FFmpeg: Simplify code for determining video frame count
Original code was quite unorganized and not as easy to read through.

There were basically 3 code paths:
1. Division of `AVStream` duration by its timebase
2. Division of `AVFormatContext` duration by its timebase, with possible
   AV offset compensation
3. Simply using frame count from `AVStream`

Finally there was possibility of ending up with duration of 0 in
specific case where `pFormatCtx->duration == AV_NOPTS_VALUE`, but I did
not find any test case for this (Added in aebb32748e).

During investigation for PR #126866, I have concluded, that before
commit 8903205dd9, the code which compared duration of stream and
container was incorrectly always true. But it resulted in correct
behavior for about 4 years. Code was reorganized with that assumption,
so above listed code paths are in order of possible execution. Exception
is code path 3, which is run first, but it's result is pretty much always
discarded.

Since all these workarounds are added around code path 3, it is safe
to assume, that it is least precise, so it should be considered last.

Pull Request: https://projects.blender.org/blender/blender/pulls/127010
2024-09-04 08:40:01 +02:00
YimingWu
fe4bd519f3 Fix #127073: GPv3: Auto keying in edit mode
GPv3 didn't handle auto keyframe insertion in edit mode transformation,
now corrected by using `insert_duplicate_frame` when target frame doesn't
exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/127078
2024-09-04 06:06:21 +02:00
Pratik Borhade
0ef35bc475 UI: Expose Proportional edit in image editor mask mode
Proportional edit works with shortcut in mask mode of image editor but
it was never exposed in UI (header). Also move pivot point along with
proportional edit property to the right of mask template.

Pull Request: https://projects.blender.org/blender/blender/pulls/126482
2024-09-03 22:56:48 +02:00
Aras Pranckevicius
174387e4d9 Fix #126908: 3D view background color affects attribute text outline color
The change was accidentally done in #121383 which primarily concerned
itself with overlay text colors, but started to use TH_BACK theme color
for the draw manager text (e.g. for geometry nodes value visualization)
outline color. Change behavior to use black or white outline color, based
on lightness of text color.

Pull Request: https://projects.blender.org/blender/blender/pulls/127071
2024-09-03 22:01:14 +02:00
Hans Goudey
324e1441a2 Fix #127085: Extrude mesh crash with no faces
In some cases when there are no faces there are no corner domain
topology attributes. Though this could be changed theoretically,
it's simpler to just make sure they exist in the few places we resize
a mesh rather than creating a new one from scratch.
2024-09-03 14:13:21 -04:00
Aras Pranckevicius
0bda704eee Tests: update VSE color balance test to cover masking 2024-09-03 21:02:16 +03:00
Jesse Yurkovich
787eb2b433 Fix: prevent free of nullptr during bone collection undo processing
It's possible for the `bArmature.collection_array` to be null if Bone
Collections were never added after armature creation. This could trip up
undo processing later when we call `MEM_freeN` on the collection.

Use a `MEM_SAFE_FREE` call instead which handles checking for null, as
well as setting to null when complete.

Pull Request: https://projects.blender.org/blender/blender/pulls/126945
2024-09-03 19:19:26 +02:00
Sybren A. Stüvel
4d4ad34f4c Anim: Action Slot icon
Add an icon for Action Slots. Design task: #123372

Pull Request: https://projects.blender.org/blender/blender/pulls/127102
2024-09-03 18:33:36 +02:00
Miguel Pozo
6f81cb7c63 Fix #126194: Parallel shader compilation crash 2024-09-03 18:13:19 +02:00
Jacques Lucke
3393af16da Cleanup: remove unused FunctionRef::call_safe
It's better to be more explicit in the calling code about what
happens when there is no function.
2024-09-03 18:06:12 +02:00
Hans Goudey
fc7de7c92f Cleanup: Sculpt: Use specific node types for original data access
This already exposes one place where we used the wrong function.
2024-09-03 11:13:52 -04:00
Hans Goudey
aaf445830c Fix: Sculpt: Geodesic distances crash after recent cleanup
Caused by 49409bdc89
2024-09-03 11:13:18 -04:00
Hans Goudey
4f23e4c6b0 Fix: Crash in some cases after disabling dynamic topology
Make sure the deform normals caches stored in `SculptSession` are
cleared after topology changes. These should eventually be stored
in an actual mesh rather than `SculptSession` which would simplify
the situation.
2024-09-03 10:45:20 -04:00
Hans Goudey
43a96d6b8d Fix: Compile error from missing includes after attribute ID refactor
b279a6d703
2024-09-03 10:43:07 -04:00
Hans Goudey
1730ba23ec Fix: Crash when toggling dynamic topology off
Before some recent refactors, normals were always calculated
when creating the sculpt BVH tree. Switching from dyntopo BMesh
back to base mesh sculpting, that didn't happen anymore.
Nowadays it makes more sense to update the normals as necessary
where they are used, so the intent of the code that uses normals
is clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/127111
2024-09-03 16:34:06 +02:00
Alaska
8cf4d47fe2 Fix: Improve Cycles point clouds in HIPRT
Fixes a few issues with point clouds with HIPRT.
1. Crashing when building the BLAS due to an incorrect sized array.
2. A typo leading to all point cloud intersections being skipped.
3. A typo leading to some motion blurred point clouds rendering
as if they were stationary, or not rendering at all.

Pointclouds, with deformable motion blur, with BVH time steps set to >0
still do not render. Curves seem to have the same issue.

Ref #125086

Pull Request: https://projects.blender.org/blender/blender/pulls/125834
2024-09-03 16:31:41 +02:00
Nathan Vegdahl
56e5b61ad0 Fix: layered-action channel groups not shown in graph editor
The issue was that we were misinterpreting the `ANIMFILTER_FCURVESONLY`
flag in the animation filtering code. We were taking it to mean that
literally only actual fcurve channels should be included, but in fact
it should include the channel groups for those fcurve channels as well.

The graph editor code (but not the dopesheet code) depended on this
interpretation to function correctly, and doesn't display the groups
at all without it.

This fixes the issue by not excluding channel groups even when that
flag is set. This also updates the documentation of that flag to
clarify its actual semantics.

Pull Request: https://projects.blender.org/blender/blender/pulls/127108
2024-09-03 15:48:40 +02:00
Jacques Lucke
b279a6d703 Refactor: Geometry Nodes: remove AnonymousAttributeID in favor of just strings
This removes `AnonymousAttributeID` which was "attached" to every anonymous
attribute before. It adds more complexity than is justified for its
functionality.

It was originally introduced to keep the reference count of the anonymous
attribute so that it can be deleted automatically when the attribute is not
referenced anymore. For quite some time we have had deterministic attribute
life-times though which don't rely on the reference count anymore.

Anonymous attributes are sometimes shown in the UI as "friendly looking" string
like `"UV Map" from Cube`. Some information necessary for this was also stored
in `AnonymousAttributeID`. However, this can also be solved differently.
Specifically, this functionality has now been added directly to
`AttributeFieldInput`.

This refactor also allows removing `AttributeIDRef` which was mainly introduced
because we had to keep the `AnonymousAttributeID` attached with the attribute
name. Just using simple string types to identify attributes can reduce the
mental overhead quite significantly. This will be done as a separate refactor
though.

Pull Request: https://projects.blender.org/blender/blender/pulls/127081
2024-09-03 15:38:51 +02:00
Jeroen Bakker
b2a0d29345 Vulkan: Separate pipeline caches for (non)static shaders
This change does some preparations before we implement persistent
caching for static shaders.

- Move ownership of pipeline cache to the pipeline pool.
- Use two pools. one is only used for static shaders
  other for non static shaders.

Related to #126229

Pull Request: https://projects.blender.org/blender/blender/pulls/127100
2024-09-03 15:25:50 +02:00
Julian Eisel
a8c08e4a8c Refactor: Sculpt/Paint: Rename brush "tool" to "brush type"
The term "tool" is historic from before the actual tool system got
introduced. Since then the term was already a bit confusing, because it
wasn't directly related to the tool system, but there was still some
relationship between the two. Now brushes and their types are decoupled
much more from the tool system, with a single "Brush" tool supporting
all kinds of brushes (draw, grab, cloth, smooth, ...).

For a more clear terminology, use "brush type" instead of "tool".

For #126032 we need to write the brush type to the asset metadata (done
in !124618), so we can filter brushes based on the type (so the grease
pencil eraser tool only shows eraser brushes, for example). I'd like to
use future proof names for that to avoid versioning of asset metadata in
future, so I'd rather do the full naming change now.

RNA properties (thus BPY names) are not changed for compatibility
reasons. Can be done in 5.0, see blender/blender#124201.

Pull Request: https://projects.blender.org/blender/blender/pulls/126796
2024-09-03 15:20:34 +02:00
Campbell Barton
c1e145ed47 BLI: add empty string & "." to BLI_path tests 2024-09-03 21:37:13 +10:00
jamesf
7c0368d058 BLI: add tests for some BLI_path_is_* functions
Ref: !127007
2024-09-03 21:31:35 +10:00
Miguel Pozo
1340aa615a Fix: EEVEE: Crash with >16 AOVs
Null check the result of `get_aov_texture`.
Reported in #127059.
2024-09-03 13:27:06 +02:00
Campbell Barton
e34d9eeac7 Cleanup: use C-style comments, double quote Python text 2024-09-03 21:22:34 +10:00
Campbell Barton
e242157674 Core: flush outputs before calling exiting on execvp failure
Flush outputs to ensure any errors will be seen by the user.
2024-09-03 21:22:33 +10:00
Campbell Barton
790333578b Fix incorrect use of exit() when execv() fails on *nix
Calling exit() runs temporary directory cleanup and other atexit
functions that shouldn't be called while Blender runs.
The same issue [0] addresses.

Also add clarifying comments.

[0]: e00b7c4ad4
2024-09-03 21:22:32 +10:00
Aras Pranckevicius
0e999f3786 Tests: fix Mac arm64 failure on recently added VSE render tests 2024-09-03 14:05:04 +03:00
Miguel Pozo
2afb9e3d95 Fix #126038: Default Cube has Transparent Shadows off 2024-09-03 13:03:30 +02:00
Bastien Montagne
16eff5af62 Cleanup: Update documentation of MEM module API.
Make it clearer that C++-style MEM_new/MEM_delete and
C-style MEM_cnew/MEM_malloc/etc./MEM_freeN calls should never be mixed
on the same data.
2024-09-03 13:00:21 +02:00
Campbell Barton
e9333c82ab Fix #120861: BMFace.copy_from_face_interp looses reference
Remove call to BM_elem_attrs_copy in face interpolation function.
This was copying custom-data which cleared the faces CD_BM_ELEM_PYPTR,
making the Python objects behave as if it was removed.

While the issue could also be fixed by skipping the PYPTR layer,
copying attributes such as the material & normal in a face-data
interpolation function isn't correct. In cases where this is needed,
it's better the caller handles copying attributes.
2024-09-03 20:45:12 +10:00