VSE: Python API: Deprecate sequence properties and replace with new ones

This PR adds new RNA properties that deprecate and replace any `sequence` property.
The old prooperties are still there and fully functional, but the description is changed
to indicate that these will be removed in the future and that the new properties should
be used instead.

| Deprecated property | Replacement property |
| --------------------------------- | ----------------------------------- |
| `context.active_sequence_strip` | `context.active_strip` |
| `context.selected_editable_sequences` | `context.selected_editable_strips` |
| `context.selected_sequences` | `context.selected_strips` |
| `context.sequences` | `context.strips` |
| `SequenceEditor.sequences` | `SequenceEditor.strips` |
| `SequenceEditor.sequences_all` |  `SequenceEditor.strips_all` |
| `MetaStrip.sequences` | `MetaStrip.strips` |

Previously, rna paths for animation data on strips started with `sequence_editor.sequences`.
This PRadds versioning for the rna paths to make sure to use
the new naming scheme. This does mean that in previous versions of blender,
the animations don't show but the data is not lost (even if the file is saved in the older version).

Also do some cleanup of existing python scripts inside the source to use the
new properties.

Part of #132963.

Pull Request: https://projects.blender.org/blender/blender/pulls/133156
This commit is contained in:
Falk David
2025-01-21 11:30:20 +01:00
committed by Falk David
parent b976f71e1c
commit b9f253564e
20 changed files with 278 additions and 135 deletions

View File

@@ -2845,9 +2845,9 @@ class WM_OT_batch_rename(Operator):
return data_type_test
if data_type == data_type_test:
data = (
context.selected_sequences
context.selected_strips
if only_selected else
scene.sequence_editor.sequences_all,
scene.sequence_editor.strips_all,
"name",
iface_("Strip(s)"),
)