When landing #134860 we didn't yet have documentation for the Path
Templates feature. Now that we do, we can refer users to it.
This PR adds a reference to the docs in the type info of properties that
are marked as supporting Path Templates.
Pull Request: https://projects.blender.org/blender/blender/pulls/139099
For IDProperties, this flag is mostly used only to controll whether
IDProperty code should also handle ID refcounting or not (through
`LIB_ID_CREATE_NO_USER_REFCOUNT`).
Without this fix, IDProp Group Merge could end up trying to modify ID
refcount of its data-block properties (via `IDP_FreeProperty`), which
can lead to data corruption or even crashes (e.g. when used in readfile
code, before lib-linking process).
Issue discovered while working on the system IDProperties split project
(!135807).
Pull Request: https://projects.blender.org/blender/blender/pulls/139230
* Avoid usage of `applied` in favor of helper methods to indicate
undo and redo requirements
* Rename `bmesh_restore_begin` and `bmesh_restore_end` to avoid
similarity with geometry methods
* Swap `geometry_original` and `geometry_modified` to match
expected meaning
Pull Request: https://projects.blender.org/blender/blender/pulls/139244
For Sculpt Undo, certain operators will modify the topology count of the
mesh. These operators are handled separately from normal brush strokes,
and so having tests for an operator that uses this functionality is
beneficial in detecting regressions.
Pull Request: https://projects.blender.org/blender/blender/pulls/139249
Previously, when a socket was detected to be unused, it was just grayed out.
This patch adds support for automatically hiding unused sockets based on this
convention: Menu inputs control visibility while other inputs only control
whether something is grayed out.
More specifically, an input is visible if any of these conditions is met:
* It affects the output currently.
* It never affects the output. In this case its usage does not depend on any
menu input.
* It is used if all non-menu inputs are considered to be unknown.
In the future, we could support customizing which inputs are allowed to control
visibility. For now it's good to use the convention that Blender generally
follows itself.
As before, panels are grayed out if they only contain grayed out sockets and
panels are hidden when they don't contain any visible sockets.
Hiding inputs works in group nodes, the Geometry Nodes modifier and node
operators. In theory it will work for all node tree types, but since only
Geometry Nodes supports the Menu Switch node currently, this patch currently
only makes a difference there.
The implementation reuses the existing `SocketUsageInferencer` with a different
sets of inputs. So no new core-inferencing logic was needed.
Design task: #132706.
Pull Request: https://projects.blender.org/blender/blender/pulls/138186
Regression in [0] caused the poll function to compare the result with
nullptr instead of std::nullopt.
The operators exec function then de-referenced the the std::nullopt.
[0]: 550094b018
The particle system generates some particles with NaN values. The
set_if_different mechanism skipped copying those due to a refactor
in the matrix equality test. Revert that part of 689633d802 for now.
A better solution would be to improve handling of NaNs in Cycles,
and to find and fix the cause of the NaN in the particle system.
Pull Request: https://projects.blender.org/blender/blender/pulls/139238
Test was failing since efdda78175. The asset library path was now using
backslashes on Windows, and got compared to a path with forward slashes. Use
our higher level path comparison function to make sure they point to the same
directory.
When displaying an asset library that contains a back slash on macOS (or Linux,
I assume), resizing the asset browser would make all assets disappear, and
instead the message would show that indicates an invalid asset library path.
Convert all slashes to native format when initializing an asset library. This
might convert slashes that are valid parts of the file name, but this just
leads to an error about a not found asset library, which is better than
crashing. This is a typical tradeoff when dealing with cross platform paths.
Now that handles are effectively hidden with the "Tweak Handles" option
(and clear themselves if `use_restore_handle_selection` is set),
handle selection for multiple strips is quite unintuitive.
It is expected that, after selecting a group of strips, the user will
be able to tweak all of their handles, even if they are not connected,
consistent with other NLEs.
This patch enables that behavior by propagating handle selection to
all selected strips if "Tweak Handles" is on.
Pull Request: https://projects.blender.org/blender/blender/pulls/139075
Originally, `element_already_selected` would always return `true`
as long as the user clicked on a strip that was already selected,
regardless of its handle selection state.
This led to unexpected behavior when trying to tweak a strip:
E.g. taking a strip, selecting its left handle, then trying to tweak
the strip itself would actually tweak the left handle unexpectedly, even
though the cursor would be far enough away that this does not make sense.
A lot of this is very messy and I keep running into
the same weird edge-cases, so hopefully more documentation
will help for the time being, until I can rework the entire
selection system in 5.0.
This should make VSE code more readable and easier to understand from an
outside perspective.
The name was chosen to be `channel` rather than `channel_index` to keep
things short and concise -- it should be clear based on the context
whether we are talking about the strip's channel index (singular case,
`Strip::channel` or `SeqTimelineChannel::index`) vs. the channel list
(plural case, e.g. `Editing::channels`).
Pull Request: https://projects.blender.org/blender/blender/pulls/138919
Some Linux multi lib setups have a helper include file for Jemalloc that
in turn includes the actual header file. This makes our version regex fail.
As the Jemalloc version we are checking for is no longer in any of
the currently supported LTS linux distros, we can safely drop it.
Pull Request: https://projects.blender.org/blender/blender/pulls/139225
For default values, the fairly complex reasoning for the code is explained
in details in comments. The TL;DR: would be that this code is needed to
safely load blendfiles older than 2.83, which were saved without any DNA
type information for these default value data.
Storage data have always been written with DNA info (added in commits
3bae60d0c9 and 9d91bc38d3), so no need to add special handling for them.
Just use regular DNA struct reading.
Pull Request: https://projects.blender.org/blender/blender/pulls/139175
Previously, when reordering a tree view item to the end, one had to move it drop
it fairly precisely on the lower half of the last item in the list. This patch
makes it possible to just drop it below the last item too. The outliner has the
same functionality.
Pull Request: https://projects.blender.org/blender/blender/pulls/139025
Currently, nothing happens when trying to scroll while hovering a tree view that
is fully visible (i.e. does not have a scroll bar). This patch makes it so that
the scroll event is passed through in this case so that one can scroll the
entire region even when hovering the tree view. If the tree view does have a
scrollbar, then the scroll-event is still captured by that even if scroll all
the way up/down already.
Pull Request: https://projects.blender.org/blender/blender/pulls/138930
Node UIs can now have panels. Some of those may need to have their
labels translated using translation contexts. PanelDeclarations
already had a translation_context member, this commit adds a way to
specify this context, and to use it for translation on drawing the
node.
Pull Request: https://projects.blender.org/blender/blender/pulls/139124
Reported on devtalk: MotionBuilder produced FBX files contain
"cameras" that are not really user visible cameras, but rather map to
MotionBuilder viewports. They are at root, have no child elements,
and have special names. There is also a "camera switcher";
ignore that too.
Pull Request: https://projects.blender.org/blender/blender/pulls/139204
This patch turns the options of the Crop node into inputs.
Instead of specifying the bounds of the crop, the inputs now specify the
Width and Height of the crop region. The Crop Image Size option was
renamed to Alpha Crop and inverted, so it now defaults to actual
cropping. The Relative option was removed, as it is now superseded by
the Relative To Pixel node, and removal was done to facilitate the
options to inputs project.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/139163
The Relative To Pixel node considers the original resolution of the
image with no transformation, while it is more useful for it to consider
the realized size instead, because that's what later processing nodes
will be using.
If the cursor has never been over the mesh and a stroke is drawn that
starts off of it, passes over the mesh, and then ends off of the mesh,
then when the active index is accessed, it is possible that the BMesh
indices and tables are not initialized.
Pull Request: https://projects.blender.org/blender/blender/pulls/139184
This was used to cache a lazily evaluated viewer field in the past, but is
unused for a while now already. If we need it again, it can be implemented with
`GenericKey` instead of a custom version of that.
Pull Request: https://projects.blender.org/blender/blender/pulls/139192