Fix recent regression preventing animation on any linked data. #119089

Merged
Bastien Montagne merged 3 commits from mont29/blender:tmp-rna-fix-animateable-check into blender-v4.1-release 2024-03-06 10:03:04 +01:00

3 Commits

Author SHA1 Message Date
Bastien Montagne 004c17df55 Merge branch 'blender-v4.1-release' into tmp-rna-fix-animateable-check 2024-03-05 18:19:50 +01:00
Bastien Montagne e37a788fa2 `BKE_animsys_write_to_rna_path` also need to use `animateable` check.
This function is called from `animsys_evaluate_fcurves`, so yeah...
2024-03-05 18:17:46 +01:00
Bastien Montagne 375e1b2f1e Fix recent regression preventing animation on any linked data.
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
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).
2024-03-05 16:08:03 +01:00