First we copied the entire BMesh custom data layout to the Mesh, then we
decided not to copy some boolean layers like UV pinning if every value
was false. But that left the layers uninitialized. Instead, copy the
custom data layout _after_ finding which layers to skip.
The utility counts the number of occurrences of each index in an array.
It's used to build offsets for mesh topology maps, or to count the
number of connected elements. Some users are geometry nodes,
the subdivision draw cache, and mesh to curve conversion.
This PR parallelizes the counting to take advantage of multiple
threads. On a Ryzen 7950x, when counting connected edges to
vertices, I observed an improvement from 10.2 to 3.0 ms.
This most likely makes the counting less efficient, but it is
quite a nice performance improvement.
The new code was much slower for me at less than four threads,
so I added a check so that counting remains single threaded in
that case.
Pull Request: https://projects.blender.org/blender/blender/pulls/109628
The Texture margin 'adjacent faces' algorithm always used the
full UV map, even if not all polygons were actually part of the
baking. Remedy this by checking the mask if passed in.
Pull Request: https://projects.blender.org/blender/blender/pulls/109500
Instead of manipulating the selection attribute directly, we get an `IndexMask` of the random elements, and then apply the changes to the selection attribute in the operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/109366
The file-name would be included twice, because an_stringdec worked
differently to BLI_path_sequence_encode.
Use BLI_path_sequence_{encode/decode} to resolve the issue.
While image-sequence `anim` doesn't seem to be relied on, it's
possible to use this code-path by referencing an image from a movie
sequence strip.
In some cases, freeing the image cache keys would not update
next/previous links - causing future updates to reference freed memory.
Also assert the `last_key` is never points to freed memory.
Clang's missing-variable-declarations is useful to set as an error
when variables aren't declared as static when they should be.
C++ support for RNA files [0] caused clang to print many
missing-variable-declarations warnings (which I set to error locally).
This change suppresses the warning for RNA.
This should be resolved but for now suppress the RNA warning so this
can be treated as an error elsewhere.
[0]: d154ebfa83
It was only used by OpenEXR and Iris images, and saving the Z Buffer
in those formats was disabled by default. This option comes from the
times prior to the addition of the Multilayer EXR.
It also worth noting that it was not possible to save Iris with Depth
pass from Blender as internally it is called IRIZ format and it was
not exposed. But even after exposing this format option something still
was missing as saving and loading ITIZ did not show up the Depth pass.
The reason of removal is to make it a more clear match of the ImBuf
with a render pass, and use it instead of a custom type in the render
result and render pass API. This will simplify the API and also avoid
stealing buffers and making shallow copies when showing the render
result.
For the cases when Depth is needed a Multilayer EXR is to be used,
as most likely more than just the Depth will be needed.
On a user level this change:
- Removes the "Z Buffer" option from the interface.
- It preserves existing sockets in compositor nodes, but it will
output black image. Also changing the image data-block will
remove the socket unless a Multilayer EXR with Depth pass image
is selected.
- Removes "Depth" socket of the Viewer and Composite nodes.
Ref #108618
Pull Request: https://projects.blender.org/blender/blender/pulls/109687
Adds a new function to insert a frame with a duration on a layer.
Also adds tests for the edge cases.
This introduces the concept of a `null-frame`.
It can be created with `GreasePencilFrame::null()` and checked for with
`is_null()`.
The purpose of a `null` frame is to indicate the end of whatever frame
comes before it. This way, the frames map does not need to store
the duration of frames. The duration is always implied by the distance
to the next frame.
When using ASAN without WITH_COMPILER_ASAN, for example when enabling it
in Xcode, some symbols would be missing from makesdna. Instead just always
include them, there's no harm in it.
Also deduplicate some code.
Pull Request: https://projects.blender.org/blender/blender/pulls/109666
This reverts commit d53862351d.
After conducting tests with artists at the studio, it was observed that
altering the Transform Modal Maps caused significant disruption due to
the heavy reliance on the "Proportional Editing" and "Automatic
Constraint" features.
Considering this, it is now deemed more beneficial to provide users
with the choice of adapting their muscle memory to the new changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/109660
Doing the promotion on the internal GPU texture format
created a bug in `draw::Texture::ensure_impl` where
the texture would be constantly being recreated.
As remarked by Harley Acheson in !109163, some tooltip lines regarding
geometry nodes attributes were not translated. They are basically just
bullet points followed by an actual line of text so they may not seem
important, but given that list items may not use the same bullet
points in all languages*, and other items are already translatable, it
makes sense to also translate these ones.
* For instance, the bullet point character used in Japanese is the
KATAKANA MIDDLE DOT, a monospaced variant.
Pull Request: https://projects.blender.org/blender/blender/pulls/109384
Prior to using OIIO for image loading, DDS files were hard-coded to
always treat files with BC5/ATI2 compression as normal maps[1].
This basically means that the B channel would be reconstructed from the
R,G channels in a particular way. There is a non-standard header flag
(coming from tools like NVTT and various others) that can also be used
to indicate if such processing should take place, and OIIO understands
that flag and acts appropriately. However, not all files have that flag
set.
This patch reverts to the hard-coded behavior to match prior versions.
If the user has explicitly set the OIIO environment variable to say
otherwise, we will respect that setting instead.
[1] https://projects.blender.org/blender/blender/src/branch/blender-v3.5-release/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp#L870
Pull Request: https://projects.blender.org/blender/blender/pulls/109541