The Cryptomatte pick layer in the compositor is wrongly displayed due to
color management getting applied even though it is non color data. This
is because the non color meta-data member of viewer images was not set
if it was newels created. To fix this, we make sure it gets set in all
code paths for the viewer.
The Cryptomatte node fails to work for some animated images in certain
cases. That's because the auto refresh frame mechanism is not reliable.
To fix this, we use the context's frame to get Cryptomatte layers.
When selecting gizmo nodes using box selection, circle selection, or
lasso selection, the gizmos don't show in the viewport.
This is fixed by notifying that the gizmo nodes have been updated to
redraw the gizmos using `WM_event_add_notifier`.
Pull Request: https://projects.blender.org/blender/blender/pulls/139728
This PR changes loading of implicit vulkan layers. See #139543 where we
detected that there are vulkan layers installed on systems that try to
impersonate other software, but crashes when used in Blender.
Use the C++ "get_default_hash" instead of the C GHash functions. These
are inlined and also simpler, which is typically good for our open-
addessing hash tables. In a few scenes with many objects/instances,
I observed a 2% improvement in playback FPS.
Also the less than operator was unused. I figured this was probably
used in a `std::map` or another container that required the operator
at some point.
Pull Request: https://projects.blender.org/blender/blender/pulls/139744
With 24d08e0bae, the ability to view UVs
in the Image Editor was introduced in all modes, not just Texture Paint
and Edit Mode. This introduced a new flag that was enabled by default,
causing UVs to be displayed in any of the Image Editor modes.
While this is helpful for some workflows, it is unnecessarily
distracting for many usecases when using the Image and Mask modes of the
Image Editor. To remedy this, this PR adds various polls to ensure
that these are only shown in the Paint Mode of the Image Editor and the
UV Editor. Further thought should be put into the potential separation
between the different usecases of this editor, but that is out of scope
for now.
Pull Request: https://projects.blender.org/blender/blender/pulls/139563
`BKE_id_material_used_with_fallback_eval` doesn't account for the case
the evaluated mesh is empty and `SubdivCCG` is used for drawing instead,
which only happens for workbench/EEVEE in sculpt mode. Instead of
further complicating the logic, change the multires modifier to produce
a copy of the input mesh with the SubdivCCG attached, rather than that
mesh being empty. This makes things like detecting the max material
index work "for free."
Pull Request: https://projects.blender.org/blender/blender/pulls/139742
calloc is generally faster than zeroing separately after a regular
allocation. Our allocator API exposed an allocation call with "calloc"
in the name that didn't actually use "calloc" because it had an
alignment argument (there is no standardized calloc-with-alignment
provided by the OS). However, we can still use calloc internally if
the alignment fits within the default. That just aligns the function
better with performance expectations.
Pull Request: https://projects.blender.org/blender/blender/pulls/139749
Previously, the armature modifier retrieved the list of available vertex group
names from the original mesh. However, that list may contain different vertex
groups then are actually on the mesh that is being deformed. This patch makes it
so that the vertex group list (`defbase`) is taken directly from the
mesh-to-deform if possible.
Pull Request: https://projects.blender.org/blender/blender/pulls/139734
Deactivate the following buttons when no node tree exists:
- Overlays (all node editors)
- Snap (all node editors)
- Gizmos (compositor only)
- Backdrop (compositor only)
Note: a node tree can exist although compositing is deactivated
(e.g. "Use Nodes" is set to False), in which case the buttons are
active.
Pull Request: https://projects.blender.org/blender/blender/pulls/139526
When multi-frame editing is enabled, users would expect to be able to
paste strokes into multiple selected frames. This PR supports this by
using `retrieve_editable_drawings` instead of `get_editable_drawing_at`
to achieve such feature.
Pull Request: https://projects.blender.org/blender/blender/pulls/139573
Commit 611940805e changed movie proxies to use MP4 container format
instead of AVI (to support video rotation metadata), however MP4
container needs more care compared to AVI. Several parts of proxy
generation were subtly wrong before:
- AVStream.avg_frame_rate was not set, this can make the mp4 muxer
incorrectly determine the video duration for the "moov" atom.
- AV_CODEC_FLAG_GLOBAL_HEADER (needed by mp4 more than by avi) was not
set since the code was checking the flags on the wrong structure.
- avcodec_parameters_from_context were called at the wrong place
(need to be called after avcodec_open2, not before it)
- avcodec_flush_buffers call before av_write_trailer was incorrect;
the codec state should not be reset there!
- avcodec_free_context should be called after fully finishing with the
file (i.e. after avio_close)
Pull Request: https://projects.blender.org/blender/blender/pulls/139731
If an OpenVDB grid has an 8x8x8 block with the same value, it is stored as
a tile with a single value. Now iterate over the bounding box and copy the
value to all voxels for this case.
Fix#91174: Hollow emission artifacts
Fix#124064: Hollow density artifacts
Pull Request: https://projects.blender.org/blender/blender/pulls/139231
Caused by a67b5f6f63
Since we dont necessarily act with `MeshExtractType::BMesh` (can be
`MeshExtractType::Mesh` as well -- and seems the specific mesh analysis
`statvis_calc` functions are well prepared for this), move access to
`BMesh` to the codepaths specific to `MeshExtractType::BMesh`.
Also remove (non-appropriate) assert in `extract_mesh_analysis`.
Pull Request: https://projects.blender.org/blender/blender/pulls/139717
The Image Coordinates node leaks memory if no input is connected and
some of the outputs are not connected. That's because all outputs are
allocated even if they are not used. To fix this, we only allocate
outputs that are actually needed.
When a String node is created using link-drag-search, it's width is now based on
the width of the string it contains. This eliminates the common step to increase
the width manually after the node has been created.
Pull Request: https://projects.blender.org/blender/blender/pulls/139707
Converting from legacy curves to grease pencil with "Keep Original"
option enabled can cause the new grease pencil ID to not be evalueated,
leading to an situation where a evaluated grease pencil object would
point to the original legacy curve ID as its object data. This fix added
a depsgraph tag so it ensures the COW ID is the latest.
Pull Request: https://projects.blender.org/blender/blender/pulls/139006
Over time, the various visibility states of sockets has become more complex. In
the past, it was only affected by `socket.enabled` and `socket.hide`. However,
the introduction or panels and automatic usage inferencing made it hard to
impossible to figure out how sockets are actually drawn from the Python API.
This adds two new getters to `NodeSocket`:
* `is_inactive`: If true, the socket values is grayed out because it has been
detected to not have any effect.
* `is_icon_visible`: The socket is drawn as an interactible icon, i.e. it is not
in a collapsed panel or otherwise hidden.
Both of these concepts map quite clearly to user-level concepts and are hard to
detect exactly otherwise which is why I'm exposing those. More visibility states
accessible on `bNodeSocket` could be made available but we also need to be
careful with not exposing too much stuff that we might not need in the future
anymore. I'd need more precise use-cases to justify adding more such accessors.
Pull Request: https://projects.blender.org/blender/blender/pulls/139424
This reduces the search weight of the frame node because it is rarely added
through the add menu. It's much easier to add it with the F key.
By reducing its search weight, the Frame output of the Scene Time node shows up
as first result, which is more desirable.
Pull Request: https://projects.blender.org/blender/blender/pulls/139709
Previously `get_bone_deformed_vertex_group_names` checkes for regular
mesh armature modifier type instead of the one specific to grease pencil
and this caused it to always return empty defgroup name list, renders
auto-normalize ineffective downstream. Now corrected to using
`GreasePencilArmatureModifierData`.
Pull Request: https://projects.blender.org/blender/blender/pulls/139706
Asset libraries from the Preferences were not recognized as such. This
could cause various issues like the asset library not being refreshed
correctly on relevant changes. There was also a failed assert when
right-clicking the context menu of a custom brush asset, and the "Edit
Metadata" brush asset operator would be unavailable.
A pointer was unintentionally cast to a boolean, and instead null passed
for the pointer (because of a default argument value).
The light objects' Color Temperature prop introduced in a12bce039f
currently is a temperature subtype. This means it is expressed in °C
if the user set that as scene unit, but a color temperature should
always be expressed in Kelvin.
Pull Request: https://projects.blender.org/blender/blender/pulls/139661
Correct the documentation of the `BLI_uniquename_cb()` variant that was
introduced in 7afa5aaa59 to support
dynamically-allocated strings.
Contrary to the other functions with the same name, this variant does
not actually assign the name. It returns the new name and leaves the
assignment to the caller.
Pull Request: https://projects.blender.org/blender/blender/pulls/139639