Commit Graph

109161 Commits

Author SHA1 Message Date
Jacques Lucke
89a1a2cd7e Fix #121458: crash when using layout panels in operator ui
The same fix is used in e.g. `wm_block_dialog_create`.
2024-05-07 12:01:11 +02:00
Jacques Lucke
96db947f16 Geometry Nodes: show info in simulation node when it is baked
This adds the same overlay that already exists for the bake node to the simulation output node.
Without this, it's quite hard to see if the simulation zone is baked or not currently.

Pull Request: https://projects.blender.org/blender/blender/pulls/121497
2024-05-07 11:35:03 +02:00
Pratik Borhade
8d8d358196 GPv3: Replace active_layer with active_node
This was discussed in #121390 for further selection support of
layer groups.

Pull Request: https://projects.blender.org/blender/blender/pulls/121475
2024-05-07 11:26:33 +02:00
Jacques Lucke
5f02eaae9f Geometry Nodes: use aligned sockets in bake node
This aligns the corresponding input and output sockets in the Bake node.
A similar change has been done for simulation and repeat zones before in #118335.

Pull Request: https://projects.blender.org/blender/blender/pulls/121496
2024-05-07 11:23:23 +02:00
Christoph Lendenfeld
afe13175da Anim: run bezier handle calculation in parallel
Bezier handles are recalculated in many places in the
animation code. Threading that code can give a performance
boost  all over Blender.
This patch only threads a part of the handle calculation code.
`BKE_nurb_handle_smooth_fcurve` can still be run in parallel,
but that's more complicated, so not done in this PR.

Overall this patch mostly benefits code paths that are not already threaded.

------

Performance delta

| Action | Before | After |
| - | - | - |
| `recalcData_graphedit` moving a single key | 1.06 ms | 1.0 ms |
| `recalcData_graphedit` moving 300 keys of a single FCurve | 1.6 ms | 1.4 ms |
| `recalcData_graphedit` moving 300 keys of multiple FCurves | 60 ms | 55 ms |
| `ANIM_animdata_update` when using the Breakdown operator in the GE | 90 ms | 73 ms |

Test file used
https://download.blender.org/ftp/sybren/animation-rigging/heavy_mocap_test.blend

Pull Request: https://projects.blender.org/blender/blender/pulls/119388
2024-05-07 10:42:53 +02:00
Campbell Barton
7456d716f4 Fix #120811: Loop cut crash with symmetry enabled
Resolve regression introduced in [0].

[0]: 7f1b70ac50
2024-05-07 17:02:03 +10:00
Campbell Barton
aa03383838 Cleanup: resolve cppcheck funcArgNamesDifferent warnings in blenlib 2024-05-07 13:07:02 +10:00
Campbell Barton
1838499f55 Cleanup: suppress unassignedVariable warning with cppcheck
While not an error this has the minor benefit of simplifying the macro.
2024-05-07 12:59:21 +10:00
Campbell Barton
74a59076d8 Cleanup: spelling in comments, use doxy-sections 2024-05-07 12:59:13 +10:00
Campbell Barton
eda129a768 Cleanup: quiet parentheses warning 2024-05-07 12:59:12 +10:00
Iliya Katueshenock
4e3af58885 Cleanup: Avoid unnecessary copies of VArray
Cleanup to avoid unnecessary copies of VArray. This
requires ref-qualifier overloads of dereference operator
of attribute reader and some move operators and constructor
overloads in the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/118437
2024-05-07 04:02:17 +02:00
Hans Goudey
32bfe448bc Cleanup: Remove unused data-block previews function
This was added 17 years ago, and the last uses were removed
3 and 9 years ago.
2024-05-06 21:10:00 -04:00
Sean Kim
d584cdbb8a Fix #121341: Add pbvh null check when destroying attribute
This PR fixes #121341 by adding a null check for the PBVH.

Pull Request: https://projects.blender.org/blender/blender/pulls/121418
2024-05-07 00:51:48 +02:00
Iliya Katueshenock
620c9a03c0 Fix: Geometry Nodes: Matrix type in Switch node
Missed static type in Switch node for fields.

Pull Request: https://projects.blender.org/blender/blender/pulls/121450
2024-05-07 00:30:21 +02:00
Hans Goudey
88b4498b32 Cleanup: Miscellaneous cleanups to workspace status items
- Remove meaningless const for by-value arguments in declarations
- Use std::move for strings (otherwise StringRef should be used)
- Move struct to C++ namespace
- Avoid unnecessary namespace specification
- Use static constexpr instead of macros
- Add const for other arguments in function definitions
- Avoid copying struct in for loop
- Remove redundnat "private" in class
2024-05-06 18:20:43 -04:00
Harley Acheson
44606c5e4d UI: Status Bar While Menus Are Open
While menus are open display a nicer status in the Status Bar, whether
spacebar search or type to search.

Pull Request: https://projects.blender.org/blender/blender/pulls/121502
2024-05-07 00:19:01 +02:00
Harley Acheson
c4e5a70e07 UI: Optional Complex Layout for Workspace Status
Optionally allow complex layout instead of just plain text when using
ED_workspace_status_text.

Pull Request: https://projects.blender.org/blender/blender/pulls/120595
2024-05-06 23:52:37 +02:00
Sean Kim
80092fe1e0 Fix: Crash when showing all multires grid elements
This PR fixes the ternary operation to avoid indexing into a cleared
`BitGroupVector`when trying to create an `IndexMask` for a mesh
with no hidden elements.

Pull Request: https://projects.blender.org/blender/blender/pulls/121461
2024-05-06 23:04:35 +02:00
Jacques Lucke
69625494ad Cleanup: add missing includes 2024-05-06 19:52:45 +02:00
Iliya Katueshenock
968b98be56 Geometry Nodes: new Input Rotation node
This adds a new node input node for a constant rotation.
Similar nodes exist for vector, integer, boolean, etc. already.

Pull Request: https://projects.blender.org/blender/blender/pulls/120345
2024-05-06 19:04:30 +02:00
Richard Antalik
69472c88ee IMB: Cleanup timecode options
Remove options that are duplicate and change description of options, so
they describe bit better, how timecodes are actually used.

Timecodes in Blender have pretty much nothing in common with more widely
known term "timecode". This confused users (and developers).
There were 5 options of which 3 were exactly same. This commit leaves
user with 3 options:
 - Use timecodes for normal seeking/playback - Record Run
 - Ensure, that no frame is duplicated or skipped - "Record Run No Gaps"
 - Do not use timecodes - "None"

More verbose description was added to the definition in code.

Naming of these timecode types was kept, even if it is incorrect to not
break scripts and habits.

Pull Request: https://projects.blender.org/blender/blender/pulls/121001
2024-05-06 17:56:56 +02:00
Guillermo Venegas
89c1f7e0c3 IO: Use file handler in space VSE
Uses `FileHandlers` to handle file drag-n-drop in the space Sequencer, drop-boxes
still remain since they handle Images ID drag-n-drop.

This also allows to open/drag-n-drop multiple files at once.

When drag-and-drop is performed with a single image/movie/sound
file and only the internal `FileHandler` can be used, is used
the internal drop-box api for drag and drop, since it has a nice
drag-and-drop preview.

Pull Request: https://projects.blender.org/blender/blender/pulls/119927
2024-05-06 17:44:50 +02:00
Raul Fernandez
27c1618c5d Fix #94631: Multires: Duplicating objects sets the viewport level to sculpt level
Fixes duplicating objects sets the viewport level to sculpt level.

Self explanatory fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/121429
2024-05-06 17:34:52 +02:00
Iliya Katueshenock
8249c09f3a Geometry Nodes: add implicit input for Instance Transform
`instance_transform` is the basic transformation attribute of instances.
This will be used in separate patches.

Pull Request: https://projects.blender.org/blender/blender/pulls/120340
2024-05-06 17:22:24 +02:00
Julian Eisel
05e9d95e52 Fix 121488: Crash when splitting editor with asset shelf open
Mistake in a6ebfb05ad, enabled catalog list shouldn't be free'd, it just
needs to be overridden by the duplicated list correctly. Earlier a clear
(but not a free) was necessary, but now it's overridden anyway so no
clearing is needed.
2024-05-06 17:08:38 +02:00
Jeroen Bakker
c99e7519c4 Fix #120919: EEVEE-Next: Intel UHD support for probe remapping.
Windows/Intel UHD 600 iGPUs crash when compiling probe remapping shader.
The cause is that there is a balanced barrier inside a forloop. When removing
the barrier the compilation works. This is a driver bug and most likely not
being solved as the driver maintenance mode will only be updated for critical
fixes.

This PR works around the issue making the loop condition less complex.

Pull Request: https://projects.blender.org/blender/blender/pulls/121105
2024-05-06 17:02:46 +02:00
Jeroen Bakker
9d07f6d5a0 EEVEE-Next: Fix motion blur large geom on iGPU HD520 devices
Detected when testing mr_elephant on an Intel HD520. When copying
the velocity buffer using the copy shader, the number of scheduled
workgroups could be larger than supported by the device.

This PR fixes this by copying multiple vertices per thread when
the work size cannot cover all the pixels.

Pull Request: https://projects.blender.org/blender/blender/pulls/120915
2024-05-06 17:02:23 +02:00
Jeroen Bakker
c50a0f6478 Cleanup: Framebuffer tests expect parameter order
Framebuffer tests use incorrect order of parameters, which lead to messages
misinforming the developer.

Pull Request: https://projects.blender.org/blender/blender/pulls/121481
2024-05-06 16:19:52 +02:00
Jacques Lucke
dca2faec33 Geometry Nodes: fix typo in Invert Matrix node
Also changing the identifier because this node is only just out of
experimental and has not been released yet.
2024-05-06 16:19:15 +02:00
Jacques Lucke
2a765858d8 Cleanup: quiet warning 2024-05-06 15:45:18 +02:00
Jeroen Bakker
62b871d572 Fix #121467: EEVEE-Next: Write varying interfaces in world shader
Intel drivers on Windows platform require all varying interface data
to be written to in the previous stage.

It was detected that the world shader didn't do that as the interface
contains data used for regular objects.

There are several ways how this could be solved:
- Change nodes to use a different path for world materials.
- Include of the draw_model_lib/common_view_lib
- set the failing interface directly.

I chose to set the failing interface directly but I am fine to include
any missing library.

Pull Request: https://projects.blender.org/blender/blender/pulls/121477
2024-05-06 14:58:39 +02:00
Jeroen Bakker
d2d1311023 OpenGL: Disable multi texture binding on Windows with Intel GPUs
Multiple generations of Intel GPU have the same issue where multi
texture binding results in invalid operations where the driver
reports that the internal texture format isn't supported.

Previously this was only enabled for UHD devices, but this PR
enables it for any Intel GPU. It was detected to be faulty on
UHD600 and Iris.

Pull Request: https://projects.blender.org/blender/blender/pulls/121479
2024-05-06 14:57:25 +02:00
Hallam Roberts
ab664ad5a2 Modeling: Pixel perfect Suzanne UV map
Fix issues with misaligned and non-symmetric UVs.

Partially based on blend file provided by Kickair 8p.

Pull Request: https://projects.blender.org/blender/blender/pulls/121422
2024-05-06 14:51:23 +02:00
Omar Emara
73aea76202 Fix: Map UV and Displace nodes produce wrong outputs
The Map UV and Displace nodes produce unexpected outputs. That's because
the derivatives computed for anisotropic filter were computed in the
sampler's space, while it should be in texel space, as expected bu the
textureGrad function.
2024-05-06 15:26:20 +03:00
Sietse Brouwer
c4405f61d5 Fix: GPv3: Crash when duplicating frames
In larger scenes Blender could crash when duplicating frames in GPv3.
This was caused by a dangling reference in `insert_duplicate_frame`.
The source frame could become invalid when the frames map was
reallocated due to `layer.add_frame(dst_frame_number, ...)` a few lines
later in the code.
The fix replaces the reference and assigns by value.

Pull Request: https://projects.blender.org/blender/blender/pulls/121414
2024-05-06 14:21:04 +02:00
Lukas Tönne
fe6c1f4659 Fix #121353: GPv3: Reset shading group pointers for polling in overlays
Grease Pencil overlay drawing code uses the existence of shading groups
to determine which parts of the overlay need to be drawn. If the tool
settings change the shading groups need to be set to null, otherwise
the drawing code will still draw points in curve selection mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/121472
2024-05-06 13:25:34 +02:00
Brecht Van Lommel
50ee7229c5 Fix #121345: View layer denoising versioning don't apply correctly
Thanks Philipp for help investiging the problem.

Ref #121389
2024-05-06 12:47:31 +02:00
Omar Emara
7f222d0fe2 Fix #121305: Corner Pin node returns single color
The Corner Pin node as well as the Plane Track Deform nodes always
return a single color that appears to be the average of the input.
That's because the derivatives were computed in the sampler's space,
while they should be in texel space. Large derivatives meant that the
textureGrad function would always sample the lowest MIP level, hence the
constant average color.

This might be an issue with other uses of textureGrad in the compositor,
so their use should be investigated.
2024-05-06 13:36:03 +03:00
Pratik Borhade
db33ee0ba7 Cleanup: Typo in GPv3 primitive enum class and function
Rename `model` to `modal`.

Pull Request: https://projects.blender.org/blender/blender/pulls/121470
2024-05-06 11:42:50 +02:00
Omar Emara
9a3c7290a9 Fix #121447: Simple Blur node takes too long
The Blur node takes too long to execute even though it is in a simple
configuration. That's because the CPU compositor uses variable size
blurring even if the size is constant. So ensure the input size is
actually variable before using variable size blurring.
2024-05-06 10:46:05 +03:00
Campbell Barton
0fedcc2f3c Cleanup: correct invalid use of "r_" prefixed return arguments
These arguments are modified in-place and aren't output-only variables.
2024-05-06 11:58:44 +10:00
Campbell Barton
3b00f11161 Cleanup: remove unused Collada functions 2024-05-06 11:43:12 +10:00
Campbell Barton
e153758318 Cleanup: remove optional draw flipping argument
Always use take a boolean array instead of checking for null.
2024-05-06 11:28:47 +10:00
Campbell Barton
27fe72cf0d Cleanup: use angle brackets for system include 2024-05-06 11:28:10 +10:00
Campbell Barton
ab6e00bd7d Cleanup: sort cmake file lists 2024-05-06 09:20:57 +10:00
Campbell Barton
948dc29dd8 Cleanup: order return arguments last 2024-05-06 09:20:06 +10:00
Campbell Barton
c5ad937f53 Cleanup: match argument names in function & declaration 2024-05-06 09:20:05 +10:00
Campbell Barton
bb172dae61 Cleanup: use const variables & arguments 2024-05-06 09:20:03 +10:00
Harley Acheson
8735a8a6be UI: Different Warning for Revert if Unsaved Images
Change to the confirmation when reverting the current blend file to
include a specific warning if there are unsaved images.

Pull Request: https://projects.blender.org/blender/blender/pulls/121288
2024-05-05 19:31:20 +02:00
Jacques Lucke
18600e430c Geometry Nodes: show correct type in menu socket tooltips
Previously, menu sockets were sometimes shown as integers or strings
in socket tooltips. Now, they are always shown as "Menu" type. This also
changes how these values are logged. Previously, they were logged as
strings. Now, only the integer identifier is logged and the name is looked
up when drawing the tooltip.

Pull Request: https://projects.blender.org/blender/blender/pulls/121236
2024-05-05 09:30:02 +02:00