Commit Graph

109488 Commits

Author SHA1 Message Date
Hans Goudey
040bfcee12 Cleanup: Remove unused DerivedMesh code 2024-05-20 11:52:08 -04:00
Hans Goudey
ce104c33d6 Cleanup: Move CDDerivedMesh to new legacy file
Grouping the legacy DerivedMesh code in the same place helps keep
the actively maintained code clearer and clarifies what we are hoping
to remove in the future.
2024-05-20 11:45:57 -04:00
Hans Goudey
f73f3451d9 Cleanup: Move legacy DerivedMesh code to a separate file
Move to a file with the more consistent "mesh_legacy" naming, out of the
modifier evaluation code which has nothing to do with this anymore. That
file can be renamed in a separate step.
2024-05-20 11:40:09 -04:00
Hans Goudey
19aa5b793d Cleanup: Fix const correctness of node find socket function 2024-05-20 11:16:34 -04:00
Hans Goudey
907941309b Cleanup: Remove unused node function declaration 2024-05-20 11:08:27 -04:00
Hans Goudey
5a9a04a990 Cleanup: Use StringRef for node find socket function 2024-05-20 11:08:19 -04:00
Hans Goudey
9b1c6fb04b Cleanup: Use const for edit mesh deformation arguments 2024-05-20 10:14:41 -04:00
Hans Goudey
9e019c33fc Cleanup: Remove unused logger for USD point reader 2024-05-20 10:04:55 -04:00
Hans Goudey
1efbc78b0d Cleanup: Add comment about edit mesh BMesh ownership 2024-05-20 10:00:31 -04:00
Hans Goudey
4e622fbccd Revert "UI: Remove icon usage in brush tool RNA enums"
This reverts commit fd5a790f36.

Fixes #121700
2024-05-20 09:50:28 -04:00
Hans Goudey
cdf59b7355 Refactor: Move preview image runtime data to runtime struct
Follow up for 5445fae9cf

Pull Request: https://projects.blender.org/blender/blender/pulls/122009
2024-05-20 15:24:03 +02:00
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
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
Clément Foucault
fd7b88a43b Fix: StudioLight: Alpha channel messing HDR values
Fixes #121760
2024-05-18 07:27:51 +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