Commit Graph

139165 Commits

Author SHA1 Message Date
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
Campbell Barton
eaa5542314 Merge branch 'blender-v4.2-release' 2024-07-16 17:50:47 +10:00
Campbell Barton
bf738fd35a Build: add missing ROCm installation step 2024-07-16 17:50:03 +10: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
Alaska
ef010da315 Cycles tests: Enable MNEE test on Metal on supported macOS version
MNEE tests were disabled on Metal due to the feature not being
supported in macOS < 13.

This commit enables MNEE tests on Metal GPUs if they are using
macOS >= 13, otherwise leave it disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/124709
2024-07-16 09:46:12 +02:00
Sergey Sharybin
047568f633 Cycles: Add an assert for DeviceString construction
The motivation is to be able to catch issues like #124705 early on,
by relying on asserts.

The not-so-obvious part of the change is the change in the order of
includes, which is needed for the types.h to have definition of the
kernel_assert().

Pull Request: https://projects.blender.org/blender/blender/pulls/124729
2024-07-16 09:43:28 +02:00
Aaron Carlisle
63435d19e9 Merge branch 'blender-v4.2-release' 2024-07-16 02:23:40 -04:00
Aaron Carlisle
a51f293548 Docs: Fix RNA to manual mapping
a39fa10b5b used the 4.3 manual instead of 4.2
2024-07-16 02:20:19 -04:00
Campbell Barton
fd5780e97b PyAPI: add bpy.utils.register_preset_path utility function
Support add-ons including their own preset paths,
needed to resolve #124020.
2024-07-16 15:50:28 +10: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
Thomas Dinges
a49efc5b17 Release: Bump to 4.2 release. 2024-07-15 21:25:41 +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
ec48c79112 Assets: Update asset repository hash for removed tool icons
See e6a4245099 and blender/blender-assets@814eed6390.
2024-07-15 19:11:52 +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
Thomas Dinges
a39fa10b5b Manual: Update RNA references for 4.2 2024-07-15 17:35:59 +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
Thomas Dinges
8aedcd5143 Merge branch 'blender-v4.2-release' 2024-07-15 16:41:40 +02:00
Thomas Dinges
1c3d51a2f1 Release: Update freedesktop xml for 4.2. 2024-07-15 16:40:01 +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
Alaska
cf96136ec6 Fix #124705: Incorrect SSS method used in OptiX OSL
Update the string hashs in SSS OSL closure setup so they match the
strings being used by the SSS node.

This fixes two issues in OptiX OSL:
- SSS Random Walk would render as Random Walk Skin.
- Random Walk Skin wouldn't render at all.

Pull Request: https://projects.blender.org/blender/blender/pulls/124707
2024-07-15 16:23: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
Jeroen Bakker
b761d3435f Image Plane: Add support for EEVEE
- Fixes incorrect handling of incompatible engines. There is a global list of compatible
  engines, but `create_cycles_material` didn't use it, displaying an incorrect warning
  when using the operator.
- Add `BLENDER_EEVEE_NEXT` to compatible engines.
- Remove `BLENDER_EEVEE` from compatible engines.
- Add render method option. This replaces the material `blend_method`
- Remove material blend method option (replaced by `render_method`)
- Remove material shadow option. Not needed anymore as shadows use
  the node tree for evaluation.

**TODO**
- Manual should still be updated. Will be done after this patch lands.
- I did some basic tests. I am not familiar with this operator, but think it
  should handle all the different cases. Would be nice to have some
  render tests for this to detect regressions.

Implements: #122315
Pull Request: https://projects.blender.org/blender/blender/pulls/124094
2024-07-15 15:35:57 +02:00
Pratik Borhade
5f54c463c0 Fix #124501: Make Cycles camera DOF UI consistent with EEVEE
Fix labels and add DOF eyedropper button in camera properties panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/124506
2024-07-15 15:26:32 +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
Clément Foucault
c7bcd1137f Fix: UI: Hide studiolight world orientation button for Cycles
This option is not available in EEVEE anymore. Limit the
visibility to Workbench.

Fix #124521

Pull Request: https://projects.blender.org/blender/blender/pulls/124717
2024-07-15 11:59:26 +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
Campbell Barton
84b0ccdd4b Merge branch 'blender-v4.2-release' 2024-07-15 19:42:57 +10:00
Campbell Barton
cec4531dde Fix window creation error on wayland when EGL resource allocation fails
Quickly opening & closing windows could result in an error allocating
the EGL context.

In my tests the window would be created but not display (in GNOME)
hanging for a while although Blender could be usable again after a
while. However some users report this crashing (see #123096).

Change the behavior to match X11, where failure to set the context
makes the GHOSTWindow::getValid return false.

In my tests the Blender window is created after a short delay.
This may also resolve #123096.
2024-07-15 19:41:51 +10: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