Commit Graph

139992 Commits

Author SHA1 Message Date
Sean Kim
cab4d6f724 Refactor: Restructure sculpt shape key updates
Pull Request: https://projects.blender.org/blender/blender/pulls/126161
2024-08-12 18:25:45 +02:00
Clément Foucault
fd7c884aef Fix: Overlay-Next: Crash on scene without active object 2024-08-12 17:24:00 +02:00
Clément Foucault
461bd0a477 Fix: Overlay-Next: Incorrect overlay_fb_draw lambda 2024-08-12 17:20:31 +02:00
Sean Kim
64211aa8c6 Sculpt: Add polyline gesture submit on double click
Originally, the polyline gesture tools were intended to have the gesture
submit on clicking on the starting point and pressing enter only. It was
brought up that the knife tool which has similar behavior also exposes
this on double clicking. To better align expected behavior across tools,
this commit adds similar functionality for the polyline tools.

Implements #125249

Pull Request: https://projects.blender.org/blender/blender/pulls/125391
2024-08-12 17:06:25 +02:00
Anthony Roberts
9576576039 Windows: Enable clang-cl for ARM64
This gets Windows ARM64 to compile with clang-cl, which gives up to 40% performance improvements in certain scenes rendered with cycles, compared to MSVC.

This is all tested using LLVM 18.1.8 and a VS2022 `vcvarsall` window.

Subsequent PRs with various lib version updates, etc to go in at a later point.

Pull Request: https://projects.blender.org/blender/blender/pulls/124182
2024-08-12 16:50:07 +02:00
Michael Kowalski
f30689e12c Fix: USD instancing export errors
Fixed two errors when exporting to USD with Instancing enabled:

Ensuring the mesh prototype prim exists before referencing it to
avoid the "Unresolved reference prim path" error messages in the
console.

Adding the Root Prim path prefix to the prototype reference path.

Pull Request: https://projects.blender.org/blender/blender/pulls/126210
2024-08-12 16:35:51 +02:00
Dalai Felinto
4b726b41b9 Outliner: Expand Geometry Nodes Modifier to show the data-block
This allow users to create a Geometry Nodes Asset directly from the Outliner.

---

Pull Request: https://projects.blender.org/blender/blender/pulls/126103
2024-08-12 15:59:09 +02:00
Hans Goudey
be53bd079f Cleanup: Formatting 2024-08-12 09:47:02 -04:00
Hans Goudey
3d7c9a7a0b Cleanup: Sculpt: Remove unnecessary BMesh function call
This code path doesn't support BMesh which is the only
case this does anything anyway.
2024-08-12 09:45:47 -04:00
Hans Goudey
005cc72bda Cleanup: Sculpt: Remove outdated comment
The "vertex iterators" have been removed.
2024-08-12 09:45:47 -04:00
Clément Foucault
c42380c633 Overlay-Next: Outline
Straightforward port.

Only the dupli object optimization and the resource handle
deduplication are left as todos.

Marked areas that are against design to be fixed.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/126152
2024-08-12 15:29:20 +02:00
Laurynas Duburas
1c70e07af5 Overlay-Next: Facing
Overlay-Next version of facing.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/126153
2024-08-12 15:17:54 +02:00
Lukas Stockner
d8f550875b Fix #124038: Performance issue with color sampling in 3D Viewport
The issue here is that copying the GPU viewport back to the CPU is an expensive
operation, so doing it for every frame when dragging the eyedropper is not ideal.

Instead, copy it once at the start and keep reading from it until the user
releases the eyedropper.

Pull Request: https://projects.blender.org/blender/blender/pulls/126072
2024-08-12 14:52:28 +02:00
Sergey Sharybin
49d2184fca Cleanup: Unused variable 2024-08-12 14:14:01 +02:00
Andrej730
74c796e057 UI: Add property description for show hidden objects operator
Clarify `selection` property with description.

Pull Request: https://projects.blender.org/blender/blender/pulls/126221
2024-08-12 13:32:01 +02:00
Pratik Borhade
c89b878371 GPv3: Sculpt context menu
Similar to GP legacy context menu of sculpt mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/126135
2024-08-12 13:05:13 +02:00
Bastien Montagne
473456323f I18N: Extraction tools: Add timeout to async multi-processing.
Once in a while these get (dead)locked for some reason, at least avoid
having to kill the whole Blender then.
2024-08-12 13:00:46 +02:00
Bastien Montagne
9b6c1f7926 I18N: Updated UI translations from git/weblate repository (494a849e744ff5). 2024-08-12 11:51:27 +02:00
Jesse Yurkovich
cb9ca2f7a7 Fix: USD: Write vertex crease data correctly and add tests
While adding test coverage for mesh subdivision surface scenarios, a few
problems were noticed with vertex crease support.

This PR fixes:
- Used incorrect `crease_sharpnesses` instead of `corner_sharpnesses`
- Used incorrect value for an "infinitely sharp" vertex crease
- Unnecessarily wrote out Blender's `crease_vert` attribute as a primvar

Tests are added which validate everything we support.

Pull Request: https://projects.blender.org/blender/blender/pulls/126209
2024-08-12 01:50:34 +02:00
Jesse Yurkovich
56779c7bb0 Fix: USD: Ensure mesh velocity data is written sparsely and add tests
The mesh velocity data was not using the UsdUtilsSparseValueWriter and
was writing out data for all frames even if the velocity didn't change.

Adds test coverage for this scenario as well as other situations where a
MeshSequenceCache (MSC) would be required:
- Ensures that when positions vary a MSC is added
- Ensures that when velocities vary a MSC is added (see blender/blender@c862d40e09)
- Ensures that when attributes vary a MSC is added (see blender/blender@3c394d39f2)

Pull Request: https://projects.blender.org/blender/blender/pulls/126208
2024-08-11 23:36:40 +02:00
Jesse Yurkovich
b2f65b9bcb USD: Add additional attribute and sub-d test files 2024-08-11 13:40:30 -07:00
Jesse Yurkovich
2dcf3467ce USD: Add tests for additional light setups
Adds test coverage for a few, minor, missing cases for USD Light export:
- Spot lights with the special case of a 0 radius
- Area lights of type SQUARE (RECTANGLE was already tested)
- Area lights of type ELLIPSE (DISK was already tested)

Pull Request: https://projects.blender.org/blender/blender/pulls/126203
2024-08-11 20:29:14 +02:00
Harley Acheson
cd998d392d UI: Color Icon Theme Internal Parts
Allow color SVG icons to have their fill colors modified by theme
colors using a callback. This is done just before rasterization so
only happens once per requested size, before these are cached for
reuse.

Pull Request: https://projects.blender.org/blender/blender/pulls/125146
2024-08-11 20:10:32 +02:00
Jacques Lucke
e842966c5e Nodes: add group node default width
This adds the ability to customize the default width of a group node that's
created for a node group. This feature works towards the goal of unifying the
features available to built-in nodes and node groups. We often customize the
width of built-in nodes from them to looks slightly better (e.g. to avoid
cut-off labels).

Pull Request: https://projects.blender.org/blender/blender/pulls/126054
2024-08-11 19:25:53 +02:00
Harley Acheson
30038f1710 UI: Allow BLF_svg_icon_bitmap to Optionally Get Multicolor Bitmap
When we draw SVG icons we have an optional argument that specifies to
treat it as multicolor. This PR allows doing the same thing when
requesting a bitmap from an icon. This is only currently done for
Dialog boxes and the About screen. The purpose of this isn't really
to allow multicolor dialog icons, but to get to the point where a
single SVG source file could be used as monochrome (changing the one
color with text color) or multi-color (changing internal colors with
themes) without needing multiple copies of the source file

Pull Request: https://projects.blender.org/blender/blender/pulls/126193
2024-08-11 05:07:35 +02:00
Harley Acheson
c3377a3498 UI: Improved Gray scale Values for Rendered SVG Bitmaps
This PR corrects some mistakes in the conversion between RGBA bitmaps
created when rasterizing SVG icons and the monochrome coverage maps
when displaying these in a single color. This only occurs when we need
a bitmap from an icon for About screen and for dialogs. The bitmap
from NanoSVG is already premultiplied so don't do it again.  When
converting from coverage map to RGBA use map value for all components
rather than FFF for colors. When converting to coverage map from RGBA
use perceptual grayscale level of color, not just alpha value.

Pull Request: https://projects.blender.org/blender/blender/pulls/126192
2024-08-11 03:12:20 +02:00
Bastien Montagne
1c98cdbc52 Refactor: UI_list: Move PointerRNA containers to C++ code.
Essentially replace a C-managed allocated array by a `blender::Vector`.

Part of on-going effort to make PointerRNA an actual non-trivial C++
struct (see !123435 and #122431).

Pull Request: https://projects.blender.org/blender/blender/pulls/126100
2024-08-10 17:51:41 +02:00
Bastien Montagne
7d52265771 Fix several issues with i18n tools on non-linux platforms.
- Paths of C++-parsed files were not properly 'unixified' on Windows.
  This was bad both for changes noisyness in PO files, and broke on
  the un-escaping of `\n` and `\t` sequences.
- The `ProcessPoolExecutor` starts sub-processes differently on Linux
  than on Windows or OSX. While Linux's `fork` keeps the same
  environment (i.e. all Blender stuff remains available in workers
  subprocesses), the 'spawn' used on Windows (and reportedly OSX) starts
  a new bare python interpreter. This means that code executed by these
  needs to be Blender-agnostic to be portable.

The only thing that is currently known broken on non-Linux platforms is
the RTL processing of some languages like Arabic or Hebrew.
2024-08-10 17:35:28 +02:00
Clément FOUCAULT
1c1af5383b Overlay-Next: Enable prepass only if selection and xray are off 2024-08-10 10:44:27 +02:00
Jesse Yurkovich
ef2e1f8423 Fix #126160: Incorrect string returned from usd::make_safe_name
When a multi-byte character needed to be turned into a single "_", the
final returned string would be too large in size.

Resize it to the exact number of bytes required and add test coverage.

Pull Request: https://projects.blender.org/blender/blender/pulls/126164
2024-08-10 05:59:05 +02:00
Campbell Barton
7e80bfaa62 Cleanup: follow naming convention for source lists
The cmake checking utility uses this to know which lists should be
scanned for souces.
2024-08-10 11:32:46 +10:00
Campbell Barton
2a7c5d692b Cleanup: exclude /lib/ from cmake checks 2024-08-10 11:32:45 +10:00
Campbell Barton
b1be5b15c4 Cleanup: various non functional changes
Remove struct, use string copy macros.
2024-08-10 11:32:43 +10:00
Campbell Barton
0bc5b3f70e Cleanup: remove redundant checks 2024-08-10 11:32:42 +10:00
Campbell Barton
34d12ab33a Cleanup: consistent naming for icon/icon_id 2024-08-10 11:32:40 +10:00
Campbell Barton
06df1dab8b Cleanup: use const args & vars 2024-08-10 11:32:39 +10:00
Campbell Barton
fe3c6ef448 Cleanup: spelling in comments 2024-08-10 11:32:37 +10:00
Sean Kim
52a0d4252e Refactor: Sculpt: Create per-pbvh topology automasking initialization
Pull Request: https://projects.blender.org/blender/blender/pulls/126110
2024-08-10 02:15:41 +02:00
Hans Goudey
12aa569f6e Cleanup: Remove now unused PBVH vertex iteration macro
Part of #118145.
2024-08-09 17:33:04 -04:00
Hans Goudey
391ebb603c Sculpt: Refactor for pose brush factors creation
Part of #118145.
2024-08-09 17:33:04 -04:00
Sean Kim
810fee35f3 Fix #126074: Sculping on a non-basis shape key modifies mesh
This commit prevents writing to the mesh when sculpting on a non-basis
shape key. Prior to this, we incorrectly were applying changes to the
base mesh, even though those changes were not visible with the shape
keys still active, causing new shape keys to have a copy of the deformed
mesh data.

Pull Request: https://projects.blender.org/blender/blender/pulls/126107
2024-08-09 22:34:25 +02:00
Hans Goudey
ae13fb5a53 Refactor: Sculpt: Various cleanups in relax brush
- Use `Vector::remove_if` rather than custom "filter" functions copying
  data to new vectors.
- Pass `float3` by const reference.
- Reorder arguments to pass constant/operation-global arguments first,
  also using consistent order for mesh data arrays.
- Use const for some `Object` arguments.
- Initialize zero `float3` in a simpler way.
- Simplify neighbor averaging by checking for empty vectors first.
- Use more standard grids index variable names
- Remove `BLI_NOINLINE` from functions called for every element, more
  consistent usage in general.

Pull Request: https://projects.blender.org/blender/blender/pulls/126145
2024-08-09 21:37:58 +02:00
Philipp Oeser
3e5751c726 Fix: Animation Editors Dopesheet RNA paths incomplete/wrong
Somewhat similar to !125365, !126035 and !125963 (but more specialized
for Dopesheet), this PR adds the missing "areas[x].spaces[x]" subpath to
an Animation Editor (Graph, Dopesheet, NLA) `Dopesheet` struct and its
properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/126132
2024-08-09 20:00:15 +02:00
Hans Goudey
4349d6b766 Fix #126101: Crash with lines generated by geometry nodes grid node
The grid geometry creation incorrectly tagged the mesh with no loose edges
or vertices, breaking invariants of the caches that are relied on elsewhere.
2024-08-09 13:49:06 -04:00
Jesse Yurkovich
3c394d39f2 Fix: USD: Write sparse attribute data correctly
The common code which writes out attribute data was seemingly not
performing the right sequence of calls for the UsdUtilsSparseValueWriter
to actually write sparse data.

See PR for a test file and .usda files produced with 4.1 and now with
this change applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/126113
2024-08-09 19:48:52 +02:00
Jesse Yurkovich
5835ea1eaf Build: C++20: Properly implement some definitions of operator==
Several `operator==` methods were mis-implemented; they were not defined
as `const` when implemented as part of the class rather than as friends.
C++20 is more strict about this now.

Example errors: https://godbolt.org/z/h8G5jaoha

Ref #125881

Pull Request: https://projects.blender.org/blender/blender/pulls/126121
2024-08-09 19:48:05 +02:00
Jesse Yurkovich
67eef274ee Build: C++20: Replace the removed std::shared_ptr::unique API
C++20 removes the `std::shared_ptr::unique()` API with the suggestion to
use the `use_count()` method instead.

Note that we are using the unique/use_count APIs in a way that is
generally cautioned against though our usage patterns may be fine.

See: https://en.cppreference.com/w/cpp/memory/shared_ptr/unique
Example errors: https://godbolt.org/z/1j3zzd1hP

Ref #125881

Pull Request: https://projects.blender.org/blender/blender/pulls/126120
2024-08-09 19:47:29 +02:00
Clément Foucault
4d17c674af Overlay-Next: Add debug group to edit mesh 2024-08-09 19:20:59 +02:00
Falk David
e2ade82b41 Annotations: Revert removal of some API functions
These were removed by cc28ad8dcf
but shouldn't have been.

Since these are used by some addons to e.g. add new
annotation layers, it's better to keep them around.

Pull Request: https://projects.blender.org/blender/blender/pulls/126096
2024-08-09 17:28:30 +02:00
Clément Foucault
2c275aec87 Overlay-Next: Mesh Edit Mode
This includes the port of the edit edge shader to the new
primitive expansion API, removing split codepath and
code duplication.

Some of the shader code is duplicated for keeping the
legacy engine untouched.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/125921
2024-08-09 16:29:59 +02:00