From a5a302bd18061e833c4d629fffd06f57e7447d39 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Sat, 19 Dec 2020 06:44:57 +0100 Subject: Cleanup: Split SEQ_sequencer.h file --- source/blender/blenkernel/intern/bpath.c | 2 +- source/blender/blenkernel/intern/image.c | 2 +- source/blender/blenkernel/intern/ipo.c | 2 +- source/blender/blenkernel/intern/scene.c | 8 +- source/blender/blenkernel/intern/sound.c | 1 + source/blender/blenloader/intern/readfile.c | 3 + source/blender/blenloader/intern/versioning_250.c | 2 +- source/blender/blenloader/intern/versioning_260.c | 4 +- source/blender/blenloader/intern/versioning_270.c | 3 +- source/blender/blenloader/intern/versioning_280.c | 4 +- source/blender/blenloader/intern/versioning_290.c | 2 + .../blender/blenloader/intern/versioning_legacy.c | 2 +- .../depsgraph/intern/builder/deg_builder_nodes.cc | 2 +- .../intern/builder/deg_builder_relations.cc | 2 +- .../intern/eval/deg_eval_copy_on_write.cc | 2 +- .../eval/deg_eval_runtime_backup_sequencer.cc | 2 +- source/blender/editors/animation/anim_deps.c | 1 + source/blender/editors/animation/anim_filter.c | 1 + source/blender/editors/animation/anim_ops.c | 1 + source/blender/editors/render/render_internal.c | 2 +- source/blender/editors/render/render_opengl.c | 2 +- source/blender/editors/sound/sound_ops.c | 2 +- .../editors/space_outliner/outliner_select.c | 1 + .../blender/editors/space_outliner/outliner_sync.c | 2 +- .../editors/space_sequencer/sequencer_add.c | 8 + .../editors/space_sequencer/sequencer_draw.c | 9 + .../editors/space_sequencer/sequencer_edit.c | 12 + .../editors/space_sequencer/sequencer_modifier.c | 4 + .../editors/space_sequencer/sequencer_proxy.c | 3 + .../editors/space_sequencer/sequencer_select.c | 2 + .../editors/space_sequencer/sequencer_view.c | 2 + .../editors/space_sequencer/space_sequencer.c | 1 + .../transform/transform_convert_sequencer.c | 4 + source/blender/editors/transform/transform_snap.c | 1 + source/blender/editors/util/ed_util_imbuf.c | 1 + source/blender/imbuf/intern/colormanagement.c | 2 +- source/blender/makesrna/intern/rna_camera.c | 2 +- source/blender/makesrna/intern/rna_color.c | 3 +- source/blender/makesrna/intern/rna_movieclip.c | 2 +- source/blender/makesrna/intern/rna_scene.c | 2 + source/blender/makesrna/intern/rna_sequencer.c | 11 + source/blender/makesrna/intern/rna_sequencer_api.c | 4 + source/blender/makesrna/intern/rna_space.c | 2 +- source/blender/render/intern/pipeline.c | 3 +- source/blender/sequencer/CMakeLists.txt | 15 + source/blender/sequencer/SEQ_add.h | 89 ++++ source/blender/sequencer/SEQ_clipboard.h | 41 ++ source/blender/sequencer/SEQ_edit.h | 59 +++ source/blender/sequencer/SEQ_effects.h | 118 +++++ source/blender/sequencer/SEQ_iterator.h | 75 +++ source/blender/sequencer/SEQ_modifier.h | 88 ++++ source/blender/sequencer/SEQ_prefetch.h | 39 ++ source/blender/sequencer/SEQ_proxy.h | 57 +++ source/blender/sequencer/SEQ_relations.h | 73 +++ source/blender/sequencer/SEQ_render.h | 88 ++++ source/blender/sequencer/SEQ_select.h | 41 ++ source/blender/sequencer/SEQ_sequencer.h | 570 +-------------------- source/blender/sequencer/SEQ_sound.h | 44 ++ source/blender/sequencer/SEQ_time.h | 51 ++ source/blender/sequencer/SEQ_transform.h | 63 +++ source/blender/sequencer/SEQ_util.h | 58 +++ source/blender/sequencer/SEQ_utils.h | 60 +++ source/blender/sequencer/intern/clipboard.c | 2 +- source/blender/sequencer/intern/effects.c | 5 +- source/blender/sequencer/intern/image_cache.c | 3 + source/blender/sequencer/intern/iterator.c | 2 +- source/blender/sequencer/intern/modifier.c | 3 +- source/blender/sequencer/intern/prefetch.c | 3 +- source/blender/sequencer/intern/proxy.c | 2 + source/blender/sequencer/intern/render.c | 5 + source/blender/sequencer/intern/render.h | 3 +- source/blender/sequencer/intern/sequencer.c | 6 + source/blender/sequencer/intern/sound.c | 21 +- source/blender/sequencer/intern/strip_add.c | 6 + source/blender/sequencer/intern/strip_edit.c | 7 +- source/blender/sequencer/intern/strip_relations.c | 4 + source/blender/sequencer/intern/strip_select.c | 1 + source/blender/sequencer/intern/strip_time.c | 2 + source/blender/sequencer/intern/strip_transform.c | 4 + source/blender/sequencer/intern/utils.c | 4 + source/blender/windowmanager/intern/wm_init_exit.c | 2 +- source/blender/windowmanager/intern/wm_jobs.c | 2 +- 82 files changed, 1238 insertions(+), 611 deletions(-) create mode 100644 source/blender/sequencer/SEQ_add.h create mode 100644 source/blender/sequencer/SEQ_clipboard.h create mode 100644 source/blender/sequencer/SEQ_edit.h create mode 100644 source/blender/sequencer/SEQ_effects.h create mode 100644 source/blender/sequencer/SEQ_iterator.h create mode 100644 source/blender/sequencer/SEQ_modifier.h create mode 100644 source/blender/sequencer/SEQ_prefetch.h create mode 100644 source/blender/sequencer/SEQ_proxy.h create mode 100644 source/blender/sequencer/SEQ_relations.h create mode 100644 source/blender/sequencer/SEQ_render.h create mode 100644 source/blender/sequencer/SEQ_select.h create mode 100644 source/blender/sequencer/SEQ_sound.h create mode 100644 source/blender/sequencer/SEQ_time.h create mode 100644 source/blender/sequencer/SEQ_transform.h create mode 100644 source/blender/sequencer/SEQ_util.h create mode 100644 source/blender/sequencer/SEQ_utils.h (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index f624d0ae057..762ced7dc5f 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -78,7 +78,7 @@ #include "CLG_log.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #ifndef _MSC_VER # include "BLI_strict_flags.h" diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 090ab571542..ab57d14d2cf 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -93,7 +93,7 @@ #include "RE_pipeline.h" -#include "SEQ_sequencer.h" /* seq_foreground_frame_get() */ +#include "SEQ_utils.h" /* SEQ_get_topmost_sequence() */ #include "GPU_texture.h" diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 0e611b21304..1ab6e61e20e 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -74,7 +74,7 @@ #include "MEM_guardedalloc.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include "BLO_read_write.h" diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 7acd54b6af1..c099fdb0e19 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -109,7 +109,13 @@ #include "RE_engine.h" +#include "SEQ_edit.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" +#include "SEQ_proxy.h" +#include "SEQ_relations.h" #include "SEQ_sequencer.h" +#include "SEQ_sound.h" #include "BLO_read_write.h" @@ -3733,6 +3739,6 @@ void BKE_scene_eval_sequencer_sequences(Depsgraph *depsgraph, Scene *scene) } } SEQ_ALL_END; - SEQ_sound_update_muting(scene->ed); + SEQ_edit_update_muting(scene->ed); SEQ_sound_update_bounds_all(scene); } diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index d167fc4e51f..78729fb9261 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -68,6 +68,7 @@ #include "BLO_read_write.h" #include "SEQ_sequencer.h" +#include "SEQ_sound.h" static void sound_free_audio(bSound *sound); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 73606db9a41..b61abd4ed06 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -105,6 +105,9 @@ #include "BLO_readfile.h" #include "BLO_undofile.h" +#include "SEQ_clipboard.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" #include "SEQ_sequencer.h" #include "readfile.h" diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index b282a978e8a..23f46e15f51 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -77,7 +77,7 @@ #include "BKE_sound.h" #include "BKE_texture.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include "NOD_socket.h" diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 86085ddbc73..767f24cf175 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -67,7 +67,9 @@ #include "BKE_texture.h" #include "BKE_tracking.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" +#include "SEQ_utils.h" #ifdef WITH_FFMPEG # include "BKE_writeffmpeg.h" diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index ee5efff7216..df9268f0da1 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -66,7 +66,8 @@ #include "BKE_tracking.h" #include "DNA_material_types.h" -#include "SEQ_sequencer.h" +#include "SEQ_effects.h" +#include "SEQ_iterator.h" #include "BLI_listbase.h" #include "BLI_math.h" diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f7ef7f74a42..88493de5076 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -97,7 +97,9 @@ #include "BKE_unit.h" #include "BKE_workspace.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" +#include "SEQ_utils.h" /* Only for IMB_BlendMode */ #include "IMB_imbuf.h" diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 86293f273b3..b27e62c9218 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -66,6 +66,8 @@ #include "RNA_access.h" +#include "SEQ_proxy.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" #include "BLO_readfile.h" diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 6f459339675..dc8f7a0305a 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -80,7 +80,7 @@ #include "BKE_particle.h" #include "BKE_pointcache.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include "NOD_socket.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index e5301532ddc..eb20dfb69a2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -109,7 +109,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include "intern/builder/deg_builder.h" #include "intern/depsgraph.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index de68ec6210e..df48cb91ce7 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -99,7 +99,7 @@ #include "RNA_access.h" #include "RNA_types.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 5119de1ed9e..2544bb1642c 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -92,7 +92,7 @@ #include "BKE_pointcache.h" #include "BKE_sound.h" -#include "SEQ_sequencer.h" +#include "SEQ_relations.h" #include "intern/builder/deg_builder.h" #include "intern/builder/deg_builder_nodes.h" diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequencer.cc b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequencer.cc index c0e284a930e..34c23740730 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequencer.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequencer.cc @@ -30,7 +30,7 @@ #include "BKE_sound.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" namespace blender::deg { diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index fbd55592729..17251587d3b 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -50,6 +50,7 @@ #include "RNA_access.h" #include "SEQ_sequencer.h" +#include "SEQ_utils.h" #include "ED_anim_api.h" diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 83665d7a053..f2022194ed5 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -101,6 +101,7 @@ #include "ED_markers.h" #include "SEQ_sequencer.h" +#include "SEQ_utils.h" #include "UI_resources.h" /* for TH_KEYFRAME_SCALE lookup */ diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 07601414fb0..a5514f6517e 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -56,6 +56,7 @@ #include "DEG_depsgraph_query.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" #include "anim_intern.h" diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 46680f649cd..10cf4131584 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -83,7 +83,7 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "SEQ_sequencer.h" +#include "SEQ_relations.h" #include "BLO_undofile.h" diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index f7275b06804..1069f942a7a 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -77,7 +77,7 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "SEQ_sequencer.h" +#include "SEQ_render.h" #include "GPU_framebuffer.h" #include "GPU_matrix.h" diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 5bc13ec1b75..34617804888 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -52,7 +52,7 @@ #include "RNA_define.h" #include "RNA_enum_types.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include "UI_interface.h" diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index a1df922b335..6380bb9505e 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -72,6 +72,7 @@ #include "ED_sequencer.h" #include "ED_undo.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" #include "WM_api.h" diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c index b3e8761f60b..0b2d1ce34ec 100644 --- a/source/blender/editors/space_outliner/outliner_sync.c +++ b/source/blender/editors/space_outliner/outliner_sync.c @@ -46,7 +46,7 @@ #include "ED_object.h" #include "ED_outliner.h" -#include "SEQ_sequencer.h" +#include "SEQ_select.h" #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index e40e9f5429d..f9076145f2f 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -50,7 +50,15 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_add.h" +#include "SEQ_effects.h" +#include "SEQ_relations.h" +#include "SEQ_render.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" +#include "SEQ_utils.h" /* For menu, popup, icons, etc. */ #include "ED_screen.h" diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 2f146690416..1b213746add 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -68,7 +68,16 @@ #include "BIF_glutil.h" +#include "SEQ_effects.h" +#include "SEQ_prefetch.h" +#include "SEQ_proxy.h" +#include "SEQ_relations.h" +#include "SEQ_render.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" +#include "SEQ_utils.h" #include "UI_interface.h" #include "UI_resources.h" diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index f78b602ceda..c3553ac88ad 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -45,7 +45,19 @@ #include "BKE_report.h" #include "BKE_sound.h" +#include "SEQ_add.h" +#include "SEQ_clipboard.h" +#include "SEQ_edit.h" +#include "SEQ_effects.h" +#include "SEQ_iterator.h" +#include "SEQ_prefetch.h" +#include "SEQ_relations.h" +#include "SEQ_render.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" +#include "SEQ_utils.h" #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c index e8f4fac1920..f11a879912c 100644 --- a/source/blender/editors/space_sequencer/sequencer_modifier.c +++ b/source/blender/editors/space_sequencer/sequencer_modifier.c @@ -34,6 +34,10 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" +#include "SEQ_relations.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" /* Own include. */ diff --git a/source/blender/editors/space_sequencer/sequencer_proxy.c b/source/blender/editors/space_sequencer/sequencer_proxy.c index 032885c2719..b04363a4f33 100644 --- a/source/blender/editors/space_sequencer/sequencer_proxy.c +++ b/source/blender/editors/space_sequencer/sequencer_proxy.c @@ -34,6 +34,9 @@ #include "BKE_main.h" #include "BKE_report.h" +#include "SEQ_iterator.h" +#include "SEQ_proxy.h" +#include "SEQ_relations.h" #include "SEQ_sequencer.h" #include "WM_api.h" diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 6534a63f03e..a6027a2472c 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -39,6 +39,8 @@ #include "RNA_define.h" +#include "SEQ_iterator.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" /* For menu, popup, icons, etc. */ diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index 250a0afc717..8805d5af227 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -38,7 +38,9 @@ #include "RNA_define.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" /* For menu, popup, icons, etc. */ #include "ED_anim_api.h" diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 19146db3719..b11e2a32b87 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -52,6 +52,7 @@ #include "RNA_access.h" #include "SEQ_sequencer.h" +#include "SEQ_utils.h" #include "UI_interface.h" #include "UI_resources.h" diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 83e384010bd..ebb0b6823a3 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -32,7 +32,11 @@ #include "ED_markers.h" +#include "SEQ_relations.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" +#include "SEQ_utils.h" #include "UI_view2d.h" diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 8d20f1686f2..d407cea0033 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -42,6 +42,7 @@ #include "RNA_access.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" #include "WM_types.h" diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index ca97a7b21c3..0f2e280251f 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -42,6 +42,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" #include "UI_view2d.h" diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 2c95d49612f..046e233fd05 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -57,7 +57,7 @@ #include "RNA_define.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" #include diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 2ac8b50f381..9d0ee90de60 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -40,7 +40,7 @@ # include "DEG_depsgraph.h" # include "DEG_depsgraph_build.h" -# include "SEQ_sequencer.h" +# include "SEQ_relations.h" static float rna_Camera_angle_get(PointerRNA *ptr) { diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 2293b892ddb..39aeeb430c2 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -60,7 +60,8 @@ # include "IMB_colormanagement.h" # include "IMB_imbuf.h" -# include "SEQ_sequencer.h" +# include "SEQ_iterator.h" +# include "SEQ_relations.h" static int rna_CurveMapping_curves_length(PointerRNA *ptr) { diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index e7f697b281d..d32872d1682 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -49,7 +49,7 @@ # include "DNA_screen_types.h" # include "DNA_space_types.h" -# include "SEQ_sequencer.h" +# include "SEQ_relations.h" static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index bce10b42ea8..b93922e46f2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -699,7 +699,9 @@ const EnumPropertyItem rna_enum_transform_orientation_items[] = { # include "DEG_depsgraph_build.h" # include "DEG_depsgraph_query.h" +# include "SEQ_relations.h" # include "SEQ_sequencer.h" +# include "SEQ_sound.h" # ifdef WITH_FREESTYLE # include "FRS_freestyle.h" diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 43d65a4380b..4ab32d54665 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -46,7 +46,18 @@ #include "rna_internal.h" +#include "SEQ_add.h" +#include "SEQ_effects.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" +#include "SEQ_prefetch.h" +#include "SEQ_proxy.h" +#include "SEQ_relations.h" #include "SEQ_sequencer.h" +#include "SEQ_sound.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" +#include "SEQ_utils.h" #include "WM_types.h" diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 67497c2da2a..070fb08c3b4 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -51,6 +51,10 @@ # include "IMB_imbuf.h" # include "IMB_imbuf_types.h" +# include "SEQ_add.h" +# include "SEQ_edit.h" +# include "SEQ_relations.h" +# include "SEQ_render.h" # include "SEQ_sequencer.h" # include "WM_api.h" diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 5604ccd9655..acfb317c616 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -53,7 +53,7 @@ #include "rna_internal.h" -#include "SEQ_sequencer.h" +#include "SEQ_relations.h" #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index fc6ff51976d..f484977d2b4 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -88,7 +88,8 @@ #include "RE_pipeline.h" #include "RE_texture.h" -#include "SEQ_sequencer.h" +#include "SEQ_relations.h" +#include "SEQ_render.h" #include "../../windowmanager/WM_api.h" /* XXX */ #include "../../windowmanager/wm_window.h" /* XXX */ diff --git a/source/blender/sequencer/CMakeLists.txt b/source/blender/sequencer/CMakeLists.txt index db46fe91718..82e303806b3 100644 --- a/source/blender/sequencer/CMakeLists.txt +++ b/source/blender/sequencer/CMakeLists.txt @@ -44,7 +44,22 @@ set(INC_SYS ) set(SRC + SEQ_add.h + SEQ_clipboard.h + SEQ_edit.h + SEQ_effects.h + SEQ_iterator.h + SEQ_modifier.h + SEQ_prefetch.h + SEQ_proxy.h + SEQ_relations.h + SEQ_render.h + SEQ_select.h SEQ_sequencer.h + SEQ_sound.h + SEQ_time.h + SEQ_transform.h + SEQ_utils.h intern/clipboard.c intern/effects.c diff --git a/source/blender/sequencer/SEQ_add.h b/source/blender/sequencer/SEQ_add.h new file mode 100644 index 00000000000..9ed617e6963 --- /dev/null +++ b/source/blender/sequencer/SEQ_add.h @@ -0,0 +1,89 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct ListBase; +struct bContext; + +/* api for adding new sequence strips */ +typedef struct SeqLoadInfo { + int start_frame; + int end_frame; + int channel; + int flag; /* use sound, replace sel */ + int type; + int len; /* only for image strips */ + char path[1024]; /* 1024 = FILE_MAX */ + eSeqImageFitMethod fit_method; + + /* multiview */ + char views_format; + struct Stereo3dFormat *stereo3d_format; + + /* return values */ + char name[64]; + struct Sequence *seq_sound; /* for movie's */ + int tot_success; + int tot_error; +} SeqLoadInfo; + +/* SeqLoadInfo.flag */ +#define SEQ_LOAD_REPLACE_SEL (1 << 0) +#define SEQ_LOAD_FRAME_ADVANCE (1 << 1) +#define SEQ_LOAD_MOVIE_SOUND (1 << 2) +#define SEQ_LOAD_SOUND_CACHE (1 << 3) +#define SEQ_LOAD_SYNC_FPS (1 << 4) +#define SEQ_LOAD_SOUND_MONO (1 << 5) + +/* use as an api function */ +typedef struct Sequence *(*SeqLoadFn)(struct bContext *, ListBase *, struct SeqLoadInfo *); + +struct Sequence *SEQ_add_image_strip(struct bContext *C, + ListBase *seqbasep, + struct SeqLoadInfo *seq_load); +struct Sequence *SEQ_add_sound_strip(struct bContext *C, + ListBase *seqbasep, + struct SeqLoadInfo *seq_load); +struct Sequence *SEQ_add_movie_strip(struct bContext *C, + ListBase *seqbasep, + struct SeqLoadInfo *seq_load); +void SEQ_add_reload_new_file(struct Main *bmain, + struct Scene *scene, + struct Sequence *seq, + const bool lock_range); +void SEQ_add_movie_reload_if_needed(struct Main *bmain, + struct Scene *scene, + struct Sequence *seq, + bool *r_was_reloaded, + bool *r_can_produce_frames); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_clipboard.h b/source/blender/sequencer/SEQ_clipboard.h new file mode 100644 index 00000000000..4b2bf69a8ac --- /dev/null +++ b/source/blender/sequencer/SEQ_clipboard.h @@ -0,0 +1,41 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct ListBase; +struct Main; + +extern struct ListBase seqbase_clipboard; +extern int seqbase_clipboard_frame; +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); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_edit.h b/source/blender/sequencer/SEQ_edit.h new file mode 100644 index 00000000000..b0c5d46d713 --- /dev/null +++ b/source/blender/sequencer/SEQ_edit.h @@ -0,0 +1,59 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct Main; +struct ListBase; + +int SEQ_edit_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str); +void SEQ_edit_flag_for_removal(struct Scene *scene, + struct ListBase *seqbase, + struct Sequence *seq); +void SEQ_edit_remove_flagged_sequences(struct Scene *scene, struct ListBase *seqbase); +void SEQ_edit_update_muting(struct Editing *ed); + +typedef enum eSeqSplitMethod { + SEQ_SPLIT_SOFT, + SEQ_SPLIT_HARD, +} eSeqSplitMethod; + +struct Sequence *SEQ_edit_strip_split(struct Main *bmain, + struct Scene *scene, + struct ListBase *seqbase, + struct Sequence *seq, + const int timeline_frame, + const eSeqSplitMethod method); +bool SEQ_edit_remove_gaps(struct Scene *scene, + struct ListBase *seqbase, + const int initial_frame, + const bool remove_all_gaps); +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_effects.h b/source/blender/sequencer/SEQ_effects.h new file mode 100644 index 00000000000..1258efd2694 --- /dev/null +++ b/source/blender/sequencer/SEQ_effects.h @@ -0,0 +1,118 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Sequence; +struct ImBuf; +struct SeqRenderData; +struct TextVars; + +/* Wipe effect */ +enum { + DO_SINGLE_WIPE, + DO_DOUBLE_WIPE, + /* DO_BOX_WIPE, */ /* UNUSED */ + /* DO_CROSS_WIPE, */ /* UNUSED */ + DO_IRIS_WIPE, + DO_CLOCK_WIPE, +}; + +struct SeqEffectHandle { + bool multithreaded; + bool supports_mask; + + /* constructors & destructor */ + /* init is _only_ called on first creation */ + void (*init)(struct Sequence *seq); + + /* number of input strips needed + * (called directly after construction) */ + int (*num_inputs)(void); + + /* load is called first time after readblenfile in + * get_sequence_effect automatically */ + void (*load)(struct Sequence *seqconst); + + /* duplicate */ + void (*copy)(struct Sequence *dst, struct Sequence *src, const int flag); + + /* destruct */ + void (*free)(struct Sequence *seq, const bool do_id_user); + + /* returns: -1: no input needed, + * 0: no early out, + * 1: out = ibuf1, + * 2: out = ibuf2 */ + int (*early_out)(struct Sequence *seq, float facf0, float facf1); + + /* stores the y-range of the effect IPO */ + void (*store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax); + + /* stores the default facf0 and facf1 if no IPO is present */ + void (*get_default_fac)(struct Sequence *seq, float timeline_frame, float *facf0, float *facf1); + + /* execute the effect + * sequence effects are only required to either support + * float-rects or byte-rects + * (mixed cases are handled one layer up...) */ + + struct ImBuf *(*execute)(const struct SeqRenderData *context, + struct Sequence *seq, + float timeline_frame, + float facf0, + float facf1, + struct ImBuf *ibuf1, + struct ImBuf *ibuf2, + struct ImBuf *ibuf3); + + struct ImBuf *(*init_execution)(const struct SeqRenderData *context, + struct ImBuf *ibuf1, + struct ImBuf *ibuf2, + struct ImBuf *ibuf3); + + void (*execute_slice)(const struct SeqRenderData *context, + struct Sequence *seq, + float timeline_frame, + float facf0, + float facf1, + struct ImBuf *ibuf1, + struct ImBuf *ibuf2, + struct ImBuf *ibuf3, + int start_line, + int total_lines, + struct ImBuf *out); +}; + +struct SeqEffectHandle SEQ_effect_handle_get(struct Sequence *seq); +int SEQ_effect_get_num_inputs(int seq_type); +void SEQ_effect_text_font_unload(struct TextVars *data, const bool do_id_user); +void SEQ_effect_text_font_load(struct TextVars *data, const bool do_id_user); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_iterator.h b/source/blender/sequencer/SEQ_iterator.h new file mode 100644 index 00000000000..05fd706a8de --- /dev/null +++ b/source/blender/sequencer/SEQ_iterator.h @@ -0,0 +1,75 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Sequence; +struct Editing; + +typedef struct SeqIterator { + struct Sequence **array; + int tot, cur; + + struct Sequence *seq; + int valid; +} SeqIterator; + +#define SEQ_ALL_BEGIN(ed, _seq) \ + { \ + SeqIterator iter_macro; \ + for (SEQ_iterator_begin(ed, &iter_macro, false); iter_macro.valid; \ + SEQ_iterator_next(&iter_macro)) { \ + _seq = iter_macro.seq; + +#define SEQ_ALL_END \ + } \ + SEQ_iterator_end(&iter_macro); \ + } \ + ((void)0) + +#define SEQ_CURRENT_BEGIN(_ed, _seq) \ + { \ + SeqIterator iter_macro; \ + for (SEQ_iterator_begin(_ed, &iter_macro, true); iter_macro.valid; \ + SEQ_iterator_next(&iter_macro)) { \ + _seq = iter_macro.seq; + +#define SEQ_CURRENT_END SEQ_ALL_END + +void SEQ_iterator_begin(struct Editing *ed, SeqIterator *iter, const bool use_current_sequences); +void SEQ_iterator_next(SeqIterator *iter); +void SEQ_iterator_end(SeqIterator *iter); +int SEQ_iterator_seqbase_recursive_apply(struct ListBase *seqbase, + int (*apply_fn)(struct Sequence *seq, void *), + void *arg); +int SEQ_iterator_recursive_apply(struct Sequence *seq, + int (*apply_fn)(struct Sequence *, void *), + void *arg); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_modifier.h b/source/blender/sequencer/SEQ_modifier.h new file mode 100644 index 00000000000..74948db24d4 --- /dev/null +++ b/source/blender/sequencer/SEQ_modifier.h @@ -0,0 +1,88 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct ListBase; +struct SequenceModifierData; +struct SeqRenderData; +struct ImBuf; +struct BlendDataReader; +struct BlendLibReader; +struct BlendWriter; + +typedef struct SequenceModifierTypeInfo { + /* default name for the modifier */ + char name[64]; /* MAX_NAME */ + + /* DNA structure name used on load/save filed */ + char struct_name[64]; /* MAX_NAME */ + + /* size of modifier data structure, used by allocation */ + int struct_size; + + /* data initialization */ + void (*init_data)(struct SequenceModifierData *smd); + + /* free data used by modifier, + * only modifier-specific data should be freed, modifier descriptor would + * be freed outside of this callback + */ + void (*free_data)(struct SequenceModifierData *smd); + + /* copy data from one modifier to another */ + void (*copy_data)(struct SequenceModifierData *smd, struct SequenceModifierData *target); + + /* apply modifier on a given image buffer */ + void (*apply)(struct SequenceModifierData *smd, struct ImBuf *ibuf, struct ImBuf *mask); +} SequenceModifierTypeInfo; + +const struct SequenceModifierTypeInfo *SEQ_modifier_type_info_get(int type); +struct SequenceModifierData *SEQ_modifier_new(struct Sequence *seq, const char *name, int type); +bool SEQ_modifier_remove(struct Sequence *seq, struct SequenceModifierData *smd); +void SEQ_modifier_clear(struct Sequence *seq); +void SEQ_modifier_free(struct SequenceModifierData *smd); +void SEQ_modifier_unique_name(struct Sequence *seq, struct SequenceModifierData *smd); +struct SequenceModifierData *SEQ_modifier_find_by_name(struct Sequence *seq, const char *name); +struct ImBuf *SEQ_modifier_apply_stack(const struct SeqRenderData *context, + struct Sequence *seq, + struct ImBuf *ibuf, + int timeline_frame); +void SEQ_modifier_list_copy(struct Sequence *seqn, struct Sequence *seq); +int SEQ_sequence_supports_modifiers(struct Sequence *seq); + +void SEQ_modifier_blend_write(struct BlendWriter *writer, struct ListBase *modbase); +void SEQ_modifier_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb); +void SEQ_modifier_blend_read_lib(struct BlendLibReader *reader, + struct Scene *scene, + struct ListBase *lb); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_prefetch.h b/source/blender/sequencer/SEQ_prefetch.h new file mode 100644 index 00000000000..2ec8d509a91 --- /dev/null +++ b/source/blender/sequencer/SEQ_prefetch.h @@ -0,0 +1,39 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Main; + +void SEQ_prefetch_stop_all(void); +void SEQ_prefetch_stop(struct Scene *scene); +bool SEQ_prefetch_need_redraw(struct Main *bmain, struct Scene *scene); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_proxy.h b/source/blender/sequencer/SEQ_proxy.h new file mode 100644 index 00000000000..b909ac7b02d --- /dev/null +++ b/source/blender/sequencer/SEQ_proxy.h @@ -0,0 +1,57 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Main; +struct GSet; +struct Sequence; +struct ListBase; +struct Depsgraph; +struct SeqIndexBuildContext; +struct ListBase; + +bool SEQ_proxy_rebuild_context(struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, + struct Sequence *seq, + struct GSet *file_list, + struct ListBase *queue); +void SEQ_proxy_rebuild(struct SeqIndexBuildContext *context, + short *stop, + short *do_update, + float *progress); +void SEQ_proxy_rebuild_finish(struct SeqIndexBuildContext *context, bool stop); +void SEQ_proxy_set(struct Sequence *seq, bool value); +bool SEQ_can_use_proxy(struct Sequence *seq, int psize); +int SEQ_rendersize_to_proxysize(int render_size); +double SEQ_rendersize_to_scale_factor(int size); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_relations.h b/source/blender/sequencer/SEQ_relations.h new file mode 100644 index 00000000000..d0c5d2a474b --- /dev/null +++ b/source/blender/sequencer/SEQ_relations.h @@ -0,0 +1,73 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct Main; +struct ListBase; +struct ReportList; +struct MovieClip; + +void SEQ_relations_sequence_free_anim(struct Sequence *seq); +void SEQ_relations_update_changed_seq_and_deps(struct Scene *scene, + struct Sequence *changed_seq, + int len_change, + int ibuf_change); +bool SEQ_relations_check_scene_recursion(struct Scene *scene, struct ReportList *reports); +bool SEQ_relations_render_loop_check(struct Sequence *seq_main, struct Sequence *seq); +void SEQ_relations_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); +void SEQ_relations_invalidate_cache_raw(struct Scene *scene, struct Sequence *seq); +void SEQ_relations_invalidate_cache_preprocessed(struct Scene *scene, struct Sequence *seq); +void SEQ_relations_invalidate_cache_composite(struct Scene *scene, struct Sequence *seq); +void SEQ_relations_invalidate_dependent(struct Scene *scene, struct Sequence *seq); +void SEQ_relations_invalidate_scene_strips(struct Main *bmain, struct Scene *scene_target); +void SEQ_relations_invalidate_movieclip_strips(struct Main *bmain, struct MovieClip *clip_target); +void SEQ_relations_invalidate_cache_in_range(struct Scene *scene, + struct Sequence *seq, + struct Sequence *range_mask, + int invalidate_types); +void SEQ_relations_free_all_anim_ibufs(struct Scene *scene, int timeline_frame); +/* A debug and development function which checks whether sequences have unique UUIDs. + * Errors will be reported to the console. */ +void SEQ_relations_check_uuids_unique_and_report(const struct Scene *scene); +/* Generate new UUID for the given sequence. */ +void SEQ_relations_session_uuid_generate(struct Sequence *sequence); + +void SEQ_cache_cleanup(struct Scene *scene); +void SEQ_cache_iterate(struct Scene *scene, + void *userdata, + bool callback_init(void *userdata, size_t item_count), + bool callback_iter(void *userdata, + struct Sequence *seq, + int timeline_frame, + int cache_type, + float cost)); +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_render.h b/source/blender/sequencer/SEQ_render.h new file mode 100644 index 00000000000..fea68c14c7b --- /dev/null +++ b/source/blender/sequencer/SEQ_render.h @@ -0,0 +1,88 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Editing; +struct Sequence; +struct bSound; +struct Main; +struct ListBase; + +typedef enum eSeqTaskId { + SEQ_TASK_MAIN_RENDER, + SEQ_TASK_PREFETCH_RENDER, +} eSeqTaskId; + +typedef struct SeqRenderData { + struct Main *bmain; + struct Depsgraph *depsgraph; + struct Scene *scene; + int rectx; + int recty; + int preview_render_size; + int for_render; + int motion_blur_samples; + float motion_blur_shutter; + bool skip_cache; + bool is_proxy_render; + bool is_prefetch_render; + int view_id; + /* ID of task for asigning temp cache entries to particular task(thread, etc.) */ + eSeqTaskId task_id; + + /* special case for OpenGL render */ + struct GPUOffScreen *gpu_offscreen; + // int gpu_samples; + // bool gpu_full_samples; +} SeqRenderData; + +struct ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, + float timeline_frame, + int chanshown); +struct ImBuf *SEQ_render_give_ibuf_direct(const SeqRenderData *context, + float timeline_frame, + struct Sequence *seq); +void SEQ_render_init_colorspace(struct Sequence *seq); +void SEQ_render_new_render_data(struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, + int rectx, + int recty, + int preview_render_size, + int for_render, + SeqRenderData *r_context); +int SEQ_render_evaluate_frame(struct ListBase *seqbase, int timeline_frame); +struct StripElem *SEQ_render_give_stripelem(struct Sequence *seq, int timeline_frame); + +void SEQ_render_imbuf_from_sequencer_space(struct Scene *scene, struct ImBuf *ibuf); +void SEQ_render_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_select.h b/source/blender/sequencer/SEQ_select.h new file mode 100644 index 00000000000..5a65f9c0d8c --- /dev/null +++ b/source/blender/sequencer/SEQ_select.h @@ -0,0 +1,41 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; + +struct Sequence *SEQ_select_active_get(struct Scene *scene); +int SEQ_select_active_get_pair(struct Scene *scene, + struct Sequence **seq_act, + struct Sequence **seq_other); +void SEQ_select_active_set(struct Scene *scene, struct Sequence *seq); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_sequencer.h b/source/blender/sequencer/SEQ_sequencer.h index b2068a0d690..37ad71b64bd 100644 --- a/source/blender/sequencer/SEQ_sequencer.h +++ b/source/blender/sequencer/SEQ_sequencer.h @@ -23,15 +23,12 @@ * \ingroup sequencer */ -#include "DNA_scene_types.h" - #ifdef __cplusplus extern "C" { #endif -struct BlendDataReader; -struct BlendLibReader; -struct BlendWriter; +#include "DNA_scene_types.h" + struct Depsgraph; struct Editing; struct GPUOffScreen; @@ -54,16 +51,6 @@ struct BlendDataReader; struct BlendLibReader; struct SequencerToolSettings; -/* Wipe effect */ -enum { - DO_SINGLE_WIPE, - DO_DOUBLE_WIPE, - /* DO_BOX_WIPE, */ /* UNUSED */ - /* DO_CROSS_WIPE, */ /* UNUSED */ - DO_IRIS_WIPE, - DO_CLOCK_WIPE, -}; - /* RNA enums, just to be more readable */ enum { SEQ_SIDE_MOUSE = -1, @@ -74,576 +61,39 @@ enum { SEQ_SIDE_NO_CHANGE, }; -/* ********************************************************************** - * sequencer.c - * - * Sequencer iterators - * ********************************************************************** - */ - -typedef struct SeqIterator { - struct Sequence **array; - int tot, cur; - - struct Sequence *seq; - int valid; -} SeqIterator; - -#define SEQ_ALL_BEGIN(ed, _seq) \ - { \ - SeqIterator iter_macro; \ - for (SEQ_iterator_begin(ed, &iter_macro, false); iter_macro.valid; \ - SEQ_iterator_next(&iter_macro)) { \ - _seq = iter_macro.seq; - -#define SEQ_ALL_END \ - } \ - SEQ_iterator_end(&iter_macro); \ - } \ - ((void)0) - -#define SEQ_CURRENT_BEGIN(_ed, _seq) \ - { \ - SeqIterator iter_macro; \ - for (SEQ_iterator_begin(_ed, &iter_macro, true); iter_macro.valid; \ - SEQ_iterator_next(&iter_macro)) { \ - _seq = iter_macro.seq; - -#define SEQ_CURRENT_END SEQ_ALL_END - -void SEQ_iterator_begin(struct Editing *ed, SeqIterator *iter, const bool use_current_sequences); -void SEQ_iterator_next(SeqIterator *iter); -void SEQ_iterator_end(SeqIterator *iter); - -/* ********************************************************************** - * render.c - * - * Sequencer render functions - * ********************************************************************** - */ - -typedef enum eSeqTaskId { - SEQ_TASK_MAIN_RENDER, - SEQ_TASK_PREFETCH_RENDER, -} eSeqTaskId; - -typedef struct SeqRenderData { - struct Main *bmain; - struct Depsgraph *depsgraph; - struct Scene *scene; - int rectx; - int recty; - int preview_render_size; - int for_render; - int motion_blur_samples; - float motion_blur_shutter; - bool skip_cache; - bool is_proxy_render; - bool is_prefetch_render; - int view_id; - /* ID of task for asigning temp cache entries to particular task(thread, etc.) */ - eSeqTaskId task_id; - - /* special case for OpenGL render */ - struct GPUOffScreen *gpu_offscreen; - // int gpu_samples; - // bool gpu_full_samples; -} SeqRenderData; - -struct ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, - float timeline_frame, - int chanshown); -struct ImBuf *SEQ_render_give_ibuf_direct(const SeqRenderData *context, - float timeline_frame, - struct Sequence *seq); -void SEQ_render_init_colorspace(struct Sequence *seq); -void SEQ_render_new_render_data(struct Main *bmain, - struct Depsgraph *depsgraph, - struct Scene *scene, - int rectx, - int recty, - int preview_render_size, - int for_render, - SeqRenderData *r_context); -int SEQ_render_evaluate_frame(struct ListBase *seqbase, int timeline_frame); -struct StripElem *SEQ_render_give_stripelem(struct Sequence *seq, int timeline_frame); - -/* ********************************************************************** - * render.c - * - * Sequencer color space functions - * ********************************************************************** */ - -void SEQ_render_imbuf_from_sequencer_space(struct Scene *scene, struct ImBuf *ibuf); -void SEQ_render_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]); +#define SEQ_CACHE_COST_MAX 10.0f -/* ********************************************************************** - * sequencer.c - * - * Sequencer scene functions - * ********************************************************************** */ +/* seq_dupli' flags */ +#define SEQ_DUPE_UNIQUE_NAME (1 << 0) +#define SEQ_DUPE_CONTEXT (1 << 1) +#define SEQ_DUPE_ANIM (1 << 2) +#define SEQ_DUPE_ALL (1 << 3) /* otherwise only selected are copied */ +#define SEQ_DUPE_IS_RECURSIVE_CALL (1 << 4) struct SequencerToolSettings *SEQ_tool_settings_init(void); void SEQ_tool_settings_free(struct SequencerToolSettings *tool_settings); eSeqImageFitMethod SEQ_tool_settings_fit_method_get(struct Scene *scene); void SEQ_tool_settings_fit_method_set(struct Scene *scene, eSeqImageFitMethod fit_method); - struct SequencerToolSettings *SEQ_tool_settings_copy(struct SequencerToolSettings *tool_settings); struct Editing *SEQ_editing_get(struct Scene *scene, bool alloc); struct Editing *SEQ_editing_ensure(struct Scene *scene); void SEQ_editing_free(struct Scene *scene, const bool do_id_user); struct ListBase *SEQ_active_seqbase_get(const struct Editing *ed); -void SEQ_sort(struct Scene *scene); -struct Sequence *SEQ_sequence_from_strip_elem(ListBase *seqbase, struct StripElem *se); -struct Sequence *SEQ_select_active_get(struct Scene *scene); -int SEQ_select_active_get_pair(struct Scene *scene, - struct Sequence **seq_act, - struct Sequence **seq_other); -void SEQ_select_active_set(struct Scene *scene, struct Sequence *seq); -struct Mask *SEQ_active_mask_get(struct Scene *scene); -/* apply functions recursively */ -int SEQ_iterator_seqbase_recursive_apply(struct ListBase *seqbase, - int (*apply_fn)(struct Sequence *seq, void *), - void *arg); -int SEQ_iterator_recursive_apply(struct Sequence *seq, - int (*apply_fn)(struct Sequence *, void *), - void *arg); -float SEQ_time_sequence_get_fps(struct Scene *scene, struct Sequence *seq); -int SEQ_time_find_next_prev_edit(struct Scene *scene, - int timeline_frame, - const short side, - const bool do_skip_mute, - const bool do_center, - const bool do_unselected); -/* maintenance functions, mostly for RNA */ +struct Sequence *SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type); void SEQ_sequence_free(struct Scene *scene, struct Sequence *seq, const bool do_clean_animdata); -void SEQ_relations_sequence_free_anim(struct Sequence *seq); -const char *SEQ_sequence_give_name(struct Sequence *seq); -ListBase *SEQ_get_seqbase_from_sequence(struct Sequence *seq, int *r_offset); -void SEQ_time_update_sequence(struct Scene *scene, struct Sequence *seq); -void SEQ_time_update_sequence_bounds(struct Scene *scene, struct Sequence *seq); -void SEQ_add_reload_new_file(struct Main *bmain, - struct Scene *scene, - struct Sequence *seq, - const bool lock_range); -void SEQ_add_movie_reload_if_needed(struct Main *bmain, - struct Scene *scene, - struct Sequence *seq, - bool *r_was_reloaded, - bool *r_can_produce_frames); -void SEQ_alpha_mode_from_file_extension(struct Sequence *seq); -void SEQ_relations_update_changed_seq_and_deps(struct Scene *scene, - struct Sequence *changed_seq, - int len_change, - int ibuf_change); -bool SEQ_relations_check_scene_recursion(struct Scene *scene, struct ReportList *reports); -bool SEQ_relations_render_loop_check(struct Sequence *seq_main, struct Sequence *seq); -int SEQ_time_cmp_time_startdisp(const void *a, const void *b); - -/* ********************************************************************** - * proxy.c - * - * Proxy functions - * ********************************************************************** */ - -bool SEQ_proxy_rebuild_context(struct Main *bmain, - struct Depsgraph *depsgraph, - struct Scene *scene, - struct Sequence *seq, - struct GSet *file_list, - ListBase *queue); -void SEQ_proxy_rebuild(struct SeqIndexBuildContext *context, - short *stop, - short *do_update, - float *progress); -void SEQ_proxy_rebuild_finish(struct SeqIndexBuildContext *context, bool stop); -void SEQ_proxy_set(struct Sequence *seq, bool value); -bool SEQ_can_use_proxy(struct Sequence *seq, int psize); -int SEQ_rendersize_to_proxysize(int render_size); -double SEQ_rendersize_to_scale_factor(int size); - -/* ********************************************************************** - * image_cache.c - * - * Sequencer memory cache management functions - * ********************************************************************** */ - -void SEQ_cache_cleanup(struct Scene *scene); -void SEQ_cache_iterate(struct Scene *scene, - void *userdata, - bool callback_init(void *userdata, size_t item_count), - bool callback_iter(void *userdata, - struct Sequence *seq, - int timeline_frame, - int cache_type, - float cost)); - -/* ********************************************************************** - * prefetch.c - * - * Sequencer frame prefetching - * ********************************************************************** */ - -#define SEQ_CACHE_COST_MAX 10.0f -void SEQ_prefetch_stop_all(void); -void SEQ_prefetch_stop(struct Scene *scene); -bool SEQ_prefetch_need_redraw(struct Main *bmain, struct Scene *scene); - -/* ********************************************************************** - * sequencer.c - * - * Sequencer editing functions - * ********************************************************************** - */ - -/* for transform but also could use elsewhere */ -int SEQ_transform_get_left_handle_frame(struct Sequence *seq, bool metaclip); -int SEQ_transform_get_right_handle_frame(struct Sequence *seq, bool metaclip); -void SEQ_transform_set_left_handle_frame(struct Sequence *seq, int val); -void SEQ_transform_set_right_handle_frame(struct Sequence *seq, int val); -void SEQ_transform_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag); -bool SEQ_transform_sequence_can_be_translated(struct Sequence *seq); -bool SEQ_transform_single_image_check(struct Sequence *seq); -void SEQ_transform_fix_single_image_seq_offsets(struct Sequence *seq); -bool SEQ_transform_test_overlap(struct ListBase *seqbasep, struct Sequence *test); -void SEQ_transform_translate_sequence(struct Scene *scene, struct Sequence *seq, int delta); -const struct Sequence *SEQ_get_topmost_sequence(const struct Scene *scene, int frame); -struct ListBase *SEQ_get_seqbase_by_seq(struct ListBase *seqbase, struct Sequence *seq); void SEQ_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs); void SEQ_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst); -bool SEQ_transform_seqbase_shuffle_ex(struct ListBase *seqbasep, - struct Sequence *test, - struct Scene *evil_scene, - int channel_delta); -bool SEQ_transform_seqbase_shuffle(struct ListBase *seqbasep, - struct Sequence *test, - struct Scene *evil_scene); -bool SEQ_transform_seqbase_shuffle_time(ListBase *seqbasep, - struct Scene *evil_scene, - ListBase *markers, - const bool use_sync_markers); -bool SEQ_transform_seqbase_isolated_sel_check(struct ListBase *seqbase); -void SEQ_relations_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); struct Sequence *SEQ_sequence_dupli_recursive(const struct Scene *scene_src, struct Scene *scene_dst, struct ListBase *new_seq_list, struct Sequence *seq, int dupe_flag); -int SEQ_edit_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str); -void SEQ_sound_update_bounds_all(struct Scene *scene); -void SEQ_sound_update_bounds(struct Scene *scene, struct Sequence *seq); -void SEQ_sound_update_muting(struct Editing *ed); -void SEQ_sound_update(struct Scene *scene, struct bSound *sound); -void SEQ_sound_update_length(struct Main *bmain, struct Scene *scene); -void SEQ_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq); void SEQ_sequence_base_dupli_recursive(const struct Scene *scene_src, struct Scene *scene_dst, struct ListBase *nseqbase, const struct ListBase *seqbase, int dupe_flag, const int flag); -bool SEQ_sequence_has_source(struct Sequence *seq); -struct Sequence *SEQ_get_sequence_by_name(struct ListBase *seqbase, - const char *name, - bool recursive); -void SEQ_edit_flag_for_removal(struct Scene *scene, - struct ListBase *seqbase, - struct Sequence *seq); -void SEQ_edit_remove_flagged_sequences(struct Scene *scene, struct ListBase *seqbase); - -/* ********************************************************************** - * sequencer.c - * - * Cache invalidation - * ********************************************************************** - */ - -void SEQ_relations_invalidate_cache_raw(struct Scene *scene, struct Sequence *seq); -void SEQ_relations_invalidate_cache_preprocessed(struct Scene *scene, struct Sequence *seq); -void SEQ_relations_invalidate_cache_composite(struct Scene *scene, struct Sequence *seq); -void SEQ_relations_invalidate_dependent(struct Scene *scene, struct Sequence *seq); -void SEQ_relations_invalidate_scene_strips(struct Main *bmain, struct Scene *scene_target); -void SEQ_relations_invalidate_movieclip_strips(struct Main *bmain, struct MovieClip *clip_target); -void SEQ_relations_invalidate_cache_in_range(struct Scene *scene, - struct Sequence *seq, - struct Sequence *range_mask, - int invalidate_types); -void SEQ_relations_free_all_anim_ibufs(struct Scene *scene, int timeline_frame); - -/* ********************************************************************** - * util.c - * - * Add strips - * ********************************************************************** - */ - -void SEQ_set_scale_to_fit(const struct Sequence *seq, - const int image_width, - const int image_height, - const int preview_width, - const int preview_height, - const eSeqImageFitMethod fit_method); - -/* ********************************************************************** - * sequencer.c - * - * Add strips - * ********************************************************************** - */ - -/* api for adding new sequence strips */ -typedef struct SeqLoadInfo { - int start_frame; - int end_frame; - int channel; - int flag; /* use sound, replace sel */ - int type; - int len; /* only for image strips */ - char path[1024]; /* 1024 = FILE_MAX */ - eSeqImageFitMethod fit_method; - - /* multiview */ - char views_format; - struct Stereo3dFormat *stereo3d_format; - - /* return values */ - char name[64]; - struct Sequence *seq_sound; /* for movie's */ - int tot_success; - int tot_error; -} SeqLoadInfo; - -/* SeqLoadInfo.flag */ -#define SEQ_LOAD_REPLACE_SEL (1 << 0) -#define SEQ_LOAD_FRAME_ADVANCE (1 << 1) -#define SEQ_LOAD_MOVIE_SOUND (1 << 2) -#define SEQ_LOAD_SOUND_CACHE (1 << 3) -#define SEQ_LOAD_SYNC_FPS (1 << 4) -#define SEQ_LOAD_SOUND_MONO (1 << 5) - -/* seq_dupli' flags */ -#define SEQ_DUPE_UNIQUE_NAME (1 << 0) -#define SEQ_DUPE_CONTEXT (1 << 1) -#define SEQ_DUPE_ANIM (1 << 2) -#define SEQ_DUPE_ALL (1 << 3) /* otherwise only selected are copied */ -#define SEQ_DUPE_IS_RECURSIVE_CALL (1 << 4) - -/* use as an api function */ -typedef struct Sequence *(*SeqLoadFn)(struct bContext *, ListBase *, struct SeqLoadInfo *); - -struct Sequence *SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type); -struct Sequence *SEQ_add_image_strip(struct bContext *C, - ListBase *seqbasep, - struct SeqLoadInfo *seq_load); -struct Sequence *SEQ_add_sound_strip(struct bContext *C, - ListBase *seqbasep, - struct SeqLoadInfo *seq_load); -struct Sequence *SEQ_add_movie_strip(struct bContext *C, - ListBase *seqbasep, - struct SeqLoadInfo *seq_load); - -/* ********************************************************************** - * modifier.c - * - * Modifiers - * ********************************************************************** - */ - -typedef struct SequenceModifierTypeInfo { - /* default name for the modifier */ - char name[64]; /* MAX_NAME */ - - /* DNA structure name used on load/save filed */ - char struct_name[64]; /* MAX_NAME */ - - /* size of modifier data structure, used by allocation */ - int struct_size; - - /* data initialization */ - void (*init_data)(struct SequenceModifierData *smd); - - /* free data used by modifier, - * only modifier-specific data should be freed, modifier descriptor would - * be freed outside of this callback - */ - void (*free_data)(struct SequenceModifierData *smd); - - /* copy data from one modifier to another */ - void (*copy_data)(struct SequenceModifierData *smd, struct SequenceModifierData *target); - - /* apply modifier on a given image buffer */ - void (*apply)(struct SequenceModifierData *smd, struct ImBuf *ibuf, struct ImBuf *mask); -} SequenceModifierTypeInfo; - -const struct SequenceModifierTypeInfo *SEQ_modifier_type_info_get(int type); -struct SequenceModifierData *SEQ_modifier_new(struct Sequence *seq, const char *name, int type); -bool SEQ_modifier_remove(struct Sequence *seq, struct SequenceModifierData *smd); -void SEQ_modifier_clear(struct Sequence *seq); -void SEQ_modifier_free(struct SequenceModifierData *smd); -void SEQ_modifier_unique_name(struct Sequence *seq, struct SequenceModifierData *smd); -struct SequenceModifierData *SEQ_modifier_find_by_name(struct Sequence *seq, const char *name); -struct ImBuf *SEQ_modifier_apply_stack(const SeqRenderData *context, - struct Sequence *seq, - struct ImBuf *ibuf, - int timeline_frame); -void SEQ_modifier_list_copy(struct Sequence *seqn, struct Sequence *seq); -int SEQ_sequence_supports_modifiers(struct Sequence *seq); - -void SEQ_modifier_blend_write(struct BlendWriter *writer, struct ListBase *modbase); -void SEQ_modifier_blend_read_data(struct BlendDataReader *reader, struct ListBase *lb); -void SEQ_modifier_blend_read_lib(struct BlendLibReader *reader, - struct Scene *scene, - struct ListBase *lb); - -/* ********************************************************************** - * seqeffects.c - * - * Sequencer effect strip management functions - * ********************************************************************** - */ - -struct SeqEffectHandle { - bool multithreaded; - bool supports_mask; - - /* constructors & destructor */ - /* init is _only_ called on first creation */ - void (*init)(struct Sequence *seq); - - /* number of input strips needed - * (called directly after construction) */ - int (*num_inputs)(void); - - /* load is called first time after readblenfile in - * get_sequence_effect automatically */ - void (*load)(struct Sequence *seqconst); - - /* duplicate */ - void (*copy)(struct Sequence *dst, struct Sequence *src, const int flag); - - /* destruct */ - void (*free)(struct Sequence *seq, const bool do_id_user); - - /* returns: -1: no input needed, - * 0: no early out, - * 1: out = ibuf1, - * 2: out = ibuf2 */ - int (*early_out)(struct Sequence *seq, float facf0, float facf1); - - /* stores the y-range of the effect IPO */ - void (*store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax); - - /* stores the default facf0 and facf1 if no IPO is present */ - void (*get_default_fac)(struct Sequence *seq, float timeline_frame, float *facf0, float *facf1); - - /* execute the effect - * sequence effects are only required to either support - * float-rects or byte-rects - * (mixed cases are handled one layer up...) */ - - struct ImBuf *(*execute)(const SeqRenderData *context, - struct Sequence *seq, - float timeline_frame, - float facf0, - float facf1, - struct ImBuf *ibuf1, - struct ImBuf *ibuf2, - struct ImBuf *ibuf3); - - struct ImBuf *(*init_execution)(const SeqRenderData *context, - struct ImBuf *ibuf1, - struct ImBuf *ibuf2, - struct ImBuf *ibuf3); - - void (*execute_slice)(const SeqRenderData *context, - struct Sequence *seq, - float timeline_frame, - float facf0, - float facf1, - struct ImBuf *ibuf1, - struct ImBuf *ibuf2, - struct ImBuf *ibuf3, - int start_line, - int total_lines, - struct ImBuf *out); -}; - -struct SeqEffectHandle SEQ_effect_handle_get(struct Sequence *seq); -int SEQ_effect_get_num_inputs(int seq_type); -void SEQ_effect_text_font_unload(struct TextVars *data, const bool do_id_user); -void SEQ_effect_text_font_load(struct TextVars *data, const bool do_id_user); - -/* ********************************************************************** - * sequencer.c - * - * Clipboard - * ********************************************************************** - */ - -extern ListBase seqbase_clipboard; -extern int seqbase_clipboard_frame; -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); - -/* ********************************************************************** - * sequencer.c - * - * Depsgraph - * ********************************************************************** - */ - -/* A debug and development function which checks whether sequences have unique UUIDs. - * Errors will be reported to the console. */ -void SEQ_relations_check_uuids_unique_and_report(const struct Scene *scene); -/* Generate new UUID for the given sequence. */ -void SEQ_relations_session_uuid_generate(struct Sequence *sequence); - -/* ********************************************************************** - * strip_edit.c - * - * Editing functions - * ********************************************************************** - */ - -typedef enum eSeqSplitMethod { - SEQ_SPLIT_SOFT, - SEQ_SPLIT_HARD, -} eSeqSplitMethod; - -struct Sequence *SEQ_edit_strip_split(struct Main *bmain, - struct Scene *scene, - struct ListBase *seqbase, - struct Sequence *seq, - const int timeline_frame, - const eSeqSplitMethod method); -bool SEQ_edit_remove_gaps(struct Scene *scene, - struct ListBase *seqbase, - const int initial_frame, - const bool remove_all_gaps); - -/* ********************************************************************** - * strip_time.c - * - * Editing functions - * ********************************************************************** - */ - -void SEQ_timeline_boundbox(const struct Scene *scene, - const struct ListBase *seqbase, - struct rctf *rect); - -/* ********************************************************************** - * strip_transform.c - * - * Editing functions - * ********************************************************************** - */ - -void SEQ_transform_offset_after_frame(struct Scene *scene, - struct ListBase *seqbase, - const int delta, - const int timeline_frame); #ifdef __cplusplus } diff --git a/source/blender/sequencer/SEQ_sound.h b/source/blender/sequencer/SEQ_sound.h new file mode 100644 index 00000000000..d04aed259fb --- /dev/null +++ b/source/blender/sequencer/SEQ_sound.h @@ -0,0 +1,44 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Editing; +struct Sequence; +struct bSound; +struct Main; +struct ListBase; + +void SEQ_sound_update_bounds_all(struct Scene *scene); +void SEQ_sound_update_bounds(struct Scene *scene, struct Sequence *seq); +void SEQ_sound_update(struct Scene *scene, struct bSound *sound); +void SEQ_sound_update_length(struct Main *bmain, struct Scene *scene); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_time.h b/source/blender/sequencer/SEQ_time.h new file mode 100644 index 00000000000..7fb47d42354 --- /dev/null +++ b/source/blender/sequencer/SEQ_time.h @@ -0,0 +1,51 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct ListBase; +struct rctf; + +void SEQ_timeline_boundbox(const struct Scene *scene, + const struct ListBase *seqbase, + struct rctf *rect); +float SEQ_time_sequence_get_fps(struct Scene *scene, struct Sequence *seq); +int SEQ_time_find_next_prev_edit(struct Scene *scene, + int timeline_frame, + const short side, + const bool do_skip_mute, + const bool do_center, + const bool do_unselected); +void SEQ_time_update_sequence(struct Scene *scene, struct Sequence *seq); +void SEQ_time_update_sequence_bounds(struct Scene *scene, struct Sequence *seq); +int SEQ_time_cmp_time_startdisp(const void *a, const void *b); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_transform.h b/source/blender/sequencer/SEQ_transform.h new file mode 100644 index 00000000000..10d9c781dcb --- /dev/null +++ b/source/blender/sequencer/SEQ_transform.h @@ -0,0 +1,63 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct ListBase; + +int SEQ_transform_get_left_handle_frame(struct Sequence *seq, bool metaclip); +int SEQ_transform_get_right_handle_frame(struct Sequence *seq, bool metaclip); +void SEQ_transform_set_left_handle_frame(struct Sequence *seq, int val); +void SEQ_transform_set_right_handle_frame(struct Sequence *seq, int val); +void SEQ_transform_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag); +bool SEQ_transform_sequence_can_be_translated(struct Sequence *seq); +bool SEQ_transform_single_image_check(struct Sequence *seq); +void SEQ_transform_fix_single_image_seq_offsets(struct Sequence *seq); +bool SEQ_transform_test_overlap(struct ListBase *seqbasep, struct Sequence *test); +void SEQ_transform_translate_sequence(struct Scene *scene, struct Sequence *seq, int delta); +bool SEQ_transform_seqbase_shuffle_ex(struct ListBase *seqbasep, + struct Sequence *test, + struct Scene *evil_scene, + int channel_delta); +bool SEQ_transform_seqbase_shuffle(struct ListBase *seqbasep, + struct Sequence *test, + struct Scene *evil_scene); +bool SEQ_transform_seqbase_shuffle_time(struct ListBase *seqbasep, + struct Scene *evil_scene, + struct ListBase *markers, + const bool use_sync_markers); +bool SEQ_transform_seqbase_isolated_sel_check(struct ListBase *seqbase); +void SEQ_transform_offset_after_frame(struct Scene *scene, + struct ListBase *seqbase, + const int delta, + const int timeline_frame); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_util.h b/source/blender/sequencer/SEQ_util.h new file mode 100644 index 00000000000..9dae0a25a37 --- /dev/null +++ b/source/blender/sequencer/SEQ_util.h @@ -0,0 +1,58 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#include "DNA_scene_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct ListBase; + +void SEQ_set_scale_to_fit(const struct Sequence *seq, + const int image_width, + const int image_height, + const int preview_width, + const int preview_height, + const eSeqImageFitMethod fit_method); +void SEQ_sort(struct Scene *scene); +void SEQ_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq); +const char *SEQ_sequence_give_name(struct Sequence *seq); +ListBase *SEQ_get_seqbase_from_sequence(struct Sequence *seq, int *r_offset); +const struct Sequence *SEQ_get_topmost_sequence(const struct Scene *scene, int frame); +struct ListBase *SEQ_get_seqbase_by_seq(struct ListBase *seqbase, struct Sequence *seq); +struct Sequence *SEQ_sequence_from_strip_elem(ListBase *seqbase, struct StripElem *se); +struct Sequence *SEQ_get_sequence_by_name(struct ListBase *seqbase, + const char *name, + bool recursive); +struct Mask *SEQ_active_mask_get(struct Scene *scene); +void SEQ_alpha_mode_from_file_extension(struct Sequence *seq); +bool SEQ_sequence_has_source(struct Sequence *seq); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/SEQ_utils.h b/source/blender/sequencer/SEQ_utils.h new file mode 100644 index 00000000000..417d257ddd7 --- /dev/null +++ b/source/blender/sequencer/SEQ_utils.h @@ -0,0 +1,60 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + */ + +#pragma once + +/** \file + * \ingroup sequencer + */ + +#include "DNA_scene_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct Scene; +struct Sequence; +struct ListBase; +struct Mask; +struct StripElem; + +void SEQ_sort(struct Scene *scene); +void SEQ_sequence_base_unique_name_recursive(struct ListBase *seqbasep, struct Sequence *seq); +const char *SEQ_sequence_give_name(struct Sequence *seq); +struct ListBase *SEQ_get_seqbase_from_sequence(struct Sequence *seq, int *r_offset); +const struct Sequence *SEQ_get_topmost_sequence(const struct Scene *scene, int frame); +struct ListBase *SEQ_get_seqbase_by_seq(struct ListBase *seqbase, struct Sequence *seq); +struct Sequence *SEQ_sequence_from_strip_elem(struct ListBase *seqbase, struct StripElem *se); +struct Sequence *SEQ_get_sequence_by_name(struct ListBase *seqbase, + const char *name, + bool recursive); +struct Mask *SEQ_active_mask_get(struct Scene *scene); +void SEQ_alpha_mode_from_file_extension(struct Sequence *seq); +bool SEQ_sequence_has_source(struct Sequence *seq); +void SEQ_set_scale_to_fit(const struct Sequence *seq, + const int image_width, + const int image_height, + const int preview_width, + const int preview_height, + const eSeqImageFitMethod fit_method); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/intern/clipboard.c b/source/blender/sequencer/intern/clipboard.c index 7a9a06a744a..29cb749bc99 100644 --- a/source/blender/sequencer/intern/clipboard.c +++ b/source/blender/sequencer/intern/clipboard.c @@ -37,7 +37,7 @@ #include "BKE_scene.h" #include "BKE_sound.h" -#include "SEQ_sequencer.h" +#include "SEQ_clipboard.h" #include "sequencer.h" diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index 58dd6d6e048..e8e80c8da83 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -59,7 +59,10 @@ #include "RE_pipeline.h" -#include "SEQ_sequencer.h" +#include "SEQ_effects.h" +#include "SEQ_proxy.h" +#include "SEQ_render.h" +#include "SEQ_utils.h" #include "BLF_api.h" diff --git a/source/blender/sequencer/intern/image_cache.c b/source/blender/sequencer/intern/image_cache.c index 6eb12df7186..2fe59f52bf4 100644 --- a/source/blender/sequencer/intern/image_cache.c +++ b/source/blender/sequencer/intern/image_cache.c @@ -48,6 +48,9 @@ #include "BKE_main.h" #include "BKE_scene.h" +#include "SEQ_prefetch.h" +#include "SEQ_relations.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" #include "image_cache.h" diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index 7d54795b150..bb4982d1468 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -35,7 +35,7 @@ #include "BKE_scene.h" -#include "SEQ_sequencer.h" +#include "SEQ_iterator.h" /* ************************* iterator ************************** */ /* *************** (replaces old WHILE_SEQ) ********************* */ diff --git a/source/blender/sequencer/intern/modifier.c b/source/blender/sequencer/intern/modifier.c index 99fa228e7a5..b6f56025e6b 100644 --- a/source/blender/sequencer/intern/modifier.c +++ b/source/blender/sequencer/intern/modifier.c @@ -44,7 +44,8 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "SEQ_sequencer.h" +#include "SEQ_modifier.h" +#include "SEQ_render.h" #include "BLO_read_write.h" diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index 5d769a18a19..5ffb2287e1c 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -53,7 +53,8 @@ #include "DEG_depsgraph_debug.h" #include "DEG_depsgraph_query.h" -#include "SEQ_sequencer.h" +#include "SEQ_prefetch.h" +#include "SEQ_render.h" #include "image_cache.h" #include "prefetch.h" diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c index 72dc9708ccb..22d8daba696 100644 --- a/source/blender/sequencer/intern/proxy.c +++ b/source/blender/sequencer/intern/proxy.c @@ -54,6 +54,8 @@ #include "IMB_imbuf_types.h" #include "IMB_metadata.h" +#include "SEQ_proxy.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" #include "multiview.h" diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 84f2a6df647..524bf7cd74c 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -64,7 +64,12 @@ #include "RE_engine.h" #include "RE_pipeline.h" +#include "SEQ_effects.h" +#include "SEQ_modifier.h" +#include "SEQ_proxy.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" +#include "SEQ_utils.h" #include "effects.h" #include "image_cache.h" diff --git a/source/blender/sequencer/intern/render.h b/source/blender/sequencer/intern/render.h index 46748415187..6875087df82 100644 --- a/source/blender/sequencer/intern/render.h +++ b/source/blender/sequencer/intern/render.h @@ -32,6 +32,7 @@ struct ListBase; struct Scene; struct SeqRenderData; struct Sequence; +struct SeqEffectHandle; #define EARLY_NO_INPUT -1 #define EARLY_DO_EFFECT 0 @@ -50,7 +51,7 @@ struct ImBuf *seq_render_give_ibuf_seqbase(const struct SeqRenderData *context, int chan_shown, struct ListBase *seqbasep); struct ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh, - const SeqRenderData *context, + const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, float facf0, diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c index 51495e7bf02..79e8ba2f6c0 100644 --- a/source/blender/sequencer/intern/sequencer.c +++ b/source/blender/sequencer/intern/sequencer.c @@ -44,7 +44,13 @@ #include "IMB_colormanagement.h" #include "IMB_imbuf.h" +#include "SEQ_effects.h" +#include "SEQ_iterator.h" +#include "SEQ_modifier.h" +#include "SEQ_relations.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_utils.h" #include "image_cache.h" #include "prefetch.h" diff --git a/source/blender/sequencer/intern/sound.c b/source/blender/sequencer/intern/sound.c index f62142d0112..1054dbeeba6 100644 --- a/source/blender/sequencer/intern/sound.c +++ b/source/blender/sequencer/intern/sound.c @@ -36,28 +36,11 @@ #include "BKE_scene.h" #include "BKE_sound.h" -#include "SEQ_sequencer.h" +#include "SEQ_sound.h" +#include "SEQ_time.h" #include "strip_time.h" -static void seq_sound_init(Scene *scene, Sequence *seq) -{ - if (seq->type == SEQ_TYPE_META) { - Sequence *seq_child; - for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { - seq_sound_init(scene, seq_child); - } - } - else { - if (seq->sound) { - seq->scene_sound = BKE_sound_add_scene_sound_defaults(scene, seq); - } - if (seq->scene) { - seq->scene_sound = BKE_sound_scene_add_scene_sound_defaults(scene, seq); - } - } -} - /* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */ #ifdef WITH_AUDASPACE static bool sequencer_refresh_sound_length_recursive(Main *bmain, Scene *scene, ListBase *seqbase) diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c index 4fe02b7fdd2..ba080a07879 100644 --- a/source/blender/sequencer/intern/strip_add.c +++ b/source/blender/sequencer/intern/strip_add.c @@ -53,7 +53,13 @@ #include "IMB_imbuf_types.h" #include "IMB_metadata.h" +#include "SEQ_add.h" +#include "SEQ_relations.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" +#include "SEQ_utils.h" #include "multiview.h" #include "proxy.h" diff --git a/source/blender/sequencer/intern/strip_edit.c b/source/blender/sequencer/intern/strip_edit.c index 11f42c5de9d..bba026057d2 100644 --- a/source/blender/sequencer/intern/strip_edit.c +++ b/source/blender/sequencer/intern/strip_edit.c @@ -40,7 +40,12 @@ #include "strip_time.h" +#include "SEQ_add.h" +#include "SEQ_edit.h" +#include "SEQ_effects.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" int SEQ_edit_sequence_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) { @@ -124,7 +129,7 @@ static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, i } } -void SEQ_sound_update_muting(Editing *ed) +void SEQ_edit_update_muting(Editing *ed) { if (ed) { /* mute all sounds up to current metastack list */ diff --git a/source/blender/sequencer/intern/strip_relations.c b/source/blender/sequencer/intern/strip_relations.c index 939cafb09fd..18ae21e3a65 100644 --- a/source/blender/sequencer/intern/strip_relations.c +++ b/source/blender/sequencer/intern/strip_relations.c @@ -40,7 +40,11 @@ #include "IMB_imbuf.h" +#include "SEQ_iterator.h" +#include "SEQ_prefetch.h" +#include "SEQ_relations.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" #include "effects.h" #include "image_cache.h" diff --git a/source/blender/sequencer/intern/strip_select.c b/source/blender/sequencer/intern/strip_select.c index fbf28087825..58ae281ead1 100644 --- a/source/blender/sequencer/intern/strip_select.c +++ b/source/blender/sequencer/intern/strip_select.c @@ -29,6 +29,7 @@ #include "BKE_scene.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" Sequence *SEQ_select_active_get(Scene *scene) diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index a3b17a7c58c..c495ad6d8f1 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -36,7 +36,9 @@ #include "IMB_imbuf.h" +#include "SEQ_render.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" #include "strip_time.h" #include "utils.h" diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index 0cf3940dc54..3a0ba36b795 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -33,7 +33,11 @@ #include "BKE_scene.h" #include "BKE_sound.h" +#include "SEQ_effects.h" +#include "SEQ_relations.h" #include "SEQ_sequencer.h" +#include "SEQ_time.h" +#include "SEQ_transform.h" static int seq_tx_get_start(Sequence *seq) { diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c index 40f2aca4714..a15465eb3c0 100644 --- a/source/blender/sequencer/intern/utils.c +++ b/source/blender/sequencer/intern/utils.c @@ -42,7 +42,11 @@ #include "BKE_main.h" #include "BKE_scene.h" +#include "SEQ_iterator.h" +#include "SEQ_relations.h" +#include "SEQ_select.h" #include "SEQ_sequencer.h" +#include "SEQ_utils.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index be58575f99c..d513598cf19 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -80,7 +80,7 @@ #include "RE_engine.h" #include "RE_pipeline.h" /* RE_ free stuff */ -#include "SEQ_sequencer.h" /* free seq clipboard */ +#include "SEQ_clipboard.h" /* free seq clipboard */ #include "IMB_thumbs.h" diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 2e794940f26..cf45d380c48 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -36,7 +36,7 @@ #include "BKE_context.h" #include "BKE_global.h" -#include "SEQ_sequencer.h" +#include "SEQ_prefetch.h" #include "WM_api.h" #include "WM_types.h" -- cgit v1.2.3