From ea1c5a6c15d956639dde8445d79b7f8abe7983fd Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Sun, 1 Nov 2020 21:03:31 +0100 Subject: Rename BKE_sequencer.h Reviewed By: sergey Differential Revision: https://developer.blender.org/D9349 --- source/blender/blenkernel/intern/blender.c | 3 +- source/blender/blenkernel/intern/bpath.c | 3 +- source/blender/blenkernel/intern/image.c | 3 +- source/blender/blenkernel/intern/ipo.c | 3 +- source/blender/blenkernel/intern/object.c | 3 +- source/blender/blenkernel/intern/scene.c | 3 +- source/blender/blenkernel/intern/sound.c | 3 +- source/blender/blenloader/intern/readfile.c | 3 +- source/blender/blenloader/intern/versioning_250.c | 3 +- source/blender/blenloader/intern/versioning_260.c | 3 +- source/blender/blenloader/intern/versioning_270.c | 3 +- source/blender/blenloader/intern/versioning_280.c | 3 +- .../blender/blenloader/intern/versioning_legacy.c | 3 +- source/blender/blenloader/intern/writefile.c | 3 +- .../depsgraph/intern/builder/deg_builder_nodes.cc | 3 +- .../intern/builder/deg_builder_relations.cc | 3 +- .../intern/eval/deg_eval_copy_on_write.cc | 3 +- .../eval/deg_eval_runtime_backup_sequencer.cc | 3 +- source/blender/editors/animation/anim_deps.c | 3 +- source/blender/editors/animation/anim_filter.c | 3 +- source/blender/editors/animation/anim_ops.c | 3 +- source/blender/editors/render/render_internal.c | 3 +- source/blender/editors/render/render_opengl.c | 3 +- source/blender/editors/screen/screen_context.c | 3 +- source/blender/editors/sound/sound_ops.c | 3 +- .../editors/space_outliner/outliner_select.c | 3 +- .../blender/editors/space_outliner/outliner_sync.c | 3 +- .../editors/space_outliner/outliner_tools.c | 3 +- .../blender/editors/space_outliner/outliner_tree.c | 3 +- .../editors/space_sequencer/sequencer_add.c | 3 +- .../editors/space_sequencer/sequencer_draw.c | 3 +- .../editors/space_sequencer/sequencer_edit.c | 3 +- .../editors/space_sequencer/sequencer_modifier.c | 3 +- .../editors/space_sequencer/sequencer_ops.c | 2 +- .../editors/space_sequencer/sequencer_select.c | 3 +- .../editors/space_sequencer/sequencer_view.c | 3 +- .../editors/space_sequencer/space_sequencer.c | 3 +- .../transform/transform_convert_sequencer.c | 3 +- source/blender/editors/transform/transform_snap.c | 3 +- source/blender/editors/util/ed_util_imbuf.c | 3 +- source/blender/imbuf/intern/colormanagement.c | 3 +- source/blender/makesrna/intern/rna_camera.c | 3 +- source/blender/makesrna/intern/rna_color.c | 3 +- source/blender/makesrna/intern/rna_curveprofile.c | 3 +- source/blender/makesrna/intern/rna_movieclip.c | 4 +- source/blender/makesrna/intern/rna_scene.c | 3 +- source/blender/makesrna/intern/rna_sequencer.c | 3 +- source/blender/makesrna/intern/rna_sequencer_api.c | 3 +- source/blender/makesrna/intern/rna_sound.c | 3 +- source/blender/makesrna/intern/rna_space.c | 3 +- source/blender/render/intern/source/pipeline.c | 3 +- source/blender/sequencer/BKE_sequencer.h | 560 --------------------- source/blender/sequencer/CMakeLists.txt | 2 +- source/blender/sequencer/SEQ_sequencer.h | 560 +++++++++++++++++++++ source/blender/sequencer/intern/effects.c | 3 +- source/blender/sequencer/intern/image_cache.c | 3 +- source/blender/sequencer/intern/modifier.c | 3 +- source/blender/sequencer/intern/prefetch.c | 3 +- source/blender/sequencer/intern/sequencer.c | 3 +- source/blender/windowmanager/intern/wm_init_exit.c | 7 +- source/blender/windowmanager/intern/wm_jobs.c | 3 +- 61 files changed, 678 insertions(+), 622 deletions(-) delete mode 100644 source/blender/sequencer/BKE_sequencer.h create mode 100644 source/blender/sequencer/SEQ_sequencer.h (limited to 'source') diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 1ad1a821129..897552723ee 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -53,7 +53,6 @@ #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_studiolight.h" #include "DEG_depsgraph.h" @@ -61,6 +60,8 @@ #include "RE_pipeline.h" #include "RE_render_ext.h" +#include "SEQ_sequencer.h" + #include "BLF_api.h" Global G; diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 4ea9a26f0f8..f624d0ae057 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -73,12 +73,13 @@ #include "BKE_main.h" #include "BKE_node.h" #include "BKE_report.h" -#include "BKE_sequencer.h" #include "BKE_bpath.h" /* own include */ #include "CLG_log.h" +#include "SEQ_sequencer.h" + #ifndef _MSC_VER # include "BLI_strict_flags.h" #endif diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 187908573dd..cadd442ad9e 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -84,7 +84,6 @@ #include "BKE_packedFile.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" /* seq_foreground_frame_get() */ #include "BKE_workspace.h" #include "BLF_api.h" @@ -93,6 +92,8 @@ #include "RE_pipeline.h" +#include "SEQ_sequencer.h" /* seq_foreground_frame_get() */ + #include "GPU_texture.h" #include "BLI_sys_types.h" /* for intptr_t support */ diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 1a87b931689..c09c5bf5cda 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -68,12 +68,13 @@ #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_nla.h" -#include "BKE_sequencer.h" #include "CLG_log.h" #include "MEM_guardedalloc.h" +#include "SEQ_sequencer.h" + #ifdef WIN32 # include "BLI_math_base.h" /* M_PI */ #endif diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 398860b6796..6bfee0194b0 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -123,7 +123,6 @@ #include "BKE_pointcloud.h" #include "BKE_rigidbody.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_softbody.h" #include "BKE_speaker.h" @@ -136,6 +135,8 @@ #include "DRW_engine.h" +#include "SEQ_sequencer.h" + #ifdef WITH_PYTHON # include "BPY_extern.h" #endif diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 416f5aa7edd..6a9fe4615f7 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -90,7 +90,6 @@ #include "BKE_rigidbody.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "BKE_unit.h" #include "BKE_workspace.h" @@ -103,6 +102,8 @@ #include "RE_engine.h" +#include "SEQ_sequencer.h" + #include "engines/eevee/eevee_lightcache.h" #include "PIL_time.h" diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 8bec9f331c5..2ee48a13454 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -60,7 +60,6 @@ #include "BKE_main.h" #include "BKE_packedFile.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "DEG_depsgraph.h" @@ -68,6 +67,8 @@ #include "BLO_read_write.h" +#include "SEQ_sequencer.h" + static void sound_free_audio(bSound *sound); static void sound_copy_data(Main *UNUSED(bmain), diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 29ed66c5080..5d63456cfab 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -156,7 +156,6 @@ #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_simulation.h" #include "BKE_sound.h" @@ -177,6 +176,8 @@ #include "RE_engine.h" +#include "SEQ_sequencer.h" + #include "engines/eevee/eevee_lightcache.h" #include "readfile.h" diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 1988b2e1f33..83cd5dfb6f3 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -73,10 +73,11 @@ #include "BKE_particle.h" #include "BKE_pointcache.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "BKE_texture.h" +#include "SEQ_sequencer.h" + #include "NOD_socket.h" #include "BLO_readfile.h" diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index a7c5d7b933c..6642749d907 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -61,11 +61,12 @@ #include "BKE_pointcache.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_text.h" /* for txt_extended_ascii_as_utf8 */ #include "BKE_texture.h" #include "BKE_tracking.h" +#include "SEQ_sequencer.h" + #ifdef WITH_FFMPEG # include "BKE_writeffmpeg.h" #endif diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 2452ac43bd4..41e46f8f0a0 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -63,9 +63,10 @@ #include "BKE_node.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_tracking.h" +#include "SEQ_sequencer.h" + #include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_string.h" diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 8e082f1c0f9..472400998b1 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -93,11 +93,12 @@ #include "BKE_report.h" #include "BKE_rigidbody.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_studiolight.h" #include "BKE_unit.h" #include "BKE_workspace.h" +#include "SEQ_sequencer.h" + /* Only for IMB_BlendMode */ #include "IMB_imbuf.h" diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 9d858da266d..2659cc13bcc 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -77,7 +77,8 @@ #include "BKE_modifier.h" #include "BKE_particle.h" #include "BKE_pointcache.h" -#include "BKE_sequencer.h" + +#include "SEQ_sequencer.h" #include "NOD_socket.h" diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 835e2f92c7c..95cfeef4243 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -156,7 +156,6 @@ #include "BKE_pointcache.h" #include "BKE_report.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_subsurf.h" #include "BKE_workspace.h" @@ -168,6 +167,8 @@ #include "BLO_undofile.h" #include "BLO_writefile.h" +#include "SEQ_sequencer.h" + #include "readfile.h" #include diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 7f9a745c1a4..a739e9cc46b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -96,7 +96,6 @@ #include "BKE_pointcache.h" #include "BKE_rigidbody.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_simulation.h" #include "BKE_sound.h" @@ -110,6 +109,8 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" +#include "SEQ_sequencer.h" + #include "intern/builder/deg_builder.h" #include "intern/depsgraph.h" #include "intern/depsgraph_type.h" diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index bac36885dfc..af281c3f0cf 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -89,7 +89,6 @@ #include "BKE_particle.h" #include "BKE_pointcache.h" #include "BKE_rigidbody.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_shrinkwrap.h" #include "BKE_sound.h" @@ -99,6 +98,8 @@ #include "RNA_access.h" #include "RNA_types.h" +#include "SEQ_sequencer.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 477dd316768..0a92cdb2e64 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 @@ -90,9 +90,10 @@ #include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_pointcache.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" +#include "SEQ_sequencer.h" + #include "intern/builder/deg_builder.h" #include "intern/builder/deg_builder_nodes.h" #include "intern/depsgraph.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 4d79480a5ad..314254c0cf6 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 @@ -28,9 +28,10 @@ #include "BLI_assert.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" +#include "SEQ_sequencer.h" + namespace blender { namespace deg { diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index b2225ec138f..e552a321bca 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -44,12 +44,13 @@ #include "BKE_gpencil.h" #include "BKE_main.h" #include "BKE_node.h" -#include "BKE_sequencer.h" #include "DEG_depsgraph.h" #include "RNA_access.h" +#include "SEQ_sequencer.h" + #include "ED_anim_api.h" /* **************************** depsgraph tagging ******************************** */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 5dff62459ac..2e65fff69f1 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -96,11 +96,12 @@ #include "BKE_material.h" #include "BKE_modifier.h" #include "BKE_node.h" -#include "BKE_sequencer.h" #include "ED_anim_api.h" #include "ED_markers.h" +#include "SEQ_sequencer.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 b52ff131b43..9e622aea6ab 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -37,7 +37,6 @@ #include "BKE_main.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "UI_view2d.h" @@ -56,6 +55,8 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" +#include "SEQ_sequencer.h" + #include "anim_intern.h" /* ********************** frame change operator ***************************/ diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 92bd2a137ef..3dbf70aa4bc 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -57,7 +57,6 @@ #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_undo_system.h" #include "DEG_depsgraph.h" @@ -83,6 +82,8 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "SEQ_sequencer.h" + #include "BLO_undofile.h" #include "render_intern.h" diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 8d410e36ca6..5d355ada77c 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -54,7 +54,6 @@ #include "BKE_main.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_writeavi.h" #include "DEG_depsgraph.h" @@ -78,6 +77,8 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "SEQ_sequencer.h" + #include "GPU_framebuffer.h" #include "GPU_matrix.h" diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 3924c334541..af09100b8e6 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -48,7 +48,6 @@ #include "BKE_gpencil.h" #include "BKE_layer.h" #include "BKE_object.h" -#include "BKE_sequencer.h" #include "RNA_access.h" @@ -56,6 +55,8 @@ #include "ED_armature.h" #include "ED_gpencil.h" +#include "SEQ_sequencer.h" + #include "UI_interface.h" #include "WM_api.h" diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index e5f6b61a2ae..8bf14f85b89 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -46,13 +46,14 @@ #include "BKE_packedFile.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_sequencer.h" + #include "UI_interface.h" #include "WM_api.h" diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index acdedf8a238..beba1fc9e8d 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -56,7 +56,6 @@ #include "BKE_particle.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_shader_fx.h" #include "BKE_workspace.h" @@ -73,6 +72,8 @@ #include "ED_sequencer.h" #include "ED_undo.h" +#include "SEQ_sequencer.h" + #include "WM_api.h" #include "WM_toolsystem.h" #include "WM_types.h" diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c index 3055d15725b..e1a96da1c91 100644 --- a/source/blender/editors/space_outliner/outliner_sync.c +++ b/source/blender/editors/space_outliner/outliner_sync.c @@ -39,7 +39,6 @@ #include "BKE_layer.h" #include "BKE_main.h" #include "BKE_object.h" -#include "BKE_sequencer.h" #include "DEG_depsgraph.h" @@ -47,6 +46,8 @@ #include "ED_object.h" #include "ED_outliner.h" +#include "SEQ_sequencer.h" + #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index cbdeb350ba4..159a4616ba7 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -65,7 +65,6 @@ #include "BKE_report.h" #include "BKE_scene.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" @@ -89,6 +88,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_sequencer.h" + #include "outliner_intern.h" /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index c44a1554478..79376686342 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -69,7 +69,6 @@ #include "BKE_main.h" #include "BKE_modifier.h" #include "BKE_outliner_treehash.h" -#include "BKE_sequencer.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" @@ -81,6 +80,8 @@ #include "RNA_access.h" +#include "SEQ_sequencer.h" + #include "UI_interface.h" #include "outliner_intern.h" diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 0725109944a..42abc97bebe 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -43,7 +43,6 @@ #include "BKE_mask.h" #include "BKE_movieclip.h" #include "BKE_report.h" -#include "BKE_sequencer.h" #include "WM_api.h" #include "WM_types.h" @@ -51,6 +50,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_sequencer.h" + /* For menu, popup, icons, etc. */ #include "ED_screen.h" #include "ED_sequencer.h" diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index e9c5b003420..eb35cced95b 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -44,7 +44,6 @@ #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "IMB_colormanagement.h" @@ -69,6 +68,8 @@ #include "BIF_glutil.h" +#include "SEQ_sequencer.h" + #include "UI_interface.h" #include "UI_resources.h" #include "UI_view2d.h" diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 9554608ea7c..92449126d2c 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -43,9 +43,10 @@ #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_report.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" +#include "SEQ_sequencer.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 50f2a5084ef..fb09afc6ca5 100644 --- a/source/blender/editors/space_sequencer/sequencer_modifier.c +++ b/source/blender/editors/space_sequencer/sequencer_modifier.c @@ -27,7 +27,6 @@ #include "DNA_scene_types.h" #include "BKE_context.h" -#include "BKE_sequencer.h" #include "WM_api.h" #include "WM_types.h" @@ -35,6 +34,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "SEQ_sequencer.h" + /* Own include. */ #include "sequencer_intern.h" diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 0a7aa1a6072..bdf6e4ece7f 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -34,7 +34,7 @@ #include "ED_sequencer.h" #include "ED_transform.h" /* Transform keymap. */ -#include "BKE_sequencer.h" +#include "SEQ_sequencer.h" #include "sequencer_intern.h" diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 0a4a1ae92d9..2af708494cb 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -33,13 +33,14 @@ #include "BKE_context.h" #include "BKE_report.h" -#include "BKE_sequencer.h" #include "WM_api.h" #include "WM_types.h" #include "RNA_define.h" +#include "SEQ_sequencer.h" + /* For menu, popup, icons, etc. */ #include "ED_outliner.h" diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index 491c475b596..75d92d5f00d 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -28,7 +28,6 @@ #include "DNA_scene_types.h" #include "BKE_context.h" -#include "BKE_sequencer.h" #include "WM_api.h" #include "WM_types.h" @@ -39,6 +38,8 @@ #include "RNA_define.h" +#include "SEQ_sequencer.h" + /* For menu, popup, icons, etc. */ #include "ED_anim_api.h" #include "ED_screen.h" diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 289477c8353..45c7bac54f8 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -38,7 +38,6 @@ #include "BKE_global.h" #include "BKE_lib_id.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "BKE_sequencer_offscreen.h" #include "ED_screen.h" @@ -52,6 +51,8 @@ #include "RNA_access.h" +#include "SEQ_sequencer.h" + #include "UI_interface.h" #include "UI_resources.h" #include "UI_view2d.h" diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 307fbbdf80b..3f86ef3e81b 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -29,10 +29,11 @@ #include "BKE_context.h" #include "BKE_report.h" -#include "BKE_sequencer.h" #include "ED_markers.h" +#include "SEQ_sequencer.h" + #include "UI_view2d.h" #include "transform.h" diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index e461bcb88e9..f1c4c243780 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -38,10 +38,11 @@ #include "BKE_layer.h" #include "BKE_object.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "RNA_access.h" +#include "SEQ_sequencer.h" + #include "WM_types.h" #include "ED_gizmo_library.h" diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index 9a2b346132e..9ae5cbbdfe9 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -30,7 +30,6 @@ #include "BKE_image.h" #include "BKE_main.h" #include "BKE_screen.h" -#include "BKE_sequencer.h" #include "ED_image.h" #include "ED_screen.h" @@ -43,6 +42,8 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +#include "SEQ_sequencer.h" + #include "UI_view2d.h" #include "WM_api.h" diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 8005049eab2..c169633fa3c 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -54,10 +54,11 @@ #include "BKE_context.h" #include "BKE_image.h" #include "BKE_main.h" -#include "BKE_sequencer.h" #include "RNA_define.h" +#include "SEQ_sequencer.h" + #include /* -------------------------------------------------------------------- */ diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 31a71a80bbc..c6b2489f831 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -36,11 +36,12 @@ # include "BKE_camera.h" # include "BKE_object.h" -# include "BKE_sequencer.h" # include "DEG_depsgraph.h" # include "DEG_depsgraph_build.h" +# include "SEQ_sequencer.h" + static float rna_Camera_angle_get(PointerRNA *ptr) { Camera *cam = (Camera *)ptr->owner_id; diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index b02377f4bb0..e8bef4a8a9e 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -52,7 +52,6 @@ # include "BKE_linestyle.h" # include "BKE_movieclip.h" # include "BKE_node.h" -# include "BKE_sequencer.h" # include "DEG_depsgraph.h" @@ -61,6 +60,8 @@ # include "IMB_colormanagement.h" # include "IMB_imbuf.h" +# include "SEQ_sequencer.h" + static int rna_CurveMapping_curves_length(PointerRNA *ptr) { CurveMapping *cumap = (CurveMapping *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_curveprofile.c b/source/blender/makesrna/intern/rna_curveprofile.c index ee1c659fcd5..25f0c5fb9b4 100644 --- a/source/blender/makesrna/intern/rna_curveprofile.c +++ b/source/blender/makesrna/intern/rna_curveprofile.c @@ -53,7 +53,6 @@ # include "BKE_linestyle.h" # include "BKE_movieclip.h" # include "BKE_node.h" -# include "BKE_sequencer.h" # include "DEG_depsgraph.h" @@ -62,6 +61,8 @@ # include "IMB_colormanagement.h" # include "IMB_imbuf.h" +# include "SEQ_sequencer.h" + /** * Set both handle types for all selected points in the profile-- faster than changing types * for many points individually. Also set both handles for the points. diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index ff5445f1d71..d07a4b4fac7 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -46,11 +46,11 @@ # include "ED_clip.h" -# include "BKE_sequencer.h" - # include "DNA_screen_types.h" # include "DNA_space_types.h" +# include "SEQ_sequencer.h" + static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { MovieClip *clip = (MovieClip *)ptr->owner_id; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 7b7c1516b50..0484a75a773 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -680,7 +680,6 @@ const EnumPropertyItem rna_enum_transform_orientation_items[] = { # include "BKE_pointcache.h" # include "BKE_scene.h" # include "BKE_screen.h" -# include "BKE_sequencer.h" # include "BKE_unit.h" # include "ED_image.h" @@ -694,6 +693,8 @@ const EnumPropertyItem rna_enum_transform_orientation_items[] = { # include "DEG_depsgraph_build.h" # include "DEG_depsgraph_query.h" +# include "SEQ_sequencer.h" + # ifdef WITH_FREESTYLE # include "FRS_freestyle.h" # endif diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index e180ab5dfb6..8da2d762c94 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -34,7 +34,6 @@ #include "BKE_anim_data.h" #include "BKE_animsys.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "IMB_metadata.h" @@ -47,6 +46,8 @@ #include "rna_internal.h" +#include "SEQ_sequencer.h" + #include "WM_types.h" typedef struct EffectInfo { diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index e93ca7bc019..1ee84ef080c 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -46,12 +46,13 @@ # include "BKE_movieclip.h" # include "BKE_report.h" -# include "BKE_sequencer.h" # include "BKE_sound.h" # include "IMB_imbuf.h" # include "IMB_imbuf_types.h" +# include "SEQ_sequencer.h" + # include "WM_api.h" static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, bool do_data) diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c index 2fb50c2e89e..c5a53d4522d 100644 --- a/source/blender/makesrna/intern/rna_sound.c +++ b/source/blender/makesrna/intern/rna_sound.c @@ -29,11 +29,12 @@ #ifdef RNA_RUNTIME # include "BKE_context.h" -# include "BKE_sequencer.h" # include "BKE_sound.h" # include "DEG_depsgraph.h" +# include "SEQ_sequencer.h" + static void rna_Sound_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { bSound *sound = (bSound *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 84c1ccd30d9..70c7bf0a81e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -29,7 +29,6 @@ #include "BKE_key.h" #include "BKE_movieclip.h" #include "BKE_node.h" -#include "BKE_sequencer.h" #include "BKE_studiolight.h" #include "ED_text.h" @@ -55,6 +54,8 @@ #include "rna_internal.h" +#include "SEQ_sequencer.h" + #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 14375c27bfa..fee1a26ca85 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -70,7 +70,6 @@ #include "BKE_pointcache.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_sound.h" #include "BKE_writeavi.h" /* <------ should be replaced once with generic movie module */ @@ -89,6 +88,8 @@ #include "RE_pipeline.h" #include "RE_render_ext.h" +#include "SEQ_sequencer.h" + #include "../../../windowmanager/WM_api.h" /* XXX */ #include "../../../windowmanager/wm_window.h" /* XXX */ #include "GPU_context.h" diff --git a/source/blender/sequencer/BKE_sequencer.h b/source/blender/sequencer/BKE_sequencer.h deleted file mode 100644 index 90b1d611842..00000000000 --- a/source/blender/sequencer/BKE_sequencer.h +++ /dev/null @@ -1,560 +0,0 @@ -/* - * 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 Depsgraph; -struct Editing; -struct GPUOffScreen; -struct GSet; -struct ImBuf; -struct Main; -struct Mask; -struct ReportList; -struct Scene; -struct Sequence; -struct SequenceModifierData; -struct Stereo3dFormat; -struct StripElem; -struct TextVars; -struct bContext; -struct bSound; -struct SeqIndexBuildContext; - -/* 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_NONE = 0, - SEQ_SIDE_LEFT, - SEQ_SIDE_RIGHT, - SEQ_SIDE_BOTH, - 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 (BKE_sequence_iterator_begin(ed, &iter_macro, false); iter_macro.valid; \ - BKE_sequence_iterator_next(&iter_macro)) { \ - _seq = iter_macro.seq; - -#define SEQ_ALL_END \ - } \ - BKE_sequence_iterator_end(&iter_macro); \ - } \ - ((void)0) - -#define SEQ_CURRENT_BEGIN(_ed, _seq) \ - { \ - SeqIterator iter_macro; \ - for (BKE_sequence_iterator_begin(_ed, &iter_macro, true); iter_macro.valid; \ - BKE_sequence_iterator_next(&iter_macro)) { \ - _seq = iter_macro.seq; - -#define SEQ_CURRENT_END SEQ_ALL_END - -void BKE_sequence_iterator_begin(struct Editing *ed, - SeqIterator *iter, - const bool use_current_sequences); -void BKE_sequence_iterator_next(SeqIterator *iter); -void BKE_sequence_iterator_end(SeqIterator *iter); - -/* ********************************************************************** - * sequencer.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 *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown); -struct ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context, - float cfra, - struct Sequence *seq); -void BKE_sequence_alpha_mode_from_extension(struct Sequence *seq); -void BKE_sequence_init_colorspace(struct Sequence *seq); -void BKE_sequencer_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); - -/* ********************************************************************** - * sequencer.c - * - * Sequencer color space functions - * ********************************************************************** */ - -void BKE_sequencer_imbuf_from_sequencer_space(struct Scene *scene, struct ImBuf *ibuf); -void BKE_sequencer_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]); - -/* ********************************************************************** - * sequencer.c - * - * Sequencer scene functions - * ********************************************************************** */ -struct Editing *BKE_sequencer_editing_get(struct Scene *scene, bool alloc); -struct Editing *BKE_sequencer_editing_ensure(struct Scene *scene); -void BKE_sequencer_editing_free(struct Scene *scene, const bool do_id_user); -void BKE_sequencer_sort(struct Scene *scene); -struct Sequence *BKE_sequencer_from_elem(ListBase *seqbase, struct StripElem *se); -struct Sequence *BKE_sequencer_active_get(struct Scene *scene); -int BKE_sequencer_active_get_pair(struct Scene *scene, - struct Sequence **seq_act, - struct Sequence **seq_other); -void BKE_sequencer_active_set(struct Scene *scene, struct Sequence *seq); -struct Mask *BKE_sequencer_mask_get(struct Scene *scene); -/* apply functions recursively */ -int BKE_sequencer_base_recursive_apply(struct ListBase *seqbase, - int (*apply_fn)(struct Sequence *seq, void *), - void *arg); -int BKE_sequencer_recursive_apply(struct Sequence *seq, - int (*apply_fn)(struct Sequence *, void *), - void *arg); -float BKE_sequence_get_fps(struct Scene *scene, struct Sequence *seq); -int BKE_sequencer_find_next_prev_edit(struct Scene *scene, - int cfra, - const short side, - const bool do_skip_mute, - const bool do_center, - const bool do_unselected); -/* maintenance functions, mostly for RNA */ -void BKE_sequence_free(struct Scene *scene, struct Sequence *seq, const bool do_clean_animdata); -void BKE_sequence_free_anim(struct Sequence *seq); -const char *BKE_sequence_give_name(struct Sequence *seq); -ListBase *BKE_sequence_seqbase_get(struct Sequence *seq, int *r_offset); -void BKE_sequence_calc(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_calc_disp(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_reload_new_file(struct Main *bmain, - struct Scene *scene, - struct Sequence *seq, - const bool lock_range); -void BKE_sequence_movie_reload_if_needed(struct Main *bmain, - struct Scene *scene, - struct Sequence *seq, - bool *r_was_reloaded, - bool *r_can_produce_frames); -int BKE_sequencer_evaluate_frame(struct Scene *scene, int cfra); -struct StripElem *BKE_sequencer_give_stripelem(struct Sequence *seq, int cfra); -void BKE_sequencer_update_changed_seq_and_deps(struct Scene *scene, - struct Sequence *changed_seq, - int len_change, - int ibuf_change); -bool BKE_sequencer_proxy_rebuild_context(struct Main *bmain, - struct Depsgraph *depsgraph, - struct Scene *scene, - struct Sequence *seq, - struct GSet *file_list, - ListBase *queue); -void BKE_sequencer_proxy_rebuild(struct SeqIndexBuildContext *context, - short *stop, - short *do_update, - float *progress); -void BKE_sequencer_proxy_rebuild_finish(struct SeqIndexBuildContext *context, bool stop); -void BKE_sequencer_proxy_set(struct Sequence *seq, bool value); -bool BKE_sequencer_check_scene_recursion(struct Scene *scene, struct ReportList *reports); -bool BKE_sequencer_render_loop_check(struct Sequence *seq_main, struct Sequence *seq); -int BKE_sequencer_cmp_time_startdisp(const void *a, const void *b); -double BKE_sequencer_rendersize_to_scale_factor(int size); - -/* ********************************************************************** - * image_cache.c - * - * Sequencer memory cache management functions - * ********************************************************************** */ - -void BKE_sequencer_cache_cleanup(struct Scene *scene); -void BKE_sequencer_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 cfra, - int cache_type, - float cost)); - -/* ********************************************************************** - * prefetch.c - * - * Sequencer frame prefetching - * ********************************************************************** */ - -#define SEQ_CACHE_COST_MAX 10.0f -void BKE_sequencer_prefetch_stop_all(void); -void BKE_sequencer_prefetch_stop(struct Scene *scene); -bool BKE_sequencer_prefetch_need_redraw(struct Main *bmain, struct Scene *scene); - -/* ********************************************************************** - * sequencer.c - * - * Sequencer editing functions - * ********************************************************************** - */ - -/* for transform but also could use elsewhere */ -int BKE_sequence_tx_get_final_left(struct Sequence *seq, bool metaclip); -int BKE_sequence_tx_get_final_right(struct Sequence *seq, bool metaclip); -void BKE_sequence_tx_set_final_left(struct Sequence *seq, int val); -void BKE_sequence_tx_set_final_right(struct Sequence *seq, int val); -void BKE_sequence_tx_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag); -bool BKE_sequence_tx_test(struct Sequence *seq); -bool BKE_sequence_tx_fullupdate_test(struct Sequence *seq); -bool BKE_sequence_single_check(struct Sequence *seq); -void BKE_sequence_single_fix(struct Sequence *seq); -bool BKE_sequence_test_overlap(struct ListBase *seqbasep, struct Sequence *test); -void BKE_sequence_translate(struct Scene *scene, struct Sequence *seq, int delta); -const struct Sequence *BKE_sequencer_foreground_frame_get(const struct Scene *scene, int frame); -struct ListBase *BKE_sequence_seqbase(struct ListBase *seqbase, struct Sequence *seq); -void BKE_sequencer_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs); -void BKE_sequencer_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst); -bool BKE_sequence_base_shuffle_ex(struct ListBase *seqbasep, - struct Sequence *test, - struct Scene *evil_scene, - int channel_delta); -bool BKE_sequence_base_shuffle(struct ListBase *seqbasep, - struct Sequence *test, - struct Scene *evil_scene); -bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, - struct Scene *evil_scene, - ListBase *markers, - const bool use_sync_markers); -bool BKE_sequence_base_isolated_sel_check(struct ListBase *seqbase); -void BKE_sequencer_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); -struct Sequence *BKE_sequence_dupli_recursive(const struct Scene *scene_src, - struct Scene *scene_dst, - struct ListBase *new_seq_list, - struct Sequence *seq, - int dupe_flag); -int BKE_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str); -void BKE_sequencer_update_sound_bounds_all(struct Scene *scene); -void BKE_sequencer_update_sound_bounds(struct Scene *scene, struct Sequence *seq); -void BKE_sequencer_update_muting(struct Editing *ed); -void BKE_sequencer_update_sound(struct Scene *scene, struct bSound *sound); -void BKE_sequencer_refresh_sound_length(struct Main *bmain, struct Scene *scene); -void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq); -void BKE_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 BKE_sequence_is_valid_check(struct Sequence *seq); -struct Sequence *BKE_sequence_get_by_name(struct ListBase *seqbase, - const char *name, - bool recursive); -void BKE_sequencer_flag_for_removal(struct Scene *scene, - struct ListBase *seqbase, - struct Sequence *seq); -void BKE_sequencer_remove_flagged_sequences(struct Scene *scene, struct ListBase *seqbase); - -/* ********************************************************************** - * sequencer.c - * - * Cache invalidation - * ********************************************************************** - */ - -void BKE_sequence_invalidate_cache_raw(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_invalidate_cache_preprocessed(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_invalidate_cache_composite(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_invalidate_dependent(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_invalidate_scene_strips(struct Main *bmain, struct Scene *scene_target); -void BKE_sequence_invalidate_movieclip_strips(struct Main *bmain, struct MovieClip *clip_target); -void BKE_sequence_invalidate_cache_in_range(struct Scene *scene, - struct Sequence *seq, - struct Sequence *range_mask, - int invalidate_types); -void BKE_sequencer_all_free_anim_ibufs(struct Scene *scene, int cfra); - -/* ********************************************************************** - * 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 */ - - /* 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 *BKE_sequence_alloc(ListBase *lb, int cfra, int machine, int type); -struct Sequence *BKE_sequencer_add_image_strip(struct bContext *C, - ListBase *seqbasep, - struct SeqLoadInfo *seq_load); -struct Sequence *BKE_sequencer_add_sound_strip(struct bContext *C, - ListBase *seqbasep, - struct SeqLoadInfo *seq_load); -struct Sequence *BKE_sequencer_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 *BKE_sequence_modifier_type_info_get(int type); -struct SequenceModifierData *BKE_sequence_modifier_new(struct Sequence *seq, - const char *name, - int type); -bool BKE_sequence_modifier_remove(struct Sequence *seq, struct SequenceModifierData *smd); -void BKE_sequence_modifier_clear(struct Sequence *seq); -void BKE_sequence_modifier_free(struct SequenceModifierData *smd); -void BKE_sequence_modifier_unique_name(struct Sequence *seq, struct SequenceModifierData *smd); -struct SequenceModifierData *BKE_sequence_modifier_find_by_name(struct Sequence *seq, - const char *name); -struct ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, - struct Sequence *seq, - struct ImBuf *ibuf, - int cfra); -void BKE_sequence_modifier_list_copy(struct Sequence *seqn, struct Sequence *seq); -int BKE_sequence_supports_modifiers(struct Sequence *seq); - -/* ********************************************************************** - * 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 cfra, 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 cfra, - 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 cfra, - float facf0, - float facf1, - struct ImBuf *ibuf1, - struct ImBuf *ibuf2, - struct ImBuf *ibuf3, - int start_line, - int total_lines, - struct ImBuf *out); -}; - -struct SeqEffectHandle BKE_sequence_get_effect(struct Sequence *seq); -int BKE_sequence_effect_get_num_inputs(int seq_type); -void BKE_sequencer_text_font_unload(struct TextVars *data, const bool do_id_user); -void BKE_sequencer_text_font_load(struct TextVars *data, const bool do_id_user); - -/* ********************************************************************** - * sequencer.c - * - * Clipboard - * ********************************************************************** - */ - -extern ListBase seqbase_clipboard; -extern int seqbase_clipboard_frame; -void BKE_sequencer_base_clipboard_pointers_store(struct Main *bmain, struct ListBase *seqbase); -void BKE_sequencer_base_clipboard_pointers_restore(struct ListBase *seqbase, struct Main *bmain); -void BKE_sequencer_free_clipboard(void); - -/* ********************************************************************** - * sequencer.c - * - * Depsgraph - * ********************************************************************** - */ - -/* A debug and development function which checks whether sequences have unique UUIDs. - * Errors will be reported to the console. */ -void BKE_sequencer_check_uuids_unique_and_report(const struct Scene *scene); -/* Generate new UUID for the given sequence. */ -void BKE_sequence_session_uuid_generate(struct Sequence *sequence); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/sequencer/CMakeLists.txt b/source/blender/sequencer/CMakeLists.txt index 84684987ca7..7aac6eebc66 100644 --- a/source/blender/sequencer/CMakeLists.txt +++ b/source/blender/sequencer/CMakeLists.txt @@ -40,7 +40,7 @@ set(INC_SYS ) set(SRC - BKE_sequencer.h + SEQ_sequencer.h intern/sequencer.c intern/sequencer.h diff --git a/source/blender/sequencer/SEQ_sequencer.h b/source/blender/sequencer/SEQ_sequencer.h new file mode 100644 index 00000000000..90b1d611842 --- /dev/null +++ b/source/blender/sequencer/SEQ_sequencer.h @@ -0,0 +1,560 @@ +/* + * 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 Depsgraph; +struct Editing; +struct GPUOffScreen; +struct GSet; +struct ImBuf; +struct Main; +struct Mask; +struct ReportList; +struct Scene; +struct Sequence; +struct SequenceModifierData; +struct Stereo3dFormat; +struct StripElem; +struct TextVars; +struct bContext; +struct bSound; +struct SeqIndexBuildContext; + +/* 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_NONE = 0, + SEQ_SIDE_LEFT, + SEQ_SIDE_RIGHT, + SEQ_SIDE_BOTH, + 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 (BKE_sequence_iterator_begin(ed, &iter_macro, false); iter_macro.valid; \ + BKE_sequence_iterator_next(&iter_macro)) { \ + _seq = iter_macro.seq; + +#define SEQ_ALL_END \ + } \ + BKE_sequence_iterator_end(&iter_macro); \ + } \ + ((void)0) + +#define SEQ_CURRENT_BEGIN(_ed, _seq) \ + { \ + SeqIterator iter_macro; \ + for (BKE_sequence_iterator_begin(_ed, &iter_macro, true); iter_macro.valid; \ + BKE_sequence_iterator_next(&iter_macro)) { \ + _seq = iter_macro.seq; + +#define SEQ_CURRENT_END SEQ_ALL_END + +void BKE_sequence_iterator_begin(struct Editing *ed, + SeqIterator *iter, + const bool use_current_sequences); +void BKE_sequence_iterator_next(SeqIterator *iter); +void BKE_sequence_iterator_end(SeqIterator *iter); + +/* ********************************************************************** + * sequencer.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 *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown); +struct ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context, + float cfra, + struct Sequence *seq); +void BKE_sequence_alpha_mode_from_extension(struct Sequence *seq); +void BKE_sequence_init_colorspace(struct Sequence *seq); +void BKE_sequencer_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); + +/* ********************************************************************** + * sequencer.c + * + * Sequencer color space functions + * ********************************************************************** */ + +void BKE_sequencer_imbuf_from_sequencer_space(struct Scene *scene, struct ImBuf *ibuf); +void BKE_sequencer_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]); + +/* ********************************************************************** + * sequencer.c + * + * Sequencer scene functions + * ********************************************************************** */ +struct Editing *BKE_sequencer_editing_get(struct Scene *scene, bool alloc); +struct Editing *BKE_sequencer_editing_ensure(struct Scene *scene); +void BKE_sequencer_editing_free(struct Scene *scene, const bool do_id_user); +void BKE_sequencer_sort(struct Scene *scene); +struct Sequence *BKE_sequencer_from_elem(ListBase *seqbase, struct StripElem *se); +struct Sequence *BKE_sequencer_active_get(struct Scene *scene); +int BKE_sequencer_active_get_pair(struct Scene *scene, + struct Sequence **seq_act, + struct Sequence **seq_other); +void BKE_sequencer_active_set(struct Scene *scene, struct Sequence *seq); +struct Mask *BKE_sequencer_mask_get(struct Scene *scene); +/* apply functions recursively */ +int BKE_sequencer_base_recursive_apply(struct ListBase *seqbase, + int (*apply_fn)(struct Sequence *seq, void *), + void *arg); +int BKE_sequencer_recursive_apply(struct Sequence *seq, + int (*apply_fn)(struct Sequence *, void *), + void *arg); +float BKE_sequence_get_fps(struct Scene *scene, struct Sequence *seq); +int BKE_sequencer_find_next_prev_edit(struct Scene *scene, + int cfra, + const short side, + const bool do_skip_mute, + const bool do_center, + const bool do_unselected); +/* maintenance functions, mostly for RNA */ +void BKE_sequence_free(struct Scene *scene, struct Sequence *seq, const bool do_clean_animdata); +void BKE_sequence_free_anim(struct Sequence *seq); +const char *BKE_sequence_give_name(struct Sequence *seq); +ListBase *BKE_sequence_seqbase_get(struct Sequence *seq, int *r_offset); +void BKE_sequence_calc(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_calc_disp(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_reload_new_file(struct Main *bmain, + struct Scene *scene, + struct Sequence *seq, + const bool lock_range); +void BKE_sequence_movie_reload_if_needed(struct Main *bmain, + struct Scene *scene, + struct Sequence *seq, + bool *r_was_reloaded, + bool *r_can_produce_frames); +int BKE_sequencer_evaluate_frame(struct Scene *scene, int cfra); +struct StripElem *BKE_sequencer_give_stripelem(struct Sequence *seq, int cfra); +void BKE_sequencer_update_changed_seq_and_deps(struct Scene *scene, + struct Sequence *changed_seq, + int len_change, + int ibuf_change); +bool BKE_sequencer_proxy_rebuild_context(struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, + struct Sequence *seq, + struct GSet *file_list, + ListBase *queue); +void BKE_sequencer_proxy_rebuild(struct SeqIndexBuildContext *context, + short *stop, + short *do_update, + float *progress); +void BKE_sequencer_proxy_rebuild_finish(struct SeqIndexBuildContext *context, bool stop); +void BKE_sequencer_proxy_set(struct Sequence *seq, bool value); +bool BKE_sequencer_check_scene_recursion(struct Scene *scene, struct ReportList *reports); +bool BKE_sequencer_render_loop_check(struct Sequence *seq_main, struct Sequence *seq); +int BKE_sequencer_cmp_time_startdisp(const void *a, const void *b); +double BKE_sequencer_rendersize_to_scale_factor(int size); + +/* ********************************************************************** + * image_cache.c + * + * Sequencer memory cache management functions + * ********************************************************************** */ + +void BKE_sequencer_cache_cleanup(struct Scene *scene); +void BKE_sequencer_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 cfra, + int cache_type, + float cost)); + +/* ********************************************************************** + * prefetch.c + * + * Sequencer frame prefetching + * ********************************************************************** */ + +#define SEQ_CACHE_COST_MAX 10.0f +void BKE_sequencer_prefetch_stop_all(void); +void BKE_sequencer_prefetch_stop(struct Scene *scene); +bool BKE_sequencer_prefetch_need_redraw(struct Main *bmain, struct Scene *scene); + +/* ********************************************************************** + * sequencer.c + * + * Sequencer editing functions + * ********************************************************************** + */ + +/* for transform but also could use elsewhere */ +int BKE_sequence_tx_get_final_left(struct Sequence *seq, bool metaclip); +int BKE_sequence_tx_get_final_right(struct Sequence *seq, bool metaclip); +void BKE_sequence_tx_set_final_left(struct Sequence *seq, int val); +void BKE_sequence_tx_set_final_right(struct Sequence *seq, int val); +void BKE_sequence_tx_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag); +bool BKE_sequence_tx_test(struct Sequence *seq); +bool BKE_sequence_tx_fullupdate_test(struct Sequence *seq); +bool BKE_sequence_single_check(struct Sequence *seq); +void BKE_sequence_single_fix(struct Sequence *seq); +bool BKE_sequence_test_overlap(struct ListBase *seqbasep, struct Sequence *test); +void BKE_sequence_translate(struct Scene *scene, struct Sequence *seq, int delta); +const struct Sequence *BKE_sequencer_foreground_frame_get(const struct Scene *scene, int frame); +struct ListBase *BKE_sequence_seqbase(struct ListBase *seqbase, struct Sequence *seq); +void BKE_sequencer_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs); +void BKE_sequencer_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst); +bool BKE_sequence_base_shuffle_ex(struct ListBase *seqbasep, + struct Sequence *test, + struct Scene *evil_scene, + int channel_delta); +bool BKE_sequence_base_shuffle(struct ListBase *seqbasep, + struct Sequence *test, + struct Scene *evil_scene); +bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, + struct Scene *evil_scene, + ListBase *markers, + const bool use_sync_markers); +bool BKE_sequence_base_isolated_sel_check(struct ListBase *seqbase); +void BKE_sequencer_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); +struct Sequence *BKE_sequence_dupli_recursive(const struct Scene *scene_src, + struct Scene *scene_dst, + struct ListBase *new_seq_list, + struct Sequence *seq, + int dupe_flag); +int BKE_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str); +void BKE_sequencer_update_sound_bounds_all(struct Scene *scene); +void BKE_sequencer_update_sound_bounds(struct Scene *scene, struct Sequence *seq); +void BKE_sequencer_update_muting(struct Editing *ed); +void BKE_sequencer_update_sound(struct Scene *scene, struct bSound *sound); +void BKE_sequencer_refresh_sound_length(struct Main *bmain, struct Scene *scene); +void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq); +void BKE_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 BKE_sequence_is_valid_check(struct Sequence *seq); +struct Sequence *BKE_sequence_get_by_name(struct ListBase *seqbase, + const char *name, + bool recursive); +void BKE_sequencer_flag_for_removal(struct Scene *scene, + struct ListBase *seqbase, + struct Sequence *seq); +void BKE_sequencer_remove_flagged_sequences(struct Scene *scene, struct ListBase *seqbase); + +/* ********************************************************************** + * sequencer.c + * + * Cache invalidation + * ********************************************************************** + */ + +void BKE_sequence_invalidate_cache_raw(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_invalidate_cache_preprocessed(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_invalidate_cache_composite(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_invalidate_dependent(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_invalidate_scene_strips(struct Main *bmain, struct Scene *scene_target); +void BKE_sequence_invalidate_movieclip_strips(struct Main *bmain, struct MovieClip *clip_target); +void BKE_sequence_invalidate_cache_in_range(struct Scene *scene, + struct Sequence *seq, + struct Sequence *range_mask, + int invalidate_types); +void BKE_sequencer_all_free_anim_ibufs(struct Scene *scene, int cfra); + +/* ********************************************************************** + * 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 */ + + /* 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 *BKE_sequence_alloc(ListBase *lb, int cfra, int machine, int type); +struct Sequence *BKE_sequencer_add_image_strip(struct bContext *C, + ListBase *seqbasep, + struct SeqLoadInfo *seq_load); +struct Sequence *BKE_sequencer_add_sound_strip(struct bContext *C, + ListBase *seqbasep, + struct SeqLoadInfo *seq_load); +struct Sequence *BKE_sequencer_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 *BKE_sequence_modifier_type_info_get(int type); +struct SequenceModifierData *BKE_sequence_modifier_new(struct Sequence *seq, + const char *name, + int type); +bool BKE_sequence_modifier_remove(struct Sequence *seq, struct SequenceModifierData *smd); +void BKE_sequence_modifier_clear(struct Sequence *seq); +void BKE_sequence_modifier_free(struct SequenceModifierData *smd); +void BKE_sequence_modifier_unique_name(struct Sequence *seq, struct SequenceModifierData *smd); +struct SequenceModifierData *BKE_sequence_modifier_find_by_name(struct Sequence *seq, + const char *name); +struct ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, + struct Sequence *seq, + struct ImBuf *ibuf, + int cfra); +void BKE_sequence_modifier_list_copy(struct Sequence *seqn, struct Sequence *seq); +int BKE_sequence_supports_modifiers(struct Sequence *seq); + +/* ********************************************************************** + * 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 cfra, 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 cfra, + 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 cfra, + float facf0, + float facf1, + struct ImBuf *ibuf1, + struct ImBuf *ibuf2, + struct ImBuf *ibuf3, + int start_line, + int total_lines, + struct ImBuf *out); +}; + +struct SeqEffectHandle BKE_sequence_get_effect(struct Sequence *seq); +int BKE_sequence_effect_get_num_inputs(int seq_type); +void BKE_sequencer_text_font_unload(struct TextVars *data, const bool do_id_user); +void BKE_sequencer_text_font_load(struct TextVars *data, const bool do_id_user); + +/* ********************************************************************** + * sequencer.c + * + * Clipboard + * ********************************************************************** + */ + +extern ListBase seqbase_clipboard; +extern int seqbase_clipboard_frame; +void BKE_sequencer_base_clipboard_pointers_store(struct Main *bmain, struct ListBase *seqbase); +void BKE_sequencer_base_clipboard_pointers_restore(struct ListBase *seqbase, struct Main *bmain); +void BKE_sequencer_free_clipboard(void); + +/* ********************************************************************** + * sequencer.c + * + * Depsgraph + * ********************************************************************** + */ + +/* A debug and development function which checks whether sequences have unique UUIDs. + * Errors will be reported to the console. */ +void BKE_sequencer_check_uuids_unique_and_report(const struct Scene *scene); +/* Generate new UUID for the given sequence. */ +void BKE_sequence_session_uuid_generate(struct Sequence *sequence); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index a05a69a522f..ee94ecadb14 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -46,7 +46,6 @@ #include "BKE_fcurve.h" #include "BKE_lib_id.h" #include "BKE_main.h" -#include "BKE_sequencer.h" #include "IMB_colormanagement.h" #include "IMB_imbuf.h" @@ -59,6 +58,8 @@ #include "RE_pipeline.h" +#include "SEQ_sequencer.h" + #include "BLF_api.h" #include "sequencer.h" diff --git a/source/blender/sequencer/intern/image_cache.c b/source/blender/sequencer/intern/image_cache.c index ea59625065b..1cde481cf16 100644 --- a/source/blender/sequencer/intern/image_cache.c +++ b/source/blender/sequencer/intern/image_cache.c @@ -47,7 +47,8 @@ #include "BKE_global.h" #include "BKE_main.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" + +#include "SEQ_sequencer.h" #include "sequencer.h" diff --git a/source/blender/sequencer/intern/modifier.c b/source/blender/sequencer/intern/modifier.c index d31be56b036..6ddbbc6a8e9 100644 --- a/source/blender/sequencer/intern/modifier.c +++ b/source/blender/sequencer/intern/modifier.c @@ -39,12 +39,13 @@ #include "DNA_sequence_types.h" #include "BKE_colortools.h" -#include "BKE_sequencer.h" #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +#include "SEQ_sequencer.h" + #include "sequencer.h" static SequenceModifierTypeInfo *modifiersTypes[NUM_SEQUENCE_MODIFIER_TYPES]; diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index c22fb3c4ad8..3ea3b6f1ac7 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -47,13 +47,14 @@ #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "DEG_depsgraph_debug.h" #include "DEG_depsgraph_query.h" +#include "SEQ_sequencer.h" + #include "sequencer.h" typedef struct PrefetchJob { diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c index acbdc28c6fd..42134b38666 100644 --- a/source/blender/sequencer/intern/sequencer.c +++ b/source/blender/sequencer/intern/sequencer.c @@ -74,7 +74,6 @@ #include "BKE_movieclip.h" #include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sequencer.h" #include "BKE_sequencer_offscreen.h" #include "DEG_depsgraph.h" @@ -84,6 +83,8 @@ #include "RE_pipeline.h" +#include "SEQ_sequencer.h" + #include #include "IMB_colormanagement.h" diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index ac9d3848f3a..926e61f4a0e 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -72,15 +72,16 @@ #include "BKE_addon.h" #include "BKE_appdir.h" -#include "BKE_mask.h" /* free mask clipboard */ -#include "BKE_material.h" /* BKE_material_copybuf_clear */ -#include "BKE_sequencer.h" /* free seq clipboard */ +#include "BKE_mask.h" /* free mask clipboard */ +#include "BKE_material.h" /* BKE_material_copybuf_clear */ #include "BKE_studiolight.h" #include "BKE_tracking.h" /* free tracking clipboard */ #include "RE_engine.h" #include "RE_pipeline.h" /* RE_ free stuff */ +#include "SEQ_sequencer.h" /* free seq clipboard */ + #include "IMB_thumbs.h" #ifdef WITH_PYTHON diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 361b3ed3d7f..eccad214305 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -35,7 +35,8 @@ #include "BKE_context.h" #include "BKE_global.h" -#include "BKE_sequencer.h" + +#include "SEQ_sequencer.h" #include "WM_api.h" #include "WM_types.h" -- cgit v1.2.3