Commit Graph

103599 Commits

Author SHA1 Message Date
Sybren A. Stüvel
1ea35a6d4e Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-10-10 12:07:46 +02:00
Sybren A. Stüvel
048625cc1f Anim: make bone colors library-overridable
Pose bone colors should be library-overridable, and now they are.
2023-10-10 12:05:06 +02:00
Jeroen Bakker
9c52b4e606 Fix #113470: EEVEE-Next doesn't stop sampling
After performing a transformation EEVEE-Next non-stops resets the
sampling. The cause is that the `recalc` flag that are stored in the
Object isn't consumed. When transforming it was always filled with
`ID_RECALC_TRANSFORM` and kept on resetting the sampling.

Regression introduced by PR #113252.

Pull Request: https://projects.blender.org/blender/blender/pulls/113484
2023-10-10 11:49:37 +02:00
Hans Goudey
1ccba4d9fe Nodes: Use index instead of reordering for draw order
Currently nodes are reordered so that the "on top" nodes are last in
the list. Node order changing for simple operations like selection
means we either have to reevaluate the node tree data-block on
selections or accept that the evaluated order can be different from the
original. Currently we do the latter (see d76a0e98ba), but
makes it complex to access nodes by index, and is hard to reason about.

Instead of reordering nodes, store the ui order in the node itself
and sort the nodes before drawing them or doing any processing
that depends on the "depth."

The "selected_nodes" list in the context is no longer ordered by the
recent selection.

Pull Request: https://projects.blender.org/blender/blender/pulls/113419
2023-10-10 10:57:51 +02:00
Omar Emara
203559757a Compositor: Allow variable size Kuwahara
This patch changes the size property of the Kuwahara into a node socket
to allow variable size Kuwahara.

Pull Request: https://projects.blender.org/blender/blender/pulls/112946
2023-10-10 10:10:18 +02:00
Campbell Barton
1a234805d0 Merge branch 'blender-v4.0-release' 2023-10-10 19:05:03 +11:00
Campbell Barton
bb9b60f13d Fix build error Windows with ssize_t not being defined 2023-10-10 19:03:31 +11:00
Jeroen Bakker
f361cfa361 Vulkan: Bundle Immediate Mode Calls
When using Immediate mode emulation the data is stored in a ring buffer.
As data isn't overwritten it is safe to call multiple draw commands in
a single command buffer.

This improves drawing performance when immediate mode is being used, it
mostly improves the readability of the GPU traces in renderdoc.

Pull Request: https://projects.blender.org/blender/blender/pulls/113482
2023-10-10 09:54:35 +02:00
Hans Goudey
012c110222 Merge branch 'blender-v4.0-release' 2023-10-10 09:31:42 +02:00
Hans Goudey
ab9716f058 Cleanup: Access mesh bounds directly
Similar to 4eeabd274e, helps simplify fix to #111120
2023-10-10 09:31:20 +02:00
Jeroen Bakker
d67ec32747 Vulkan: Support for Framebuffer with Missing Attachments
Wireframe mode wasn't working and viewport had flickering artifacts.
Reason was that the render pass creation failed for its framebuffer as
the input data was filled with garbage for attachments that were unused.

Vulkan requires every attachment to be filled upto the highest used attachment
slot. This PR fills missing attachments with a dummy texture.

Pull Request: https://projects.blender.org/blender/blender/pulls/113141
2023-10-10 09:27:07 +02:00
Christoph Lendenfeld
0c2afa7c17 Fix #111553: Double IK constraint not working
It seems that the code only ever converted the
first IK constraint found into a `PoseTree`.
Before #110417 constraints with zero influence were
skipped so it worked, except for the bug with the depsgraph.

After this patch the logic is the following:
From top to bottom of the constraint stack,
keep adding constraints until the first constraint with influence is added.

This ensures, that if there is only one disabled constraint,
it still gets converted into a `PoseTree`,
which is needed for the depsgraph to work correctly.

The resulting behavior from adding the first active constraint is
that the higher in the stack the constraint is, the higher its priority.

To achieve that I split off a helper function `find_ik_constraints`
that populates a vector of `bConstraint` pointers.
The code to create the `PoseTree` is still largely the same,
except I moved a few variables closer to where they are used.

Pull Request: https://projects.blender.org/blender/blender/pulls/113056
2023-10-10 09:06:28 +02:00
Campbell Barton
89efad1dbd Merge branch 'blender-v4.0-release' 2023-10-10 18:02:51 +11:00
Campbell Barton
9ebe1c386f Merge branch 'blender-v4.0-release' 2023-10-10 18:02:48 +11:00
Campbell Barton
780bb012ce Fix integer overflow in ED_draw_imbuf_method
Prevent int overflow calculating the size of an image buffer.
2023-10-10 18:01:13 +11:00
Campbell Barton
34899ec13d Fix crash when the animation player fails to create a texture 2023-10-10 18:00:05 +11:00
Campbell Barton
4afd8ef9a4 Cleanup: add BLI_mmap_get_length, remove duplicate file size access
Remove unnecessary calls to BLI_file_descriptor_size when using
BLI_mmap_open since this stores the file size too.

While accessing the size twice isn't so bad, the additional check
that the file size isn't an error value is unnecessarily verbose.
2023-10-10 15:43:13 +11:00
Campbell Barton
ed8d2d8219 Merge branch 'blender-v4.0-release' 2023-10-10 15:33:47 +11:00
Campbell Barton
7a503d160e BLI_mmap: open now checks for seek failing & exists early
Failure to seek would attempt to MMAP SIZE_T_MAX, while this would
likely fail, prefer an explicit error check instead of relying on
unreasonable requests to be rejected.
2023-10-10 15:32:13 +11:00
Campbell Barton
acd54a2afb Merge branch 'blender-v4.0-release' 2023-10-10 14:57:00 +11:00
Campbell Barton
ae6b1ead4c Fix failure to check the error value for file-size access
Accessing the file size returns -1 on error, for file packing this
was passed directly to an allocation which would wrap around to
SIZE_T_MAX and fail to allocate. In other cases zero was treated
as an error value but -1 wasn't.

Add checks for the error return value, also warn that packing files over
2gb isn't supported.
2023-10-10 14:56:30 +11:00
Campbell Barton
f5d2f520cf Merge branch 'blender-v4.0-release' 2023-10-10 14:25:57 +11:00
Campbell Barton
cb51cc7ce8 Fix OpenEXR leak, failure to close a file when BLI_mmap_open fails 2023-10-10 14:16:04 +11:00
Campbell Barton
70e548a79f Merge branch 'blender-v4.0-release' 2023-10-10 14:14:58 +11:00
Campbell Barton
60f4f71733 Merge branch 'blender-v4.0-release' 2023-10-10 14:14:55 +11:00
Campbell Barton
8b5d271c5c Fix playing back image files over 2gb in the animation player
Use size_t to store the file size.
2023-10-10 14:01:23 +11:00
Campbell Barton
3307e0afe8 Fix crash on startup with large images in the animation player
The image size was used to set the window size, large values could
make the window fail to create it's GPU context.

Resolve by constraining window size by the main display dimensions.

Even in cases where the window would succeed to create its generally
not useful to have a window larger than the screen size.
2023-10-10 13:57:44 +11:00
Campbell Barton
53a27eba86 Merge branch 'blender-v4.0-release' 2023-10-10 11:06:35 +11:00
Campbell Barton
af737c3a57 Merge branch 'blender-v4.0-release' 2023-10-10 11:06:33 +11:00
Campbell Barton
e03fd667f2 Fix clipped text with the animation player
The text was drawn at the very bottom left of the window.
2023-10-10 11:04:36 +11:00
Campbell Barton
256ace4c57 Fix animation player scrubbing with multiple file arguments
While passing in multiple files is supported, scrubbing both images
an movies wasn't working properly when multiple files were passed in.

For images, arguments such as "*.png" expand to multiple image files
which were each assigned a frame index of 0, this would play but stopped
scrubbing from working completely.

For movies, passing in multiple files would play back all files but
only properly scrub the first file, if other videos were longer than
the first scrubbing would jump to those.

Resolve by starting the frame index where the previous files left off.

Also resolve divide by zero when showing the indiciator for a single
frame.
2023-10-10 11:04:36 +11:00
Hans Goudey
a935701a87 Cleanup: Remove unnecessary struct keyword in BKE_object.hh
Pull Request: https://projects.blender.org/blender/blender/pulls/113464
2023-10-10 00:55:58 +02:00
Campbell Barton
137f8dd7bc Cleanup: spelling in comments 2023-10-10 09:44:57 +11:00
Hans Goudey
8f27baf388 Merge branch 'blender-v4.0-release' 2023-10-09 23:54:43 +02:00
Hans Goudey
976eaae02f Cleanup: Move BKE_object.hh to C++
Simplifies the fix to #111120, where the object bounds functions
may return a C++ type instead of `BoundBox`.

Pull Request: https://projects.blender.org/blender/blender/pulls/113462
2023-10-09 23:41:53 +02:00
Hans Goudey
4eeabd274e Cleanup: Access mesh bounds more directly
Simplifies the fix to #111120, because it is clearer that the threadsafe
Mesh access is used rather than the potentially problematic object-level
bounds access.
2023-10-09 22:31:31 +02:00
Harley Acheson
a6a4d45538 Merge branch 'blender-v4.0-release' 2023-10-09 13:10:22 -07:00
Harley Acheson
1d141e721c Fix #109968: Allow Warping on Actual Mouse Bounds
For Color Circle (and Square) and for Walk Navigation, use the actual
region bounds for mouse warping.

Pull Request: https://projects.blender.org/blender/blender/pulls/113066
2023-10-09 22:09:04 +02:00
Harley Acheson
7db72d4622 Merge branch 'blender-v4.0-release' 2023-10-09 09:56:40 -07:00
Harley Acheson
ec59d5eac0 Fix #113008: VIEW3D Header Overlap With No Transparency
Do not treat the VIEW3D Header as overlapped if fully opaque. This
allows opening the Header Context menu from any part of it when without
transparency.

Pull Request: https://projects.blender.org/blender/blender/pulls/113032
2023-10-09 18:55:17 +02:00
Harley Acheson
6e9be2ae2f Merge branch 'blender-v4.0-release' 2023-10-09 09:32:58 -07:00
Philipp Oeser
78489af86a Fix #113346: Append/Link fails if no name is specified
Removing one unnecessary check in wm_link_append_exec that caused us to
error out even though multiple files are selected. This removed check
is also done later on in the function so safety is still ensured.

Pull Request: https://projects.blender.org/blender/blender/pulls/113350
2023-10-09 18:29:49 +02:00
Miguel Pozo
f54205cfdd EEVEE Next: Optional surfel backface culling
Allow disabling surfels backfaces from contributing to volume probes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113362
2023-10-09 17:02:14 +02:00
Harley Acheson
311a3d5695 Merge branch 'blender-v4.0-release' 2023-10-09 07:58:47 -07:00
Harley Acheson
35d3d52508 UI: Search All Menus with Space Bar
Allow initiating the search of any named menu by pressing space bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/113299
2023-10-09 16:56:16 +02:00
Brecht Van Lommel
03b2523df8 Merge branch 'blender-v4.0-release' into main 2023-10-09 16:14:39 +02:00
Germano Cavalcante
ffaf3e30ef DRW: Simplify Selection Engine
The selection engine has some complex tricks that improve performance.
These are:
- Only draws objects whose bounding box intersects the selection
threshold;
- If the viewport or objects are not "dirty", it does not clean the
texture IDs and only adds objects that have not yet been drawn;
- Only updates the depth buffer if a new object is drawn;
- Skip drawing if no object is found;

These tricks were initially implemented so that this engine could be
used for snapping.

But this initial idea has changed and now the engine is only used to
select Vertices, Edges or Faces.

Due to this limited use, these tricks bring no real benefit.
In fact, it's even worse with the Retopology Overlay, as it forces the
Depth buffer to be redrawn.

This commit removes these tricks and only keeps those that indicate
whether the drawing needs to be updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/113308
2023-10-09 11:06:53 -03:00
Bogdan Nagirniak
7d7e3d0986 Fix Hydra Storm border rendering being wrong in the viewport
Pull Request: https://projects.blender.org/blender/blender/pulls/113376
2023-10-09 16:01:58 +02:00
Jeroen Bakker
701c14acea EEVEE-Next: Support for Intel ARC GPUs
This PR adds support for Intel ARC GPUs. Due barriers inside a non
uniform control flow the Intel ARC can stall the whole system.

The cause is that a barrier is used, but some threads in the shader
have completed. The barriers might wait until it gets the signal from
the exited threads and stalls the system.

Although some implementations support it it is safer to limit the
number of HiZ levels.

Pull Request: https://projects.blender.org/blender/blender/pulls/113447
2023-10-09 15:29:26 +02:00
Hans Goudey
f27ac434f6 Fix: Incorrect early return in recent cleanup 2023-10-09 15:27:04 +02:00