diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-03-01 05:33:53 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-03-01 05:33:53 +0300 |
commit | da4ab26a478dd6e0f52c8bc8d0c324def048dfd9 (patch) | |
tree | e6f676a4f81881e171e89fab51800a2abc1ab3d5 /source/blender/makesrna/intern | |
parent | fbb8672da459a027a7dd3ccb798b2f5db1c73c59 (diff) |
Bugfix #21398: Renaming sequencer strip disables F-Curves
Related F-Curves were not being renamed when Sequencer strips were renamed.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 771751277c8..bacbf5f574e 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -236,9 +236,19 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value) { Scene *scene= (Scene*)ptr->id.data; Sequence *seq= (Sequence*)ptr->data; + char oldname[32]; + + /* make a copy of the old name first */ + BLI_strncpy(oldname, seq->name+2, sizeof(seq->name)-2); + + /* copy the new name into the name slot */ BLI_strncpy(seq->name+2, value, sizeof(seq->name)-2); - + + /* make sure the name is unique */ seqbase_unique_name_recursive(&scene->ed->seqbase, seq); + + /* fix all the animation data which may link to this */ + BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2); } static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr) |