Commit Graph

150077 Commits

Author SHA1 Message Date
Jacques Lucke
97290aab8d Fix: Geometry Nodes: add missing default value in repeat zone graph
This (internal) output is probably never used, but better set it now instead of
trying to find the cause for a crash later on if it's actually used.
2024-09-12 18:25:12 +02:00
Jacques Lucke
5ee60600a3 Geometry Nodes: improve debug graph for repeat zone
This makes some labels more self-explanatory in the graph generated with
`graph.to_dot()`.
2024-09-12 18:20:52 +02:00
Jacques Lucke
e9ad0e506c UI: speedup drawing large tree views
Previously, mapping old to new items was O(n^2) because each new item was
compared to all old items until the corresponding one was found. This patch
introduces a pre-filter to the old elements that have to be checked. Instead of
comparing all old items, only the ones with the same label are compared now.
This reduces the time complexity to O(n), making the tree view much more
usable with many items.
2024-09-12 18:12:22 +02:00
Alaska
bcf53fd5da Cycles render test: Add ability to control hardware raytracing
Add the ability to control whether or not Hardware Ray Tracing (HWRT)
is enabled during render tests.

This is done by adding `-RT` to the end of the device name in the
Cycles device list. E.g. `HIP-RT`. This is supported with HIP, oneAPI,
and Metal.

Change in behaviour:
If you do not specify `-RT`, then HWRT will be disabled. This results
in a change in behaviour:
1. `METAL` device tests on M3 or newer Macs no longer using MetalRT
2. `ONEAPI` device tests no longer use Embree GPU.

Note: Some tests are failing on some platforms/configurations that can
now be easily tested due to this commit. This does not effect the
build bot automated testing as it does not test these configurations.

These tests have not been blocked from running, primarily to help
developers investigate and fix the issues.

Ref #123012

Pull Request: https://projects.blender.org/blender/blender/pulls/125082
2024-09-12 17:56:31 +02:00
Jacques Lucke
bde6f888e2 Geometry Nodes: speedup joining many geometries
Joining many geometries was O(n^2) because of deduplication of the same
components was not done using a map. My test file that generates 1000
stars in a repeat zone got 10x faster, but it's possible to create a file for any
speedup.
2024-09-12 17:49:21 +02:00
Hans Goudey
5ff4e5fcb9 Sculpt: Avoid rebuilding draw vertex buffers for visibility changes
Use the possibility from ad7d7212c1
to make changes to visibility a bit snappier.
2024-09-12 11:39:55 -04:00
Hans Goudey
bd96b378a6 Sculpt: Avoid processing hidden nodes for drawing
When "update only visible" is turned on (during strokes or based on
the mode option), skip updating draw buffers for invisible nodes.
2024-09-12 11:39:55 -04:00
Hans Goudey
f52b813c36 Fix #127462: Sculpt drawing crash with hidden mesh faces
Mistake in ad7d7212c1.
2024-09-12 11:39:55 -04:00
Jacques Lucke
246c513f92 Nodes: add support for line separators in nodes
This adds support for line separators in nodes. Currently this is only available for
built-in nodes and it's only used in the Simulation Zone. However, we also want
to use it in the For Each Geometry Element zone (#127331). Support for node groups
can be added separately too.

![image](/attachments/74f44b2a-9996-461a-a3eb-d0f546d2305e)

Pull Request: https://projects.blender.org/blender/blender/pulls/127501
2024-09-12 17:38:51 +02:00
Lukas Tönne
49965841bb Fix: GPv3: Armature deform using the wrong vertex group list
Grease Pencil armature deformation has to use the correct
`vertex_group_names` list from the `Curves` (i.e. drawings) rather than
the names from its parent `GreasePencil` data block.

The ancient armature deformation code used a `defbase` list (`ListBase`
of type `bDeformGroup`) from the object via `BKE_id_defgroup_list_get`.
This function does not have enough information to determine the correct
vertex groups for GPv3, and it's use inside supposedly generic code is
highly questionable.

This patch removes the `defbase` lookup inside
`armature_deform_coords_impl` and instead passes an explicit list of
vertex group names to be used for resolving indices. We already have
context in every place this is called to determine the correct vertex
groups, without having to make assumptions down the line based on just
the object type.

Pull Request: https://projects.blender.org/blender/blender/pulls/127509
2024-09-12 17:35:35 +02:00
Clément FOUCAULT
c0b1091e5b Overlay-Next: Grease Pencil Edit Mode
Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/127317
2024-09-12 17:05:51 +02:00
Hans Goudey
2f9884cee1 Refactor: Sculpt: Use int instead of PBVHVertRef in expand
As a generic type for referencing the active/initial vertex, int is
more convenient here because mostly it's used for array indexing,
and moving from int to `BMVert` and `SubdivCCGCoord` is
simple and cheap.
2024-09-12 10:51:51 -04:00
Sybren A. Stüvel
367cceaab8 Anim: Make it possible to enter/exit NLA tweak mode on slotted Actions
Properly track Action and Slot assignment when entering/exiting NLA
tweak mode.

This doesn't properly sync the length of the NLA strip when exiting
tweak mode. This and more NLA work is tracked at #127489.

Pull Request: https://projects.blender.org/blender/blender/pulls/127498
2024-09-12 16:48:02 +02:00
salipourto
17ddca5017 Fix #127240: Deforming motion blurred point clouds do not render under certain conditions
Deforming motion blurred point clouds do not render in Cycles
HIP-RT when BVH timesteps != 0 if Blender is launched with
debug memory.

The root cause is that the size of allocated memory for the
bounding boxes is reported to HIP-RT not the number of valid
bounding boxes.

Pull Request: https://projects.blender.org/blender/blender/pulls/127432
2024-09-12 16:47:13 +02:00
Alaska
0e36107433 Fix: Cycles: Rendering of VDB files with HIP-RT
VDB files would fail to render in HIP-RT because NanoVDB wasn't
enabled when compiling HIP-RT kernels, resulting in NanoVDB textures
not being sampled and a blank result being returned instead.

The fix is to enable NanoVDB when compiling HIP-RT kernels.

Ref: #125086

Pull Request: https://projects.blender.org/blender/blender/pulls/127384
2024-09-12 16:26:41 +02:00
Alaska
2d611f7b45 Fix #125392: Cycles: Unnecessary recreation of denoiser
Fix the unnecessary recreation of the denoiser that occurs if
Cycles had fallen back to an alternative denoiser in a previous
interation. (E.g. Fallback from OptiX to OIDN)

This issue occured because Cycles didn't understand that when it
previously setup the denoising device, that it had fallen back to
something else. So it thinks the denoising settings have been changes
and tries to recreate the denoiser.

The solution is to first compute the settings change due to
the fallback, then check to see if it's different from the current
denoiser, then recreate the denoiser device if neccesary.

Pull Request: https://projects.blender.org/blender/blender/pulls/125453
2024-09-12 16:23:59 +02:00
Pablo Vazquez
8845e3243d UI: Remove duplicate icons on menus
As per the human interface guidelines, do not use the same icon in
consecutive items within a group in a menu.

* Operator Search in Top Bar's Edit menu
* Viewport Render Keyframes in Viewport's View menu
2024-09-12 16:19:34 +02:00
Jacques Lucke
5ca7aa1cf3 Cleanup: Geometry Nodes: extract reusable functions for node tree zones 2024-09-12 16:12:13 +02:00
Julien Duroure
00bc059894 glTF: Fix typo in a previous commit 2024-09-12 15:50:58 +02:00
Pablo Vazquez
32a2c9ea32 UI: Add missing ellipsis to File menu items
As per the writing style guidelines, add ellipsis to labels of
operators that do not run immediately but open settings or require
further steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/127475
2024-09-12 15:48:41 +02:00
Pablo Vazquez
14208b6dfa UI: Compositor: Show Parent button when available
The Parent Node Tree operator button to go up a level in nested
node trees is always visible in the header, regardless if we are
currently in a nested tree or not.

Only show the button when it is actually possible to go a level up.
This frees up space in the header when at the top level.
2024-09-12 15:44:06 +02:00
Pablo Vazquez
3986b99e42 UI: Compositor: do not expand backdrop channels
To be consistent with other editors (Image Editor, Sequencer), and use
less space in the header.
2024-09-12 15:44:06 +02:00
Julien Duroure
a9bfca5483 glTF exporter: fix missing hook parameters leading to crash 2024-09-12 15:41:00 +02:00
Julien Duroure
0169abd220 glTF exporter: account for library when gathering image URI
When using "keep original" option
2024-09-12 15:19:32 +02:00
salipourto
4bfee1936c Fix #126749: HIP-RT Memory leak in Cycles viewport
hiprtScene object wasn't being freed between frames.

Pull Request: https://projects.blender.org/blender/blender/pulls/127473
2024-09-12 15:05:08 +02:00
Campbell Barton
610cf11bee Linux: update for intel graphics compiler
Update IGC 1.0.17384, ocloc 24.31.30508.

Ref !127251.
2024-09-12 22:53:59 +10:00
Campbell Barton
7cd91c55a4 Linux: LibPNG: Update to 1.6.43, OSL & OpenImageIO
Ref !126980.
2024-09-12 22:53:59 +10:00
Aras Pranckevicius
41cdac536e Cleanup: remove "64 bit compiler detected" cmake message
On Windows, if compiler is 32 bit there already is a fatal error. If it
is 64 bit (normal case, and any case when build can actually work), it
feels like "64 bit compiler detected" status message does not indicate
anything useful.

Pull Request: https://projects.blender.org/blender/blender/pulls/127484
2024-09-12 14:50:13 +02:00
Aras Pranckevicius
649cde421b Fix #127468: VSE thumbnail cache related crash when quitting blender
Do not try to kill thumbnail generation job when destroying the cache
(which happens as part of destroying the scene) -- all the code
paths that destroy a scene already cancel outstanding WM jobs. And WM
itself might be gone at that point, so accessing a stale pointer to it
can lead to a crash.

Instead, fix the problem of "refresh sequencer can cause a crash" by
not destroying the thumbnail cache, but merely clearing it in
sequencer_refresh_all_exec.

Pull Request: https://projects.blender.org/blender/blender/pulls/127485
2024-09-12 14:48:20 +02:00
Hans Goudey
36a196a738 Fix: Assert in sculpt symmetrize poll 2024-09-12 08:29:29 -04:00
Weizhen Huang
ee2fe7fa6c Fix: Cycles: reuse random number for sampling color channel in volume
The same random number was used for sampling color channel at each step,
which leads to bias. Fixed by rescaling the random number.

Another possibility would be to scramble `rng_offset` and use a new
random number each time, similar as in subsurface scattering, but
rescaling random number should be faster than computing a new one, and
is favorable here since the precision here is not very important

Pull Request: https://projects.blender.org/blender/blender/pulls/127454
2024-09-12 14:27:56 +02:00
Jacques Lucke
2ca5a65add Fix #127434: copying node does not work in many cases
The issue was that the ctrl+C event was consumed by a uiBut that did not even support copying.
The old behavior was broken in 749433f20b.

Pull Request: https://projects.blender.org/blender/blender/pulls/127460
2024-09-12 14:21:33 +02:00
Falk David
c07c9d5729 GPv3: Change "use_locked_material" option
This option is meant to ignore any material locking when it
comes to editing strokes that might use locked materials.

There were some issues with the current implementation.
* The name did not reflect what it was supposed to do, so it
   was renamed to `ignore_locked_materials`.
* The description of the option has been updated to better
   reflect the behavior.
* Some util functions have been refactored

Pull Request: https://projects.blender.org/blender/blender/pulls/127423
2024-09-12 14:20:16 +02:00
Sybren A. Stüvel
3417934eff Anim: add Action Slot assignment to NLA strip
For an NLA strip to use a slotted Action, it needs to specify which slot
to use in that action. This is now handled by two new properties on the
strip in DNA & RNA: `action_slot_handle` and `action_slot_name`.

These serve the same purpose as their counterparts on the `AnimData`
struct.

Note that this commit does NOT add NLA evaluation support for slotted
Actions. It merely allows assigning them. Evaluation, tweak mode
support, etc. will be implemented in future commits.

Pull Request: https://projects.blender.org/blender/blender/pulls/127359
2024-09-12 14:08:16 +02:00
Sybren A. Stüvel
20ba3bd530 Anim: Add RNA function Slot.debug_log_users()
Add an RNA function that can log the users of an Action Slot. It's
available in debug builds only, as it is purely a debug tool for C++
developers at the moment.

Eventually it's likely that the list of Action Slot users will be
exposed to RNA/Python directly, but I'll only write code for that once
we actually need it for non-debugging functionality. For now this is
enough.
2024-09-12 14:08:14 +02:00
Pratik Borhade
d2091b4b15 Fix #126513: VSE: Handle tweaking does not work with Select Box tool
Select handles of strip available below the cursor when
`selection.seq1/seq2` exists in `sequencer_box_select_invoke`.
Also fixed the condition in `sequencer_main_cursor` so the new
WM_CURSOR_HANDLE is visible.

Pull Request: https://projects.blender.org/blender/blender/pulls/126548
2024-09-12 13:43:13 +02:00
Falk David
8f86a04c72 Fix: GPv3: Missing context mode case in overlay options panel
The vertex paint mode options was missing in this panel.
2024-09-12 13:39:28 +02:00
Clément FOUCAULT
e067bf7cf6 Overlay-Next: Paint Overlay
Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/127455
2024-09-12 12:29:09 +02:00
Julien Duroure
044d20fe46 glTF importer: Fix light spot default values check 2024-09-12 12:05:48 +02:00
Julien Duroure
4c441c1c64 glTF exporter: fix accessor min/max float check 2024-09-12 12:02:51 +02:00
Xavier Hallade
33dd8dbdac Cycles: simplify fmodf(c, 1.0f) to fractf(c) in hsv node
Pull Request: https://projects.blender.org/blender/blender/pulls/127461
2024-09-12 11:53:07 +02:00
Julien Duroure
936ca7636a glTF exporter: Removes a duplicate lookup 2024-09-12 11:49:16 +02:00
Julien Duroure
89c389c465 glTF: hook UI, distinct import & export draw code 2024-09-12 11:42:22 +02:00
Falk David
0cfc4b197f Fix: GPv3: retrieve_editable_fill_strokes function
The function was not behaving correctly.
Instead of reimplementing getting the editable strokes,
it calls `retrieve_editable_strokes` directly now.
Then an index mask of the fill strokes is built and
the result is intersected with the editable strokes mask.
2024-09-12 11:29:22 +02:00
Philipp Oeser
6f781481c1 Fix #127399: Sculpt temporary Smooth brush ignores some settings
If the Smooth brush (which is switched to from other brushes holding
`Shift`) had the following settings (possibly others as well)
- Stabilize Stroke
- Airbrush
- Line
These were ignored (not drawing their correct cursor, airbrush not
working because the timer wasnt started).

Problem here is that `smooth_brush_toggle_on` (called via stroke->
test_start) changes the brush, this was ignored in following code (and
in case of the `Stabilize Stroke` is called only after the code that was
checking if this was ON).

So to resolve, get the brush again after `stroke->test_start` has run
(and also move the check `Stabilize Stroke` a bit (to  place that
actually fits much better since similar things like line visualization
are handled there as well)

Pull Request: https://projects.blender.org/blender/blender/pulls/127412
2024-09-12 11:16:40 +02:00
YimingWu
52d3426cf5 Fix #127480: Tag geometry recalc when adding new frames in GPv3
`rna_Frames_frame_new` did not `DEG_id_tag_update` when it's
done so this lead users to believe that the new frame is
duplicated. The frame is correctly created, just display needs
refreshing.
2024-09-12 17:11:32 +08:00
Sybren A. Stüvel
f271e89a45 Revert "Linux: LibPNG: Update to 1.6.43"
This reverts commit 1890887f3b.

It was referring to a submodule commit that doesn't exist (likely wasn't
pushed yet).
2024-09-12 11:06:50 +02:00
Xavier Hallade
a1182e07b1 Build: upgrade Intel Graphics Compiler and ocloc on Linux
IGC 1.0.17384, ocloc 24.31.30508, which:
- add support for Battlemage and Lunar Lake GPUs
- recover from recent performance regression on Linux
- allow to drop older work-around
  (9d5164d472) and need for a patched
  version on Windows
- ocloc now needs "dg2,mtl" naming for fat binaries.

opencl-clang patches don't get applied anymore by igc build scripts
when llvm is not a git repository, hence I could also drop we can drop
current patch disabling patching.

I've only slightly pushed min-driver-version updates after carefull
testing, instead of jumping to the same version as ocloc as we use to.

Pull Request: https://projects.blender.org/blender/blender/pulls/127251
2024-09-12 09:11:56 +02:00
Campbell Barton
941fb02646 Fix typo in recent cleanup (ref #118145) 2024-09-12 15:04:06 +10:00
Campbell Barton
1890887f3b Linux: LibPNG: Update to 1.6.43 2024-09-12 14:48:24 +10:00