PR #129125 allowed the movement of centered dialogs, like About and
Splash, without them snapping back to their original positions. But
that change was more complex than necessary. This returns
interface_region_popup.cc to exactly as it was before any of this, and
interface.cc gets simpler too. In a nutshell recentering these dialogs
is a lot easier that seemed at first.
Pull Request: https://projects.blender.org/blender/blender/pulls/131464
The `exec` callback was missing a call to `undo::push_end`, meaning that
using the undo panel would not undo the prior step, causing an
accumulative effect.
Pull Request: https://projects.blender.org/blender/blender/pulls/131466
This is already prevented in the UI in both the top left mode selector
and the pie menu, this commit adds an actual check to avoid being put
into an invalid state by another operator or script.
Pull Request: https://projects.blender.org/blender/blender/pulls/130769
Not sure if this makes a practical difference currently. However, it's good
to avoid depending on `SOCK_IS_LINKED` which is phased out more and more.
The topology cache should always be more up to date.
Issues with the "Separate by selection" operator. Reported by the Blender studio.
There were multiple problems in this code.
1. When a new object is created, the parameters are not copied.
2. When a new layer in a new object is created, the parameters are not
copied.
3. The code to transfer the layer attributes was not working correctly.
Fixed all the issues above. The layer attributes are now transfered once
after all layers have been added.
Pull Request: https://projects.blender.org/blender/blender/pulls/131449
Previously, the data-block dependencies were always detected in
`update_depsgraph` in `MOD_nodes.cc`. This would only be called when something
called `DEG_relations_tag_update` before. We don't want to trigger a depsgraph
rebuild after each operation in the node editor, as that would be expensive.
However, that also meant that we often had to add data-block dependencies that
are not actually used, but might be used if the user changed e.g. a link. A
typical example for that is a object socket that has a default value, but the
socket is also linked.
Now, the dependencies referenced by the node tree are collected by the node tree
update code which runs after all changes. This way we can detect whether the
dependencies have changed. Only if they have changed, a depsgraph rebuild is
triggered. This now allows also taking into account the mute status of nodes and
whether an input is linked.
There are still more things that could be taken into account. Most obviously
whether a node is connected to an output. This can be done later. The most
tricky aspect here is probably that we also have to consider all viewer nodes as
output, because at the time the node runs, it's not known which viewer will
actually be used (which depends on other editors).
This also cleans up some special cases we had for e.g. the scene time node where
we always had to trigger a depsgraph rebuild when it was added/removed because
of its time dependence. This is now part of a more general system.
This fixes#109219.
Pull Request: https://projects.blender.org/blender/blender/pulls/131446
If toggling the status of the Auto Keyframe button with a custom
keyboard shortcut it does not update and display the current status of
the button - it looks like nothing has changed. This PR just updates
the button correctly when used this way. Just the addition of a
RNA_def_property_update.
Pull Request: https://projects.blender.org/blender/blender/pulls/131406
This commit adds a new `color_tag` read-only enum property to nodes,
expanding on the existing node group `color_tag` property. The existing
node group color tag enum (`NodeGroupColorTag`) was renamed to the more
generic `NodeColorTag` and expanded to support all possible color tags.
This new property also works on node group nodes with custom color tags
set by the user.
Pull Request: https://projects.blender.org/blender/blender/pulls/131101
Optimize pixel access in the new CPU compositor by specializing pixel
load and store for the type of the result that is being loaded or
stored. Gives up to 10% improvement.
Pull Request: https://projects.blender.org/blender/blender/pulls/131441
VSE can support file basenames of only up to 256 characters length (due
to limited capacity of StripElem::filename). When adding e.g. a movie
that has a longer file basename, it was silently truncating it. The
strip was added, it was just not actually working due to truncated
file basename. Instead of that, log actual error and fail the addition
operator.
The issue repro with "not working" file has basename of 351 length
(due to lots of "invisible zero width space" characters).
Pull Request: https://projects.blender.org/blender/blender/pulls/131417
The Move to Layer operator in grease pencil edit mode when invoked from
operator search directly will not show menu correctly, instead it tries
to execute directly without a target layer name set. This fix ensures
that when it happens the UI would show a menu instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/131437
Grease Pencil animation data is stored in the object-data, not the
`AnimData` of the Grease Pencil ID. This meant that the object was
not properly tagged for an update, because the code assumed that
the object had an `adt`.
The fix calls `ANIM_id_update` to directly tag the Grease Pencil
ID for an update (which will also update the Grease Pencil frames
animation data).
Simplify the code:
- Pull a lambda function out of a `for`-loop (making it clearer that the
loop itself is pretty simple), and
- move the `ActionUserInfo` struct into the only function that uses it.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/131424
Change how we visit embedded IDs. Apparently using
`BKE_library_foreach_ID_link()` to get those IDs is not the right way to
go.
Currently the only animatable embedded IDs are node trees, so now the
code just handles those explicitly. Since this is versioning code,
there's also very little chance that there will be new types of
animatable embedded IDs before 4.4 gets released.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/131424
Devices reported by failing drivers were still part of the device
selection list. When selected they would never be picked.
This change hides these devices from the UI
Pull Request: https://projects.blender.org/blender/blender/pulls/131431
Copy the interface socket directly which makes sure that all relevant data is passed on.
The default is still adapted from the current socket value.
There are still places that could be improved that are not covered by this patch yet.
For example creating a group from a Set Position node changes the default Position input.
That could be fixed separately.
I removed one `assert` that did not seem important. It was making sure that an interface
item is only copied within a group, but I don't see a reason for why it should not be possible
to copy an item to a different group.
Pull Request: https://projects.blender.org/blender/blender/pulls/131394
Currently, the Layout node class is used by the Reroute, Frame and
Compositing Switch node. To bring more uniformity, and clear up the use
of each class, this commit moves the Compositing Switch node from
the Layout class to the Converter class. This aligns it with similar
nodes (Compositing Split, Compositing Switch View, Geometry Switch)
which use the same class, and limits the Layout class to layout-related
nodes. On the UI side, this also gives the Compositing Switch node a
more relevant header color.
Pull Request: https://projects.blender.org/blender/blender/pulls/131392