Commit Graph

115070 Commits

Author SHA1 Message Date
Omar Emara
54fa1f9bb7 Compositor: Implement Cryptomatte for new CPU compositor
Reference #125968.
2024-11-19 12:47:23 +02:00
Jacques Lucke
8528407a18 Cleanup: rename ComponentAttributeProviders to GeometryAttributeProviders
This API is used even without `GeometryComponent` nowadays.
2024-11-19 11:37:29 +01:00
Iliya Katueshenock
ae0ab14716 Cleanup: BLI: Binary search first_if and last_if utils
Cleanup to simplify code by using common terms like _first_ and _last_ in context
of predicate applying in a range just like we do for spans and range containers.

Pull Request: https://projects.blender.org/blender/blender/pulls/130380
2024-11-19 11:05:57 +01:00
Thomas Dinges
e16cc94c5c Merge branch 'blender-v4.3-release' 2024-11-19 10:05:45 +01:00
Sean Kim
2b18cad88b Fix #130459: Select tools do not work in Weight Paint
Introduced in 23cd299ba7

Pull Request: https://projects.blender.org/blender/blender/pulls/130480
2024-11-19 09:52:10 +01:00
Jesse Yurkovich
7788c85472 Cleanup: USD: remove dead fields from ImportSettings struct
Looks like the initial version of this struct was copied from Alembic.
Remove the fields that were never ultimately used and initialize the
remaining fields inline.

Pull Request: https://projects.blender.org/blender/blender/pulls/130492
2024-11-19 08:16:09 +01:00
YimingWu
911ccac5f8 Fix #130198: GPv3 build modifier timing for nature drawing speed
GPv3 build modifier in "Nature Drawing Speed" mode didn't finish
building a frame when the time it took to draw those strokes by hand is
greater than the frame duration. Previous fix #129894 is only effective
for "Number of Frames" build mode. This fix moved the timing scaling
into `get_build_factor` and `get_factor_from_draw_speed` for more
granulated control in different modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/130199
2024-11-19 05:16:16 +01:00
Germano Cavalcante
9b3fb99bc9 Fix #116551: gpu.types.Buffer always returning 'FLOAT' type on MacOS
The issue involves using const on a variable that is later modified.
2024-11-18 23:24:48 -03:00
Sean Kim
54c0699413 Fix: Assert when undoing sculpt deformation
Pull Request: https://projects.blender.org/blender/blender/pulls/130477
2024-11-18 22:29:17 +01:00
Clément Foucault
eeeac09241 DRW: Update reference for pass_all_commands and manager_sync tests
These were not updated after functional changes.
2024-11-18 21:33:17 +01:00
Germano Cavalcante
dc653b94cc Cleanup: merge transform_data.hh into transform.hh
What's in one ends up mixing with the other. There's no need to keep
the two headers separate.
2024-11-18 17:13:35 -03:00
Germano Cavalcante
cc293577d6 Cleanup: Replace TRANSDATABASIC macro with explicit struct 2024-11-18 17:13:35 -03:00
Germano Cavalcante
1cc113dd5c Refactor: Transform - Remove the member 'TransData::ob'
This member was only really used by `transform_convert_object.cc` and
`transform_convert_object_texspace.cc`.

So instead of using a super-specialized member, use `TransData::extra`
instead.
2024-11-18 17:13:34 -03:00
Germano Cavalcante
ba3d017929 Transform: remove unused "GPENCIL_SHRINKFATTEN"
Since `c986aa03b9`, this mode is no longer used and is quite difficult
to access, as in version 4.3, `ob->data` should never be of type
`bGPdata *`.

Pull Request: https://projects.blender.org/blender/blender/pulls/130406
2024-11-18 21:09:07 +01:00
Lukas Tönne
8e8d21a8ca Fix #130456: GP Render engine crash due to C/C++ mix
1d48d842 introduced a float4x4 matrix in the GPencil render data, but that
struct must be trivially initializable. Use a conventional C matrix to avoid
crashes.

Pull Request: https://projects.blender.org/blender/blender/pulls/130468
2024-11-18 19:42:43 +01:00
Thomas Dinges
43def5d19d Release: Bump to 4.3 release 2024-11-18 19:15:25 +01:00
Miguel Pozo
d4f321fe54 Overlay: Add a pre_draw step and use submit_only for PassMain
Run the compute steps of all passes up-front to avoid constant GPU
compute/raster context switching.

Pull Request: https://projects.blender.org/blender/blender/pulls/130336
2024-11-18 18:25:09 +01:00
Miguel Pozo
d50d287924 Draw: Add specialized generate_commands for PassSortable 2024-11-18 18:25:07 +01:00
Miguel Pozo
5586533cc8 Overlay: Add image_plane_depth_bias shader
Move the depth bias to the shader to avoid creating extra views and
culling passes.
2024-11-18 18:25:07 +01:00
Miguel Pozo
c86fd709cf Overlay: Add missing early return 2024-11-18 18:25:07 +01:00
Miguel Pozo
a9cd1639db Cleanup: Fix codestyle for private variables 2024-11-18 18:25:07 +01:00
Miguel Pozo
cd26e0834b FIx: EEVEE: Fix asserts on exit at GLShaderCompiler destructor 2024-11-18 18:24:09 +01:00
Julian Eisel
f0db870822 UI: Support persistent view state, write tree-view height to files
Adds support for saving some view state persistently and uses this to keep the
height of a tree-view, even as the region containing it is hidden, or the file
re-loaded.

Fixes #129058.

Basically the design is to have state stored in the region, so it can be saved
to files. Views types (tree-view, grid-view, etc) can decide themselves if they
have state to be preserved, and what state that is. If a view wants to preserve
state, it's stored in a list inside the region, identified by the view's idname.

Limitation is that multiple instances of the same view would share these bits of
state, in practice I don't think that's ever an issue.

More state can be added to be preserved as needed. Since different kinds of
views may require different state, I was thinking we could add ID properties to
`uiViewState` even, making it much more dynamic.

Pull Request: https://projects.blender.org/blender/blender/pulls/130292
2024-11-18 18:19:48 +01:00
Jacques Lucke
9f0d20c056 Cleanup: Blenloader: add missing const
This adds `const` in a few obvious places where it should be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/130461
2024-11-18 17:55:24 +01:00
Sebastian Parborg
4acb7455df VSE: Remove byte position index from our time codes
This is a more invasive change to the timecode indexer because ffmpeg removed the ability to to get the `pkt_pos` (byte location of a frame packet):
27f8c9b27b
As stated there, they don't think that using it too seek is any better than using the dts or the pts position of the packets.
While you can still seek with the byte position, you need to do quite a bit of extra work to get this information from ffmpeg.
As we are only using it for the indexer and only if the fileformat was quite old (mpegts etc) I thought that we could instead simplify this and always seek by the pts timestamp instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/130444
2024-11-18 17:46:33 +01:00
Sebastian Parborg
b1ca2f09db Fix: FFmpeg deprecation warnings
Pull Request: https://projects.blender.org/blender/blender/pulls/127203
2024-11-18 17:46:04 +01:00
Jeroen Bakker
f7fef99b31 Vulkan: Fix renderdoc step-by-step debugger.
Recently the GLSL code was changed in Blender. For every GLSL file
the #line directive was added. However due to limitations in Blender
we misuse the indexed based line directive to store a hash. This is not
according to the spec where indexes should index the source inside the
array of sources. In vulkan the indexed based approach is not
'supported' as the compiler inputs only accepts a single file.

We tried to support file based approach but that lead to other issues in
renderdoc. Might be related to that the source file doesn't exist on the
file system.

This PR fixes this by scrambling the #line directive so the
step-by-step debugger can be used. The scrabling only happens when
blender is started with the `--debug-gpu-renderdoc` startup argument.

Pull Request: https://projects.blender.org/blender/blender/pulls/130458
2024-11-18 17:37:35 +01:00
Clément Foucault
7ca8a66a45 Fix: Overlay-Next: Fix uninitialized memory in some shape batches 2024-11-18 17:16:18 +01:00
Clément Foucault
d4ac4f7b2d DRW: Make manager and passes allow range of handles
Allow passing range of resources inside the draw manager.

This allows to reduce the overhead of the drawing logic
for group of instances sharing the same drawing state.

The only catch is that we do consider them as having the
same handedness, which seems to be a valid assumption for
now.

For now this is not used and just change the API in a transparent
way to allow incremental changes to the engines code.

Pull Request: https://projects.blender.org/blender/blender/pulls/130290
2024-11-18 17:08:19 +01:00
Bastien Montagne
645e542b58 Fix/Cleanup (unreported) illegal PointerRNA::owner_id manipulation.
RNA accessors should never (ever?) modify the `owner_id` of their parent
PointerRNA data. This is opening a potential monstruous can of worms.

If such behavior is absolutely needed, there should be a very detailed
comment about why!

In the present case, this does not seem needed at all - and was most
likely fairly harmless in practice.
2024-11-18 17:04:50 +01:00
Bastien Montagne
fb59efb12e Cleanup: Use PointerRNA_NULL assignement to reset a PointerRNA.
Do not reset each individual values manually.
2024-11-18 17:04:50 +01:00
Aras Pranckevicius
b26dc3dd01 VSE: Optimize Text Box w/ roundness with multi-threading
Filling the background Box of a text strip was a single-threaded
code before. Which was pretty fast for a simple rectangle, but
when roundness is used it becomes a bit slower (super-ellipse
equation has to be evaluated for each pixel in the rounded corners,
which is 3x powf per pixel).

So make the background box use multi-threading. On M1 Max, filling
background box of 2256x1691 pixels:
- No roundness: 25.8ms -> 4.3ms
- Roundness 0.3 (253 pixels): 31.9ms -> 5.8ms
- Roundness 1.0 (845 pixels): 94.6ms -> 15.8ms

Pull Request: https://projects.blender.org/blender/blender/pulls/130403
2024-11-18 16:40:23 +01:00
Thomas Dinges
6f286980b9 Merge branch 'blender-v4.3-release' 2024-11-18 16:37:23 +01:00
Omar Emara
24d1733059 Compositor: Implement Double Edge Mask for new CPU compositor
Reference #125968.
2024-11-18 17:35:22 +02:00
Omar Emara
9dd04cafd9 Compositor: Implement Jump Flooding for new CPU compositor
Reference #125968.
2024-11-18 17:35:22 +02:00
Omar Emara
a8591c9efb Compositor: Implement Box Mask for new CPU compositor
Reference #125968.
2024-11-18 17:35:22 +02:00
Omar Emara
c9e974249e Compositor: Implement Ellipse Mask for new CPU compositor
Reference #125968.
2024-11-18 17:35:22 +02:00
Omar Emara
8034e1ee51 Compositor: Implement ID Mask node for new CPU compositor
Reference #125968.
2024-11-18 17:35:22 +02:00
Omar Emara
6166e9ab6e Compositor: Add integer pixel load and store functions 2024-11-18 17:35:21 +02:00
Omar Emara
5511256f3b Compositor: Add fallback variant for pixel loader
This patch adds a variant of the pixel loader function that returns a
fallback value for out of bound access.
2024-11-18 17:35:21 +02:00
Falk David
9e82331ae6 Fix #130368: GPv3: Canvas overlay incorrect offset
The issue was that if the evaluated object doesn't have an active
layer, the canvas is offset by twice the objects position.

The reason was that the code scaled the whole transformation
matrix by two to match the code in 4.2, but then had to overwrite
the location of the transformation again to counteract the scaling.

The fix is to not counteract the scaling and just scale the 3x3 part
of the matrix instead. This way we can remove the part afterwards
that writes to the location of the transform.

Pull Request: https://projects.blender.org/blender/blender/pulls/130454
2024-11-18 16:24:34 +01:00
Pratik Borhade
e23b710bcf Fix #130376: GPv3: Outline modifier traces flat caps incorrectly
For flat caps, only one point is added in data.positions array for
endpoints of stroke. It results in incomplete outline. To resolve
this, add another point in new curves at the exact opposite position.

Pull Request: https://projects.blender.org/blender/blender/pulls/130437
2024-11-18 16:16:08 +01:00
Bastien Montagne
e8770a3845 Cleanup: Do not use PointerRNA::owner_id to create non-ID PointerRNAs.
Also added asserts to 'document' that in that case the PointerRNA data
is expected to be the same as the (Brush) ID.
2024-11-18 15:58:06 +01:00
Clément Foucault
376f896b1f Cleanup: Overlay-Next: Use same test for V3D everywhere 2024-11-18 15:55:14 +01:00
Clément Foucault
fb6188f658 Fix: Overlay-Next: Crash when changing workspace
Outline drawing was not guarded to V3D
2024-11-18 15:55:14 +01:00
Clément Foucault
cb1440b92f Fix: Overlay-Next: Wireframe does not update in sculpt mode
Was just missing the implementation.
2024-11-18 15:55:14 +01:00
Germano Cavalcante
607b2dd826 Fix: assert failure when snapping to geometry with only vertices
These geometries do not have "EDGE_ENDPOINT".
2024-11-18 11:18:09 -03:00
Clément Foucault
906e770b15 Fix: Overlay-Next: Object wireframe draw type not drawing wireframe
Logic was missing.
2024-11-18 14:42:28 +01:00
Clément Foucault
3cad71b03f Fix: Overlay-Next: Grid occluding overlays in wireframe mode 2024-11-18 14:35:39 +01:00
Hans Goudey
47a002747c Merge branch 'blender-v4.3-release' 2024-11-18 08:34:40 -05:00