Commit Graph

140003 Commits

Author SHA1 Message Date
Hans Goudey
dd1454a648 Sculpt: Various refactors in expand tool
Part of #118145.
- Specialize initialization of enabled states, parallelize for mesh.
- Pass integer index and position instead of `PBVHVertRef`.
- Rename some variables to more standard names.
- Precalculate vertex enabled state instead of calculating in loop.
2024-08-12 22:55:14 -04:00
Hans Goudey
60390f8ac4 Cleanup: Sculpt: Pass expand cache by reference, use C++ Array 2024-08-12 22:43:47 -04:00
Hans Goudey
7e11ccc78c Cleanup: Sculpt: Use clearer variable name than "f" 2024-08-12 22:43:47 -04:00
Hans Goudey
f602492f18 Cleanup: Sculpt: Use IndexMask for expand boundary vertices 2024-08-12 22:43:47 -04:00
Harley Acheson
99a4bc325e UI: Allow Theme Coloring for Color SVG Extraction
For the times we need to obtain the bitmap of an SVG icon, send these
through the new theme coloring callback if they are multi-color. This
removes some code duplication by adding a new function that gets an
imBuf from SVG Icon. This allows, for "About" logo, Dialog icons, and
file system icons the optional ability to use a single SVG source file
that works as both monochrome (themed by text color) or multicolor with
internal parts themed.

Pull Request: https://projects.blender.org/blender/blender/pulls/126215
2024-08-13 03:31:43 +02:00
Blazer
ddc9f92777 Define fallback tooltip string for UI_UL_list items
Having the description blank for template list items when not editable
creates undo items that show as "Unknown Action." This PR ensure it has
a description whether editable or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/126184
2024-08-13 00:42:39 +02:00
Harley Acheson
e8786c7be7 UI: Icon Overlay Text Should Not Shadow if Dark
If the text color is dark then don't add shadow to the icon overlay
text - the small text showing things like user counts.

Pull Request: https://projects.blender.org/blender/blender/pulls/126247
2024-08-12 21:23:12 +02:00
Hans Goudey
4c2e5b57de Sculpt: Use new relax implementation for mesh filter
Use the relax/relax face sets implementation from
4f73bf2871 for the mesh filter.
2024-08-12 13:51:48 -04:00
Hans Goudey
00ca0e8eee Refactor: Sculpt: Share face set boundary filtering functions 2024-08-12 13:51:48 -04:00
Hans Goudey
11076b691c Cleanup: Sculpt: Small simplification in relax brush
Check the boundary corner condition outside of the
function that calculates it, and only check zero normals
when calculating them here.
2024-08-12 13:51:48 -04:00
Sean Kim
45d9bfa734 Refactor: Sculpt: Add active_vert_index() and active_vert_position()
* Adds two helper methods, the first replacing direct access to the
  PBVHVertRef i value, the second replacing the previously removed
  SCULPT_active_vertex_co_get
* Removes most trivial usage of active_vert_ref(), the remaining cases
  are a bit more complex and need separate PRs

Pull Request: https://projects.blender.org/blender/blender/pulls/126186
2024-08-12 18:57:24 +02:00
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