Commit Graph

120055 Commits

Author SHA1 Message Date
il4n
41a61aa4aa Fix: VSE: Overlap when using reset retiming on strip with effect strips
If a strip had effect strips applied on it, and using the reset
retiming operator caused the strips to increase in length, the effect
strips would become overlapped with any strips they hit, unless the
"Expand" overlap mode was used.

This is because the "effect chain" strips weren't included
in #strips.

Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124750
2024-07-16 13:10:28 +02:00
il4n
e2934ee29f Fix: Reset retiming doesn't update effect strip and meta strip ranges
Pull Request: https://projects.blender.org/blender/blender/pulls/124749
2024-07-16 13:04:48 +02:00
Christoph Lendenfeld
b2cedb891e Fix #124686: Armature wire width not working with curves
This was originally fixed in 8ecccddf1c but for some reason
the merge to main didn't include those changes
merge commit: 2e03ca4a5b

The issue was that the wire width was not passed to the shader when using curve objects.

This PR is just the cherry picked changes from the original commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/124774
2024-07-16 12:59:42 +02:00
John Kiril Swenson
471a148666 VSE: Fix glitchy handle select for adjacent strips
For very small hotspot regions when trying to select handles on adjacent
strips, selection can sometimes jump to the strip farthest away from the
current mouse cursor position. This happens regardless of "Tweak
Handles" setting, but is most noticeable when it is off.

In the case that two strips are selected at once (which is possible
because internally strip handles are shifted away from the strip body by
a third of the handle size), `mouseover_strips_sorted_get` attempts to
sort these strips to maintain priority, but the logic was backwards --
fix the glitch by sorting strips such that the first strip in the
`Vector` is always the strip closest to the mouse cursor.

Pull Request: https://projects.blender.org/blender/blender/pulls/124708
2024-07-16 12:25:15 +02:00
il4n
0935baee36 Fix: VSE: Memory leak in SEQ_retiming_data_clear
Pull Request: https://projects.blender.org/blender/blender/pulls/124744
2024-07-16 12:24:16 +02:00
il4n
2d6d62da18 Refactor: Move code into new SEQ_retiming_reset function
This is so that internal functions can be used to fix bugs in the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/124748
2024-07-16 12:20:47 +02:00
Julian Eisel
21aeb9e454 Fix: Duplicating brush asset wouldn't display it as active
Was using the old, not the modified name of the brush to build the brush
asset reference, that is used to identify the active brush asset.

The new brush was actually activated, but some of the UI like the asset
shelf would display it as such.
2024-07-16 11:57:26 +02:00
YimingWu
5a60e3f439 Fix #124297: GPv3: Build modifier natural drawing speed fix
The fix contains two parts:

1. Grease Pencil v3 now stores stroke `init_time` as a float attribute,
   it's not enough precisiton for unix timestamp. Now the time value is
   truncated to allow better precision. It's still stored in seconds.
2. The previous logic for calculating stroke gap time of the build
   modifier isn't correct, it used to only count two starting times as
   gap time. Now it's fixed with correct delta time.

Pull Request: https://projects.blender.org/blender/blender/pulls/124350
2024-07-16 10:26:31 +02:00
Jacques Lucke
c3f79ee250 Geometry Nodes: support simulating and baking grease pencil geometry
This adds support using grease pencil in simulation zones and bake nodes.
The code is very similar to the code of the other geometry types.

Pull Request: https://projects.blender.org/blender/blender/pulls/124670
2024-07-16 10:11:48 +02:00
Iliya Katueshenock
81de8f388e Fix: Geometry Nodes: Field inferencing takes dangling reroutes into account
Fix is to ignore dangling reroutes for sockets which have an implicit field input.

Pull Request: https://projects.blender.org/blender/blender/pulls/124742
2024-07-16 09:52:57 +02:00
Iliya Katueshenock
9a2ff022a7 Fix: Nodes: Lack of dash on fields links
Regression after 24dc9a21b1.

Pull Request: https://projects.blender.org/blender/blender/pulls/124740
2024-07-16 09:47:15 +02:00
Sean Kim
e18dcef38d Cleanup: Reduce usage of initial_vert
Pull Request: https://projects.blender.org/blender/blender/pulls/124756
2024-07-16 04:28:52 +02:00
Sean Kim
cf656ac040 Refactor: Use float3 instead of PBVHVertRef for pivot_vertex
This commit removes the extra initial_pivot_position variable from
SculptBoundary as well as the PBVHVertRef in favor of a single float3.
This value is effectively const for the lifetime of the struct in the
current state, as this value is only calculated and used at the
beginning of the brush stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/124755
2024-07-16 04:20:22 +02:00
Sean Kim
c20b8f5d6e Refactor: Replace SculptBoundaryPreviewEdge with std::pair
This commit replaces the PBVHVertRef with specific float3 positions for
the edges. To ensure data is displayed correctly, we also remove the
conditional check on updating this data when drawing the cursor to
force recaculating the edge positions on the start of every brush
stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/124754
2024-07-16 03:40:49 +02:00
Julian Eisel
e30a1326a4 Fix #124719: Failed assert in old (2.34) testfile
Issue happened in very old files only (pre 2.38), where versioning would
allocate tool-settings, without calling initialize logic for painting.
This should be fine, just handle the case properly where initialization
happens later, once the paint mode is actually entered.

Also adds missing default brush setting for this corner-case, where
texture paint data gets initialized only when entering the mode.
2024-07-15 20:25:15 +02:00
Hans Goudey
e35e80275a Cleanup: Formatting 2024-07-15 13:36:20 -04:00
Hans Goudey
7ce067d73b Sculpt: Data oriented refactor for enhance details brush
Part of #118145.

This brush first stores an array of translations for each vertex and
then reuses those translations for the rest of the stroke. I added
a few utilities to simplify storing the data for all vertices for the
multires and BMesh implementations. Compared to the old code,
computing the translations is skipped for completely hidden or
masked nodes. Also we don't skip hidden neighbors since that gives
better results. That wasn't as easy with the old API.

Pull Request: https://projects.blender.org/blender/blender/pulls/124569
2024-07-15 19:14:29 +02:00
Julian Eisel
e6a4245099 UI: Remove unused brush tool icons
Since 7b0ea0f1b4, brushes are used as assets and most brush based tools
removed. This commit removes the icons of these tools.

The `toolbar.blend` these icons are generated from was updated in
blender/blender-assets@814eed6390.

Initially reviewed in (but the exact changes in this commit differ):
https://projects.blender.org/blender/blender/pulls/123842

Pull Request: https://projects.blender.org/blender/blender/pulls/124736
2024-07-15 19:06:10 +02:00
Bastien Montagne
50076993f3 Refactor: UI: Use std::variant instead of Union for non-trivial data.
Unions make handling of non-trivial data 'members'... non-trivial.

Since `PointerRNA` is going to become non-trivial, this commit replaces
the Union storing delta, min and max values of editied RNA properties
in `ui_selectcontext_apply`, into a `std::variant`.

It also adds a new accessor to RNA string properties, returning a
`std::string` data, and uses this type to store string properties values
in `ui_selectcontext_apply`.

Pull Request: https://projects.blender.org/blender/blender/pulls/124727
2024-07-15 18:23:23 +02:00
Clément Foucault
d7a7491518 Fix: EEVEE: Missing shader include
Caused by 3fcd80db68
2024-07-15 18:15:34 +02:00
Clément Foucault
d25b99aa64 EEVEE: Depth Of Field: Add debug visualization
This allows to see which stage is causing trouble.
2024-07-15 17:36:35 +02:00
Falk David
8c9df38eb9 Fix: GPv3: Conversion of edit curves not working correctly
There was a case where we wouldn't convert edit curves correctly,
specifically when the user created an edit curve
(using "Curve Editing") and then changes the stroke outside of
curve editing. This invalidates the edit curve, but does not
deallocate it.

The conversion assumed that any allocated edit curve is valid.

Now we check for the `GP_CURVE_NEEDS_STROKE_UPDATE` flag
to skip invalid edit curves (and use the stroke instead).
2024-07-15 17:13:38 +02:00
Weizhen Huang
3fcd80db68 Fix #124621: EEVEE closure reservoir sampling not considering color weight
color was not taken into consideration when picking a closure using
reservoir sampling, giving closures with dark color much higher weights
than they should have.
This fix multiplies the weight by the average color when picking the
closure, similar as what has been done in principled BSDF.

Pull Request: https://projects.blender.org/blender/blender/pulls/124730
2024-07-15 17:00:51 +02:00
Sebastian Parborg
4f46493eae VSE: Reword the text of the movie add "use_framerate" option
Reword the setting to be more clear what it actually does.

Pull Request: https://projects.blender.org/blender/blender/pulls/124613
2024-07-15 16:56:12 +02:00
Bastien Montagne
c607ead4b7 Refactor: Makesrna: move generated code further in C++.
This commit moves generated `RNA_blender.h`, `RNA_prototype.h` and
`RNA_blender_cpp.h` headers to become C++ header files.

It also removes the now useless `RNA_EXTERN_C` defines, and just
directly use the `extern` keyword. We do not need anymore `extern "C"`
declarations here.

Pull Request: https://projects.blender.org/blender/blender/pulls/124469
2024-07-15 16:39:45 +02:00
Jeroen Bakker
0d71d83d47 Vulkan: Share rendergraphs on context inside same thread
This PR will share render graphs between all contexts that run in
the same thread. This allows the draw manager commands to be added
to the same render graph as the UI.

- Fixes debug groups hiearchy. Draw manager would restart a hierarchy as
  it wasn't aware of the debug groups already added by the UI
- Removes cpu sync when switching between contexts.

In a future change this is needed to improve discarding resources.

Pull Request: https://projects.blender.org/blender/blender/pulls/124715
2024-07-15 16:03:51 +02:00
Hans Goudey
5a293e5cc2 Fix #124703: MEM_free/MEM_new mismatch in file browser code
See 06be295946.
Caused by efa6525bf1.
2024-07-15 08:40:31 -04:00
Sergey Sharybin
ed873e420a Refactor: Make PaintStroke::mode_data an unique pointer
Should be no functional changes on user level.

Incidentally, this change fixes memory leak in grease pencil.

For the ease of detecting memory leaks in the future we might
consider adding MEM_CXX_CLASS_ALLOC_FUNCS to the PaintModeData.
But maybe look into this as a separate follow-up.

Pull Request: https://projects.blender.org/blender/blender/pulls/124612
2024-07-15 14:29:27 +02:00
Julian Eisel
a843d93bd1 Cleanup: Remove unused icon defines
Missed these in 088b885087.
2024-07-15 14:15:11 +02:00
Pratik Borhade
a33b1a8da0 Fix: GPv3: Sculpt mode crash after brush assets merge
Blender was crashing when sculpting on a frame that had no keyframe
under the playhead.
Use brush from correct context with the help of `BKE_paint_get_active`.

Pull Request: https://projects.blender.org/blender/blender/pulls/124397
2024-07-15 12:17:53 +02:00
Julian Eisel
088b885087 UI: Remove unused brush preview icons, now replaced by asset previews
Since 7b0ea0f1b4, brushes use the asset system and previews are stored
in the asset source blend files. The bundled ones are part of the
essentials asset library, see
`release/datafiles/assets/publis/brushes/essentials_brushes.blend`.

Note that this doesn't remove the toolbar icons for these brushes yet.

Initially reviewed in (but this commit contains further changes missing
in the PR):
https://projects.blender.org/blender/blender/pulls/123842
2024-07-15 12:09:21 +02:00
Aras Pranckevicius
f08d72fceb Merge branch 'blender-v4.2-release' 2024-07-15 12:49:01 +03:00
Aras Pranckevicius
4d6ba7604d Fix #124584: VSE thumbnail transparency for muted strips is wrongly stored in cache
Make sure the code that alters the VSE thumbnail to add transparency
(for disabled strips) works on a copy of the image, so that the extra
transparency does not get "stored" into the thumbnail cache.

Pull Request: https://projects.blender.org/blender/blender/pulls/124689
2024-07-15 11:47:39 +02:00
Bastien Montagne
e25756cb62 RNA: Fix illegal types mismatch in extern'ed PropertyRNA data.
Previous code would declare properties as `extern PropertyRNA`, but
implement them as type-refined data (e.g. `FloatPropertyRNA`).

This is fully illegal thing, it happened to work 'fine' so far for two
main reasons:
* C-linking does not do type-checks on extern data.
* Code using these publicly exposed data would always use them as
  `PorpertyRNA *` pointers, and pass them to RNA API.

However, this (finally !) breaks when trying to move generated
`RNA_property.h` header to C++, since at least MSVC2022 does mangle the
type in the extern'ed symbol name, which makes linking fails epically.

This commit fixes the issue by only declaring `PointerRNA *` pointers in
the headers. These pointers are then defined in each implementation file
(the `rna_xxx_gen.cc` ones), and assinged to the address of a matching
local static variable. These static variables are type-refined, and
actually contain the property definition data.

Pull Request: https://projects.blender.org/blender/blender/pulls/124603
2024-07-15 11:34:27 +02:00
Omar Emara
970ec097e3 Cleanup: Fix missing declaration warning 2024-07-15 11:42:35 +03:00
Nathan Vegdahl
b792515644 Fix: deleting keys on buttons doesn't work with layered actions
Deleting keys via the right-click menu on property buttons failed to do anything
when the keys were part of a layered action.

The root cause was simply that the code for that hadn't been updated to support
layered actions yet. This updates that code to support Baklava phase-1 layered
actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/124598
2024-07-15 10:26:41 +02:00
Lukas Tönne
9ce61d7222 Fix #123076: Remove UI line for removed property
The `keep_custom_normals` property was removed in
f3c32a36bc.

Pull Request: https://projects.blender.org/blender/blender/pulls/123079
2024-07-15 09:51:55 +02:00
Campbell Barton
8fcd1812b4 Merge branch 'blender-v4.2-release' 2024-07-15 11:07:54 +10:00
Germano Cavalcante
cb66c9623c Merge branch 'blender-v4.2-release' 2024-07-14 22:08:38 -03:00
Nathan Burnham
988bf2b88f Fix incorrect exception message on collection key type error
String keys aren't supported.

Ref: !123577
2024-07-15 11:07:27 +10:00
Germano Cavalcante
742943f554 Fix: error in previus commit 7249b7
Use of uninitialized variable.
2024-07-14 22:05:59 -03:00
Germano Cavalcante
7249b78b6b Fix #124545: Axis constraints in knife failing
The problem was basically that, after efd3c4b3c9, `test_cagep` started
to be used without being calculated.

`test_cagep` represents the closest 3D point on an edge.

The solution was to edit the `knife_snap_edge_constrained` function to
calculate the `test_cagep` instead of the `closest_ss` (which is the
projected point).

Calculating `test_cagep`(3D) instead of `closest_ss`(2D) is
advantageous as we avoid matrix transformations and achieve more
precision.

We also deduplicate the code a bit since `closest_ss` can be obtained
by projecting `test_cagep`.

This commit also adds comments to the code, and renamed some variables
and functions for more clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/124701
2024-07-15 02:47:03 +02:00
Jesse Yurkovich
8c779cfade Merge branch 'blender-v4.2-release' 2024-07-14 14:30:41 -07:00
Jesse Yurkovich
ba6a89e5db Fix: Incorrect free of null IDProperty array during Collection Export
This was unfortunately regressed during another recent fix [1].

Simply check for null last_properties before removing them.

[1] a362c225c0

Pull Request: https://projects.blender.org/blender/blender/pulls/124698
2024-07-14 23:29:29 +02:00
Lukas Stockner
021bce8b48 Compositor: Add White Point mode to the Color Balance node
This adds a new mode to the Color Balance node, which applies a white point
transformation similar to the one applied in the view transform.

Unlike the view transform, the compositor node allows specifying both the
source and the destination white point for more flexibility. Both default
to the D65 white point, so just leaving the destination alone achieves the
same behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/124110
2024-07-14 23:22:58 +02:00
Iliya Katueshenock
71e1305b06 Fix #124637: double spacing for inline sockets
Pull Request: https://projects.blender.org/blender/blender/pulls/124658
2024-07-14 12:33:40 +02:00
Iliya Katueshenock
0b0481cf54 Fix: Nodes: crash in case of dissolving node after save
There is missed topology ensure call.

Pull Request: https://projects.blender.org/blender/blender/pulls/124605
2024-07-14 12:32:17 +02:00
Campbell Barton
a721c81668 Unbreak build from missing include 2024-07-14 20:09:11 +10:00
Jacques Lucke
50e2ea82a7 Merge branch 'blender-v4.2-release' 2024-07-14 11:46:12 +02:00
Iliya Katueshenock
649fa05bcb Geometry Nodes: support link drag search for Bake node
Fixes #124625.

Pull Request: https://projects.blender.org/blender/blender/pulls/124659
2024-07-14 11:27:27 +02:00