Commit Graph

136247 Commits

Author SHA1 Message Date
Hans Goudey
5445fae9cf Refactor: Use more standard storage for PreviewImage runtime data
Using a non-virtual derived struct for polymorphism is error prone,
especially combined with the requirements of DNA. Instead, use a
separately allocated runtime struct as done for many other DNA structs.

In a followup commit, the remaining runtime members of `PreviewImage`
could be moved to the new runtime struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/121509
2024-05-20 14:25:44 +02:00
Omar Emara
434ad164a8 Fix #121940: Viewport compositor works on part of render
The Viewport Compositor only operates on part of the render when doing
viewport rendering when in camera view. That's because the code wrongly
assumed camera offset even when doing viewport renders, which do not
exist in that case.
2024-05-20 14:27:31 +03:00
Habib Gahbiche
a241790e8f Fix image viewer sampler does not consider image offset
When viewer image is drawn with offset (because of translation in compositor), the sampler doesn't consider the offset, resulting in wrong sampled values

Pull Request: https://projects.blender.org/blender/blender/pulls/121992
2024-05-20 10:56:12 +02:00
Hans Goudey
70b008d18d Cleanup: Fix header location of color attribute fill function
The function was declared in a BKE header but defined in
the sculpt_paint editors module. Move it to the slightly-less
arbitrary ED_sculpt.hh header instead.
2024-05-19 23:28:50 -04:00
Hans Goudey
5687072223 Cleanup: Sculpt: Use return values, C++ types 2024-05-19 23:28:50 -04:00
Hans Goudey
a72dbea01a Cleanup: Sculpt: Use return values for neighbor averaging functions 2024-05-19 23:28:50 -04:00
Hans Goudey
c7feda34ab Cleanup: Private member naming in PaintingKernel 2024-05-19 23:28:50 -04:00
Campbell Barton
e0b043d076 Cleanup: minor changes to the splash "Quick Setup"
No functional changes.

- Remove unnecessary variable declarations.
- Declare wm & prefs at the function beginning
  to prevent noisy patches in case they're used elsewhere in the future.
- Correct invalid comment.
2024-05-20 12:51:20 +10:00
Hans Goudey
85e5f38279 Cleanup: Use lambda instead of simple callback
Pull Request: https://projects.blender.org/blender/blender/pulls/121980
2024-05-20 02:58:15 +02:00
Hans Goudey
0ef1541834 Cleanup: Use C++ arrays in mesh batch cache 2024-05-20 02:58:13 +02:00
Hans Goudey
da32aeb455 Cleanup: Use C++ types for various mesh array arguments
Also remove duplicated code for creating an array of BMesh positions
2024-05-20 02:58:13 +02:00
Hans Goudey
e916cd5d69 Mesh: Simplify triangle draw extraction slightly
- Don't store triangulation or triangle face indices in MeshRenderData.
  This makes more automatic use of the lazy calculation and saves the
  calculation of the face indices in some cases.
- Don't use the "extractor" abstraction for the triangle index buffer.
  This is part of the ongoing transition described by #116901.
- Pass the "face sorted" data directly to the triangle index buffer
  creation. That's the only place that needs it. This makes the
  dependencies more explicit and might make better use of CPU cache.
2024-05-20 02:58:13 +02:00
Hans Goudey
3f6217c208 Cleanup: Sculpt: Use const and references
Just a general propagation of const and references, mainly for
`Object` and `SculptSession` variables, but also others.

Pull Request: https://projects.blender.org/blender/blender/pulls/121993
2024-05-20 02:56:25 +02:00
Campbell Barton
669fad29e9 Cleanup: clarify doc-strings for BLI_fftw
Reserve comments immediately before the function for doc-strings in
the header. Otherwise both are candidates as doc-strings.
2024-05-20 10:29:22 +10:00
Campbell Barton
d8a05e20a0 Cleanup: resolve missing declaration warnings 2024-05-20 10:25:31 +10:00
Campbell Barton
096eed9d7f Cleanup: spelling in comments 2024-05-20 10:23:54 +10:00
Campbell Barton
db617bc07b Cleanup: quiet warning mixing int/enum 2024-05-20 10:13:20 +10:00
Campbell Barton
72627a9d84 CMake: correct GCC's template-id-cdtor warning being suppressed 2024-05-20 10:10:55 +10:00
Iliya Katueshenock
14233be92f Nodes: hide reroute input socket in sidebar
The same as d27a1c47fa. Reroute node is
value-less and there is no actual value of input socket that should be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/121150
2024-05-19 21:35:10 +02:00
Vitaljok
7d5cd60023 EEVEE-Next: adding framebuffer viewport reset to Film
Fix #121782

`GPencil` engine renders on the whole framebuffer.
If `Render region` is used, the result of GP rendering is scaled from whole
framebuffer down to the selected region.

The fix adds framebuffer viewport reset after rendering.
This resolves the problem for downstream consumers of
the framebuffer (e.g. `GPencil`).

The final result is somewhat similar to the `EEVEE Legacy`.
Now `EEVEE` rendering is done in the selected region, while `GPencil`
is rendered on whole viewport as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/121979
2024-05-19 19:02:02 +02:00
Clément Foucault
5a83346b47 Fix: EEVEE-Next: Broken Shader compilation 2024-05-19 16:58:40 +02:00
Jacques Lucke
d1782f13c8 Nodes: show extra info tooltip when hovering over text
Previously, the tooltip was only shown when hovering over the icon.
2024-05-19 14:41:28 +02:00
Clément Foucault
71d5e49db8 Fix: EEVEE-Next: Nvidia shader compilation error
Fix #121968
2024-05-19 13:52:50 +02:00
Jacques Lucke
77d6d7e502 Cleanup: improve naming of node link flag 2024-05-19 13:19:36 +02:00
Harley Acheson
24873963a6 BLF: String length to cursor position, not INT_MAX
BLF_str_offset_from_cursor_position is being called with a str_len of
INT_MAX, so max buffer size instead of string length. This works fine
right now but will not when this gets more complex. For example if we
need to call functions like BLI_str_cursor_step_next_utf8, which
assumes that str_len is the actual end of the string.

Pull Request: https://projects.blender.org/blender/blender/pulls/121966
2024-05-19 05:53:56 +02:00
Sean Kim
99505b58e9 Cleanup: Remove unncessary prefixes in sculpt_face_set.cc
* Removes unnecessary `sculpt_face_set` prefixes
* Reorganizes some methods

Pull Request: https://projects.blender.org/blender/blender/pulls/121895
2024-05-18 22:18:43 +02:00
Clément Foucault
ba147831a4 Fix: EEVEE-Next: Remove uneeeded dependencies
This fix some missing binding errors.
2024-05-18 19:28:23 +02:00
Clément Foucault
46a61f795e Fix: EEVEE: Shadow: Assert when saving file 2024-05-18 19:17:42 +02:00
Clément Foucault
6a0fb5c35f Fix: EEVEE-Next: Shadow: Clip Rays inside the light shape
This fix the noise issue caused by shadow tracing.
2024-05-18 18:01:24 +02:00
Clément Foucault
e0b3dee35a EEVEE-Next: Jittered Soft Shadows
Jittered Soft Shadows support.
Improves soft shadow quality at the cost of re-rendering shadow maps every sample.
Disabled by default in the viewport unless enabled in the Scene settings.

| Tracing-only | Jitter-only | Jitter+Over-blur |
| --- | --- | --- |
| ![imagen](/attachments/e5ca6120-0666-4e86-b6e0-3d7512587b86) | ![imagen](/attachments/a72631aa-14f8-4e10-a748-848fc4bd4ab2) | ![imagen](/attachments/07c5de65-61d2-48e7-b78c-9c3cbdcaf844) |

Tracing-only is the method used by default in EEVEE-Next.
Jitter-only is the method used by EEVEE-Legacy Soft Shadows.
Jitter+Over-blur combines both.

Co-authored by Miguel Pozo @pragma37 (initial patch #119753)

Pull Request: https://projects.blender.org/blender/blender/pulls/121836
2024-05-18 17:21:47 +02:00
Aras Pranckevicius
e7801e0d07 Fix #121935: VSE text outline artifacts while tweaking parameters
Code was wrongly using non-initialized arrays of JFA intermediate
steps. Make sure to initialize them to invalid JFA coordinate.
2024-05-18 18:00:58 +03:00
Jacques Lucke
861cb8622d Geometry Nodes: change Location to Translation in Combine/Separate Transform nodes
Based on the context, both names can make sense, however "translation"
seems to be the more correct term and general here.

Pull Request: https://projects.blender.org/blender/blender/pulls/121656
2024-05-18 15:48:04 +02:00
Sean Kim
e987c2f146 BLI: add count to ScopedTimerAveraged
This PR adds one more stat to `ScopedTimerAveraged` for quick timing checks:
the total number of samples.

Sample output:
```
Timer 'vert_hide_update': (Average: 45.93 ms, Min: 45.93 ms, Last: 45.93 ms, Samples: 1)
```

Pull Request: https://projects.blender.org/blender/blender/pulls/121638
2024-05-18 15:41:12 +02:00
Clément Foucault
e16a0b869b Cleanup: Metal: Use MTLContext::get() instead of static casts 2024-05-18 14:43:45 +02:00
Habib Gahbiche
567012ef1d Fix cursor remains visibile in sequencer editor while panning and zooming
Cursor is already set to invisible by the gizmo in `WIDGETGROUP_navigate_setup()`. Setting the cursor visibility again in the operator overwrites the desired behavior of gizmos.

Pull Request: https://projects.blender.org/blender/blender/pulls/121927
2024-05-18 12:46:38 +02:00
YimingWu
484a031ec5 Fix #121851: LineArt: Intersection mixed type chaining logic fix
Previously there's a chance that if some intersection lines are chained
together, the chain type could become contour. That is an unexpected
behaviour. Now fixed.
2024-05-18 16:14:19 +08:00
YimingWu
82237e2f69 Fix #121850: GPv3: LineArt: Do not overwrite previous modivier result
The way line art writes to GPv3 is changed to use new CurvesGeometry,
but it didn't join newly created strokes with existing ones so the
output result was only from the last line art modifier. Now fixed.
2024-05-18 15:53:06 +08:00
Julien Duroure
20d8f48500 glTF exporter: Allow custom attribute UVMap to be on point domain
Fixes the root cause of #121204
2024-05-18 08:54:35 +02:00
Campbell Barton
e0b47f78e8 Extensions: show permissions, validate permission values 2024-05-18 16:52:21 +10:00
Julien Duroure
876bfdcbdf glTF exporter: Fix #121878 crash when exporting without animation 2024-05-18 08:50:21 +02:00
Clément Foucault
fd7b88a43b Fix: StudioLight: Alpha channel messing HDR values
Fixes #121760
2024-05-18 07:27:51 +02:00
Julien Duroure
733bd00432 glTF exporter: fix typo in Vertex Color Alpha management 2024-05-18 07:00:58 +02:00
Harley Acheson
ba36c69c9f Refactor: Add BLF Function to determine input selection boxes
Add a separate function that calculates text selection box positioning
given a string's selection start and end offsets. Moves this to a
better place and allows to have more complex boxes in future when we
might have multi-line and/or multi-directional text input.

Pull Request: https://projects.blender.org/blender/blender/pulls/121448
2024-05-18 00:13:32 +02:00
Sean Kim
31560ca26a Cleanup: Shorten & cleanup names in paint_mask.cc
* Removes unncessary prefixes
* Adds doxygen sections
* Converts a single class to enum class and renames values

Pull Request: https://projects.blender.org/blender/blender/pulls/121896
2024-05-17 18:47:28 +02:00
Lalit Shankar Chowdhury
1456dafa27 Windows: Use COM smart pointers in WASAPI plugin
Use COM smart pointer (`ComPtr`) to simplify memory management in WASAPI driver.

This reduces chances of calling `Release()` when a COM object has not been allocated.

Pull Request: https://projects.blender.org/blender/blender/pulls/121828
2024-05-17 17:00:40 +02:00
Bastien Montagne
e30893e3c2 Fix #121410: Break liboverride hierarchies on Scene IDs.
This commit prevents considering Scenes (and a few other ID types, like
WindowManager or Library) as being part of liboverride hierarchies.

Having collections, objects, obdata etc. depend on a Scene ID is
typically not considered as a valid setup for linked data.

And in any case, Scenes are not officially supported for liboverrides
currently.

In the case of #121410, where a driver of the armature object was using
the Scene ID, it will simply keep that scene reference pointing to the
linked scene, instead of overriding the whole scene.
2024-05-17 16:05:55 +02:00
Bastien Montagne
e85ef6add2 LibOverride: Refactor: de-duplicate 'is part of the hierarchy' checks.
Code checking whether an ID should be considered as part of the
currently processed liboverride hierarchy or not was very similar all
over the liboverride code.

It is now deduplicated into two util functions, which helps ensuring
coherence in these checks, and future potential changes in this
filtering process.

NOTE: While no pratical changes are expected form user PoV with this
refactor, technically it does modifies the behavior in some cases (added
checks).
2024-05-17 16:05:55 +02:00
Bastien Montagne
f6441bdd92 Fix #121410: Prevent diffing of Scene's tool settings.
This is a bit of a hack hammer to solve a specific issue, but it is not
really clear to my currently why some of these tool settings get
invalid data.

On the other end, not sure that it would make any sense to consider
these 'runtime' data for liboverrides anyway.
2024-05-17 16:05:55 +02:00
Nathan Vegdahl
98b0bfa9e7 Refactor: make yet more fcurve evaluation functions take const fcurves
This follows on after #121788.

Pull Request: https://projects.blender.org/blender/blender/pulls/121882
2024-05-17 15:56:57 +02:00
Clément Foucault
0a8a11cc9a EEVEE-Next: Shadow: Remove uneeded -1 bias
The -1 bias was counteracted by the ceil.
Remove both
2024-05-17 15:50:07 +02:00