Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2021-08-11 14:53:19 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-08-13 16:17:00 +0300
commit77744b581d082a692b35345bab57128c6915bc6d (patch)
treeb9a43717b50ecda74792ea83e9a828c22c2183ec /source/blender/editors/animation/anim_ipo_utils.c
parent0b3c7544b532d99d80a25f3cb1f63f14480b46c8 (diff)
Fix T90595: some VSE strip properties do not identify strip name in anim
channel names Working with multiple strips keyframes was unneccessarily difficult in Animation Editors (since some anim channels could not be distinguished). Namely `Crop` and `Transform` are nested structs (nested under `Sequence`), so these were just displaying the raw struct name. Also strip modifiers did not have their strip name in their channel names. Now include the strip name for these. before {F10277439} after {F10277441} Maniphest Tasks: T90595 Differential Revision: https://developer.blender.org/D12193
Diffstat (limited to 'source/blender/editors/animation/anim_ipo_utils.c')
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 5992545bdbe..eda87cf1897 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -134,6 +134,28 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
else {
structname = RNA_struct_ui_name(ptr.type);
}
+
+ /* For the VSE, a strip's 'Transform' or 'Crop' is a nested (under Sequence) struct, but
+ * displaying the struct name alone is no meaningful information (and also cannot be
+ * filtered well), same for modifiers. So display strip name alongside as well. */
+ if (GS(ptr.owner_id->name) == ID_SCE) {
+ if (BLI_str_startswith(fcu->rna_path, "sequence_editor.sequences_all[\"")) {
+ if (strstr(fcu->rna_path, ".transform.") || strstr(fcu->rna_path, ".crop.") ||
+ strstr(fcu->rna_path, ".modifiers[")) {
+ char *stripname = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all[");
+ const char *structname_all = BLI_sprintfN(
+ "%s : %s", stripname ? stripname : "", structname);
+ if (free_structname) {
+ MEM_freeN((void *)structname);
+ }
+ if (stripname) {
+ MEM_freeN(stripname);
+ }
+ structname = structname_all;
+ free_structname = 1;
+ }
+ }
+ }
}
/* Property Name is straightforward */