Calling `WM_report` & co API from wmJob worker thread is utterly unsafe,
and should never have been done. It 'worked' so far presumably because
worker threads were barely (if ever) reporting anything that way, but
now USD IO code is spamming reports in some cases, leading to fairly
common crashes.
Pull Request: https://projects.blender.org/blender/blender/pulls/113883
Simply sets the cyclical property selected strokes. Note this does not add extra geometry like the legacy operator.
Note: also adds a key bind 'alt c' to toggle, same as for curves.
Resolves#113671
Pull Request: https://projects.blender.org/blender/blender/pulls/111904
Move "Extensions Repositories" panel from FilePaths to Extensions.
Temporary change until a design is agreed on, to make it easier to test
repos while developing without going back and forth between sections.
The previous formula for adjusting Coat Tint intensity resulted
in strong tints and sudden colour changes when using a low coat weight.
This commit fixes these issues by mixing between a white tint (no tint)
and the chosen tint based on the Coat Weight.
Pull Request: https://projects.blender.org/blender/blender/pulls/113468
Extract:
- Sculpt filter types from the Sculpt menu. Some of these types use a
custom label, different from those defined in the operator RNA,
which was never extracted.
- "Today" and "Yesterday" from the file browser modification date.
- All name_plural from IDs, as these are used in the UI to list which
data block is to be removed, when calling outliner.orphans_purge.
Disambiguate:
- "Area", meaning the measurement of a surface as opposed to a place.
Some messages reported by Satoshi Yamasaki in #43295.
Pull Request: https://projects.blender.org/blender/blender/pulls/113912
This adds correct object bounds estimation.
This works by creating an occupancy texture where one
bit represents one froxel. A geometry pre-pass fill this
occupancy texture and doesn't do any shading. Each bit
set to 0 will not be considered occupied by the object
volume and will discard the material compute shader for
this froxel.
There is 2 method of computing the occupancy map:
- Atomic XOR: For each fragment we compute the amount of
froxels **center** in-front of it. We then convert that
into occupancy bitmask that we apply to the occupancy
texture using `imageAtomicXor`. This is straight forward
and works well for any manifold geometry.
- Hit List: For each fragment we write the fragment depth
in a list (contained in one array texture). This list
is then processed by a fullscreen pass (see
`eevee_occupancy_convert_frag.glsl`) that sorts and
converts all the hits to the occupancy bits. This
emulate Cycles behavior by considering only back-face
hits as exit events and front-face hits as entry events.
The result stores it to the occupancy texture using
bit-wise `OR` operation to compose it with other non-hit
list objects. This also decouple the hit-list evaluation
complexity from the material evaluation shader.
## Limitations
### Fast
- Non-manifolds geometry objects are rendered incorrectly.
- Non-manifolds geometry objects will affect other objects
in front of them.
### Accurate
- Limited to 16 hits per layer for now.
- Non-manifolds geometry objects will affect other objects
in front of them.
Pull Request: https://projects.blender.org/blender/blender/pulls/113731
Implement the same logic as we do for the active layer, by calling the
corresponding RNA function.
This makes sure all the notifiers and DEG update calls are properly
called. This is needed at least for !113908.
Also adds an undo push step which was missing in main.
Co-authored and reviewed (in real life) by: Julian Eisel <julian@blender.org>
Moving an asset from "Unassigned" to a catalog needs to clear the node tool
asset tree caches and redraw the editor. That's solved here by emitting
an asset-specific notifier rather than the less clear "file list" one.
Pull Request: https://projects.blender.org/blender/blender/pulls/112980
Since the operator can also act on e.g theme colors [and changes to these shouldnt send undo pushes], dont do a general `OPTYPE_UNDO`, but instead be a bit more specific and only do an undo push for buttons with `UI_BUT_UNDO`.
Probably good for LTS.
Pull Request: https://projects.blender.org/blender/blender/pulls/113887
View2D isn't initialized in these regions yet, which is a valid state
for hidden regions. So consider that when calculating the region zoom
factor in the region scale operator.
Their return value was only used in one place.
Change it to comparison with a stored name, and make the functions
to return void instead.
Removing the return boolean makes it possible to change underlying
functions to work with std::string and return unique name by value.
Pull Request: https://projects.blender.org/blender/blender/pulls/113934
This function was changed in main after the buildbot built the PR.
Since we are just interested in grease pencil data here, just retrieve
the bounds from the geometry directly.
Allow binding of framebuffers without sRGB to linear transform.
`GPU_framebuffer_bind_no_srgb`. This Patch removes color transform
artifacts in node, image and sequence editor.
When the framebuffer is an srgb framebuffer and it is bound without
the transformation, the SRGB textures are bound as UNORM variants.
As framebuffer, render pass and subpass recreation is ensured by
`VKCommandBuffer` we don't need to mark the framebuffer dirty at
this time. Later on we can optimize this by adding a state changed
detection for framebuffers and render passes.
Pull Request: https://projects.blender.org/blender/blender/pulls/113838
Currently object bounds (`object.runtime.bb`) are lazily initialized
when accessed. This access happens from arbitrary threads, and
is unprotected by a mutex. This can cause access to stale data at
best, and crashes at worst. Eager calculation is meant to keep this
working, but it's fragile.
Since e8f4010611, geometry bounds are cached in the geometry
itself, which makes this object-level cache redundant. So, it's clearer
to build the `BoundBox` from those cached bounds and return it by
value, without interacting with the object's cached bounding box.
The code change is is mostly a move from `const BoundBox *` to
`std::optional<BoundBox>`. This is only one step of a larger change
described in #96968. Followup steps would include switching to
a simpler and smaller `Bounds` type, removing redundant object-
level access, and eventually removing `object.runtime.bb`.
Access of bounds from the object for mesh, curves, and point cloud
objects should now be thread-safe. Other object types still lazily
initialize the object `BoundBox` cache since they don't have
a data-level cache.
Pull Request: https://projects.blender.org/blender/blender/pulls/113465
Mainly to simplify code and also add some add type safety, replace
`GSet` with `blender::Set` for the storage of BMesh triangles and
vertices on each PBVH node. Some initial tests point to better
performance too, but the numbers are hard to verify so far.
Because of the larger `PBVHNode`, memory usage slightly increases
(observed a 2% increase with a 1M face grid) for regular Mesh sculpting,
but it seems `Set` is more memory efficient than `GSet`, because I also
observed a 10% decrease in memory usage for dynamic topology.
In the future nodes can be split in a more data-oriented fashion to
reduce memory usage overall.
This also makes it simpler to switch to another type in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/113907
In `makesrna`, generate valid default values for float properties, when those
defaults are positive/negative infinity.
Blender would currently generate the strings `inff` and `-inff`, which are not
valid C++. This PR changes that to `std::numeric_limits<float>::infinity()` and
`-std::numeric_limits<float>::infinity()`.
Context: the layered animation system (see #113594) will have animation layers
with strips on them. It will have the concept of "infinite strips", where from
a user's perspective there aren't even any strips at all, and the layer seems
to directly contain the keys themselves. This is purely a UI distinction
though, where we simply won't draw the outline of infinite strips. Being able
to work with ±∞ as floating point values has clear advantages, as then the
`strip.frame_start` and `strip.frame_end` properties will always "tell the
truth".
This particular change is necessary to allow these values as defaults. It is
not intended that users will have property sliders for these properties when
their value is "infinite" (but rather a button 'make finite' or something along
those lines), so interaction with the UI code will likely be minimal.
Pull Request: https://projects.blender.org/blender/blender/pulls/113854
Resolves#113422.
The depth buffer was rendered to, but not correctly merged
with the scene depth buffer. This lead to, e.g. the object appearing
behind the grid.
This fixes the issue by rendering a "merge" pass.
Pull Request: https://projects.blender.org/blender/blender/pulls/113779