Commit Graph

105478 Commits

Author SHA1 Message Date
Harley Acheson
6007838bb2 UI: Set Initial Background Color Darker
With the popularity of dark themes, and the fact that our default theme
is dark, make the initial background color (before the program fully
loads) a darker shade of grey. {0.25f, 0.25f, 0.25f} versus current
{0.55f, 0.55f, 0.55f}. Also set Windows class background brush to the
same color to remove a potential flash.

Pull Request: https://projects.blender.org/blender/blender/pulls/115968
2023-12-20 01:36:11 +01:00
Harley Acheson
25c69d20b9 Fix #116196: Edge selection with hidden Asset Shelf
When the Asset shelf is active but hidden, the mouse cursor will give
feedback about a moveable edge above the asset shelf area. This just
alters `region_azone_edge_poll` to check for edges belonging to
regions that hide with a previous region that is now hidden.

Pull Request: https://projects.blender.org/blender/blender/pulls/116233
2023-12-20 01:21:18 +01:00
Harley Acheson
5741f7b8a9 Fix #114461: Check Interactivity in button comparisons
Implementation of Julian Eisel's idea of including interactivity in
button comparisons to avoid bad label matches.

Pull Request: https://projects.blender.org/blender/blender/pulls/116228
2023-12-20 01:14:10 +01:00
Campbell Barton
c455f76267 Cleanup: remove redundant casts, use const casts 2023-12-20 10:11:01 +11:00
Germano Cavalcante
9fbc096522 Fix #116342: crash when moving GP3 keyframe
Caused by 7f626e08e1

It is necessary to use a safer way to identify whether `TransData2D`
points to an int value.
2023-12-19 17:19:05 -03:00
Richard Antalik
c9fc69d10b Cleanup: Fix build warnings introduced in e02eeaf888 2023-12-19 19:54:21 +01:00
Hans Goudey
d093c9075d Cleanup: Check for null before copying datablocks
Avoid relying on the null check inside of `BKE_id_copy_ex`,
which shouldn't really be there.
2023-12-19 13:31:43 -05:00
Hans Goudey
2da88752be Cleanup: Avoid uninitialized variable warning 2023-12-19 13:31:42 -05:00
Philipp Oeser
55963c2811 Fix #116346: USD importer ignores camera near clipping plane
Seems the actual change somehow got swallowed in 7a9284107d / !112905
[the corresponding clamping comment is already there :)].

Now just add back.

Thx @Matt-M for the initial investigation.

Pull Request: https://projects.blender.org/blender/blender/pulls/116353
2023-12-19 19:00:11 +01:00
Aras Pranckevicius
a95dd8438d VSE: add option to display half of audio waveform
Default is "full" waveform display. Adds overlay option to display absolute
value of the signal as upper half only. Part of design task #115274

Pull Request: https://projects.blender.org/blender/blender/pulls/116344
2023-12-19 18:52:38 +01:00
Aras Pranckevicius
4805b4f13f VSE: more intuitive UI control for waveform display mode
Use a more consistent radio selection for waveform display, not an
enum-radio hybrid. Part of design task at #115274

Pull Request: https://projects.blender.org/blender/blender/pulls/116336
2023-12-19 18:49:28 +01:00
Damien Picard
faefaa4447 I18n: extract and disambiguate a few messages
Extract:
- Compositor error messages.
- `bUnitDef`s were broken after cleanup commit 2b77cd726d. Since each
  unit's "display name" is now preceded by a consistent "name_display"
  comment, the regex which extracts the unit is greatly simplified.
  It now relies on the presence of the comment instead of the struct
  order.
- "Preset" menu and "Apply Preset" button from the curveprofile
  template.
- Operator labels from the catalog context menu.

Disambiguate:
- "Bake Data": can mean "Which data to bake" (verb), or "The data that
  were baked" (noun).
- "Cache" in the Simulation Nodes panel is a verb, not a noun.
- "Mix" in the snapping menu is a noun, not a verb.
- "Top" and "Bottom" can mean the upper part of an object or the
  highest point or element of something like a menu or list.

Pull Request: https://projects.blender.org/blender/blender/pulls/115963
2023-12-19 18:41:09 +01:00
Aras Pranckevicius
4ef5d9f60f ffmpeg: optimize ffmpeg_postprocess
After doing regular movie frame decoding, there's a "postprocess" step for
each incoming frame, that does deinterlacing if needed, then YUV->RGB
conversion, then vertical image flip and additional interlace filtering if
needed. While this postprocess step is not the "heavy" part of movie
playback, it still takes 2-3ms per each 1080p resolution input frame that
is being played.

This PR does two things:
- Similar to #116008, uses multi-threaded `sws_scale` to do YUV->RGB
  conversion.
- Reintroduces "do vertical flip while converting to RGB", where possible.
  That was removed in 2ed73fc97e due to issues on arm64 platform, and
  theory that negative strides passed to sws_scale is not an officially
  supported usage.

My take on the last point: negative strides to sws_scale is a fine and
supported usage, just ffmpeg had a bug specifically on arm64 where they
were accidentally not respected. They fixed that for ffmpeg 6.0, and
backported it to all versions back to 3.4.13 -- you would not backport
something to 10 releases unless that was an actual bug fix!

I have tested the glitch_480p.mp4 that was originally attached to the
bug report #94237 back then, and it works fine both on x64 (Windows)
and arm64 (Mac).

Timings, ffmpeg_postprocess cost for a single 1920x1080 resolution movie
strip inside VSE:
- Windows/VS2022 Ryzen 5950X: 3.04ms -> 1.18ms
- Mac/clang15 M1 Max: 1.10ms -> 0.71ms

Pull Request: https://projects.blender.org/blender/blender/pulls/116309
2023-12-19 18:28:51 +01:00
Miguel Pozo
0e3dbcfae0 Fix: EEVEE-Next: Volume closure evaluation
Uninitialized data and missing weights after d73050114b
2023-12-19 17:59:12 +01:00
Richard Antalik
e02eeaf888 Fix #115305: Sound equalizer not applied when rendering
This was caused by 5c76c7bf84, which only updated sound when tagged by
`ID_RECALC_AUDIO`. On undo or rendering, this flag is missing.

Update equalizer when recalc is flagged by `ID_RECALC_COPY_ON_WRITE`.

Pull Request: https://projects.blender.org/blender/blender/pulls/116282
2023-12-19 17:38:29 +01:00
Miguel Pozo
a2317726ca Fix: EEVEE-Next: World.has_volume()
Regression from #115284
2023-12-19 17:25:16 +01:00
Hans Goudey
a0f8a6dae8 Fix #116351: Assert in sculpt mode with no faces 2023-12-19 10:56:30 -05:00
Miguel Pozo
b6fab947d1 Fix #114168: EEVEE-Next: Viewport image render sampling
Support sample accumulation in viewport image rendering.

Pull Request: https://projects.blender.org/blender/blender/pulls/116198
2023-12-19 16:13:45 +01:00
Miguel Pozo
b1e83f8323 Draw: Reuse GPUViewport when doing viewport render animations
Allows supporting motion blur for EEVEE-Next viewport render animations.
It should also provide a slight performance improvement.

Pull Request: https://projects.blender.org/blender/blender/pulls/116199
2023-12-19 16:12:30 +01:00
Philipp Oeser
17acedf965 Cleanup: correct outdated comment 2023-12-19 15:54:32 +01:00
Jacques Lucke
5d610ad43a Fix #116308: muted nodes don't do type conversion correctly
A similar issue was fixed in the commit below for inserting implicit
conversions for links, but it wasn't corrected for conversions in
muted nodes.

Caused by e1d0d70911
2023-12-19 15:50:10 +01:00
Philipp Oeser
cc03661686 Cleanup: comment style 2023-12-19 15:47:18 +01:00
Philipp Oeser
85bf6814c7 Fix #116325: crash assigning non-valid material.paint_active_slot
Similar to 64e955f522 (but extended a bit).

Fix by preventing access of non-existent (or out of bounds)
`TexPaintSlot`.

In the future, we should probably even prevent it further by using
`RNA_def_property_int_funcs` (but that is for a later commit).

Pull Request: https://projects.blender.org/blender/blender/pulls/116345
2023-12-19 15:46:03 +01:00
Hans Goudey
7c69c8827b Mesh: Rename MLoopTri variable names, and functions
Make the naming consistent with the recent change from "loop" to
"corner". Avoid the need for a special type for these triangles by
conveying the semantics in the naming instead.

- `looptris` -> `corner_tris`
- `lt` -> `tri` (or `corner_tri` when there is less context)
- `looptri_index` -> `tri_index` (or `corner_tri_index`)
- `lt->tri[0]` -> `tri[0]`
- `Span<MLoopTri>` -> `Span<int3>`
- `looptri_faces` -> `tri_faces` (or `corner_tri_faces`)

If we followed the naming pattern of "corner_verts" and "edge_verts"
exactly, we'd probably use "tri_corners" instead. But that sounds much
worse and less intuitive to me.

I've found that by using standard vector types for this sort of data,
the commonalities with other areas become much clearer, and code ends
up being naturally more data oriented. Besides that, the consistency
is nice, and we get to mostly remove use of `DNA_meshdata_types.h`.

Pull Request: https://projects.blender.org/blender/blender/pulls/116238
2023-12-19 14:57:49 +01:00
Jeroen Bakker
3f33b06dde Fix #116229: Fix EEVEE GLitches on Legacy AMD Platforms
According to the issue not all legacy AMD platforms that required the
high quality normals workaround where enabled. I have not been able to
reproduce the issue due hardware availability.

This PR will enable the workaround for all HD ATI GPUs.

Pull Request: https://projects.blender.org/blender/blender/pulls/116340
2023-12-19 14:35:28 +01:00
Julian Plak
b85011aee0 Geometry Nodes: initial display of attribute values as text in 3d viewport
Previously, attribute values were only visualized as color overlay in the 3d viewport.
Now it's possible to optionally show the attribute values as text. This can be enabled
in the `Viewer Node` overlay settings in the 3d view.

This is just the first initial version. More work towards making it look better
will be done next.

Pull Request: https://projects.blender.org/blender/blender/pulls/115664
2023-12-19 13:30:16 +01:00
Jacques Lucke
e0aa05996f Fix: normalize option not shown in noise texture node
Caused by f7e8021b2a.
2023-12-19 12:56:37 +01:00
Philipp Oeser
820a0f7240 Fix #116239: Propagate to Shapes overwrites all vertices with mirroring
Since 4d0dbab5b1, `EDBM_verts_mirror_cache` is used to find mirror
verts (but this was initialized with `use_select` being `true`, so the
cache was only set up for selected verts). `EDBM_verts_mirror_get`
behaves in a way that if you then query a vert that does not have a true
mirror, it would always return the vert with index zero in this case (so
basically would look like the index zero vert is the mirror for verts
not covered in the cache). Now if that zero index vert happened to be
selected, verts would not be skipped and the whole mesh would be
overwritten.

To solve this, we need to initialize the `EDBM_verts_mirror_cache` with
`use_select` being `false` -- this way all verts are covered and we
always get back the true mirror (checking selection on that one is fine
then and everything behaves as expected).

Pull Request: https://projects.blender.org/blender/blender/pulls/116329
2023-12-19 12:34:56 +01:00
Clément Foucault
5e5345cd2c Fix: EEVEE-Next: Subsurface artifact on M1
This is caused by the local cache optimization.
Disabling it for now on this platform.
2023-12-19 23:42:35 +13:00
Clément Foucault
07be933218 Fix: EEVEE-Next: Undefined behavior on gbuffer load
This caused issue in the SSS setup and could
have caused other issues.
2023-12-19 23:42:35 +13:00
Clément Foucault
6f50e71029 Fix: EEVEE-Next: Workaround Load/Store broken on M1
Load/store action is broken on Metal.
2023-12-19 23:42:35 +13:00
Clément Foucault
d73050114b EEVEE-Next: Volume: Combine the volume closure nodes
instead of randomly choosing one.
This avoid noise when mixing them.
2023-12-19 23:42:35 +13:00
Sybren A. Stüvel
a3160393ee Anim: clarify description of armature.bone_collection_unassign_named
The 'named' is about the name of the bone that's being unassigned. This
was already clear from the parameters, and it's now mentioned in its
description too.

No functional changes.
2023-12-19 10:41:57 +01:00
Sybren A. Stüvel
a04bbc8a1f Anim: better check for overrides when (un)assigning bone collections
When (un)assigning bone collections, don't just check that the armature is
linked, but also check for the existence of a library override.
2023-12-19 10:41:57 +01:00
Sybren A. Stüvel
b70ebf96e7 Anim: bone collections, split ARMATURE_OT_collection_assign in two
Split the `armature.collection_assign` operator in two. Before, the
operator could do two things: assign selected bones to the active/named
bone collection, or create a new bone collection with the given name.

This is now split up, where `armature.collection_assign` only assigns to
existing bone collections, and `armature.collection_create_and_assign`
always creates a new bone collection.

This makes the purpose of each operator clearer & more predictable.
2023-12-19 10:41:57 +01:00
Campbell Barton
0ec50b56ad Extensions: add option to enable/disable an extensions repo
Note that this option isn't used from Blender, it's up to
scripts that use extensions repositories to respect the setting.
2023-12-19 18:11:17 +11:00
Campbell Barton
dfce570198 Cleanup: move extensions flag to DNA_userdef_types.h, rename flag 2023-12-19 18:11:15 +11:00
Campbell Barton
69d22a42d0 Fix #116297: Context override error passing in a window without a screen
When overriding the contexts window but not the screen, the context
override would attempt to use the current screen with the new window.

This raised an error and could crash when editing properties in the
key-map editor for the "context toggle" operator.
2023-12-19 11:09:28 +11:00
Campbell Barton
9f05144fc9 Cleanup: specify defines for enum values stored in blend-files 2023-12-19 10:19:20 +11:00
Campbell Barton
7949b68e5e Cleanup: remove unused include 2023-12-19 10:17:50 +11:00
Campbell Barton
866d092994 Cleanup: use doxygen comments for usd.h
Avoid awkwardly wrapped multi-line trailing comment.
2023-12-19 10:17:48 +11:00
Campbell Barton
482ba7806d Cleanup: spelling correction: "adjacent" & spelling in comments 2023-12-19 09:54:53 +11:00
Jacques Lucke
e51126500e Fix: compile error in debug build
Caused by 8bf73a7a97
2023-12-18 22:46:18 +01:00
Hans Goudey
4ee151e204 Cleanup: Remove unnecessary function and data in PBVH 2023-12-18 15:36:55 -05:00
Hans Goudey
8bf73a7a97 Cleanup: Tweak PBVH grid faces update retrieval
The function really just gives an index mask of all the faces in the
provided nodes. The multires usage of the function didn't need that,
since it just passed all nodes. Also pass the SubdivCCG directly rather
than the PBVH. And rename the function to make this clearer.
2023-12-18 15:29:17 -05:00
Miguel Pozo
25102af766 Fix: EEVEE-Next: Metal shader compilation
Pull Request: https://projects.blender.org/blender/blender/pulls/116310
2023-12-18 20:50:31 +01:00
Iliya Katueshenock
c106066900 Geometry Nodes: Improve Shortest Edge Paths node performance
Speedup of node Shortest Edge Paths node by creating an array for
other_edge_vert's and computing them in parallel separate loop.
This also provides better CPU cache by avoiding reading edges in main
loop to find other vertex (which happen multiple time for each vertex).

For cuboid with `700`x`700`x`700` points and `0.066667%` random
selection of `Edge Vertex` this will change `1012.4 ms` -> `618.9 ms`
the in `shortest_paths` function.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114707
2023-12-18 20:32:14 +01:00
Miguel Pozo
89ec7f5360 Fix #116031: EEVEE-Next: Nishita sky does not work
Add missing sky texture binding to the new draw manager.
2023-12-18 19:36:44 +01:00
Pratik Borhade
592c884e52 Fix #116270: Sculpt: Simplify brush crash
Crash is due to garbage value stored in `vd->cd_vert_mask_offset`
This is because `BKE_pbvh_vertex_iter_begin` is removed so `vd` became
unused/unassigned.

Pull Request: https://projects.blender.org/blender/blender/pulls/116291
2023-12-18 16:33:30 +01:00
Miguel Pozo
97785b6fbb EEVEE-Next: Irradiance Grid smooth transitions
Smooth the transition at grid bounds.

The transition size is fixed at 1 grid cell,
but it may be useful to expose a user setting for controlling this.

Pull Request: https://projects.blender.org/blender/blender/pulls/112842
2023-12-18 16:25:20 +01:00