Commit Graph

110580 Commits

Author SHA1 Message Date
Pablo Vazquez
1e0eb925c4 Merge branch 'blender-v4.2-release'
# Conflicts:
#	source/blender/blenkernel/BKE_blender_version.h
#	source/blender/blenloader/intern/versioning_400.cc
2024-06-20 15:18:37 +02:00
Pablo Vazquez
c2437d11de Fix: VSE strip text label readability
During the strips redesign it was tested to go with drop shadows but
in practice and based on user feedback it looks better without.

- Remove drop shadow.
- Use white text for active/selected strips, black for unselected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123487
2024-06-20 15:10:33 +02:00
Clément Foucault
d3e4eb49a0 Fix: EEVEE: Broken Lightprobe sphere display
The vertex shader was not writting to the position
attribute output.
2024-06-20 15:06:28 +02:00
Jeroen Bakker
55d75a1de3 EEVEE: Light probe resolution
EEVEE stores light probes using octahedral mapping. Compared to the previous
cubemap storage octahedral has less pixels. The 64x64 is becoming useless
and can be removed. This PR also enables generating light probe maps upto 4k.

Some issues were found: the offset of the sphere inside the atlas
was always set to mipmap level 0 offset. This was hidden because of the texture
wrapping. Also the offset was substracted from the local texture
coordinate when calculating the direction of the pixel. Might be that due
to the incorrect offset (mipmap level 0), the latter issue was never detected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123074
2024-06-20 15:06:03 +02:00
Jeroen Bakker
af72c1f21d EEVEE: Light probe resolution
EEVEE stores light probes using octahedral mapping. Compared to the previous
cubemap storage octahedral has less pixels. The 64x64 is becoming useless
and can be removed. This PR also enables generating light probe maps upto 4k.

Some issues were found: the offset of the sphere inside the atlas
was always set to mipmap level 0 offset. This was hidden because of the texture
wrapping. Also the offset was substracted from the local texture
coordinate when calculating the direction of the pixel. Might be that due
to the incorrect offset (mipmap level 0), the latter issue was never detected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123074
2024-06-20 15:02:11 +02:00
Jeroen Bakker
4c8de4aedd Vulkan: Fix multi viewport framebuffers
Due to incorrect logic any multi viewport setup could be cleaned
when dynamic rendering begins. This patch moves the clearing
of the viewport/scissor setup when binding.

This issue fixes shadow rendering in EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/123484
2024-06-20 14:46:48 +02:00
Brecht Van Lommel
a18ab98785 Fix #122131: Image undo issues with editable linked images
Store library filepath so we can find the right datablock.

Tested to work with the brush assets project branch, as this
currently does not affect anything in main.

Pull Request: https://projects.blender.org/blender/blender/pulls/123449
2024-06-20 14:13:50 +02:00
Jeroen Bakker
faf0171c36 Vulkan: Make stencil export optional
`VK_EXT_shader_stencil_export` isn't supported by NVIDIA devices.
This extension was recently added to support EEVEE PBR layer selection.

This PR makes this extension optional and selects the work around
when not supported by the physical device.

Fixes #114385

Pull Request: https://projects.blender.org/blender/blender/pulls/123470
2024-06-20 14:12:07 +02:00
Jacques Lucke
a9a047c0e3 Core: use implicit sharing for PackedFile data
Found this bottleneck when checking #122281. With this patch, `ED_undo_pop` in
the provided file speeds up from `132 ms` to `18 ms`.

Pull Request: https://projects.blender.org/blender/blender/pulls/123243
2024-06-20 14:09:29 +02:00
Nathan Vegdahl
3ab3ac1b0a Anim: make "XYZ to RGB" user preference work for layered actions
The approach taken here is to pass an optional `PropertySubType` parameter down
the call chain from `insert_key_layered_action()` and terminating at
`create_fcurve_for_channel()`, which uses it to determine the color mode for
new fcurves.

The parameter is optional to allow other callers (e.g. Python RNA functions)
to skip passing it, in which case any new fcurves will get the default rainbow
coloration.

Pull Request: https://projects.blender.org/blender/blender/pulls/123022
2024-06-20 14:05:09 +02:00
Campbell Barton
af0f171176 Merge branch 'blender-v4.2-release' 2024-06-20 22:03:32 +10:00
Jacques Lucke
d3157699e2 BLO: remove unused packedmap from read file data
I found that `packedmap` is effectively unused when I worked on #123243.
The only function that wrote to it was `blo_make_packed_pointer_map`
and that is never called. Packed data already used the normal `datamap` as fallback.

Pull Request: https://projects.blender.org/blender/blender/pulls/123244
2024-06-20 13:51:48 +02:00
Clément Foucault
ab0e6386fc Fix: EEVEE: Imprecision in HiZ gather coordinates
The offset was only 0.5 which centered the gather
sample exactly on the first pixel of the quad.
With floating point arithmetic differences on Nvidia
this lead to the wrong set of texture pixel being
fetched by gather.

Using the coordinate at the center of the quad fixes
the issue.

Fix #123262
2024-06-20 13:06:52 +02:00
Aras Pranckevicius
c059eb73d9 Merge branch 'blender-v4.2-release' 2024-06-20 14:06:20 +03:00
Aras Pranckevicius
b76a95b8b4 Fix: VSE timeline strip outline readability
With selected strips, it is not clear where one of them begins and another
ends since their outlines are right next to each other.

This changes strip look so that:
- All strips have consistent dark 1pt outline at the outer edge.
- Selected strips have 2pt highlight inside said outer edge.
- Selected strips also have a 1pt wide 33% opacity darker line inside the
  selection highlight (and inside possible handles). To improve readability
  in case strip content happens to be similar to selection/active color.

Images in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/123431
2024-06-20 13:01:26 +02:00
Falk David
6daf139694 GPv3: Draw Tool: Outline setting
This ports the outline setting from GPv2 to GPv3.

Internally, the same code as for the outline modifier is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/123440
2024-06-20 12:07:24 +02:00
Jeroen Bakker
4353b7ffba Vulkan: Remove unused code
Vulkan backend has recently switched to a render graph approach. Many
code was left so we could develop the render graph beside the previous
implementation. Last week we removed the switch. This PR will remove
most of the unused code. There might be some left and will be removed
when detected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123422
2024-06-20 11:34:19 +02:00
Lukas Tönne
ccb3989865 GPv3: Implement the alpha threshold setting for the Fill tool
The fill tool can take opacity into account ("Advanced" brush settings).
In that case any point with a total opacity lower than the threshold is
rendered as a transparent boundary.

This was still a hardcoded setting in the fill tool, now uses brush
settings.

Pull Request: https://projects.blender.org/blender/blender/pulls/123469
2024-06-20 11:14:33 +02:00
Pratik Borhade
88553d07b1 Cleanup: Remove semicolon
It was added in e42281084b
Resolves #123466
2024-06-20 14:36:10 +05:30
Sybren A. Stüvel
5e6e8bcfb2 Refactor: Anim, remove unnecessary nullptr checks
Remove some `nullptr` checks from an operator exec function, which are
unnecessary because the corresponding poll function already checks for
them.

No functional changes.
2024-06-20 10:34:22 +02:00
Sybren A. Stüvel
b07f0e8a65 Anim: prevent pushing down layered Actions onto the NLA
Prevent creating NLA strips from layered Actions via the 'Push Down'
operator.

Maybe in the future the NLA will support layered Actions (as a transitional
phase, before the NLA is replaced with layered Actions itself). For now,
it's better to create stable boundaries to prevent their use in the NLA.
When NLA support is being worked on, those boundaries can be removed again.

Pull Request: https://projects.blender.org/blender/blender/pulls/123467
2024-06-20 10:25:52 +02:00
Sybren A. Stüvel
4c0a77ee8f Anim: avoid logged warnings when visiting layered Action in NLA evaluation
Avoid logging actions about `action->idroot` not matching, when evaluating
the NLA and visiting a layered Action. Layered Actions are not limited to
a single data-block type, and so the code should ignore `action->idroot`.
2024-06-20 10:05:34 +02:00
Sybren A. Stüvel
aa0e5368e7 Anim: add layered Action support to BKE_action_frame_range_calc()
Add layered Action support to `BKE_action_frame_range_calc()`, by
looping over all F-Curves of all Bindings in the Action.

Introduce `animrig::fcurves_all(action)`, which returns a vector of all
F-Curves in the Action, both for legacy and layered Actions.

No functional changes for legacy Actions.
2024-06-20 10:05:34 +02:00
Sybren A. Stüvel
54ed2a927e Refactor: Anim, simplify BKE_action_frame_range_calc()
Simplify `BKE_action_frame_range_calc()` by returning early and replacing
`short` with `bool`.

No functional changes.
2024-06-20 10:05:34 +02:00
Sybren A. Stüvel
b9283baf4e Refactor: Anim, simplify action_pushdown_poll()
Simplify `action_pushdown_poll()` by flipping conditions & returning early.

No functional changes.
2024-06-20 10:05:34 +02:00
Campbell Barton
7326320e81 Merge branch 'blender-v4.2-release' 2024-06-20 17:31:00 +10:00
noodlebox
de986e68d4 Cleanup: spelling and duplicates in local dictionary
Correct some misspellings in the custom spellcheck dictionary as well
as any instances of the previous spellings in code comments.

Ref !123459
2024-06-20 17:30:08 +10:00
Hans Goudey
7997d62598 Sculpt: Initial data oriented refactor for crease/blob brushes
Part of #118145.
I added a scene argument to the brush symmetry operation functions.
Besides that, the changes here are just like the other refactors.

Pull Request: https://projects.blender.org/blender/blender/pulls/123231
2024-06-20 00:15:47 +02:00
Jesse Yurkovich
ffad89f028 Merge branch 'blender-v4.2-release' 2024-06-19 12:48:56 -07:00
Jesse Yurkovich
6c5ce883e7 Fix: USD access of deleted mesh during custom property write
We were accessing `mesh` but it's been deleted already.

Pull Request: https://projects.blender.org/blender/blender/pulls/123426
2024-06-19 21:44:59 +02:00
Sean Kim
d908ae7fcc Refactor: Add helper method for creating face set attribute
Pull Request: https://projects.blender.org/blender/blender/pulls/123401
2024-06-19 21:18:23 +02:00
Brecht Van Lommel
cbc6170519 Merge branch 'blender-v4.2-release' 2024-06-19 20:54:33 +02:00
Clément Foucault
dea7620e0b Fix: EEVEE: Wrong format and barriers for AO 2024-06-19 20:25:49 +02:00
Hans Goudey
90c4c48bbf Sculpt: Specialize mask gesture writing
Part of #118145.
Use the recently added utility for base mesh data, and for BMesh and
multires add a compromise that gets some benefits of simpler loops
but still avoids some duplication.

Also add move a recently added utility to only affect visible grid
vertices to the relevant header and reuse it. I expect this won't be a
permanent part of the API but for now it's better than duplicating
all the loops twice.
2024-06-19 13:56:47 -04:00
Hans Goudey
2639b1833c Sculpt: Avoid depsgraph evaluation when adding mask attribute
For base mesh sculpting, we already draw the original data instead of the
evaluated data, so the evaluated mesh doesn't have to be updated to
contain the new attribute. This is different from multires sculpting
because sculpt brushes and drawing only deal with the evaluated
SubdivCCG, not the original multires modifier data. Removing the
unnecessary update removes a noticeable pause when clearing and
adding a mask.
2024-06-19 13:56:47 -04:00
Hans Goudey
8dba1a9e5d Sculpt: Use utilities for "Mask by Color" operator
Part of #118145.
Use a utility for updating mask values and detecting changes and
pushing undo steps. Also use the attribute API for accessing color
attributes and pass flood fill data as arguments instead of a separate
struct.
2024-06-19 13:56:47 -04:00
Hans Goudey
b343d92a01 Cleanup: Sculpt: Deduplicate code for inverting base mesh mask 2024-06-19 13:56:47 -04:00
Hans Goudey
1d83a88fdc Sculpt: Replace PBVH iteration macro for mask init operator
Part of #118145.
There is more boilerplate now, but hot loops are generally simpler,
and I think we can reuse the structure for other operators that create
masks, similar to `vert_hide_update`.
2024-06-19 13:56:47 -04:00
Hans Goudey
f05409e468 Cleanup: Sculpt: Use enum class for mask init mode
Also remove some useless comments
2024-06-19 13:56:47 -04:00
Pablo Vazquez
c2991a1751 VSE: Adjust label of subtract/multiply effect strip
When adding new effect strips, label "Subtract" instead of "Sub",
and "Multiply" instead of "Mul".
2024-06-19 19:44:43 +02:00
Falk David
bd67c3b8ef GPv3: Update names of layers in modifier filters when layer name changes
This adds additional logic to `GreasePencil::rename_node` to rename
the strings in the modifier influence data.

This is similar to how `ED_armature_bone_rename` handles renaming of
strings.

Resolves #123321.

Pull Request: https://projects.blender.org/blender/blender/pulls/123365
2024-06-19 18:57:09 +02:00
Jacques Lucke
ae4cee19ba Merge branch 'blender-v4.2-release' 2024-06-19 18:35:45 +02:00
Laurynas Duburas
9ae063d40b Fix #123325: Curve selection more does not highlight curves
Adds handles to curve types `CURVE_TYPE_CATMULL_ROM`,`CURVE_TYPE_POLY` to fix #123325.
Previously not shown as seemed redundant in `Control Point` edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/123373
2024-06-19 18:31:02 +02:00
Miguel Pozo
a4e39145a6 Merge branch 'blender-v4.2-release' 2024-06-19 18:16:12 +02:00
Miguel Pozo
8fc614fc1b Fix: EEVEE: Use of scene before assignment
Move update_eval_members to the top of init to avoid future issues.
2024-06-19 18:15:27 +02:00
Brecht Van Lommel
21d3c2505c Merge branch 'blender-v4.2-release' 2024-06-19 18:03:24 +02:00
Brecht Van Lommel
da9f586748 Fix #104061: Python GPU module unusable after too early import
Add-ons may attempt to load the GPU module in background mode when no GPU
context has been initialized yet. This would give an error on import.

If then later the GPU context does get initialized, for example for a
render engine, import would still fail as the module is cached.

This reverts commit d7f124f06f, and again
throws errors in methods and constructors instead of module import.

Pull Request: https://projects.blender.org/blender/blender/pulls/123395
2024-06-19 17:54:35 +02:00
Brecht Van Lommel
eaeb8ba8cd USD: Rename active UV Map to "st" by default
This was previously attempted in #109518 and reverted in #112234. Now do
both the changes in the mesh and material export, and make it an option
in USD export. Hydra always renamed to "st" and continues to do it.

Fix #122800: Missing textures with MaterialX materials

Pull Request: https://projects.blender.org/blender/blender/pulls/123326
2024-06-19 17:53:55 +02:00
Lukas Stockner
fd2bc9d011 UI: Support color picking from underlying viewport buffer
Currently, when color-picking from the viewport, the code will read the final
displayed pixel color and then somewhat attempt to undo the display transform.
However, this has several limitations - for example, precision is limited to 8
bit, and it does not account for e.g. View Transform or exposure/gamma.

Since we have the pre-display-transform color in a GPU texture anyways, this
code therefore adds a View3D-specific eyedropper handler (similar to e.g.
the image space) that reads from the viewport texture.

Pull Request: https://projects.blender.org/blender/blender/pulls/123408
2024-06-19 17:27:54 +02:00
Falk David
60de2752be GPv3: Hide the paint cursor while drawing
This matches the behavior of GPv2. While drawing a stroke
the paint cursor is not shown.
2024-06-19 16:26:19 +02:00