Complete the rule of 5 for the asset weak reference class and remove
a separate copy function. While adding RAII behavior to a DNA struct
directly isn't so common, this seems better than doing it half-way.
The code wrongly used the `ob_eval->data` to try and get the
`GreasePencil` data.
The `ob_eval` only needs to be used to access the transform
to get the `layer.to_world_space`
This addresses issue #93052.
Now converting the USD "varying" interpolation type to
the "point" domain type when importing USD attributes.
There have been some inconsistent opinions in the USD
developer community about whether "varying" interpolation
is equivalent to "corner" or "point" domains for meshes.
However, DCCs such as Unity and Houdini assume that the
number of entries for attributes with "varying" interpolation
is the same as the number of points, and this change allows
Blender to import such assets without error.
Pull Request: https://projects.blender.org/blender/blender/pulls/118539
GPv3 utility functions `retrieve_editable_drawings()` and friends could
return duplicate drawings when multi frame editing is enabled and the
scene time is different than the selected frames.
This PR fixes that.
Pull Request: https://projects.blender.org/blender/blender/pulls/118566
Changes to the drawings array require an update of the `drawing_index`
stored in frames. Subsequently the frame storage data (for writing to
files) also needs to be updated. This was missing in the
`remove_drawings_with_no_users` function, which can lead to invalid
`drawing_index` after loading the file again.
A regression test has been added for this case.
Also fixed a minor memory leak when all the drawings are removed.
The drawing array ends up empty but still has a pointer allocated.
Fixes should avoid this (nullptr when `drawing_array_num` is zero) but
also make sure the array pointer is handled anyway instead of assuming
nullptr.
Pull Request: https://projects.blender.org/blender/blender/pulls/118569
There were some places in the code that wrote to the frames,
but didn't tag the changes. This could result in the changes
getting lost when the file is saved (or changes getting lost during undo).
Given current tag/flag handling situation (see also #88555 and #90610),
it is not yet possible to ensure matching tags between embedded data and
their owner ID. Furthermore, a non-main Scene should also tag its master
collection as non-main, so current test was not correct anyway.
This will allow for more control over which ID should actually be marked
as unused/to be deleted.
Also some general minor cleanups and refactor, most notably:
* Add a constructor to internal `UnusedIDsData` struct, which can
directly use the public `LibQueryUnusedIDsData` parameters struct.
* Add default values to trivial data in `LibQueryUnusedIDsData`.
No expected behavioral changes in this commit.
This PR adds support for the `SCULPT_OT_dyntopo_detail_size_edit`
operator for the `Brush Detail` and `Relative Detail` modes,
replacing the old generic radial menu.
## Changes
* Triangle grid shown for all detailing modes
* Support for modal left / right scaling and sampling added
* Status bar updates with current value while editing the parameter.
## Limitations
* The brush size percent value is no longer shown in the 3D viewport
when using this modal.
This will be added with later functionality in #106243
Addresses #108111
Pull Request:
https://projects.blender.org/blender/blender/pulls/118403
The CPU compositor always adds a filter for normal and albedo even if
they don't contain any data, that is, when they are not connected to
anything, by inflating a buffer with the editor value, which is not even
accesible to the user. In anycase, such a solid color will not help do
anything in the denoise operation.
This patch aligns the implementation by only adding the abeldo and
normal filter if they contain actual data, speeding up the operation in
the process.
Pull Request: https://projects.blender.org/blender/blender/pulls/118553
PR #118382 exposed an issue where creating a catalog with non-existing
parents would trigger an endless recursion. When creating the missing
parents, the tree would be rebuilt, which would again try to create the
missing parents, for which the tree would be rebuild, etc. It just
happend to work fine for creating single catalogs with existing parents.
Rather than rebuilding the tree immediately, tag the asset library as
having "dirty" catalog data, and let code requiring the up-to-date
catalog tree (node tool menus) ensure the tree is updated if needed.
The asset library loading API should be made clearer and generally
better defined/designed, currently it's all a bit messy & confusing.
Pull Request: https://projects.blender.org/blender/blender/pulls/118463
Towards #118493: make movie writing functionality take ImBuf instead
of int* to pixel data.
While at it, make other bMovieHandle functions use "bool" return type
when it is strictly a success/failure result.
Pull Request: https://projects.blender.org/blender/blender/pulls/118559
When a sync primitive signal existed
in its own command buffer, the command
buffer execution was skipped as the empty
flag was previously still set to true.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/118557
IMB_double_x, IMB_double_y, IMB_double_fast_x, IMB_double_fast_y,
imb_filterx are not used by anything. Looks like they all come
from "initial revision, 22 years ago" and probably unused for decades.
Caused by 1c0f374ec3
When `EDBM_edge_find_nearest_ex` does not find a nearest edge in
`loopcut_mouse_move`, then `loopcut_update_edge` will set
`RingSelOpData` `ob` to nullptr (rightfully so).
This would then crash in `ringsel_draw` (because we are trying to call
`object_to_world()` on the nullptr).
Prior to 1c0f374ec3 this was also "wrong", but
`EDBM_preselect_edgering_draw` would early out before using garbage
data.
Now guard against this and dont call `EDBM_preselect_edgering_draw` at
all if we dont have valid input.
Pull Request: https://projects.blender.org/blender/blender/pulls/118549
The voronoi texture node only sets the first 3 components of the
color. The alpha value is never set. Normally this is covered
when using it in a shader node, but when directly connected to
the AOV output, the color was stored as a pure emissive color.
This resulted in incorrect colors in the viewport and image renders.
This is a partial fix for #118494
Pull Request: https://projects.blender.org/blender/blender/pulls/118497
This adds an option `WITH_EXPERIMENTAL_FEATURES` which is `ON` by default.
Sometimes it's usefull to be able to turn off all experimental features
during development for testing purposes. This option is still enforced to be
`OFF` for release cycles other than `alpha`.
Pull Request: https://projects.blender.org/blender/blender/pulls/118513
This patch unifies the implementation of the separable Blur operation
across CPU and GPU. The difference is due to the fact that the CPU code
ignores pixels that are across the image boundary and adjusts the
weights accordingly, while the GPU code assumes extended boundaries.
Like the rest of the Blur nodes the CPU implementation is adjusted to
assume extended boundaries until an option to change the boundary
condition is added. The alpha version of this operation will be handled
in a separate patch.
Pull Request: https://projects.blender.org/blender/blender/pulls/118517
Currently, the Hue Correct node uses the adjusted hue when adjusting the
saturation and value of the input, so if the user adjusted the reds to
become blue, in order to change the saturation of the same area, one
would need to adjust the blues, which would overlap with the existing
blues.
This is contrary to how other compositing software like GIMP and Natron
do it, and it is less intuitive. So this patch changes the node to use
the original hue to the saturation and value curves as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/118487
Initialize a remote repository pointing to
https://extensions.blender.org and a local repository to use for
local (side-loaded) extensions installed from the file-system.
When using a square color picker you can drag it very wide in an RGB
node. Once over a threshold the round cursor in the color canvas will
turn into a vertical bar. Caused by (dumb) proportion test. Replaced
with a proper check for gradient type.
Pull Request: https://projects.blender.org/blender/blender/pulls/118542
This allows better roughness approximation for glass
materials when not using raytracing.
The fit was done by rendering a checkerboard
with a refractive plane and an orthographic camera.
Same setup with a reflective plane gave the
reference roughness to match.
Rendering a few hundred of small images with
Cycles and then finding a curve fit manually
by matching blur level.
Rel #118256
Pull Request: https://projects.blender.org/blender/blender/pulls/118533
Add some comments that clarify that `StringRefNull` can be compared with
other `StringRefNull` and with `StringRef` instances.
Add unit tests that cover these cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/118515
When switching to an object with invalid channels,
the red underline would only appear on the second redraw.
Same when switching the other way around, then they would
stay until the next redraw.
The issue is that the logic to check if that line should be drawn
is checking the flag of the `bAnimListElem` which gets it from
the FCurve. But the FCurve is only checked later down the line
when getting the name.
Fix it by checking the flag on the FCurve directly.
Pull Request: https://projects.blender.org/blender/blender/pulls/118522
Error caused by attempting to register multiple catalogs with the same
catalog ID. This would happen when multiple asset libraries would use
the same catalog definition file, and the "All" library would attempt to
merge them all into one library.
Ignore duplicate catalogs, like we already do when reading individual
asset catalog definition files. Log an error instead, or a info log if
the catalog path matches as well (in which case the conflict can be
ignored as it won't be user visible).