From 77744b581d082a692b35345bab57128c6915bc6d Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 11 Aug 2021 13:53:19 +0200 Subject: 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 --- source/blender/editors/animation/anim_ipo_utils.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source/blender/editors/animation') 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 */ -- cgit v1.2.3