9#ifdef WITH_OPENTIMELINEIO
71 if (!scene || !editing) {
78 export_params.use_resolve_metadata =
RNA_boolean_get(op->ptr,
"use_resolve_metadata");
79 export_params.reports = op->reports;
100static bool wm_otio_export_poll(
bContext *
C)
123 ot->name =
"Export OTIO";
124 ot->description =
"Export the sequencer scene as an OpenTimelineIO timeline";
125 ot->idname =
"WM_OT_otio_export";
127 ot->invoke = wm_otio_export_invoke;
128 ot->exec = wm_otio_export_exec;
129 ot->poll = wm_otio_export_poll;
130 ot->check = wm_otio_export_check;
144 "use_resolve_metadata",
146 "Export DaVinci Resolve Metadata",
147 "Write additional metadata so DaVinci Resolve can recreate generated strips, "
148 "transforms, blending, audio levels and more");
163 if (paths.is_empty()) {
168 Scene *scene =
nullptr;
169 for (
const auto &path : paths) {
170 STRNCPY(params.filepath, path.c_str());
172 scene = imported_scene;
180 if (scene != workspace->sequencer_scene) {
181 workspace->sequencer_scene = scene;
189 TIP_(
"Imported OTIO timeline into scene '%s'"),
200 ot->name =
"Import OTIO";
201 ot->description =
"Import OpenTimelineIO Timeline into Sequencer Scene";
202 ot->idname =
"WM_OT_otio_import";
204 ot->invoke = wm_otio_import_invoke;
205 ot->exec = wm_otio_import_exec;
223static bool otio_poll_drop(
const bContext *
C, bke::FileHandlerType * )
230 auto fh = std::make_unique<bke::FileHandlerType>();
235 fh->poll_drop = otio_poll_drop;
#define STRNCPY_UTF8(dst, src)
void file_handler_add(std::unique_ptr< FileHandlerType > file_handler)
Vector< std::string > paths_from_operator_properties(PointerRNA *ptr)
void otio_file_handler_add()
wmOperatorStatus filesel_drop_import_invoke(bContext *C, wmOperator *op, const wmEvent *)
void sync_active_scene_and_time_with_scene_strip(bContext &C)
Editing * editing_get(const Scene *scene)
void WM_window_set_active_scene(Main *bmain, bContext *C, wmWindow *win, Scene *scene)
char * STRNCPY(char(&dst)[N], const char *src)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
Scene * CTX_data_sequencer_scene(const bContext *C)
WorkSpace * CTX_wm_workspace(const bContext *C)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Scene * OTIO_import(bContext *C, const OTIOImportParams ¶ms)
bool RNA_struct_property_is_set_ex(PointerRNA *ptr, const char *identifier, bool use_ghost)
wmWindow * CTX_wm_window(const bContext *C)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
bool BLI_path_extension_ensure(char *path, size_t path_maxncpy, const char *ext) ATTR_NONNULL(1
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void ED_fileselect_ensure_default_filepath(bContext *C, wmOperator *op, const char *extension)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool WM_operator_winactive(bContext *C)
Main * CTX_data_main(const bContext *C)
bool BLI_path_extension_check(const char *path, const char *ext) ATTR_NONNULL(1
void OTIO_export(bContext *C, const OTIOExportParams ¶ms)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void WM_OT_otio_export(wmOperatorType *ot)
void WM_OT_otio_import(wmOperatorType *ot)
void WM_event_add_fileselect(bContext *C, wmOperator *op)