136884 Commits

Author SHA1 Message Date
Jeroen Bakker
c7807a425a EEVEE: Alias/remove legacy RNA material attributes
- `bpy.types.Material.blend_method` aliases `bpy.types.Material.surface_render_method`.
  'Opaque' and 'Alpha Clip' maps to deferred.
- Renamed `show_transparent_back` to `use_transparency_overlap`
- Renamed `use_screen_refraction` to `use_raytrace_refraction`
- Deprecate `use_sss_translucency` and `use_sss_translucency`

Related to: #113976

**NOTE**
The light probe changes will be done in a different patch.
Both patches should land just before we remove EEVEE Legacy
from the code-base.

Pull Request: https://projects.blender.org/blender/blender/pulls/122297
2024-06-04 14:48:40 +02:00
Ray Molenkamp
8db709e149 deps: oiio, openexr, tiff updates
OpenimageIO v2.5.11.0
OpenEXR 3.2.4
LibTIFF 4.6.0

This updates OIIO and resolves some CVE's in openexr and libtiff.

some patches that were merged upstream have been removed

Pull Request: https://projects.blender.org/blender/blender/pulls/121823
2024-06-04 14:46:52 +02:00
Sergey Sharybin
6e0a49265a Fix #122622: Cycles GPU performance regression in certain scenes
This is an oversight of #122543, for which benchmarking was done in
the headless mode.

The solution is to tweak policy a little bit, and keep refresh intervals
low for the first 10 seconds of render, after which increase updates to
every 15 seconds. Doing so allows:

- Have quick cancel of complex files when the error is noticed during
  the first few samples.
- Have more predictable cancel time after long render.
- Mitigate the performance regression.

This does not fully solve the regression, but it makes it much more
manageable. There are some compromises to be done from the performance
for the UI renders. The interactivity is also not as fantastic, but it
could be solved later by introducing some "Instant Cancel" operations
which would be able to also stop render in the middle of a sample.

Performance measured with the Spring file (path tracing time in seconds):

    Samples:                  300    1024    2048
    Base (prior to #122543):  29.1   85.4    174.1
    This patch:               37.0   95.7    180.2

This is measured on M2 Ultra GPU render.

The penalty is close to a constant time (the time within which a more
interactive cancel is possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/122658
2024-06-04 14:45:46 +02:00
Ray Molenkamp
e8fe320ea0 deps: USD 24.05
- some of the arm patches are no longer needed
- Core Profile updated from upstream PR #2550 (Thanks brecht)
- Needs blender PR #121636 to build blender
- Needs blender PR #121668 to pass the tests

Pull Request: https://projects.blender.org/blender/blender/pulls/121702
2024-06-04 14:40:34 +02:00
Brad Smith
b0fdca60cd Cleanup: Mikktspace: use sqrtf() function with float type
Pull Request: https://projects.blender.org/blender/blender/pulls/121703
2024-06-04 14:27:17 +02:00
Clément Foucault
cc0d12dd20 EEVEE: Remove EEVEE-Legacy
This handles the transition to EEVEE-Next (now EEVEE).

This removes some things that make no sense to keep
even for compatibility.
- Scene.eevee.light_cache_data
- Scene Light cache operators
- Scene Light cache RNA properties

The remaining legacy properties will be removed later
on to avoid python API breakage.

We keep the identifier of EEVEE-Next as `BLENDER_EEVEE_NEXT`
to avoid addons being incorrectly silently made compatible
with the EEVEE-Next where the Python API is different.
This renaming should be done in 5.0 release.

Thank you EEVEE-Legacy, you served us well.

Pull Request: https://projects.blender.org/blender/blender/pulls/122433
2024-06-04 14:17:58 +02:00
Nathan Vegdahl
76f4a4da6a Fix: use ENUM_OPERATORS macro correctly for eInsertKeyFlags enum
We were passing a sentinel maximum enum value to `ENUM_OPERATOR`,  which
is incorrect.  In particular, this caused the bitwise-not operator to
work incorrectly and produce invalid values.

Pull Request: https://projects.blender.org/blender/blender/pulls/122711
2024-06-04 14:08:06 +02:00
Falk David
aaae9b956a GPv3: Draw Tool: Add separate "Stroke" panel
Duplicates the UI code for the "Stroke" panel and makes
sure it checks for the new GPv3 type in the poll functions.

This will allow us to slightly adapt the UI without
interfering with GPv2.
2024-06-04 13:58:10 +02:00
Jeroen Bakker
31efb29dc4 Workbench: Incorrect padding
The ExtrudedFrustum was incorrectly padded which made the GPU struct to
be larger then the CPU struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/122703
2024-06-04 13:47:44 +02:00
Pratik Borhade
028484f531 Fix #122609: Child object dimmed in outliner when parent is hidden
Caused by eea73bffb47d8773d88fa55dcc59b3d4a2de4dfa
Return visibility state of ID_OB instead of early exit from switch case.

Pull Request: https://projects.blender.org/blender/blender/pulls/122653
2024-06-04 13:41:03 +02:00
Jeroen Bakker
ade3470ccc EEVEE-Next: Crash when using sculpting template
The sculpting template was created in Blender 2.80 and never adjusted
since then. The alpha socket is added as after linking step of the
versioning.

The GPU material clipping was done before clipping and would crash when
sockets don't exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/122706
2024-06-04 13:27:19 +02:00
Sergey Sharybin
8cba704dfd Fix #122654: GPU Compositor: Cryptomatte node crashes blender
The system context is expected to be bound prior to the Blender
can be properly initialized. Otherwise GHOST will be doing OpenGL
calls without system context bound.

This follows code from DRW_render_context_enable().

Pull Request: https://projects.blender.org/blender/blender/pulls/122708
2024-06-04 13:12:35 +02:00
Sergey Sharybin
11d311e300 Fix: Cycles assert in device consistency check
A regression since #118841.

It is possible that the selected preference device is not found, in which
case a default-initialized DeviceInfo would have added to the list. This
device is set to CPU, but with differnet other fields (such as description)
compared to the actual CPU device.

Pull Request: https://projects.blender.org/blender/blender/pulls/122701
2024-06-04 12:49:30 +02:00
Clément Foucault
6ce4e94eb9 Fix: EEVEE-Next: Shadow acnee during viewport transform
The issue would happened in any situation where the light
moves (update, animation, jitter) or have a lot of LOD
tagged by moving casters. In these cases, the actual
effective LOD min is bigger than the one from the UI which
results in shadow acnee artifacts (because the computed bias
is too small).

This patch saves the effective min LOD per tilemaps and
amend the `light.lod_min` to replace it by the min of
all tilemaps in used by one light.
2024-06-04 12:47:14 +02:00
Falk David
6a61cdbb5a GPv3: Draw Tool: Smooth post-process option
This adds the smooth post process option from GPv2 to the
GPv3 draw tool.
This now smoothes the positions, opacities and radii. In GPv2 the radii were not smoothed for some reason.
2024-06-04 11:54:54 +02:00
Falk David
8b0b6dd8b5 Refactor: GPv3: PaintOperation::on_stroke_done
There were some private methods in `PaintOperation` that
were only called in `PaintOperation::on_stroke_done`. These
don't need to be private methods and can just be static functions.

There was also some code that changed the selection in the
function that was supposed to only trim the end points,
so that functionality is moved to it's own function instead.
2024-06-04 11:54:53 +02:00
Jacques Lucke
906fcfb675 Geometry Nodes: extract accumulation function in Accumulate Field node
This simplifies adding other ways to accumulate values besides just adding them.
2024-06-04 11:19:20 +02:00
Jacques Lucke
14f473b757 Cleanup: hide experimental points to sdf grid node 2024-06-04 11:12:50 +02:00
Dalai Felinto
a4aa5faa20 UI: Extensions: stash Dismiss/Allow Online Access buttons inside the panel
This includes a small cleanup:
* Remove dead code.
* Rename context to _context since it is not being used.
2024-06-04 09:49:36 +02:00
Sergey Sharybin
5401a69627 Fix: Compositor translate uses un-initialized delta
The issue is visible when adding an assert in the delta accessors of
the TranslateOperation operation (get_delta_x and get_delta_y), and
rendering compositor-nodes-desintegrate-wipe-01.blend (either command
line or F12, doesn't matter).

Seems that under certain circumstances the system might skip determining
the area of interest. For such cases ensure delta from the beginning of
the threaded code.

Pull Request: https://projects.blender.org/blender/blender/pulls/122686
2024-06-04 09:43:34 +02:00
Campbell Barton
595ac21d85 Cleanup: remove now unused logic for refreshing the splash screen 2024-06-04 10:49:11 +10:00
Campbell Barton
b0bfa56db9 Cleanup: remove unused function 2024-06-04 10:49:10 +10:00
Campbell Barton
21e988a51c Fix error in fix for #87219, accidental assignment in conditional 2024-06-04 10:46:57 +10:00
Lukas Stockner
e8c83aed17 Cleanup: Formatting 2024-06-04 02:01:44 +02:00
Lukas Stockner
fbc770d58b Cycles: Fallback to area PDF when spherical rectangles are too small
This fixes #69535 and #98930.

We use a equi-solid-angle sampling algorithm for rectangular area lights,
but it is not particularly robust for small area lights (either small
in general and/or small because it's being viewed from grazing angles).

The actual sampling part is fine since it just gets clamped into the
valid area anyways, and the difference isn't notable for small lights.

However, we also need to compute the solid angle to get the sampling PDF,
and that computation is quite sensitive to numerical issues for small
values.

Therefore, this commit adds a fallback path for small values, which instead
uses the classic equi-area sampling PDF term times the area-to-solid-angle
Jacobian term. This approximation assumes that all points on the light have
the same distance and angle to the sampling point, which is of course not
strictly the case, but it's close enough for small area lights and better
than failing altogether.

Pull Request: https://projects.blender.org/blender/blender/pulls/122323
2024-06-04 01:55:26 +02:00
Lukas Stockner
a5dc233aa2 Cycles: Tweak area light sampling to improve numerical robustness
Reformulates some terms in the equi-solid-angle rectangle sampling code to
handle small area lamps better, and allows for some rounding error in the
check whether the sampled position is inside the area light.

Pull Request: https://projects.blender.org/blender/blender/pulls/122323
2024-06-04 01:55:25 +02:00
Lukas Stockner
0566bf11b3 Cycles: Add debugging option to load custom OIDN weights
Pull Request: https://projects.blender.org/blender/blender/pulls/122591
2024-06-04 01:22:44 +02:00
Germano Cavalcante
4439e39530 Fix: assignment in a condition
Error in 042a1327ca
2024-06-03 19:35:31 -03:00
Richard Antalik
14c8f01d29 Fix: VSE handles can be moved if channel is locked
Check for locked strips in `ED_sequencer_can_select_handle()`
2024-06-03 23:40:30 +02:00
Weizhen Huang
296ac0e9ef Cycles: improve light tree with large spot blend
In the original paper, the falloff inside `bcone.theta_e` is assumed to
be `pi/2`, which is too large for spot light and resulted in an
overestimation near the cone boundary.
To address this issue, attenuate the energy of a spot light using the
minimal possible angle formed by the light axis and the shading point
when traversing the light tree.

Ref: #122362

Pull Request: https://projects.blender.org/blender/blender/pulls/122667
2024-06-03 23:33:29 +02:00
Richard Antalik
f98b01e492 VSE: Improved handle tweaking
This commit changes how users can interact with handles:

Unselected handles are not drawn anymore by default. Handles are bit
thinner. If handle can't be selected, because strip is too small,
it is not drawn.

When hovering over strip handle a cursor is changed to represent a
handle shape. It is possible to select 2 handles at once if strips are
adjoined.

When tweak event happens on unselected handle, handle selection is lost
ater tweaking.

This behavior can be disabled in preferences:
Editing > Video Sequencer > Tweak Handles.

Moving strips with G key works same way as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/109522
2024-06-03 23:17:41 +02:00
Germano Cavalcante
042a1327ca Fix #87219: 'affect transform' not working for Pose Space
`affect transform` was never supported for Pose Space in Limit
constraints.

This commit implements this space in the transform code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113363
2024-06-03 18:14:49 -03:00
Nikita Sirgienko
4651f8a08f Fix: Respect Blender Cycles setting for GPU denoising
Previously, GPU denoisers were ignoring settings about render
configuration and were using any available GPU. With these changes,
GPU denoisers will use the device selected in Blender Cycles
settings.
This allows any GPU denoiser to be used with CPU rendering.

Pull Request: https://projects.blender.org/blender/blender/pulls/118841
2024-06-03 22:41:25 +02:00
Brecht Van Lommel
a331ebb324 Fix #122562: Auto scrolling issues with modal operators
Keep the UI and modal handlers order the same as before the priority
changes, these rely on being in a particular order.
2024-06-03 21:50:19 +02:00
Harley Acheson
3a2ea7828e Fix #122599: Windows Registration/Unregistration Endless Loop
With #120283 the Win32 codepath for registration creates an endless
loop. Command-line arguments are detected for registration that causes
another blender to launch with the same arguments, that repeats
forever. But the only time these arguments is used is when Blender has
already been specifically launched with the permissions needed to
register. So this means it should just do so and then exit.

Pull Request: https://projects.blender.org/blender/blender/pulls/122682
2024-06-03 19:59:31 +02:00
Charles Wardlaw
5e6760d554 Fix #122625: List of XForm ops needs to be stored at class level
The code review request to move the vector of xform ops from class to
function-local scope broke animation export. Moved xform ops vector back
into the class, and only create new xform ops on first xform write.

Co-authored-by: kiki <charles@skeletalstudios.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/122665
2024-06-03 19:56:17 +02:00
Jesse Yurkovich
a0360be760 Fix #122517: Ensure depsgraph is updated before disabling subdiv
Ensure depsgraph is updated both before and after disabling subdiv
modifiers during Alembic export.

Looks like this regressed from 1597e9386fb6ec5a5fa1c300f5812275ac9ac259.

Pull Request: https://projects.blender.org/blender/blender/pulls/122534
2024-06-03 19:55:28 +02:00
Pablo Vazquez
068e624ebc UI: Make sidebars slightly wider
The default width for sidebars was last updated for 2.80 when columns
didn't have headings and checkboxes were right-aligned.

Some strings no longer fit especially when using headings, and in
translations. Make it slightly wider while still being relatively out of
the way in a 1920 × 1080 setup.

Detailed images in the pull request description.

Pull Request: https://projects.blender.org/blender/blender/pulls/121795
2024-06-03 19:21:31 +02:00
Harley Acheson
10071caea8 UI: Show Passepartout When All Overlays Off
Bring back old behavior where passepartout is shown when all overlays
are disabled. Move the passepartout option to the sidebar.

Pull Request: https://projects.blender.org/blender/blender/pulls/122577
2024-06-03 19:17:21 +02:00
Pratik Borhade
059c74dc98 GPv3: Console error after opening layer extras panel
Caused by c80e30684c6ffef870732fca9f415b4a0561d831.
TypeError in console after opening layer extras panel while group is
active.

The fix makes sure `layer` is not `None`.

Pull Request: https://projects.blender.org/blender/blender/pulls/122586
2024-06-03 19:15:06 +02:00
Pratik Borhade
4b6479bf9e Fix: GPv3: Wrong cursor for non brush tools
Brush cursor is being drawn even if the selected tool is non-brush in
GPv3 paint mode. To prevent this, use `ED_gpencil_brush_cursor_poll` for
`pc` poll function. Above poll function returns false if active tool is not
brush, this will avoid drawing of paint cursor in
`pc->draw`/`grease_pencil_brush_cursor_draw`.

Resolves #122541

Pull Request: https://projects.blender.org/blender/blender/pulls/122657
2024-06-03 19:13:49 +02:00
Leon Schittek
bbb7962b3c Fix: Node Editor: Always allow inserting reroute nodes
Since ebb61ef30f reroute nodes couldn't be inserted on links anymore,
when their socket's type is currently incompatible.

Because the sockets of reroute nodes change types dynamically
according to the sockets they are linked to, it should always be
allowed to insert reroutes onto links.

Pull Request: https://projects.blender.org/blender/blender/pulls/122637
2024-06-03 18:57:18 +02:00
Jacques Lucke
4fe672d7f5 Geometry Nodes: free old bake when starting new bake
Previously, the old bake was only overwritten file by file. This caused issues like
the one fixed in 7d77691a83c0091b7edf95b8. Also, it could result in invalid
bake data if some bake is canceled and the data on disk is a mix of an old and
new bake.
2024-06-03 18:56:24 +02:00
Clément Foucault
38e398b63e EEVEE-Next: Add versioning code for Material Blend mode
The material blend mode Clip and Opaque are not supported
in EEVEE-Next and need to be emulated using math nodes.

This PR makes it possible to automatically convert the
simplest cases. More complex cases need user interactions
to fix.

Rel #122489

Pull Request: https://projects.blender.org/blender/blender/pulls/122608
2024-06-03 18:54:02 +02:00
Jacques Lucke
7d77691a83 Fix: avoid trying to load bake while baking
This could cause issues when rebaking a simulation without freeing
the old bake first.
2024-06-03 18:46:41 +02:00
Clément Foucault
dabaa3d280 USD: Update material test to use Cycles instead of EEVEE
This avoid issue with the versioning script that will
disconnect all alpha inputs for opaque materials.
2024-06-03 18:31:28 +02:00
Jacques Lucke
717f4d4dae Fix #122660: show Add Rest Position checkbox only for meshes 2024-06-03 18:12:55 +02:00
Sybren A. Stüvel
5bab6126c1 Anim: Baklava, prevent infinite redraw loop in temp animation layer panel
Make the hack to get an Action selector slightly less hacky, in order to
prevent an infinite redraw loop.

No functional changes, except that `window_manager.selected_action` is only
set when it needs to change.
2024-06-03 17:55:09 +02:00
Omar Emara
20d62d3805 Fix: Crash when toggling compositor device
Blender crashes when toggling the compositor device from CPU to GPU.
This is because when submitting the compositor job, the device might be
set to CPU, so GPU related data are not initialized in the job, but
between the time the job is submitted and the time it gets executed, the
device might change to GPU, which then tries to accept the uninitialized
GPU data from the job.

To fix this, we use the evaluated scene from the depsgraph since it
captures the state of the scene used in the job initialization.

Pull Request: https://projects.blender.org/blender/blender/pulls/122661
2024-06-03 16:50:15 +02:00
John Swenson
b5389f32c8 UI: Fix polling in sequencer preview overlays
When the sequencer overlays menu was restructured in #121591, the new
Sequencer panel types did not include polling, which means that they
also show up in the Preview-only view type.

Details and screenshots in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/122638
2024-06-03 16:38:47 +02:00