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.
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
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
* 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
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
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
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
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
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
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
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
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
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
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
- 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
The grid geometry creation incorrectly tagged the mesh with no loose edges
or vertices, breaking invariants of the caches that are relied on elsewhere.
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