From 3305a94fa1d80259651c776e088ec9c6a6f64e44 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 30 Jul 2020 11:58:18 +0200 Subject: Sequencer: Add session UUID management to Sequence This is the first step for having sequences covered with session UUID with the goal to remove code which uses original sequence pointer to match sequences. Currently this UUID is maintained on file load, allocation and leaf duplication function.There are more cases to cover and ensure UUID is re-generated or re-used when needed. It will be done as follow-up development. --- source/blender/blenkernel/BKE_sequencer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_sequencer.h') diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index c32abbb41c6..6997ea94786 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -527,6 +527,9 @@ typedef struct Sequence *(*SeqLoadFn)(struct bContext *, ListBase *, struct SeqL struct Sequence *BKE_sequence_alloc(ListBase *lb, int cfra, int machine, int type); +/* Generate new UUID for the given sequence. */ +void BKE_sequence_session_uuid_generate(struct Sequence *sequence); + void BKE_sequence_alpha_mode_from_extension(struct Sequence *seq); void BKE_sequence_init_colorspace(struct Sequence *seq); -- cgit v1.2.3 From cc63897c2275dc78af7a82684dde37282b3aa876 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 30 Jul 2020 12:23:37 +0200 Subject: Sequencer: Add session UUID check function Is aimed for use during development and debug, to help verifying that operations do not leave sequences with invalid UUIDs. --- source/blender/blenkernel/BKE_sequencer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel/BKE_sequencer.h') diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 6997ea94786..60a0bee801d 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -629,6 +629,10 @@ void BKE_sequencer_all_free_anim_ibufs(struct Scene *scene, int cfra); bool BKE_sequencer_check_scene_recursion(struct Scene *scene, struct ReportList *reports); bool BKE_sequencer_render_loop_check(struct Sequence *seq_main, struct Sequence *seq); +/* A debug and development function which checks whether sequences have unique UUIDs. + * Errors will be reported to the console. */ +void BKE_sequencer_check_uuids_unique_and_report(const struct Scene *scene); + #ifdef __cplusplus } #endif -- cgit v1.2.3