Blender V2.61 - r43446
|
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_sequencer.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "ED_screen.h"
#include "UI_view2d.h"
#include "BKE_sound.h"
#include "sequencer_intern.h"
Go to the source code of this file.
Definition in file sequencer_add.c.
#define SELECT 1 |
Definition at line 87 of file sequencer_add.c.
Referenced by sequencer_add_effect_strip_exec(), and sequencer_add_scene_strip_exec().
#define SEQPROP_ENDFRAME (1<<1) |
Definition at line 83 of file sequencer_add.c.
Referenced by sequencer_add_effect_strip_invoke(), sequencer_add_image_strip_invoke(), sequencer_generic_invoke_xy__internal(), sequencer_generic_props__internal(), SEQUENCER_OT_effect_strip_add(), and SEQUENCER_OT_image_strip_add().
#define SEQPROP_NOCHAN (1<<3) |
Definition at line 85 of file sequencer_add.c.
Referenced by sequencer_add_effect_strip_invoke(), and sequencer_generic_invoke_xy__internal().
#define SEQPROP_NOPATHS (1<<2) |
Definition at line 84 of file sequencer_add.c.
Referenced by sequencer_add_image_strip_invoke(), sequencer_add_movie_strip_invoke(), sequencer_add_sound_strip_invoke(), and sequencer_generic_invoke_xy__internal().
#define SEQPROP_STARTFRAME (1<<0) |
Definition at line 82 of file sequencer_add.c.
Referenced by sequencer_generic_props__internal(), SEQUENCER_OT_effect_strip_add(), SEQUENCER_OT_image_strip_add(), SEQUENCER_OT_movie_strip_add(), SEQUENCER_OT_scene_strip_add(), and SEQUENCER_OT_sound_strip_add().
static void seq_load_operator_info | ( | SeqLoadInfo * | seq_load, |
wmOperator * | op | ||
) | [static] |
Definition at line 142 of file sequencer_add.c.
References BLI_path_basename(), BLI_path_rel(), BLI_strncpy(), SeqLoadInfo::channel, SeqLoadInfo::end_frame, SeqLoadInfo::flag, G, SeqLoadInfo::len, MEM_freeN(), SeqLoadInfo::name, NULL, SeqLoadInfo::path, wmOperator::ptr, RNA_BEGIN, RNA_boolean_get(), RNA_END, RNA_int_get(), RNA_string_get(), RNA_string_get_alloc(), RNA_struct_find_property(), SEQ_LOAD_FRAME_ADVANCE, SEQ_LOAD_MOVIE_SOUND, SEQ_LOAD_REPLACE_SEL, SEQ_LOAD_SOUND_CACHE, and SeqLoadInfo::start_frame.
Referenced by sequencer_add_generic_strip_exec(), and sequencer_add_image_strip_exec().
static int sequencer_add_effect_strip_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 567 of file sequencer_add.c.
References alloc_sequence(), BKE_report(), BKE_reportf(), Sequence::blend_mode, BLI_remlink(), BLI_strncpy(), calc_sequence(), SolidColorVars::col, CTX_data_scene(), deselect_all_seq(), Sequence::effectdata, FALSE, FILE_MAX, Sequence::flag, get_sequence_effect(), give_seqname(), SeqEffectHandle::init, SeqEffectHandle::init_plugin, Strip::len, Sequence::len, Sequence::machine, MAX3(), MAXSEQ, MEM_callocN(), Sequence::name, NC_SCENE, ND_SEQUENCER, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Sequence::plugin, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_float_get_array(), RNA_int_get(), RNA_string_get(), RNA_struct_property_is_set(), RPT_ERROR, SELECT, Sequence::seq1, Sequence::seq2, Sequence::seq3, seq_active_set(), SEQ_ADJUSTMENT, SEQ_COLOR, SEQ_CROSS, seq_effect_find_selected(), seq_free_sequence(), seq_give_editing(), SEQ_PLUGIN, seq_test_overlap(), seq_tx_set_final_right(), SEQ_USE_EFFECT_DEFAULT_FADE, Editing::seqbase, seqbase_unique_name_recursive(), Editing::seqbasep, shuffle_seq(), sort_seq(), Sequence::strip, io_export_cycles_xml::strip(), Strip::stripdata, TRUE, Sequence::type, update_changed_seq_and_deps(), Strip::us, and WM_event_add_notifier().
Referenced by sequencer_add_effect_strip_invoke(), and SEQUENCER_OT_effect_strip_add().
static int sequencer_add_effect_strip_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 687 of file sequencer_add.c.
References BKE_report(), ED_operator_sequencer_active(), get_sequence_effect_num_inputs(), OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_struct_property_is_set(), RPT_ERROR, SEQ_PLUGIN, SEQPROP_ENDFRAME, SEQPROP_NOCHAN, sequencer_add_effect_strip_exec(), sequencer_generic_invoke_xy__internal(), and WM_operator_filesel().
Referenced by SEQUENCER_OT_effect_strip_add().
static int sequencer_add_generic_strip_exec | ( | bContext * | C, |
wmOperator * | op, | ||
SeqLoadFunc | seq_load_func | ||
) | [static] |
Definition at line 301 of file sequencer_add.c.
References BKE_reportf(), BLI_join_dirfile(), BLI_split_dir_part(), CTX_data_scene(), deselect_all_seq(), FALSE, FILE_MAX, SeqLoadInfo::flag, NC_SCENE, ND_SEQUENCER, OPERATOR_CANCELLED, OPERATOR_FINISHED, SeqLoadInfo::path, wmOperator::ptr, wmOperator::reports, RNA_BEGIN, RNA_boolean_get(), RNA_END, RNA_property_collection_length(), RNA_string_get(), RNA_struct_find_property(), RPT_ERROR, seq_give_editing(), seq_load_operator_info(), SEQ_LOAD_REPLACE_SEL, seq_test_overlap(), seq_update_muting(), Editing::seqbasep, shuffle_seq(), sort_seq(), SeqLoadInfo::tot_success, TRUE, and WM_event_add_notifier().
Referenced by sequencer_add_movie_strip_exec(), and sequencer_add_sound_strip_exec().
static int sequencer_add_image_strip_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 463 of file sequencer_add.c.
References Editing::act_imagedir, BLI_strncpy(), calc_sequence_disp(), CTX_data_scene(), deselect_all_seq(), Strip::dir, SeqLoadInfo::end_frame, Sequence::endstill, FALSE, FILE_MAXDIR, SeqLoadInfo::flag, SeqLoadInfo::len, MEM_freeN(), StripElem::name, NC_SCENE, ND_SEQUENCER, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_BEGIN, RNA_boolean_get(), RNA_END, RNA_property_collection_length(), RNA_string_get_alloc(), RNA_struct_find_property(), seq_give_editing(), seq_load_operator_info(), SEQ_LOAD_REPLACE_SEL, seq_test_overlap(), Editing::seqbasep, sequencer_add_image_strip(), shuffle_seq(), sort_seq(), SeqLoadInfo::start_frame, Sequence::strip, io_export_cycles_xml::strip(), Strip::stripdata, TRUE, and WM_event_add_notifier().
Referenced by sequencer_add_image_strip_invoke(), and SEQUENCER_OT_image_strip_add().
static int sequencer_add_image_strip_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 522 of file sequencer_add.c.
References BKE_report(), ED_operator_sequencer_active(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, wmOperator::reports, RNA_collection_length(), RPT_ERROR, SEQPROP_ENDFRAME, SEQPROP_NOPATHS, sequencer_add_image_strip_exec(), sequencer_generic_invoke_xy__internal(), and WM_event_add_fileselect().
Referenced by SEQUENCER_OT_image_strip_add().
static int sequencer_add_movie_strip_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 359 of file sequencer_add.c.
References sequencer_add_generic_strip_exec(), and sequencer_add_movie_strip().
Referenced by sequencer_add_movie_strip_invoke(), and SEQUENCER_OT_movie_strip_add().
static int sequencer_add_movie_strip_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 365 of file sequencer_add.c.
References BKE_report(), ED_operator_sequencer_active(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, wmOperator::reports, RNA_collection_length(), RNA_struct_property_is_set(), RPT_ERROR, SEQPROP_NOPATHS, sequencer_add_movie_strip_exec(), sequencer_generic_invoke_xy__internal(), and WM_event_add_fileselect().
Referenced by SEQUENCER_OT_movie_strip_add().
static int sequencer_add_scene_strip_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 200 of file sequencer_add.c.
References alloc_sequence(), BKE_report(), Sequence::blend_mode, BLI_findlink(), BLI_strncpy(), calc_sequence_disp(), CTX_data_main(), CTX_data_scene(), deselect_all_seq(), RenderData::efra, FALSE, Sequence::flag, Scene::id, Sequence::len, Strip::len, MEM_callocN(), ID::name, Sequence::name, NC_SCENE, ND_SEQUENCER, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, Scene::r, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_int_get(), RPT_ERROR, Sequence::scene, Sequence::scene_sound, SELECT, seq_active_set(), SEQ_CROSS, seq_give_editing(), SEQ_SCENE, seq_test_overlap(), Editing::seqbase, seqbase_unique_name_recursive(), Editing::seqbasep, RenderData::sfra, Sequence::sfra, shuffle_seq(), sort_seq(), sound_scene_add_scene_sound(), Sequence::strip, io_export_cycles_xml::strip(), Strip::stripdata, TRUE, Sequence::type, Strip::us, and WM_event_add_notifier().
Referenced by sequencer_add_scene_strip_invoke(), and SEQUENCER_OT_scene_strip_add().
static int sequencer_add_scene_strip_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 260 of file sequencer_add.c.
References BKE_report(), ED_operator_sequencer_active(), OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_struct_property_is_set(), RPT_ERROR, sequencer_add_scene_strip_exec(), sequencer_generic_invoke_xy__internal(), and WM_enum_search_invoke().
Referenced by SEQUENCER_OT_scene_strip_add().
static int sequencer_add_sound_strip_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 412 of file sequencer_add.c.
References sequencer_add_generic_strip_exec(), and sequencer_add_sound_strip().
Referenced by sequencer_add_sound_strip_invoke(), and SEQUENCER_OT_sound_strip_add().
static int sequencer_add_sound_strip_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 417 of file sequencer_add.c.
References BKE_report(), ED_operator_sequencer_active(), OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, wmOperator::reports, RNA_collection_length(), RNA_struct_property_is_set(), RPT_ERROR, SEQPROP_NOPATHS, sequencer_add_sound_strip_exec(), sequencer_generic_invoke_xy__internal(), and WM_event_add_fileselect().
Referenced by SEQUENCER_OT_sound_strip_add().
static void sequencer_generic_invoke_path__internal | ( | bContext * | C, |
wmOperator * | op, | ||
const char * | identifier | ||
) | [static] |
Definition at line 104 of file sequencer_add.c.
References BLI_path_abs(), BLI_strncpy(), CTX_data_scene(), Strip::dir, G, wmOperator::ptr, RNA_string_set(), RNA_struct_find_property(), seq_active_get(), SEQ_HAS_PATH, and Sequence::strip.
Referenced by sequencer_generic_invoke_xy__internal().
static void sequencer_generic_invoke_xy__internal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event, | ||
int | flag | ||
) | [static] |
Definition at line 118 of file sequencer_add.c.
References wmEvent::mval, wmOperator::ptr, RNA_int_set(), RNA_struct_property_is_set(), SEQPROP_ENDFRAME, SEQPROP_NOCHAN, SEQPROP_NOPATHS, sequencer_generic_invoke_path__internal(), UI_view2d_fromcontext(), and UI_view2d_region_to_view().
Referenced by sequencer_add_effect_strip_invoke(), sequencer_add_image_strip_invoke(), sequencer_add_movie_strip_invoke(), sequencer_add_scene_strip_invoke(), and sequencer_add_sound_strip_invoke().
static void sequencer_generic_props__internal | ( | wmOperatorType * | ot, |
int | flag | ||
) | [static] |
Definition at line 89 of file sequencer_add.c.
References MAXSEQ, RNA_def_boolean(), RNA_def_int(), SEQPROP_ENDFRAME, SEQPROP_STARTFRAME, and wmOperatorType::srna.
Referenced by SEQUENCER_OT_effect_strip_add(), SEQUENCER_OT_image_strip_add(), SEQUENCER_OT_movie_strip_add(), SEQUENCER_OT_scene_strip_add(), and SEQUENCER_OT_sound_strip_add().
void SEQUENCER_OT_effect_strip_add | ( | struct wmOperatorType * | ot | ) |
Definition at line 721 of file sequencer_add.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), RNA_def_float_vector(), SEQ_CROSS, SEQPROP_ENDFRAME, SEQPROP_STARTFRAME, sequencer_add_effect_strip_exec(), sequencer_add_effect_strip_invoke(), sequencer_generic_props__internal(), sequencer_prop_effect_types, wmOperatorType::srna, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by sequencer_operatortypes().
void SEQUENCER_OT_image_strip_add | ( | struct wmOperatorType * | ot | ) |
Definition at line 544 of file sequencer_add.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, IMAGEFILE, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, SEQPROP_ENDFRAME, SEQPROP_STARTFRAME, sequencer_add_image_strip_exec(), sequencer_add_image_strip_invoke(), sequencer_generic_props__internal(), WM_FILESEL_DIRECTORY, WM_FILESEL_FILES, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by sequencer_operatortypes().
void SEQUENCER_OT_movie_strip_add | ( | struct wmOperatorType * | ot | ) |
Definition at line 388 of file sequencer_add.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, wmOperatorType::invoke, MOVIEFILE, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), SEQPROP_STARTFRAME, sequencer_add_movie_strip_exec(), sequencer_add_movie_strip_invoke(), sequencer_generic_props__internal(), wmOperatorType::srna, TRUE, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by sequencer_operatortypes().
void SEQUENCER_OT_scene_strip_add | ( | struct wmOperatorType * | ot | ) |
Definition at line 277 of file sequencer_add.c.
References wmOperatorType::description, DummyRNA_NULL_items, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), RNA_def_enum_funcs(), RNA_scene_itemf(), SEQPROP_STARTFRAME, sequencer_add_scene_strip_exec(), sequencer_add_scene_strip_invoke(), sequencer_generic_props__internal(), and wmOperatorType::srna.
Referenced by sequencer_operatortypes().
void SEQUENCER_OT_sound_strip_add | ( | struct wmOperatorType * | ot | ) |
Definition at line 440 of file sequencer_add.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, FALSE, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), SEQPROP_STARTFRAME, sequencer_add_sound_strip_exec(), sequencer_add_sound_strip_invoke(), sequencer_generic_props__internal(), SOUNDFILE, wmOperatorType::srna, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by sequencer_operatortypes().