Commit Graph

104238 Commits

Author SHA1 Message Date
Brecht Van Lommel
39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Clément Foucault
b26f176d1a Fix #114096: Workbench: Broken thumbnail shadows on Mac
This is the same as 5d06632565
but ported to the no-geometry shader version.

However the rendering is still broken for another reason.
See #114286.
2023-10-30 19:46:09 +01:00
Julian Eisel
2e1244f3cf Fix resizing asset shelf header edge not working without region overlap
If region overlap was disabled, the full background of the asset shelf
header would be drawn, unlike usually where we keep the space between
button sections transparent. But resizing the region by dragging wasn't
possible from the space between the button sections, even though the
header was fully opaque.

Button section drawing should only be respected when region overlap is
enabled.
2023-10-30 18:19:08 +01:00
Brecht Van Lommel
10645237e8 Cycles: change default Principled Hair BSDF back to Chiang
The Huang model has issues with fireflies in various scenes, and the
defualt choice is somewhat arbitrary anyway as they have both pros and
cons. For now be conservative and keep the default the same as before.
2023-10-30 18:08:34 +01:00
Julian Eisel
4a89720fe1 Fix asset shelf not hidden for new 3D Views
The asset shelf was hidden by default in 04d22d73f3. But this only
affected existing 3D Views, not newly created ones. This wasn't
intentional, 3D Views should have the same defaults here.
2023-10-30 18:02:51 +01:00
Omar Emara
56ffa441b9 Cleanup: Use input reading shaders for Movie Clip node 2023-10-30 17:33:10 +02:00
Omar Emara
f79b3ffe12 Cleanup: Generalise input reading in compositor
This patch generalises the pass reading shaders into input reading
shaders. This is done make future development easier.
2023-10-30 17:27:07 +02:00
Jeroen Bakker
5ba661b706 EEVEE-Next: Fix Infinite Loop With Reflection Probe
When a spherical reflection probe is in the scene and the viewport
is set to a lookdev world the scene was constantly being updated.

The cause for this was that the reflection probes where updated when
the lookdev shader was compiled, but that is almost always the case.

This PR fixes this by checking the compile status and compile status
change. Only the first time the world has been compiled the world
reflection probe will be marked dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/114276
2023-10-30 16:00:17 +01:00
Jeroen Bakker
fcb26fe72d EEVEE: Update UI Names
This PR will use "EEVEE (Legacy)" for the legacy EEVEE and renames
"EEVEE Next" to "EEVEE".

When starting Blender EEVEE Legacy will still be the default. We
will change the default to EEVEE when all missing features have been
addressed.

After that we can cleanup idnames and panels etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/114272
2023-10-30 15:04:13 +01:00
Jeroen Bakker
f35b0373d6 Vulkan: Separate DataTransfer, Compute, Graphics Commands
Goal is to reduce the number of command buffer flushes by tracking what is
happening in the different command queues. This is an initial step towards
advanced queue-ing strategies.

The new (intermediate) strategy records commands to different command
buffers based on what they do. There is a command buffer for data transfers,
compute pipelines and graphics pipelines.

When a compute command is recorded it ensures that all graphic commands
are finished. When a graphic command is recorded it ensures all compute
commands are finished. When a graphic or compute command is scheduled
all recorded data transfer commands are scheduled as well.

Some improvements are expected as multiple compute and data transfers
commands can now be scheduled at the same time and don't need to unbind
and rebind render passes. Especially when using EEVEE-Next which is
compute centric the performance change is visible for the user.

Pull Request: https://projects.blender.org/blender/blender/pulls/114104
2023-10-30 14:21:14 +01:00
Lukas Tönne
9c8daeb8c9 Fix WM_draw_region_free function declaration.
02fb605f removed the `hide` argument but did not update the WM_api.hh
header.
2023-10-30 13:48:22 +01:00
Sergey Sharybin
ecb346d9df Merge branch 'blender-v4.0-release' 2023-10-30 12:49:40 +01:00
Julian Eisel
02fb605f8a Cleanup: Don't unset region visibility in unrelated WM function
`WM_draw_region_free()` should manage region-draw data, and not change
region state. This should be done by normal region state management
functions. Especially for a flag like `ARegion::visible` which is just
the cached result of the region's visibility evaluation, not the proper
way to actualy manage the region visibility.
2023-10-30 12:40:00 +01:00
Julian Eisel
28a28b9a2c Cleanup: Rename region visibility update function
The old name `region_subwindow()` wasn't really saying anything, and
basically had nothing to do with what the function actually did. Give it
a name that describes better what it does:
`region_evaluate_visibility()`.
2023-10-30 12:31:16 +01:00
Pratik Borhade
9ac87af839 Cleanup: Wrong comment
Mistake in 2a5c499585
2023-10-30 16:45:51 +05:30
Douglas Paul
b62a5db37b Fix: Node grid dot sizes on Metal
The changes in #112906 (Vulkan: Use Point Shaders When Drawing Points)
broke point sizes for the nodes editor grid on Metal. That PR switched the grid
point drawing code to a shader that sets its own point size, but (at least on Metal)
setting the point size in the shader has no effect unless `GPU_program_point_size(true)`
has been called to allow shader-specified point sizes.

This PR adds the necessary call to `GPU_program_point_size(true)` to fix that problem,
as well as a corresponding "cleanup" call to set it to `false` again.

Pull Request: https://projects.blender.org/blender/blender/pulls/114218
2023-10-30 10:53:13 +01:00
Hans Goudey
ccfe952f34 Depsgraph: Hard-code visibility for "from IDs" builder
`FromIDsBuilderPipeline` is used to build a minimal depsgraph from
a set of IDs. However, the "visibility" of those IDs is still calculated
based on things like the view layer and the relations. Typically we want
all of these to be visible, the builder just happened to be used in
cases when all of the IDs were already visible so far.

This is needed for node tools which may reference objects or other
IDs from outside of the active depsgraph.

Co-authored by: "Sergey Sharybin <sergey@blender.org>"
2023-10-30 10:45:30 +01:00
casey bianco-davis
dddd1d224d Fix #114060: GPv3: Transform crash with multiple object editing
The problem was that the array of `IndexMask`s was set to the
number of objects selected and not the number of curves in all
selected objects.

This fixes the transform code from relying on undefined behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/114088
2023-10-30 08:14:51 +01:00
Campbell Barton
dffee8b323 Revert "Revert "Fix #112441: Restore Key Map Item does not restore the active property""
This reverts commit 0f36ac4e66.

This revert was only done for testing and wasn't ment to be pushed.
2023-10-29 20:08:39 +11:00
Campbell Barton
88f63c36db Merge branch 'blender-v4.0-release' 2023-10-29 16:55:25 +11:00
Campbell Barton
e8d532a9b6 Merge branch 'blender-v4.0-release' 2023-10-29 16:55:22 +11:00
Campbell Barton
1dc683e376 Fix #114223: Crash when undo in curves edit mode
Regression in [0], missed scene assignment.

[0]: 585f43064a
2023-10-29 16:53:25 +11:00
Omar Emara
01a2bd0369 Fix #113811: Blender freezes upon adding a Cryptomatte node
Blender freezes when adding a Cryptomatte node and using the GPU
compositor, even if the node is later removed.

This was because the CPU compositor acquired a render result mutex and
never released it due to an early exit that missed that release. This
patch fixes that by adding an appropriate release in that early exist.
2023-10-27 22:25:54 +02:00
Jason Fielder
b0a032e2eb Fix: EEVEE export CMDBuf out of memory in Metal
Previous commit 9333336a73f9e116771a52a2caa96455ea345c71
broke export rendering in Metal due to the command
submission not being flushed between samples.

This would lead to ghosting in export images due
to memory synchronization issues and GPU
scheduling dependency graph problems.

The in-flight memory could also get
extremely high if exporting high numbers
of samples due to all commands being
enqueued within a single submission.

Patch resolves this by flushing for
each render frame sample and
ensuring intermediate in-flight
memory remains controlled.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/114174
2023-10-27 15:13:49 +02:00
Campbell Barton
d31c61edee Cleanup: spelling in comments 2023-10-27 12:13:48 +11:00
Campbell Barton
ce027579e0 Merge branch 'blender-v4.0-release' 2023-10-27 11:53:46 +11:00
Campbell Barton
585f43064a Fix edit-mode undo leaving edit-mode with multiple windows
With two or more windows, edit-mode undo assumed it was
possible to load the undo state into the current scene.

When multiple windows are used this is not always the case.
Edit-mode undo steps now store the scene used to create them
which is used to read undo data back into this scene
(when it's shown in a window). Otherwise the current context is used.
2023-10-27 11:50:07 +11:00
Brecht Van Lommel
d7c2ef16fe Merge branch 'blender-v4.0-release' 2023-10-26 15:51:19 +02:00
Douglas Paul
c50b682858 Fix #114156: animation player assert on launch on macOS
Adds missing calls to GPU_render_begin and GPU_render_end,
required for Metal.

Pull Request: https://projects.blender.org/blender/blender/pulls/114157
2023-10-26 15:50:20 +02:00
Campbell Barton
b5a9cad252 Merge branch 'blender-v4.0-release' 2023-10-26 22:28:00 +11:00
Campbell Barton
4f0d8931f0 Fix undo crash with multiple scenes & windows
Creating a new window then a new scene would crash on undo
because the undo step loaded would not contain the new windows scene.

Regression introduced since 3.6.
2023-10-26 22:26:13 +11:00
Hans Goudey
0e4a3bd7aa Fix: Selection input inivisible in set selection node
It's much simpler to be able to control the selection with a checkbox.
It can still be a field.
2023-10-25 20:44:18 +02:00
Miguel Pozo
247491ef0f Merge branch 'blender-v4.0-release' 2023-10-25 18:58:22 +02:00
Miguel Pozo
5d06632565 Fix #114096: Broken thumbnail shadows 2023-10-25 18:57:41 +02:00
Julian Eisel
72a8851a95 UI Code Quality: Rename UI_ACTIVE button flag to UI_HOVER
Calling this state "active" has been confusing for a long time for a number of reasons:
- It's not clear that this is essentially a mouse hover state.
- Easy to confuse with "select" state (`UI_SELECT`), both terms are vague.
- Buttons can be "inactive" (`UI_BUT_INACTIVE`) which is totally related to this "active" state.
- Button handling can consider a button as active that doesn't have this flag set (e.g. during text input).
- Active and selected are well established terms in Blender, but they mean a different thing there.

See #112160.

Pull Request: https://projects.blender.org/blender/blender/pulls/114113
2023-10-25 18:36:27 +02:00
Brecht Van Lommel
3832059c61 Merge branch 'blender-v4.0-release' into main 2023-10-25 16:21:13 +02:00
Brecht Van Lommel
a5cf5a00fb Fix #113849: animation player crash on launch on macOS
GPU backend detection was missing, causing it to try using the
non-existent OpenGL backend.

Thanks to Douglas Paul for helping identify the problem.
2023-10-25 16:19:44 +02:00
Omar Emara
3f49d286cc Fix #113864: Compositor translation is doubled
Translations in the realtime compositor are doubled where there is a
rotation or scale component.

That was due to applying translations even after domain realization. So
this patch restricts the translation to the case where domain
realization doesn't take place.
2023-10-25 16:28:09 +03:00
Clément Foucault
e1bad49abf Fix #113862: EEVEE-Next: Flicker with AO or shadow pass
This was caused by wrong alpha values.
2023-10-25 12:49:32 +02:00
Falk David
23e9ebfdbd Fix: GPv3: Crash when transforming keyframes
Blender would crash when trying to move/duplicate, etc. some keyframes.
This was because the `convert_type_get` function in the transform code
would return the wrong transform type `TransConvertType_GreasePencil`
instead of `TransConvertType_Action`.
The fix makes sure that we only return the
`TransConvertType_GreasePencil` in the 3d viewport.
2023-10-25 10:24:35 +02:00
Falk David
4d453ca1c0 Fix: GPv3: Erasing when object is not at the origin
When the object was transformed, the eraser would no longer work.
This was because the transformation of the positions to screen space
did not take the transforms into account.
This fix adds the transforms to the erasing operation.
2023-10-25 10:24:35 +02:00
Falk David
ab652f7b5f Fix: GPv3: Crash earsing when using modifier
This issue happend when a geometry nodes modifier wouldn't output grease
pencil geometry. In this case, we write an emtpy grease pencil
data-block to the evaluated `geometry_set`. But we don't update the
`eval_frame` that indicates on what frame the grease pencil data-block
was evaluated on.
The fix makes sure we update the `eval_frame` even if the output is
empty.

Additionally, there was a missing return in the
`get_evaluated_grease_pencil_drawing_deformation` function that lead
to an empty `deformation.positions` span.
The fix makes sure we return the correct deformation with the correct
positions.
2023-10-25 10:24:35 +02:00
Campbell Barton
dbd7c5f35a WM: reduce noisy logging storing/loading operator properties
Don't log wm.operator operator properties when no properties
are stored/loaded, this was noisy, especially for the
INFO_OT_reports_display_update operator when runs from a timer.
2023-10-25 16:01:45 +11:00
Campbell Barton
be9b604190 WM: use a fake clipboard when simulating input
Allow simulated interactions to run without clobbering the users
clipboard text.
2023-10-25 15:51:22 +11:00
Campbell Barton
5d3ce7c679 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:18 +11:00
Campbell Barton
0b4dd16830 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:15 +11:00
Campbell Barton
272f7637d0 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:13 +11:00
Campbell Barton
7cdd73b247 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:10 +11:00
Hans Goudey
692292536f Fix #113665: Sculpt mode does not unshare color attribute data
When retrieving a color attribute to paint it, the layer data needs to
be unshared so that it doesn't modify data from separate meshes.
In the past I think we've unknowingly avoided this problem by porting
code to the new attribute API. I've been refactoring `PBVH` and
`SculptSession` to make that possible (removing the long-lived
layer pointers in the two structs). But that wouldn't fit as a bug fix.
In the meantime, make sure the color attribute data is un-shared
and separate "for read" and "for write" versions of the function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114119
2023-10-24 20:19:14 +02:00
Hans Goudey
7dcd777379 Fix #114077: Duplicate edges for two point evaluated curves
A curve with only two points shouldn't be considered cyclic. Otherwise
a duplicate edge is added between the points. This fixes the utility
that calculates the segment count to account for this and adjusts
other code to account for that as necessary. Curves now evaluate
correctly to a single evaluated segment in this case (in the case of
Bezier and NURBS curves, it depends on the resolution though).

Co-authored-by: Dalai Felinto <dalai@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114095
2023-10-24 19:39:21 +02:00