Adds a "Select by Attribute" operator as mentioned in the discussion in
#105317. This is done in 4.0 to limit the breaking aspect of the removal
of face maps. The selection storage functionality is replaced by boolean
attributes. We already have a way to control the data in the boolean
attribute with the "Set Attribute" operator, but we didn't have a way to
convert the attribute into a selection.
This operator works on the active attribute if is a boolean attribute
and isn't on the face corner domain. It adds to the existing selection
similar to other existing operators.
While this behavior can be recreated as a node tool, we add it as a
builtin operator here to avoid limitations of the new node-based
tool system and to make the late-in-the-release-cycle change safer.
Pull Request: https://projects.blender.org/blender/blender/pulls/113772
See #105317
In 46cf093270, face maps were just converted to an integer
attribute. While the internal data remains the same that way, we lose
the names and some convenient methods of interaction. This commit
additionally converts each face map to a separate boolean attribute
using the old name. This does require that no attributes were using that
name already.
Each boolean attribute can be thought of as a selection, accessible in
geometry nodes and properly interpolated by mesh processing
algorithms. The selections no longer have to be unique, meaning
one face can be part of multiple selections.
Pull Request: https://projects.blender.org/blender/blender/pulls/113769
Copy custom data and flag from the original edge to the ones created
from it when splitting a long edge.
Unfortunately, can not use generic "example" edge approach as there
is a temporary flag BM_ELEM_TAG is re-applied in a loop: the new
edges can not be tagged with this tag. Additional complication is
that even we clear this tag from the input edge before splitting it
this tag is re=applied via long_edge_queue_face_add().
Hence, use our own simple function to copy minimal subset of data and
tags.
Co-Authored-By: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/113783
- More consistent naming of variables in diagram and code.
- Use C++ array and span, and make them short-lived, without
trying to reuse them.
Co-Authored-By: Hans Goudey <hans@blender.org>
This was the last use of `CustomDataAttributes`. It's not very useful
nowadays because we have a lower level (`CustomData`) and higher level
(`AttributeAccessor`) API.
As part of this I removed the ability to `reserve` instances which was
useful when adding instances one by one. Generally, such code should
eventually be rewritten to handle more instances at once, instead of
handling them one by one. This will lead to better performance and
is more in line with how other geometry types (like mesh) are handled.
This also adds the ability to move and assign `Instances` just like we can
move and assign `CurvesGeometry`.
The experimental GPU compositor is leaking memory in any setup.
This is because the current implementation of the render texture pool
always created a new texture and only freed the textures upon deletion.
This was a temporary implementation until a proper implementation that
uses the DRW textures pool was used.
This patch implements a small texture pool as a temporary fix until the
aforementioned DRW texture pool implementation is done.
The code is already replacing instances when needed (when there was no
instances previously created in the file). To do it regardless may lead
to remove instances from the loop.
The other related nodes did not have that issue:
* Curve to Points
* Curve Fill
This was caused by spatial denoising pass sampling invalid data.
This patch make it so that there is one padding tile all
around the denoise area.
This simplifies the denoise shader too.
This is a bit wasteful to dispatch tracing tiles for clearing
and a better solution would be to use a separate shader and
tile list only for this purpose.
Before bd00324c26, strip lengths were changed in
`rna_NlaStrip_frame_start_ui_set` and `rna_NlaStrip_frame_end_ui_set`
so as not to be shorter than NLASTRIP_MIN_LEN_THRESH.
This prevented `BKE_nlameta_flush_transforms` from working with
zero-length strips.
But now, in some cases, strip can be zero length.
Therefore, consider this case and avoid division by zero.
Pull Request: https://projects.blender.org/blender/blender/pulls/110121
`CustomDataAttributes` does not serve much of a purpose nowadays,
since we usually use either the lower level `CustomData` or the higher
level `AttributeAccessor` interface.
In switch-case structure, `PROP_NEVER_NULL` is already set
for String properties. However, the code setting `PROP_EDITABLE`
below was overwriting the flag. Then `PROP_NEVER_NULL` had
to be set for a second time.
Fixed by using proper API function to set these flags, and removed
the redundant second flag setting.
Pull Request: https://projects.blender.org/blender/blender/pulls/113739
`Vertex Crease`, like `Edge Crease`, is not supposed to use transform
symmetry.
So remove it.
(`Skin Resize` remains using symmetry since that case seems desirable.
See #84376)
When searching for a new node by dragging from a socket, some results
were untranslated. This is because they did not use a translation
context matching other occurrences, from which the strings were
extracted to the translation files.
Three nodes using operations were affected: Mix and Vector Math.
- Vector Math used the default context when it should have used
NodeTree.
- Mix and Mix RGB used NodeTree when they should have used the default
context.
Pull Request: https://projects.blender.org/blender/blender/pulls/113485
Send notifiers to redraw dopesheet when keyframe is inserted/deleted.
Change default duration (and soft/hard min) to 0 for inserting
keyframe. This unnecessarily adds extra keyframe.
Pull Request: https://projects.blender.org/blender/blender/pulls/113765
Incorporated the cleanup and tweaks from Hans Goudey to return CurvesGeometry directly.
Part of #113602.
Co-authored-by: Hans Goudey <hans@blender.org>
Ref !113721