Regression in 427eed292d.
Root of the issue was that animation system was using a single same
check to decide if an F-Curve/driver was valid to use to animate some
data, and whether user can create/edit animation for that data.
Both cases are actually different, since e.g. linked data is not
user-editable, but it can still be animated (either by related linked
Actions, drivers defined in the linked data, or some more hackish
changes like py API/RNA scripting).
This commit now defines two checks:
* `RNA_property_animateable`: whether a RNA pointer & propoerty is
animateable, based on their types and definition.
* `RNA_property_anim_editable`: whether a specific data referenced by
the RNA pointer and property is effectively user-editable.
The new `driveable` check added by 427eed292d is also renamed to
`RNA_property_driver_editable` (since the basic type-based
`RNA_property_animateable` is also valid for drivers currently).
Pull Request: https://projects.blender.org/blender/blender/pulls/119089
The Realtime Compositor crashes with intricate node setups. That's
due to hardware limitations where shaders can't have as many output
images as needed by the compositor shader operations. To fix this, we
recursively split shader operations until their output count fits the
hardware limitation.
Pull Request: https://projects.blender.org/blender/blender/pulls/119075
Typically nodes that edit instances only change the top level of
instances. As an oversight, that wasn't done in the sort elements node.
This causes problems as the top level of instances are reordered and
nested instances are edited. As the top-level is replaced, its
contained geometry sets (the nested instances) are deleted.
To fix, only reoder the top-level instances in this node.
The "capture field on geometry" utility is used in many places to store
the result of field evaluation as an attribute. There is a special case
for when an attribute already exists with the same name, data type, and
domain. But when exactly the same attribute was stored, it would assert
because it ended up copying an array to itself. Arguments for those copy
functions aren't supposed to alias each other.
As a fix, clarify the logic a bit to return earlier in this case.
Also remove a redundant case handling the same thing later on
in the function.
Pull Request: https://projects.blender.org/blender/blender/pulls/119063
This PR adds an extra check to exit from sculpt gesture code early to
avoid attempting to allocate a 3 * (UINT_MAX - 1) amount of elements
inside the trim gesture code.
Pull Request: https://projects.blender.org/blender/blender/pulls/119073
The armature reported had two bones with a `bMotionPath` but its lengths
are zero (which causes trouble in `motion_path_cache` drawing code due
to 0 allocations).
Not exactly sure how we got there, something like
`animviz_verify_motionpaths` should take care of this already in current
code, but this might be from a time where there were not enough sanity
checks.
So now early out in `motion_path_cache` if we encounter such a
"corrupted" motion path.
Pull Request: https://projects.blender.org/blender/blender/pulls/119081
This can happen e.g. when relative "//" is in Preferences > File Paths >
Temporary Files is used.
Now catch the corresponding COLLADASW::StreamWriterException
and cancel export then.
NOTE: 51126fab33 might have prevented the most common case
to run into this crash (but there might be other cases still so being safe
here does not hurt)
Pull Request: https://projects.blender.org/blender/blender/pulls/118958
Regression from 427eed292d, in IDProperty case the 'ensured' PropertyRNA
pointer is some sort of empty template, and cannot be used for many
things.
Instead of calling `rna_ensure_property` twice for each call to
`RNA_property_animateable`, rather add an optional parameter to static
helper `rna_property_editable_do`, and call it directly from
`RNA_property_animateable`.
Although rare (and not recommended!), it can happen that a same exact
RNA path points to a different type of data.
This can come from an update of the code itself, but this is very
unlikely and discouraged.
However, geometry nodes and their 'modifiers' interface have made it way
more easy to create such conflicting situation, since users are free to
re-arrange and edit the nodes and their 'public' interface as they
want...
Found out while investigating some unrelated issues in some studio Gold
production files (namely,
`pro/shots/090_joining_whale/090_0130/090_0130-anim.blend` r2110
exhibits such issue for `OBGEO-mika-body`
`modifiers["RIG-GN-mask-clothing"]["Socket_3"]`, where the RNA type
changes from integer to bool).
Other minor changes:
- Remove reference to `TMP` environment variable in the `--help` text
as this isn't a posix standard and is noted as something that may be
removed in the future.
- Show WIN32 `TEMP` when showing all help text so it will be included
in the user manual.
Fix for Sculpt: Color Filter crash #117824
This change fixes the crash due to invalid active color layer
in the Undo/Redo stack when redoing from the original state.
Previously when performing a redo to a filter color state from the
original state, it cased a crash because
&((SculptUndoStep *)us_iter)->active_color_start did not contain valid
color data in the original state.
In this PR we check if is the original state and use the
&((SculptUndoStep *)us_iter)->active_color_end instead which is
de correct data to use.
- [x] Fix color update when redo from initial state
Pull Request: https://projects.blender.org/blender/blender/pulls/118885
`sock_rotation` has higher priority (6) than the vector socket (4).
Hence inserting node between vector-vector link joins thorugh "rotation"
socket (`get_main_socket()` / `get_main_socket_priority()`).
This can be fixed by making "vector" input socket as default for link.
But this will break the link creation when node is inserted between
rotation-rotation link. It seems rotation is converted to vectors so
perhaps make sense to make "vector" as default socket for link.
Pull Request: https://projects.blender.org/blender/blender/pulls/116550
The clipping was introduced because it looked a bit like the dots are
above the scrollbar. However, the clipping looks worse and the dots
are actually below the scrollbar. If we don't want stuff to be visible
through the scrollbar, it should be more opaque.
It's possible that multiple custom data layers share the same underlying data.
This data is only written once (per data-block) currently. However, when reading
the data again, two separate `ImplicitSharingInfo` were constructed which
referenced the same underlying memory. The fix is to reuse previously created
`ImplicitSharingInfo` that manage the same data.
Pull Request: https://projects.blender.org/blender/blender/pulls/118991
When adding strips that generate image on their own, while 3 or more
strips are selected, it emits error. This was caused by incorrect
handling of this case in `seq_effect_find_selected()`. If effect has no
inputs, function should return early.
Pull Request: https://projects.blender.org/blender/blender/pulls/118866
Second issue reported in the comment was caused by some shapekeys
flagged as embedded liboverride data, when their owner ID (Mesh e.g.)
is not a liboverride at all.
The `BKE_lib_override_library_validate` called on file read was only
covering real liboverride IDs, which where then supposed to take care of
their own embedded data. But since the owner ID is already a full
non-override ID, its embedded data ended up never being properly
sanitized.
Most likely more corruption data from quite old files and/or deprecated
experimental features.
For various reasons, node tools don't support some data. Shape keys aren't
supported because their format is entirely different for evaluated and
original data-blocks, and node tools currently work in the "evaluated"
world. Though that would be nice to change, in the meantime users
should at least be warned when this happens.
This PR adds a simple "Mesh shape key data removed" operator warning.
See #113662
Pull Request: https://projects.blender.org/blender/blender/pulls/118986
This fixes#116096 and is based on #115249 with some changes.
This patch contains three changes:
* `NodeSocket.links` in the Python API gives the links in the correct order.
* `NodeLink.multi_input_sort_id` gives read-only access to an id that's used
for sorting. Note that for historical reasons the highest id is the first link.
* `NodeLink.swap_multi_input_sort_id(other_link)` provides a safe way to
change the order of links connected to a multi-input socket.
Co-authored-by: Adrian Bibby Walther <adrianbibbywalther@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/118987
Building the depsgraph from a worker thread is unsafe currently, as it
may trigger some deferred processing on the Main data itself.
Mimic what was already done for USD (from `5cf3654d9d`) and build the
graph before launching `export_startjob`.
Pull Request: https://projects.blender.org/blender/blender/pulls/118974
This PR initializes all brushes with the default automasking cavity
curve when a `startup.blend` file is loaded. Because there exists a
series of brushes that are added if they are not found in the
`startup.blend` file (e.g. "Paint") **after** the file is already
loaded, the existing fallback code to handle `nullptr` in the loader
code does not run.
Pull Request: https://projects.blender.org/blender/blender/pulls/118943
Recurse selection was not restricted to "mouse over icon" during range
selection (i.e. if we shift- double click on any area of tree element,
resurse select is still executed, which is wrong)
Also did a bit cleanup to use existing `is_over_icon` instead of calling
`outliner_item_is_co_over_icon` multiple times
Pull Request: https://projects.blender.org/blender/blender/pulls/118556
The `RNA_property_animateable` would check for some conditions, where it
is not valid to add or edit animations (e.g. if using a linked Action
ID...).
Add a new `RNA_property_drivable`, which is essentially a call to
`RNA_property_animateable` with extra checks in liboverride cases, as
drivers are stored directly in the AnimData struct, instead of their own
dedicated ID.
Pull Request: https://projects.blender.org/blender/blender/pulls/118809
There seems to not be a strict rule to only have armatures as parents to
single bones, apparently collada files can also be set up to have mesh
parents for bones. As a consequence, the collada importer
`joint_parent_map` is not safe to fetch objects from and assume their
data can be cast to `bArmature`.
Ultimately, the `joint_parent_map` needs to be looked at again, this
patch just avoids a crash in this scenario (so no such joints will be
iported). Still better than crashing I guess.
Pull Request: https://projects.blender.org/blender/blender/pulls/118751
One of the consequences of the mistake in 3fcf535d2e (fixed in previous
commit), was that the more recent `LIB_EMBEDDED_DATA_LIB_OVERRIDE` ID
flag could be wrongly set in some nodetrees from pre-2.76 blendfiles.
This commit adds a check that embedded IDs flagged with
`LIB_EMBEDDED_DATA_LIB_OVERRIDE` are actually embedded IDs of a
liboverride.
Pull Request: https://projects.blender.org/blender/blender/pulls/118921
In 3fcf535d2e, the `ID.flag` data was split, keeping persisten flags in
`ID.flag`, and moving runtime ones into a new `ID.tag` data.
Some versionning code was then added to cleanup the existing `ID.flag`
on file read, but embedded IDs (root node trees only, back then) are not
stored in Main data-base, and were skipped.
Note that this fixes the conversion of older (2.76.4 and older) files.
There is no reliable way to cleanup files opened and saved from more
recent versions of Blender unfortunately.