[Bf-blender-cvs] [32b1a13fa1e] master: Cleanup: move public doc-strings into headers for 'sequencer'

Campbell Barton noreply at git.blender.org
Wed Dec 8 11:05:41 CET 2021


Commit: 32b1a13fa1e427bc5b2cce2bf179fd274679e08f
Author: Campbell Barton
Date:   Wed Dec 8 21:02:29 2021 +1100
Branches: master
https://developer.blender.org/rB32b1a13fa1e427bc5b2cce2bf179fd274679e08f

Cleanup: move public doc-strings into headers for 'sequencer'

Ref T92709

===================================================================

M	source/blender/sequencer/SEQ_add.h
M	source/blender/sequencer/SEQ_clipboard.h
M	source/blender/sequencer/SEQ_edit.h
M	source/blender/sequencer/SEQ_iterator.h
M	source/blender/sequencer/SEQ_prefetch.h
M	source/blender/sequencer/SEQ_relations.h
M	source/blender/sequencer/SEQ_render.h
M	source/blender/sequencer/SEQ_sequencer.h
M	source/blender/sequencer/SEQ_time.h
M	source/blender/sequencer/SEQ_transform.h
M	source/blender/sequencer/SEQ_utils.h
M	source/blender/sequencer/intern/clipboard.c
M	source/blender/sequencer/intern/effects.c
M	source/blender/sequencer/intern/effects.h
M	source/blender/sequencer/intern/image_cache.c
M	source/blender/sequencer/intern/image_cache.h
M	source/blender/sequencer/intern/iterator.c
M	source/blender/sequencer/intern/multiview.c
M	source/blender/sequencer/intern/multiview.h
M	source/blender/sequencer/intern/prefetch.c
M	source/blender/sequencer/intern/prefetch.h
M	source/blender/sequencer/intern/render.c
M	source/blender/sequencer/intern/sequence_lookup.c
M	source/blender/sequencer/intern/sequencer.c
M	source/blender/sequencer/intern/sequencer.h
M	source/blender/sequencer/intern/strip_add.c
M	source/blender/sequencer/intern/strip_edit.c
M	source/blender/sequencer/intern/strip_relations.c
M	source/blender/sequencer/intern/strip_time.c
M	source/blender/sequencer/intern/strip_time.h
M	source/blender/sequencer/intern/strip_transform.c
M	source/blender/sequencer/intern/utils.c

===================================================================

diff --git a/source/blender/sequencer/SEQ_add.h b/source/blender/sequencer/SEQ_add.h
index d2a731d9953..9a9f229e2d7 100644
--- a/source/blender/sequencer/SEQ_add.h
+++ b/source/blender/sequencer/SEQ_add.h
@@ -67,11 +67,30 @@ typedef struct SeqLoadData {
   bool allow_invalid_file; /* Used by RNA API to create placeholder strips. */
 } SeqLoadData;
 
+/**
+ * Initialize common SeqLoadData members
+ *
+ * \param load_data: SeqLoadData to be initialized
+ * \param name: strip name (can be NULL)
+ * \param path: path to file that is used as strip input (can be NULL)
+ * \param start_frame: timeline frame where strip will be created
+ * \param channel: timeline channel where strip will be created
+ */
 void SEQ_add_load_data_init(struct SeqLoadData *load_data,
                             const char *name,
                             const char *path,
                             const int start_frame,
                             const int channel);
+/**
+ * Add image strip.
+ * \note Use #SEQ_add_image_set_directory() and #SEQ_add_image_load_file() to load image sequences
+ *
+ * \param main: Main reference
+ * \param scene: Scene where strips will be added
+ * \param seqbase: ListBase where strips will be added
+ * \param load_data: SeqLoadData with information necessary to create strip
+ * \return created strip
+ */
 struct Sequence *SEQ_add_image_strip(struct Main *bmain,
                                      struct Scene *scene,
                                      struct ListBase *seqbase,
@@ -84,26 +103,88 @@ struct Sequence *SEQ_add_sound_strip(struct Main *bmain,
 struct Sequence *SEQ_add_meta_strip(struct Scene *scene,
                                     struct ListBase *seqbase,
                                     struct SeqLoadData *load_data);
+/**
+ * Add movie strip.
+ *
+ * \param main: Main reference
+ * \param scene: Scene where strips will be added
+ * \param seqbase: ListBase where strips will be added
+ * \param load_data: SeqLoadData with information necessary to create strip
+ * \return created strip
+ */
 struct Sequence *SEQ_add_movie_strip(struct Main *bmain,
                                      struct Scene *scene,
                                      struct ListBase *seqbase,
                                      struct SeqLoadData *load_data,
                                      double *r_start_offset);
+/**
+ * Add scene strip.
+ *
+ * \param scene: Scene where strips will be added
+ * \param seqbase: ListBase where strips will be added
+ * \param load_data: SeqLoadData with information necessary to create strip
+ * \return created strip
+ */
 struct Sequence *SEQ_add_scene_strip(struct Scene *scene,
                                      struct ListBase *seqbase,
                                      struct SeqLoadData *load_data);
+/**
+ * Add movieclip strip.
+ *
+ * \param scene: Scene where strips will be added
+ * \param seqbase: ListBase where strips will be added
+ * \param load_data: SeqLoadData with information necessary to create strip
+ * \return created strip
+ */
 struct Sequence *SEQ_add_movieclip_strip(struct Scene *scene,
                                          struct ListBase *seqbase,
                                          struct SeqLoadData *load_data);
+/**
+ * Add mask strip.
+ *
+ * \param scene: Scene where strips will be added
+ * \param seqbase: ListBase where strips will be added
+ * \param load_data: SeqLoadData with information necessary to create strip
+ * \return created strip
+ */
 struct Sequence *SEQ_add_mask_strip(struct Scene *scene,
                                     struct ListBase *seqbase,
                                     struct SeqLoadData *load_data);
+/**
+ * Add effect strip.
+ *
+ * \param scene: Scene where strips will be added
+ * \param seqbase: ListBase where strips will be added
+ * \param load_data: SeqLoadData with information necessary to create strip
+ * \return created strip
+ */
 struct Sequence *SEQ_add_effect_strip(struct Scene *scene,
                                       struct ListBase *seqbase,
                                       struct SeqLoadData *load_data);
+/**
+ * Set directory used by image strip.
+ *
+ * \param seq: image strip to be changed
+ * \param path: directory path
+ */
 void SEQ_add_image_set_directory(struct Sequence *seq, char *path);
+/**
+ * Set directory used by image strip.
+ *
+ * \param seq: image strip to be changed
+ * \param strip_frame: frame index of strip to be changed
+ * \param filename: image filename (only filename, not complete path)
+ */
 void SEQ_add_image_load_file(struct Sequence *seq, size_t strip_frame, char *filename);
+/**
+ * Set image strip alpha mode
+ *
+ * \param seq: image strip to be changed
+ */
 void SEQ_add_image_init_alpha_mode(struct Sequence *seq);
+/**
+ * \note caller should run `SEQ_time_update_sequence(scene, seq)` after..
+ */
 void SEQ_add_reload_new_file(struct Main *bmain,
                              struct Scene *scene,
                              struct Sequence *seq,
diff --git a/source/blender/sequencer/SEQ_clipboard.h b/source/blender/sequencer/SEQ_clipboard.h
index ea7f01e6ae3..72388c5db64 100644
--- a/source/blender/sequencer/SEQ_clipboard.h
+++ b/source/blender/sequencer/SEQ_clipboard.h
@@ -38,6 +38,13 @@ void SEQ_clipboard_pointers_store(struct Main *bmain, struct ListBase *seqbase);
 void SEQ_clipboard_pointers_restore(struct ListBase *seqbase, struct Main *bmain);
 void SEQ_clipboard_free(void);
 void SEQ_clipboard_active_seq_name_store(struct Scene *scene);
+/**
+ * Check if strip was active when it was copied. User should restrict this check to pasted strips
+ * before ensuring original name, because strip name comparison is used to check.
+ *
+ * \param pasted_seq: Strip that is pasted(duplicated) from clipboard
+ * \return true if strip was active, false otherwise
+ */
 bool SEQ_clipboard_pasted_seq_was_active(struct Sequence *pasted_seq);
 
 #ifdef __cplusplus
diff --git a/source/blender/sequencer/SEQ_edit.h b/source/blender/sequencer/SEQ_edit.h
index f3a64c9cd62..c237ffea9c6 100644
--- a/source/blender/sequencer/SEQ_edit.h
+++ b/source/blender/sequencer/SEQ_edit.h
@@ -33,18 +33,40 @@ struct Scene;
 struct Sequence;
 
 int SEQ_edit_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str);
+/**
+ * Move sequence to seqbase.
+ *
+ * \param scene: Scene containing the editing
+ * \param dst_seqbase: seqbase where `seq` is located
+ * \param seq: Sequence to move
+ * \param dst_seqbase: Target seqbase
+ */
 bool SEQ_edit_move_strip_to_seqbase(struct Scene *scene,
                                     ListBase *seqbase,
                                     struct Sequence *src_seq,
                                     ListBase *dst_seqbase);
+/**
+ * Move sequence to meta sequence.
+ *
+ * \param scene: Scene containing the editing
+ * \param src_seq: Sequence to move
+ * \param dst_seqm: Target Meta sequence
+ * \param error_str: Error message
+ */
 bool SEQ_edit_move_strip_to_meta(struct Scene *scene,
                                  struct Sequence *src_seq,
                                  struct Sequence *dst_seqm,
                                  const char **error_str);
 bool SEQ_meta_separate(struct Scene *scene, struct Sequence *src_meta, const char **error_str);
+/**
+ * Flag seq and its users (effects) for removal.
+ */
 void SEQ_edit_flag_for_removal(struct Scene *scene,
                                struct ListBase *seqbase,
                                struct Sequence *seq);
+/**
+ * Remove all flagged sequences, return true if sequence is removed.
+ */
 void SEQ_edit_remove_flagged_sequences(struct Scene *scene, struct ListBase *seqbase);
 void SEQ_edit_update_muting(struct Editing *ed);
 
@@ -53,6 +75,17 @@ typedef enum eSeqSplitMethod {
   SEQ_SPLIT_HARD,
 } eSeqSplitMethod;
 
+/**
+ * Split Sequence at timeline_frame in two.
+ *
+ * \param bmain: Main in which Sequence is located
+ * \param scene: Scene in which Sequence is located
+ * \param seqbase: ListBase in which Sequence is located
+ * \param seq: Sequence to be split
+ * \param timeline_frame: frame at which seq is split.
+ * \param method: affects type of offset to be applied to resize Sequence
+ * \return The newly created sequence strip. This is always Sequence on right side.
+ */
 struct Sequence *SEQ_edit_strip_split(struct Main *bmain,
                                       struct Scene *scene,
                                       struct ListBase *seqbase,
@@ -60,6 +93,15 @@ struct Sequence *SEQ_edit_strip_split(struct Main *bmain,
                                       const int timeline_frame,
                                       const eSeqSplitMethod method,
                                       const char **r_error);
+/**
+ * Find gap after initial_frame and move strips on right side to close the gap
+ *
+ * \param scene: Scene in which strips are located
+ * \param seqbase: ListBase in which strips are located
+ * \param initial_frame: frame on timeline from where gaps are searched for
+ * \param remove_all_gaps: remove all gaps instead of one gap
+ * \return true if gap is removed, otherwise false
+ */
 bool SEQ_edit_remove_gaps(struct Scene *scene,
                           struct ListBase *seqbase,
                           const int initial_frame,
diff --git a/source/blender/sequencer/SEQ_iterator.h b/source/blender/sequencer/SEQ_iterator.h
index d2a47a13db3..a3f378bcfd4 100644
--- a/source/blender/sequencer/SEQ_iterator.h
+++ b/source/blender/sequencer/SEQ_iterator.h
@@ -63,42 +63,179 @@ typedef struct SeqIterator {
   bool iterator_initialized;
 } SeqIterator;
 
+/**
+ * Utility function for SEQ_ITERATOR_FOREACH macro.
+ * Ensure, that iterator is initialized. During initialization return pointer to collection element
+ * and step gset iterator. When this function is called after iterator has been initialized, it
+ * will do nothing and return true.
+ *
+ * \param collection: collection to iterate
+ * \param iterator: iterator to be initialized
+ * \param r_seq: pointer to Sequence pointer
+ *
+ * \return false when iterator can not be initialized, true otherwise
+ */
 bool SEQ_iterator_ensure(SeqCollection *collection,
    

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list