Blender  V3.3
sequencer_add.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
8 #include <ctype.h>
9 #include <math.h>
10 #include <stdlib.h>
11 #include <string.h>
12 
13 #include "MEM_guardedalloc.h"
14 
15 #include "BLI_blenlib.h"
16 #include "BLI_ghash.h"
17 #include "BLI_math.h"
18 #include "BLI_utildefines.h"
19 
20 #include "BLT_translation.h"
21 
22 #include "DNA_mask_types.h"
23 #include "DNA_scene_types.h"
24 #include "DNA_sound_types.h"
25 #include "DNA_space_types.h"
26 
27 #include "BKE_context.h"
28 #include "BKE_global.h"
29 #include "BKE_lib_id.h"
30 #include "BKE_main.h"
31 #include "BKE_mask.h"
32 #include "BKE_movieclip.h"
33 #include "BKE_report.h"
34 #include "BKE_scene.h"
35 #include "BKE_sound.h"
36 
37 #include "IMB_imbuf.h"
38 
39 #include "WM_api.h"
40 #include "WM_types.h"
41 
42 #include "RNA_define.h"
43 #include "RNA_enum_types.h"
44 #include "RNA_prototypes.h"
45 
46 #include "SEQ_add.h"
47 #include "SEQ_effects.h"
48 #include "SEQ_iterator.h"
49 #include "SEQ_proxy.h"
50 #include "SEQ_relations.h"
51 #include "SEQ_render.h"
52 #include "SEQ_select.h"
53 #include "SEQ_sequencer.h"
54 #include "SEQ_time.h"
55 #include "SEQ_transform.h"
56 #include "SEQ_utils.h"
57 
58 #include "ED_scene.h"
59 /* For menu, popup, icons, etc. */
60 #include "ED_screen.h"
61 #include "ED_sequencer.h"
62 
63 #include "UI_interface.h"
64 
65 #ifdef WITH_AUDASPACE
66 # include <AUD_Sequence.h>
67 #endif
68 
69 #include "DEG_depsgraph.h"
70 #include "DEG_depsgraph_build.h"
71 
72 /* Own include. */
73 #include "sequencer_intern.h"
74 
75 typedef struct SequencerAddData {
78 
79 /* Generic functions, reused by add strip operators. */
80 
81 /* Avoid passing multiple args and be more verbose. */
82 #define SEQPROP_STARTFRAME (1 << 0)
83 #define SEQPROP_ENDFRAME (1 << 1)
84 #define SEQPROP_NOPATHS (1 << 2)
85 #define SEQPROP_NOCHAN (1 << 3)
86 #define SEQPROP_FIT_METHOD (1 << 4)
87 #define SEQPROP_VIEW_TRANSFORM (1 << 5)
88 #define SEQPROP_PLAYBACK_RATE (1 << 6)
89 
91  {SEQ_SCALE_TO_FIT, "FIT", 0, "Scale to Fit", "Scale image to fit within the canvas"},
92  {SEQ_SCALE_TO_FILL, "FILL", 0, "Scale to Fill", "Scale image to completely fill the canvas"},
93  {SEQ_STRETCH_TO_FILL, "STRETCH", 0, "Stretch to Fill", "Stretch image to fill the canvas"},
94  {SEQ_USE_ORIGINAL_SIZE, "ORIGINAL", 0, "Use Original Size", "Keep image at its original size"},
95  {0, NULL, 0, NULL, NULL},
96 };
97 
99 {
100  PropertyRNA *prop;
101 
102  if (flag & SEQPROP_STARTFRAME) {
104  "frame_start",
105  0,
106  INT_MIN,
107  INT_MAX,
108  "Start Frame",
109  "Start frame of the sequence strip",
110  -MAXFRAME,
111  MAXFRAME);
112  }
113 
114  if (flag & SEQPROP_ENDFRAME) {
115  /* Not usual since most strips have a fixed length. */
117  "frame_end",
118  0,
119  INT_MIN,
120  INT_MAX,
121  "End Frame",
122  "End frame for the color strip",
123  -MAXFRAME,
124  MAXFRAME);
125  }
126 
127  RNA_def_int(
128  ot->srna, "channel", 1, 1, MAXSEQ, "Channel", "Channel to place this strip into", 1, MAXSEQ);
129 
131  ot->srna, "replace_sel", true, "Replace Selection", "Replace the current selection");
132 
133  /* Only for python scripts which import strips and place them after. */
134  prop = RNA_def_boolean(
135  ot->srna, "overlap", false, "Allow Overlap", "Don't correct overlap on new sequence strips");
137 
138  prop = RNA_def_boolean(
139  ot->srna,
140  "overlap_shuffle_override",
141  false,
142  "Override Overlap Shuffle Behavior",
143  "Use the overlap_mode tool settings to determine how to shuffle overlapping strips");
145 
146  if (flag & SEQPROP_FIT_METHOD) {
147  ot->prop = RNA_def_enum(ot->srna,
148  "fit_method",
151  "Fit Method",
152  "Scale fit method");
153  }
154 
155  if (flag & SEQPROP_VIEW_TRANSFORM) {
157  "set_view_transform",
158  true,
159  "Set View Transform",
160  "Set appropriate view transform based on media color space");
161  }
162 
163  if (flag & SEQPROP_PLAYBACK_RATE) {
165  "adjust_playback_rate",
166  true,
167  "Adjust Playback Rate",
168  "Play at normal speed regardless of scene FPS");
169  }
170 }
171 
173  wmOperator *op,
174  const char *identifier)
175 {
176  if (RNA_struct_find_property(op->ptr, identifier)) {
178  Sequence *last_seq = SEQ_select_active_get(scene);
179  if (last_seq && last_seq->strip && SEQ_HAS_PATH(last_seq)) {
180  Main *bmain = CTX_data_main(C);
181  char path[FILE_MAX];
182  BLI_strncpy(path, last_seq->strip->dir, sizeof(path));
184  RNA_string_set(op->ptr, identifier, path);
185  }
186  }
187 }
188 
190 {
191  Sequence *tgt = NULL;
192  Sequence *seq;
195  int timeline_frame = (int)scene->r.cfra;
196  int proximity = INT_MAX;
197 
198  if (!ed || !ed->seqbasep) {
199  return 1;
200  }
201 
202  for (seq = ed->seqbasep->first; seq; seq = seq->next) {
203  const int strip_end = SEQ_time_right_handle_frame_get(scene, seq);
204  if ((ELEM(type, -1, seq->type)) && (strip_end < timeline_frame) &&
205  (timeline_frame - strip_end < proximity)) {
206  tgt = seq;
207  proximity = timeline_frame - strip_end;
208  }
209  }
210 
211  if (tgt) {
212  return tgt->machine + 1;
213  }
214  return 1;
215 }
216 
218 {
220 
221  int timeline_frame = (int)scene->r.cfra;
222 
223  /* Effect strips don't need a channel initialized from the mouse. */
224  if (!(flag & SEQPROP_NOCHAN) && RNA_struct_property_is_set(op->ptr, "channel") == 0) {
226  }
227 
228  if (!RNA_struct_property_is_set(op->ptr, "frame_start")) {
229  RNA_int_set(op->ptr, "frame_start", timeline_frame);
230  }
231 
232  if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end") == 0) {
233  RNA_int_set(
234  op->ptr, "frame_end", RNA_int_get(op->ptr, "frame_start") + DEFAULT_IMG_STRIP_LENGTH);
235  }
236 
237  if (!(flag & SEQPROP_NOPATHS)) {
239  sequencer_generic_invoke_path__internal(C, op, "directory");
240  }
241 }
242 
244 {
245  Main *bmain = CTX_data_main(C);
246 
247  PropertyRNA *prop;
248  const bool relative = (prop = RNA_struct_find_property(op->ptr, "relative_path")) &&
249  RNA_property_boolean_get(op->ptr, prop);
250  memset(load_data, 0, sizeof(SeqLoadData));
251 
252  load_data->start_frame = RNA_int_get(op->ptr, "frame_start");
253  load_data->channel = RNA_int_get(op->ptr, "channel");
254  load_data->image.end_frame = load_data->start_frame;
255  load_data->image.len = 1;
256 
257  if ((prop = RNA_struct_find_property(op->ptr, "fit_method"))) {
258  load_data->fit_method = RNA_enum_get(op->ptr, "fit_method");
260  }
261 
262  if ((prop = RNA_struct_find_property(op->ptr, "adjust_playback_rate"))) {
263  load_data->adjust_playback_rate = RNA_boolean_get(op->ptr, "adjust_playback_rate");
264  }
265 
266  if ((prop = RNA_struct_find_property(op->ptr, "filepath"))) {
267  RNA_property_string_get(op->ptr, prop, load_data->path);
268  BLI_strncpy(load_data->name, BLI_path_basename(load_data->path), sizeof(load_data->name));
269  }
270  else if ((prop = RNA_struct_find_property(op->ptr, "directory"))) {
271  char *directory = RNA_string_get_alloc(op->ptr, "directory", NULL, 0, NULL);
272 
273  if ((prop = RNA_struct_find_property(op->ptr, "files"))) {
274  RNA_PROP_BEGIN (op->ptr, itemptr, prop) {
275  char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0, NULL);
276  BLI_strncpy(load_data->name, filename, sizeof(load_data->name));
277  BLI_join_dirfile(load_data->path, sizeof(load_data->path), directory, filename);
278  MEM_freeN(filename);
279  break;
280  }
281  RNA_PROP_END;
282  }
283  MEM_freeN(directory);
284  }
285 
286  if (relative) {
287  BLI_path_rel(load_data->path, BKE_main_blendfile_path(bmain));
288  }
289 
290  if ((prop = RNA_struct_find_property(op->ptr, "frame_end"))) {
291  load_data->image.end_frame = RNA_property_int_get(op->ptr, prop);
292  load_data->effect.end_frame = load_data->image.end_frame;
293  }
294 
295  if ((prop = RNA_struct_find_property(op->ptr, "cache")) &&
296  RNA_property_boolean_get(op->ptr, prop)) {
297  load_data->flags |= SEQ_LOAD_SOUND_CACHE;
298  }
299 
300  if ((prop = RNA_struct_find_property(op->ptr, "mono")) &&
301  RNA_property_boolean_get(op->ptr, prop)) {
302  load_data->flags |= SEQ_LOAD_SOUND_MONO;
303  }
304 
305  if ((prop = RNA_struct_find_property(op->ptr, "use_framerate")) &&
306  RNA_property_boolean_get(op->ptr, prop)) {
307  load_data->flags |= SEQ_LOAD_MOVIE_SYNC_FPS;
308  }
309 
310  if ((prop = RNA_struct_find_property(op->ptr, "set_view_transform")) &&
311  RNA_property_boolean_get(op->ptr, prop)) {
312  load_data->flags |= SEQ_LOAD_SET_VIEW_TRANSFORM;
313  }
314 
315  if ((prop = RNA_struct_find_property(op->ptr, "use_multiview")) &&
316  RNA_property_boolean_get(op->ptr, prop)) {
317  if (op->customdata) {
318  SequencerAddData *sad = op->customdata;
319  ImageFormatData *imf = &sad->im_format;
320 
321  load_data->use_multiview = true;
322  load_data->views_format = imf->views_format;
323  load_data->stereo3d_format = &imf->stereo3d_format;
324  }
325  }
326 }
327 
329 {
332 
333  if (seq == NULL) {
334  return;
335  }
336 
337  if (RNA_boolean_get(op->ptr, "replace_sel")) {
338  seq->flag |= SELECT;
340  }
341 
342  if (RNA_boolean_get(op->ptr, "overlap") == true ||
344  /* No overlap should be handled or the strip is not overlapping, exit early. */
345  return;
346  }
347 
348  if (RNA_boolean_get(op->ptr, "overlap_shuffle_override")) {
349  /* Use set overlap_mode to fix overlaps. */
350  SeqCollection *strip_col = SEQ_collection_create(__func__);
351  SEQ_collection_append_strip(seq, strip_col);
352 
354  const bool use_sync_markers = (((SpaceSeq *)area->spacedata.first)->flag & SEQ_MARKER_TRANS) !=
355  0;
356  SEQ_transform_handle_overlap(scene, ed->seqbasep, strip_col, NULL, use_sync_markers);
357 
358  SEQ_collection_free(strip_col);
359  }
360  else {
361  /* Shuffle strip channel to fix overlaps. */
363  }
364 }
365 
366 /* In this alternative version we only check for overlap, but do not do anything about them. */
368  wmOperator *op,
369  Sequence *seq,
370  SeqCollection *strip_col)
371 {
374 
375  if (seq == NULL) {
376  return false;
377  }
378 
379  if (RNA_boolean_get(op->ptr, "replace_sel")) {
380  seq->flag |= SELECT;
382  }
383 
384  SEQ_collection_append_strip(seq, strip_col);
385 
386  return SEQ_transform_test_overlap(scene, ed->seqbasep, seq);
387 }
388 
390  wmOperator *op,
391  const PropertyRNA *prop)
392 {
393  const char *prop_id = RNA_property_identifier(prop);
394  int type = RNA_enum_get(op->ptr, "type");
395 
396  /* Hide start/end frames for effect strips that are locked to their parents' location. */
397  if (SEQ_effect_get_num_inputs(type) != 0) {
398  if (STR_ELEM(prop_id, "frame_start", "frame_end")) {
399  return false;
400  }
401  }
402  if ((type != SEQ_TYPE_COLOR) && (STREQ(prop_id, "color"))) {
403  return false;
404  }
405 
406  return true;
407 }
408 
410 {
411  Main *bmain = CTX_data_main(C);
413  const Editing *ed = SEQ_editing_ensure(scene);
414  Scene *sce_seq = BLI_findlink(&bmain->scenes, RNA_enum_get(op->ptr, "scene"));
415 
416  if (sce_seq == NULL) {
417  BKE_report(op->reports, RPT_ERROR, "Scene not found");
418  return OPERATOR_CANCELLED;
419  }
420 
421  if (RNA_boolean_get(op->ptr, "replace_sel")) {
423  }
424 
425  SeqLoadData load_data;
426  load_data_init_from_operator(&load_data, C, op);
427  load_data.scene = sce_seq;
428 
429  Sequence *seq = SEQ_add_scene_strip(scene, ed->seqbasep, &load_data);
431 
435 
436  return OPERATOR_FINISHED;
437 }
438 
440 {
442  /* Disable following properties if there are any existing strips, unless overridden by user. */
443  if (ed && ed->seqbasep && ed->seqbasep->first) {
444  if (RNA_struct_find_property(op->ptr, "use_framerate")) {
445  RNA_boolean_set(op->ptr, "use_framerate", false);
446  }
447  if (RNA_struct_find_property(op->ptr, "set_view_transform")) {
448  RNA_boolean_set(op->ptr, "set_view_transform", false);
449  }
450  }
451 }
452 
454 {
456  if (!RNA_struct_property_is_set(op->ptr, "scene")) {
457  return WM_enum_search_invoke(C, op, event);
458  }
459 
461  return sequencer_add_scene_strip_exec(C, op);
462 }
463 
465 {
466  PropertyRNA *prop;
467 
468  /* Identifiers. */
469  ot->name = "Add Scene Strip";
470  ot->idname = "SEQUENCER_OT_scene_strip_add";
471  ot->description = "Add a strip to the sequencer using a blender scene as a source";
472 
473  /* Api callbacks. */
477 
478  /* Flags. */
480 
482  prop = RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
485  ot->prop = prop;
486 }
487 
489  {SCE_COPY_NEW, "NEW", 0, "New", "Add new Strip with a new empty Scene with default settings"},
491  "EMPTY",
492  0,
493  "Copy Settings",
494  "Add a new Strip, with an empty scene, and copy settings from the current scene"},
496  "LINK_COPY",
497  0,
498  "Linked Copy",
499  "Add a Strip and link in the collections from the current scene (shallow copy)"},
500  {SCE_COPY_FULL,
501  "FULL_COPY",
502  0,
503  "Full Copy",
504  "Add a Strip and make a full copy of the current scene"},
505  {0, NULL, 0, NULL, NULL},
506 };
507 
509 {
510  Main *bmain = CTX_data_main(C);
512  const Editing *ed = SEQ_editing_ensure(scene);
513 
514  if (RNA_boolean_get(op->ptr, "replace_sel")) {
516  }
517 
518  SeqLoadData load_data;
519  load_data_init_from_operator(&load_data, C, op);
520 
521  int type = RNA_enum_get(op->ptr, "type");
522  Scene *scene_new = ED_scene_sequencer_add(bmain, C, type, false);
523  if (scene_new == NULL) {
524  return OPERATOR_CANCELLED;
525  }
526  load_data.scene = scene_new;
527 
528  Sequence *seq = SEQ_add_scene_strip(scene, ed->seqbasep, &load_data);
530 
534 
535  return OPERATOR_FINISHED;
536 }
537 
539  wmOperator *op,
540  const wmEvent *UNUSED(event))
541 {
545 }
546 
549  PropertyRNA *UNUSED(prop),
550  bool *r_free)
551 {
552  EnumPropertyItem *item = NULL;
553  int totitem = 0;
554  uint item_index;
555 
557  RNA_enum_item_add(&item, &totitem, &strip_new_scene_items[item_index]);
558 
559  bool has_scene_or_no_context = false;
560  if (C == NULL) {
561  /* For documentation generation. */
562  has_scene_or_no_context = true;
563  }
564  else {
567  if ((seq && (seq->type == SEQ_TYPE_SCENE) && (seq->scene != NULL))) {
568  has_scene_or_no_context = true;
569  }
570  }
571 
572  if (has_scene_or_no_context) {
574  for (int i = 0; i < ARRAY_SIZE(values); i++) {
575  item_index = RNA_enum_from_value(strip_new_scene_items, values[i]);
576  RNA_enum_item_add(&item, &totitem, &strip_new_scene_items[item_index]);
577  }
578  }
579 
580  RNA_enum_item_end(&item, &totitem);
581  *r_free = true;
582  return item;
583 }
584 
586 {
587  /* Identifiers. */
588  ot->name = "Add Strip with a new Scene";
589  ot->idname = "SEQUENCER_OT_scene_strip_add_new";
590  ot->description = "Create a new Strip and add a assign a new Scene as source";
591 
592  /* Api callbacks. */
596 
597  /* Flags. */
599 
601 
602  ot->prop = RNA_def_enum(ot->srna, "type", strip_new_scene_items, SCE_COPY_NEW, "Type", "");
605 }
606 
608 {
609  Main *bmain = CTX_data_main(C);
611  const Editing *ed = SEQ_editing_ensure(scene);
612  MovieClip *clip = BLI_findlink(&bmain->movieclips, RNA_enum_get(op->ptr, "clip"));
613 
614  if (clip == NULL) {
615  BKE_report(op->reports, RPT_ERROR, "Movie clip not found");
616  return OPERATOR_CANCELLED;
617  }
618 
619  if (RNA_boolean_get(op->ptr, "replace_sel")) {
621  }
622 
623  SeqLoadData load_data;
624  load_data_init_from_operator(&load_data, C, op);
625  load_data.clip = clip;
626 
627  Sequence *seq = SEQ_add_movieclip_strip(scene, ed->seqbasep, &load_data);
629 
632 
633  return OPERATOR_FINISHED;
634 }
635 
637 {
638  if (!RNA_struct_property_is_set(op->ptr, "clip")) {
639  return WM_enum_search_invoke(C, op, event);
640  }
641 
644 }
645 
647 {
648  PropertyRNA *prop;
649 
650  /* Identifiers. */
651  ot->name = "Add MovieClip Strip";
652  ot->idname = "SEQUENCER_OT_movieclip_strip_add";
653  ot->description = "Add a movieclip strip to the sequencer";
654 
655  /* Api callbacks. */
659 
660  /* Flags. */
662 
664  prop = RNA_def_enum(ot->srna, "clip", DummyRNA_NULL_items, 0, "Clip", "");
668  ot->prop = prop;
669 }
670 
672 {
673  Main *bmain = CTX_data_main(C);
675  const Editing *ed = SEQ_editing_ensure(scene);
676  Mask *mask = BLI_findlink(&bmain->masks, RNA_enum_get(op->ptr, "mask"));
677 
678  if (mask == NULL) {
679  BKE_report(op->reports, RPT_ERROR, "Mask not found");
680  return OPERATOR_CANCELLED;
681  }
682 
683  if (RNA_boolean_get(op->ptr, "replace_sel")) {
685  }
686 
687  SeqLoadData load_data;
688  load_data_init_from_operator(&load_data, C, op);
689  load_data.mask = mask;
690 
691  Sequence *seq = SEQ_add_mask_strip(scene, ed->seqbasep, &load_data);
693 
696 
697  return OPERATOR_FINISHED;
698 }
699 
701 {
702  if (!RNA_struct_property_is_set(op->ptr, "mask")) {
703  return WM_enum_search_invoke(C, op, event);
704  }
705 
707  return sequencer_add_mask_strip_exec(C, op);
708 }
709 
711 {
712  PropertyRNA *prop;
713 
714  /* Identifiers. */
715  ot->name = "Add Mask Strip";
716  ot->idname = "SEQUENCER_OT_mask_strip_add";
717  ot->description = "Add a mask strip to the sequencer";
718 
719  /* Api callbacks. */
723 
724  /* Flags. */
726 
728  prop = RNA_def_enum(ot->srna, "mask", DummyRNA_NULL_items, 0, "Mask", "");
731  ot->prop = prop;
732 }
733 
735 {
736  op->customdata = MEM_callocN(sizeof(SequencerAddData), __func__);
737 }
738 
740 {
742 }
743 
745  PropertyRNA *prop,
746  void *UNUSED(user_data))
747 {
748  const char *prop_id = RNA_property_identifier(prop);
749 
750  return !(STR_ELEM(prop_id, "filepath", "directory", "filename"));
751 }
752 
753 /* Strips are added in context of timeline which has different preview size than actual preview. We
754  * must search for preview area. In most cases there will be only one preview area, but there can
755  * be more with different preview sizes. */
757 {
758  bScreen *screen = CTX_wm_screen(C);
760  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
761  LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
762  switch (sl->spacetype) {
763  case SPACE_SEQ: {
764  SpaceSeq *sseq = (SpaceSeq *)sl;
766  continue;
767  }
769  }
770  }
771  }
772  }
773  return proxy_sizes;
774 }
775 
776 static void seq_build_proxy(bContext *C, SeqCollection *movie_strips)
777 {
778  if (U.sequencer_proxy_setup != USER_SEQ_PROXY_SETUP_AUTOMATIC) {
779  return;
780  }
781 
782  wmJob *wm_job = ED_seq_proxy_wm_job_get(C);
783  ProxyJob *pj = ED_seq_proxy_job_get(C, wm_job);
784 
785  Sequence *seq;
786  SEQ_ITERATOR_FOREACH (seq, movie_strips) {
787  /* Enable and set proxy size. */
788  SEQ_proxy_set(seq, true);
791  SEQ_proxy_rebuild_context(pj->main, pj->depsgraph, pj->scene, seq, NULL, &pj->queue, true);
792  }
793 
794  if (!WM_jobs_is_running(wm_job)) {
795  G.is_break = false;
796  WM_jobs_start(CTX_wm_manager(C), wm_job);
797  }
799 }
800 
802  Sequence *seq_movie,
803  Sequence *seq_sound)
804 {
805  if (ELEM(NULL, seq_movie, seq_sound)) {
806  return;
807  }
808 
810  scene, seq_sound, SEQ_time_right_handle_frame_get(scene, seq_movie));
812  scene, seq_sound, SEQ_time_left_handle_frame_get(scene, seq_movie));
813 }
814 
816  wmOperator *op,
817  SeqLoadData *load_data,
818  SeqCollection *r_movie_strips)
819 {
820  Main *bmain = CTX_data_main(C);
822  const Editing *ed = SEQ_editing_ensure(scene);
823  bool overlap_shuffle_override = RNA_boolean_get(op->ptr, "overlap") == false &&
824  RNA_boolean_get(op->ptr, "overlap_shuffle_override");
825  bool has_seq_overlap = false;
826  SeqCollection *strip_col = NULL;
827 
828  if (overlap_shuffle_override) {
829  strip_col = SEQ_collection_create(__func__);
830  }
831 
832  RNA_BEGIN (op->ptr, itemptr, "files") {
833  char dir_only[FILE_MAX];
834  char file_only[FILE_MAX];
835  RNA_string_get(op->ptr, "directory", dir_only);
836  RNA_string_get(&itemptr, "name", file_only);
837  BLI_join_dirfile(load_data->path, sizeof(load_data->path), dir_only, file_only);
838  BLI_strncpy(load_data->name, file_only, sizeof(load_data->name));
839  Sequence *seq_movie = NULL;
840  Sequence *seq_sound = NULL;
841 
842  seq_movie = SEQ_add_movie_strip(bmain, scene, ed->seqbasep, load_data);
843 
844  if (seq_movie == NULL) {
845  BKE_reportf(op->reports, RPT_ERROR, "File '%s' could not be loaded", load_data->path);
846  }
847  else {
848  if (RNA_boolean_get(op->ptr, "sound")) {
849  seq_sound = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data);
851 
852  if (seq_sound) {
853  /* The video has sound, shift the video strip up a channel to make room for the sound
854  * strip. */
855  seq_movie->machine++;
856  }
857  }
858 
859  load_data->start_frame += SEQ_time_right_handle_frame_get(scene, seq_movie) -
861  if (overlap_shuffle_override) {
863  C, op, seq_sound, strip_col);
865  C, op, seq_movie, strip_col);
866  }
867  else {
868  seq_load_apply_generic_options(C, op, seq_sound);
869  seq_load_apply_generic_options(C, op, seq_movie);
870  }
871  SEQ_collection_append_strip(seq_movie, r_movie_strips);
872  }
873  }
874  RNA_END;
875 
876  if (overlap_shuffle_override) {
877  if (has_seq_overlap) {
879  const bool use_sync_markers = (((SpaceSeq *)area->spacedata.first)->flag &
880  SEQ_MARKER_TRANS) != 0;
881  SEQ_transform_handle_overlap(scene, ed->seqbasep, strip_col, NULL, use_sync_markers);
882  }
883 
884  SEQ_collection_free(strip_col);
885  }
886 }
887 
889  wmOperator *op,
890  SeqLoadData *load_data,
891  SeqCollection *r_movie_strips)
892 {
893  Main *bmain = CTX_data_main(C);
895  const Editing *ed = SEQ_editing_ensure(scene);
896 
897  Sequence *seq_movie = NULL;
898  Sequence *seq_sound = NULL;
899 
900  seq_movie = SEQ_add_movie_strip(bmain, scene, ed->seqbasep, load_data);
901 
902  if (seq_movie == NULL) {
903  BKE_reportf(op->reports, RPT_ERROR, "File '%s' could not be loaded", load_data->path);
904  return false;
905  }
906  if (RNA_boolean_get(op->ptr, "sound")) {
907  seq_sound = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data);
909  if (seq_sound) {
910  /* The video has sound, shift the video strip up a channel to make room for the sound
911  * strip. */
912  seq_movie->machine++;
913  }
914  }
915 
916  bool overlap_shuffle_override = RNA_boolean_get(op->ptr, "overlap") == false &&
917  RNA_boolean_get(op->ptr, "overlap_shuffle_override");
918  if (overlap_shuffle_override) {
919  SeqCollection *strip_col = SEQ_collection_create(__func__);
920  bool has_seq_overlap = false;
921 
923  C, op, seq_sound, strip_col);
925  C, op, seq_movie, strip_col);
926 
927  if (has_seq_overlap) {
929  const bool use_sync_markers = (((SpaceSeq *)area->spacedata.first)->flag &
930  SEQ_MARKER_TRANS) != 0;
931  SEQ_transform_handle_overlap(scene, ed->seqbasep, strip_col, NULL, use_sync_markers);
932  }
933 
934  SEQ_collection_free(strip_col);
935  }
936  else {
937  seq_load_apply_generic_options(C, op, seq_sound);
938  seq_load_apply_generic_options(C, op, seq_movie);
939  }
940  SEQ_collection_append_strip(seq_movie, r_movie_strips);
941 
942  return true;
943 }
944 
946 {
947  Main *bmain = CTX_data_main(C);
949  SeqLoadData load_data;
950 
951  load_data_init_from_operator(&load_data, C, op);
952 
953  if (RNA_boolean_get(op->ptr, "replace_sel")) {
955  }
956 
957  SeqCollection *movie_strips = SEQ_collection_create(__func__);
958  const int tot_files = RNA_property_collection_length(op->ptr,
959  RNA_struct_find_property(op->ptr, "files"));
960  if (tot_files > 1) {
961  sequencer_add_movie_multiple_strips(C, op, &load_data, movie_strips);
962  }
963  else {
964  sequencer_add_movie_single_strip(C, op, &load_data, movie_strips);
965  }
966 
967  if (SEQ_collection_len(movie_strips) == 0) {
968  SEQ_collection_free(movie_strips);
969  return OPERATOR_CANCELLED;
970  }
971 
972  seq_build_proxy(C, movie_strips);
976 
977  /* Free custom data. */
978  sequencer_add_cancel(C, op);
979  SEQ_collection_free(movie_strips);
980 
981  return OPERATOR_FINISHED;
982 }
983 
985  wmOperator *op,
986  const wmEvent *UNUSED(event))
987 {
988  PropertyRNA *prop;
990 
992 
994  RNA_boolean_set(op->ptr, "adjust_playback_rate", true);
995 
996  /* This is for drag and drop. */
997  if ((RNA_struct_property_is_set(op->ptr, "files") &&
998  !RNA_collection_is_empty(op->ptr, "files")) ||
999  RNA_struct_property_is_set(op->ptr, "filepath")) {
1001  return sequencer_add_movie_strip_exec(C, op);
1002  }
1003 
1005  sequencer_add_init(C, op);
1006 
1007  /* Show multiview save options only if scene use multiview. */
1008  prop = RNA_struct_find_property(op->ptr, "show_multiview");
1009  RNA_property_boolean_set(op->ptr, prop, (scene->r.scemode & R_MULTIVIEW) != 0);
1010 
1012  return OPERATOR_RUNNING_MODAL;
1013 }
1014 
1016 {
1017  uiLayout *layout = op->layout;
1018  SequencerAddData *sad = op->customdata;
1019  ImageFormatData *imf = &sad->im_format;
1020  PointerRNA imf_ptr;
1021 
1022  /* Main draw call. */
1025 
1026  /* Image template. */
1027  RNA_pointer_create(NULL, &RNA_ImageFormatSettings, imf, &imf_ptr);
1028 
1029  /* Multiview template. */
1030  if (RNA_boolean_get(op->ptr, "show_multiview")) {
1031  uiTemplateImageFormatViews(layout, &imf_ptr, op->ptr);
1032  }
1033 }
1034 
1036 {
1037 
1038  /* Identifiers. */
1039  ot->name = "Add Movie Strip";
1040  ot->idname = "SEQUENCER_OT_movie_strip_add";
1041  ot->description = "Add a movie strip to the sequencer";
1042 
1043  /* Api callbacks. */
1049 
1050  /* Flags. */
1052 
1055  FILE_SPECIAL,
1056  FILE_OPENFILE,
1064  RNA_def_boolean(ot->srna, "sound", true, "Sound", "Load sound with the movie");
1066  "use_framerate",
1067  true,
1068  "Use Movie Framerate",
1069  "Use framerate from the movie to keep sound and video in sync");
1070 }
1071 
1073  wmOperator *op,
1074  SeqLoadData *load_data)
1075 {
1076  Main *bmain = CTX_data_main(C);
1079 
1080  RNA_BEGIN (op->ptr, itemptr, "files") {
1081  char dir_only[FILE_MAX];
1082  char file_only[FILE_MAX];
1083  RNA_string_get(op->ptr, "directory", dir_only);
1084  RNA_string_get(&itemptr, "name", file_only);
1085  BLI_join_dirfile(load_data->path, sizeof(load_data->path), dir_only, file_only);
1086  BLI_strncpy(load_data->name, file_only, sizeof(load_data->name));
1087  Sequence *seq = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data);
1088  if (seq == NULL) {
1089  BKE_reportf(op->reports, RPT_ERROR, "File '%s' could not be loaded", load_data->path);
1090  }
1091  else {
1093  load_data->start_frame += SEQ_time_right_handle_frame_get(scene, seq) -
1095  }
1096  }
1097  RNA_END;
1098 }
1099 
1101 {
1102  Main *bmain = CTX_data_main(C);
1105 
1106  Sequence *seq = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data);
1107  if (seq == NULL) {
1108  BKE_reportf(op->reports, RPT_ERROR, "File '%s' could not be loaded", load_data->path);
1109  return false;
1110  }
1112 
1113  return true;
1114 }
1115 
1117 {
1118  Main *bmain = CTX_data_main(C);
1120  SeqLoadData load_data;
1121  load_data_init_from_operator(&load_data, C, op);
1122 
1123  if (RNA_boolean_get(op->ptr, "replace_sel")) {
1125  }
1126 
1127  const int tot_files = RNA_property_collection_length(op->ptr,
1128  RNA_struct_find_property(op->ptr, "files"));
1129  if (tot_files > 1) {
1130  sequencer_add_sound_multiple_strips(C, op, &load_data);
1131  }
1132  else {
1133  if (!sequencer_add_sound_single_strip(C, op, &load_data)) {
1134  return OPERATOR_CANCELLED;
1135  }
1136  }
1137 
1138  if (op->customdata) {
1139  MEM_freeN(op->customdata);
1140  }
1141 
1142  DEG_relations_tag_update(bmain);
1145 
1146  return OPERATOR_FINISHED;
1147 }
1148 
1150  wmOperator *op,
1151  const wmEvent *UNUSED(event))
1152 {
1153  /* This is for drag and drop. */
1154  if ((RNA_struct_property_is_set(op->ptr, "files") &&
1155  !RNA_collection_is_empty(op->ptr, "files")) ||
1156  RNA_struct_property_is_set(op->ptr, "filepath")) {
1158  return sequencer_add_sound_strip_exec(C, op);
1159  }
1160 
1162 
1164  return OPERATOR_RUNNING_MODAL;
1165 }
1166 
1168 {
1169 
1170  /* Identifiers. */
1171  ot->name = "Add Sound Strip";
1172  ot->idname = "SEQUENCER_OT_sound_strip_add";
1173  ot->description = "Add a sound strip to the sequencer";
1174 
1175  /* Api callbacks. */
1179 
1180  /* Flags. */
1182 
1185  FILE_SPECIAL,
1186  FILE_OPENFILE,
1192  RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory");
1193  RNA_def_boolean(ot->srna, "mono", false, "Mono", "Merge all the sound's channels into one");
1194 }
1195 
1197  int sfra,
1198  int *r_minframe,
1199  int *r_numdigits)
1200 {
1201  int minframe = INT32_MAX, maxframe = INT32_MIN;
1202  int numdigits = 0;
1203 
1204  RNA_BEGIN (op->ptr, itemptr, "files") {
1205  char *filename;
1206  int frame;
1207  filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0, NULL);
1208 
1209  if (filename) {
1210  if (BLI_path_frame_get(filename, &frame, &numdigits)) {
1211  minframe = min_ii(minframe, frame);
1212  maxframe = max_ii(maxframe, frame);
1213  }
1214 
1215  MEM_freeN(filename);
1216  }
1217  }
1218  RNA_END;
1219 
1220  if (minframe == INT32_MAX) {
1221  minframe = sfra;
1222  maxframe = minframe + 1;
1223  }
1224 
1225  *r_minframe = minframe;
1226  *r_numdigits = numdigits;
1227 
1228  return maxframe - minframe + 1;
1229 }
1230 
1232  wmOperator *op, StripElem *se, int len, int minframe, int numdigits)
1233 {
1234  char *filename = NULL;
1235  RNA_BEGIN (op->ptr, itemptr, "files") {
1236  filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0, NULL);
1237  break;
1238  }
1239  RNA_END;
1240 
1241  if (filename) {
1242  char ext[PATH_MAX];
1243  char filename_stripped[PATH_MAX];
1244  /* Strip the frame from filename and substitute with `#`. */
1245  BLI_path_frame_strip(filename, ext, sizeof(ext));
1246 
1247  for (int i = 0; i < len; i++, se++) {
1248  BLI_strncpy(filename_stripped, filename, sizeof(filename_stripped));
1249  BLI_path_frame(filename_stripped, minframe + i, numdigits);
1250  BLI_snprintf(se->name, sizeof(se->name), "%s%s", filename_stripped, ext);
1251  }
1252 
1253  MEM_freeN(filename);
1254  }
1255 }
1256 
1258  const int start_frame,
1259  int *minframe,
1260  int *numdigits)
1261 {
1262  const bool use_placeholders = RNA_boolean_get(op->ptr, "use_placeholders");
1263 
1264  if (use_placeholders) {
1265  return sequencer_image_seq_get_minmax_frame(op, start_frame, minframe, numdigits);
1266  }
1268 }
1269 
1271  Scene *scene,
1272  Sequence *seq,
1273  SeqLoadData *load_data,
1274  const int minframe,
1275  const int numdigits)
1276 {
1277  const bool use_placeholders = RNA_boolean_get(op->ptr, "use_placeholders");
1278  /* size of Strip->dir. */
1279  char directory[768];
1280  BLI_split_dir_part(load_data->path, directory, sizeof(directory));
1281  SEQ_add_image_set_directory(seq, directory);
1282 
1283  if (use_placeholders) {
1285  op, seq->strip->stripdata, load_data->image.len, minframe, numdigits);
1286  }
1287  else {
1288  size_t strip_frame = 0;
1289  RNA_BEGIN (op->ptr, itemptr, "files") {
1290  char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0, NULL);
1291  SEQ_add_image_load_file(scene, seq, strip_frame, filename);
1292  MEM_freeN(filename);
1293  strip_frame++;
1294  }
1295  RNA_END;
1296  }
1297 }
1298 
1300 {
1303 
1304  SeqLoadData load_data;
1305  load_data_init_from_operator(&load_data, C, op);
1306 
1307  int minframe, numdigits;
1309  op, load_data.start_frame, &minframe, &numdigits);
1310  if (load_data.image.len == 0) {
1311  sequencer_add_cancel(C, op);
1312  return OPERATOR_CANCELLED;
1313  }
1314 
1315  if (RNA_boolean_get(op->ptr, "replace_sel")) {
1317  }
1318 
1319  Sequence *seq = SEQ_add_image_strip(CTX_data_main(C), scene, ed->seqbasep, &load_data);
1320  sequencer_add_image_strip_load_files(op, scene, seq, &load_data, minframe, numdigits);
1322 
1323  /* Adjust length. */
1324  if (load_data.image.len == 1) {
1326  }
1327 
1329 
1332 
1333  /* Free custom data. */
1334  sequencer_add_cancel(C, op);
1335 
1336  return OPERATOR_FINISHED;
1337 }
1338 
1340  wmOperator *op,
1341  const wmEvent *UNUSED(event))
1342 {
1343  PropertyRNA *prop;
1345 
1347 
1349 
1350  /* Name set already by drag and drop. */
1351  if (RNA_struct_property_is_set(op->ptr, "files") && !RNA_collection_is_empty(op->ptr, "files")) {
1354  return sequencer_add_image_strip_exec(C, op);
1355  }
1356 
1358  sequencer_add_init(C, op);
1359 
1360  /* Show multiview save options only if scene use multiview. */
1361  prop = RNA_struct_find_property(op->ptr, "show_multiview");
1362  RNA_property_boolean_set(op->ptr, prop, (scene->r.scemode & R_MULTIVIEW) != 0);
1363 
1365  return OPERATOR_RUNNING_MODAL;
1366 }
1367 
1369 {
1370 
1371  /* Identifiers. */
1372  ot->name = "Add Image Strip";
1373  ot->idname = "SEQUENCER_OT_image_strip_add";
1374  ot->description = "Add an image or image sequence to the sequencer";
1375 
1376  /* Api callbacks. */
1382 
1383  /* Flags. */
1385 
1388  FILE_SPECIAL,
1389  FILE_OPENFILE,
1396 
1398  "use_placeholders",
1399  false,
1400  "Use Placeholders",
1401  "Use placeholders for missing frames of the strip");
1402 }
1403 
1405 {
1408  const char *error_msg;
1409 
1410  SeqLoadData load_data;
1411  load_data_init_from_operator(&load_data, C, op);
1412  load_data.effect.type = RNA_enum_get(op->ptr, "type");
1413 
1414  Sequence *seq1, *seq2, *seq3;
1416  scene, NULL, load_data.effect.type, &seq1, &seq2, &seq3, &error_msg)) {
1417  BKE_report(op->reports, RPT_ERROR, error_msg);
1418  return OPERATOR_CANCELLED;
1419  }
1420 
1421  if (RNA_boolean_get(op->ptr, "replace_sel")) {
1423  }
1424 
1425  load_data.effect.seq1 = seq1;
1426  load_data.effect.seq2 = seq2;
1427  load_data.effect.seq3 = seq3;
1428 
1429  /* Set channel. If unset, use lowest free one above strips. */
1430  if (!RNA_struct_property_is_set(op->ptr, "channel")) {
1431  if (seq1 != NULL) {
1432  int chan = max_iii(
1433  seq1 ? seq1->machine : 0, seq2 ? seq2->machine : 0, seq3 ? seq3->machine : 0);
1434  if (chan < MAXSEQ) {
1435  load_data.channel = chan;
1436  }
1437  }
1438  }
1439 
1440  Sequence *seq = SEQ_add_effect_strip(scene, ed->seqbasep, &load_data);
1442 
1443  if (seq->type == SEQ_TYPE_COLOR) {
1444  SolidColorVars *colvars = (SolidColorVars *)seq->effectdata;
1445  RNA_float_get_array(op->ptr, "color", colvars->col);
1446  }
1447 
1450 
1451  return OPERATOR_FINISHED;
1452 }
1453 
1455  wmOperator *op,
1456  const wmEvent *UNUSED(event))
1457 {
1458  bool is_type_set = RNA_struct_property_is_set(op->ptr, "type");
1459  int type = -1;
1460  int prop_flag = SEQPROP_ENDFRAME | SEQPROP_NOPATHS;
1461 
1462  if (is_type_set) {
1463  type = RNA_enum_get(op->ptr, "type");
1464 
1465  /* When invoking an effect strip which uses inputs, skip initializing the channel from the
1466  * mouse. */
1467  if (SEQ_effect_get_num_inputs(type) != 0) {
1468  prop_flag |= SEQPROP_NOCHAN;
1469  }
1470  }
1471 
1472  sequencer_generic_invoke_xy__internal(C, op, prop_flag, type);
1473 
1474  return sequencer_add_effect_strip_exec(C, op);
1475 }
1476 
1478  wmOperatorType *UNUSED(op),
1479  PointerRNA *ptr)
1480 {
1481  const int type = RNA_enum_get(ptr, "type");
1482 
1483  switch (type) {
1484  case SEQ_TYPE_CROSS:
1485  return BLI_strdup(TIP_("Add a crossfade transition to the sequencer"));
1486  case SEQ_TYPE_ADD:
1487  return BLI_strdup(TIP_("Add an add effect strip to the sequencer"));
1488  case SEQ_TYPE_SUB:
1489  return BLI_strdup(TIP_("Add a subtract effect strip to the sequencer"));
1490  case SEQ_TYPE_ALPHAOVER:
1491  return BLI_strdup(TIP_("Add an alpha over effect strip to the sequencer"));
1492  case SEQ_TYPE_ALPHAUNDER:
1493  return BLI_strdup(TIP_("Add an alpha under effect strip to the sequencer"));
1494  case SEQ_TYPE_GAMCROSS:
1495  return BLI_strdup(TIP_("Add a gamma cross transition to the sequencer"));
1496  case SEQ_TYPE_MUL:
1497  return BLI_strdup(TIP_("Add a multiply effect strip to the sequencer"));
1498  case SEQ_TYPE_OVERDROP:
1499  return BLI_strdup(TIP_("Add an alpha over drop effect strip to the sequencer"));
1500  case SEQ_TYPE_WIPE:
1501  return BLI_strdup(TIP_("Add a wipe transition to the sequencer"));
1502  case SEQ_TYPE_GLOW:
1503  return BLI_strdup(TIP_("Add a glow effect strip to the sequencer"));
1504  case SEQ_TYPE_TRANSFORM:
1505  return BLI_strdup(TIP_("Add a transform effect strip to the sequencer"));
1506  case SEQ_TYPE_COLOR:
1507  return BLI_strdup(TIP_("Add a color strip to the sequencer"));
1508  case SEQ_TYPE_SPEED:
1509  return BLI_strdup(TIP_("Add a speed effect strip to the sequencer"));
1510  case SEQ_TYPE_MULTICAM:
1511  return BLI_strdup(TIP_("Add a multicam selector effect strip to the sequencer"));
1512  case SEQ_TYPE_ADJUSTMENT:
1513  return BLI_strdup(TIP_("Add an adjustment layer effect strip to the sequencer"));
1515  return BLI_strdup(TIP_("Add a gaussian blur effect strip to the sequencer"));
1516  case SEQ_TYPE_TEXT:
1517  return BLI_strdup(TIP_("Add a text strip to the sequencer"));
1518  case SEQ_TYPE_COLORMIX:
1519  return BLI_strdup(TIP_("Add a color mix effect strip to the sequencer"));
1520  default:
1521  break;
1522  }
1523 
1524  /* Use default description. */
1525  return NULL;
1526 }
1527 
1529 {
1530  PropertyRNA *prop;
1531 
1532  /* Identifiers. */
1533  ot->name = "Add Effect Strip";
1534  ot->idname = "SEQUENCER_OT_effect_strip_add";
1535  ot->description = "Add an effect to the sequencer, most are applied on top of existing strips";
1536 
1537  /* Api callbacks. */
1543 
1544  /* Flags. */
1546 
1547  RNA_def_enum(ot->srna,
1548  "type",
1551  "Type",
1552  "Sequencer effect type");
1554  /* Only used when strip is of the Color type. */
1555  prop = RNA_def_float_color(ot->srna,
1556  "color",
1557  3,
1558  NULL,
1559  0.0f,
1560  1.0f,
1561  "Color",
1562  "Initialize the strip with this color",
1563  0.0f,
1564  1.0f);
1566 }
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:738
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1090
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:713
struct bScreen * CTX_wm_screen(const bContext *C)
Definition: context.c:733
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1074
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition: report.c:83
@ SCE_COPY_EMPTY
Definition: BKE_scene.h:30
@ SCE_COPY_NEW
Definition: BKE_scene.h:29
@ SCE_COPY_FULL
Definition: BKE_scene.h:32
@ SCE_COPY_LINK_COLLECTION
Definition: BKE_scene.h:31
#define PATH_MAX
Definition: BLI_fileops.h:29
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
MINLINE int max_iii(int a, int b, int c)
void BLI_split_dir_part(const char *string, char *dir, size_t dirlen)
Definition: path_util.c:1490
const char * BLI_path_basename(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
Definition: path_util.c:1653
bool BLI_path_frame(char *path, int frame, int digits) ATTR_NONNULL()
Definition: path_util.c:709
#define FILE_MAX
bool BLI_path_frame_get(char *path, int *r_frame, int *r_digits_len) ATTR_NONNULL()
Definition: path_util.c:753
void BLI_path_rel(char *file, const char *relfile) ATTR_NONNULL()
Definition: path_util.c:450
void BLI_path_frame_strip(char *path, char *r_ext, size_t ext_maxlen) ATTR_NONNULL()
Definition: path_util.c:805
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
Definition: path_util.c:897
void BLI_join_dirfile(char *__restrict dst, size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
Definition: path_util.c:1531
#define STR_ELEM(...)
Definition: BLI_string.h:539
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:42
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
unsigned int uint
Definition: BLI_sys_types.h:67
#define ARRAY_SIZE(arr)
#define UNUSED(x)
#define ELEM(...)
#define STREQ(a, b)
#define TIP_(msgid)
#define BLT_I18NCONTEXT_ID_MOVIECLIP
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_SEQUENCER_STRIPS
Definition: DNA_ID.h:838
#define R_MULTIVIEW
@ SEQ_SCALE_TO_FILL
@ SEQ_STRETCH_TO_FILL
@ SEQ_USE_ORIGINAL_SIZE
@ SEQ_SCALE_TO_FIT
#define MAXFRAME
@ SEQ_TYPE_TRANSFORM
@ SEQ_TYPE_SOUND_RAM
@ SEQ_TYPE_CROSS
@ SEQ_TYPE_GLOW
@ SEQ_TYPE_COLORMIX
@ SEQ_TYPE_WIPE
@ SEQ_TYPE_OVERDROP
@ SEQ_TYPE_ALPHAUNDER
@ SEQ_TYPE_SCENE
@ SEQ_TYPE_GAMCROSS
@ SEQ_TYPE_MULTICAM
@ SEQ_TYPE_MOVIECLIP
@ SEQ_TYPE_MUL
@ SEQ_TYPE_GAUSSIAN_BLUR
@ SEQ_TYPE_ADD
@ SEQ_TYPE_ALPHAOVER
@ SEQ_TYPE_TEXT
@ SEQ_TYPE_IMAGE
@ SEQ_TYPE_SUB
@ SEQ_TYPE_SPEED
@ SEQ_TYPE_COLOR
@ SEQ_TYPE_MOVIE
@ SEQ_TYPE_MASK
@ SEQ_TYPE_ADJUSTMENT
#define SEQ_HAS_PATH(_seq)
@ SEQ_PROXY_SKIP_EXISTING
#define MAXSEQ
@ FILE_SORT_DEFAULT
@ FILE_SPECIAL
@ FILE_TYPE_MOVIE
@ FILE_TYPE_SOUND
@ FILE_TYPE_FOLDER
@ FILE_TYPE_IMAGE
@ SPACE_SEQ
@ SEQ_VIEW_SEQUENCE_PREVIEW
@ SEQ_VIEW_PREVIEW
@ FILE_DEFAULTDISPLAY
@ SEQ_MARKER_TRANS
@ USER_SEQ_PROXY_SETUP_AUTOMATIC
@ OPERATOR_CANCELLED
@ OPERATOR_FINISHED
@ OPERATOR_RUNNING_MODAL
struct Scene * ED_scene_sequencer_add(struct Main *bmain, struct bContext *C, enum eSceneCopyMethod method, const bool assign_strip)
Definition: scene_edit.c:70
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:729
bool ED_operator_sequencer_active_editable(struct bContext *C)
Definition: screen_ops.c:339
void ED_sequencer_deselect_all(struct Scene *scene)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
IMB_Proxy_Size
Definition: IMB_imbuf.h:340
Read Guarded memory(de)allocation.
#define MEM_SAFE_FREE(v)
#define RNA_PROP_END
Definition: RNA_access.h:563
#define RNA_BEGIN(sptr, itemptr, propname)
Definition: RNA_access.h:543
#define RNA_END
Definition: RNA_access.h:550
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
Definition: RNA_access.h:556
const EnumPropertyItem * RNA_scene_without_active_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem * RNA_movieclip_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
const EnumPropertyItem * RNA_mask_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
@ PROP_ENUM_NO_TRANSLATE
Definition: RNA_types.h:294
@ PROP_SKIP_SAVE
Definition: RNA_types.h:218
@ PROP_HIDDEN
Definition: RNA_types.h:216
@ PROP_COLOR_GAMMA
Definition: RNA_types.h:165
#define C
Definition: RandGen.cpp:25
@ SEQ_LOAD_SOUND_MONO
Definition: SEQ_add.h:21
@ SEQ_LOAD_SOUND_CACHE
Definition: SEQ_add.h:20
@ SEQ_LOAD_SET_VIEW_TRANSFORM
Definition: SEQ_add.h:23
@ SEQ_LOAD_MOVIE_SYNC_FPS
Definition: SEQ_add.h:22
#define SEQ_ITERATOR_FOREACH(var, collection)
Definition: SEQ_iterator.h:35
@ UI_BUT_LABEL_ALIGN_NONE
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
void uiTemplateImageFormatViews(uiLayout *layout, struct PointerRNA *imfptr, struct PointerRNA *ptr)
@ WM_FILESEL_FILES
Definition: WM_api.h:756
@ WM_FILESEL_DIRECTORY
Definition: WM_api.h:753
@ WM_FILESEL_RELPATH
Definition: WM_api.h:752
@ WM_FILESEL_SHOW_PROPS
Definition: WM_api.h:758
@ WM_FILESEL_FILEPATH
Definition: WM_api.h:755
@ FILE_OPENFILE
Definition: WM_api.h:764
#define ND_SEQUENCER
Definition: WM_types.h:385
@ OPTYPE_UNDO
Definition: WM_types.h:148
@ OPTYPE_REGISTER
Definition: WM_types.h:146
#define NC_SCENE
Definition: WM_types.h:328
unsigned int U
Definition: btGjkEpa3.h:78
#define SELECT
Scene scene
void * user_data
int len
Definition: draw_manager.c:108
int SEQ_effect_get_num_inputs(int seq_type)
Definition: effects.c:3741
static const int proxy_sizes[]
Definition: indexer.c:43
uint SEQ_collection_len(const SeqCollection *collection)
Definition: iterator.c:95
SeqCollection * SEQ_collection_create(const char *name)
Definition: iterator.c:87
bool SEQ_collection_append_strip(Sequence *seq, SeqCollection *collection)
Definition: iterator.c:117
void SEQ_collection_free(SeqCollection *collection)
Definition: iterator.c:81
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
#define G(x, y, z)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void SEQ_proxy_set(struct Sequence *seq, bool value)
Definition: proxy.c:571
int SEQ_rendersize_to_proxysize(int render_size)
Definition: proxy.c:71
bool SEQ_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, struct GSet *file_list, ListBase *queue, bool build_only_on_bad_performance)
Definition: proxy.c:401
ProxyJob * ED_seq_proxy_job_get(const bContext *C, wmJob *wm_job)
Definition: proxy_job.c:77
struct wmJob * ED_seq_proxy_wm_job_get(const bContext *C)
Definition: proxy_job.c:94
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:136
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:5155
const char * RNA_property_identifier(const PropertyRNA *prop)
Definition: rna_access.c:1000
bool RNA_collection_is_empty(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5250
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
Definition: rna_access.c:4874
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
Definition: rna_access.c:4921
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:717
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
Definition: rna_access.c:4980
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2153
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2429
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
Definition: rna_access.c:5116
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4910
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
Definition: rna_access.c:3149
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
Definition: rna_access.c:2180
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
Definition: rna_access.c:5129
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
Definition: rna_access.c:1736
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:5301
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4863
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
Definition: rna_access.c:5015
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5004
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3762
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4487
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4436
PropertyRNA * RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:3922
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2848
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3597
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
Definition: rna_define.c:3830
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
Definition: rna_define.c:1534
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
const EnumPropertyItem DummyRNA_NULL_items[]
Definition: rna_rna.c:26
Editing * SEQ_editing_ensure(Scene *scene)
Definition: sequencer.c:246
Editing * SEQ_editing_get(const Scene *scene)
Definition: sequencer.c:241
eSeqImageFitMethod SEQ_tool_settings_fit_method_get(Scene *scene)
Definition: sequencer.c:346
void SEQ_tool_settings_fit_method_set(Scene *scene, eSeqImageFitMethod fit_method)
Definition: sequencer.c:370
static void seq_build_proxy(bContext *C, SeqCollection *movie_strips)
static void sequencer_add_sound_multiple_strips(bContext *C, wmOperator *op, SeqLoadData *load_data)
static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wmOperator *op)
static void sequencer_add_init(bContext *UNUSED(C), wmOperator *op)
#define SEQPROP_NOPATHS
Definition: sequencer_add.c:84
static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op)
#define SEQPROP_ENDFRAME
Definition: sequencer_add.c:83
static IMB_Proxy_Size seq_get_proxy_size_flags(bContext *C)
static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier)
static int sequencer_add_mask_strip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int sequencer_add_scene_strip_new_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static EnumPropertyItem strip_new_scene_items[]
static int sequencer_add_image_strip_calculate_length(wmOperator *op, const int start_frame, int *minframe, int *numdigits)
void SEQUENCER_OT_mask_strip_add(struct wmOperatorType *ot)
static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
#define SEQPROP_VIEW_TRANSFORM
Definition: sequencer_add.c:87
static bool seq_effect_add_properties_poll(const bContext *UNUSED(C), wmOperator *op, const PropertyRNA *prop)
static const EnumPropertyItem scale_fit_methods[]
Definition: sequencer_add.c:90
static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, int flag, int type)
static bool sequencer_add_sound_single_strip(bContext *C, wmOperator *op, SeqLoadData *load_data)
struct SequencerAddData SequencerAddData
static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void SEQUENCER_OT_scene_strip_add_new(struct wmOperatorType *ot)
static const EnumPropertyItem * strip_new_sequencer_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
static void sequencer_generic_props__internal(wmOperatorType *ot, int flag)
Definition: sequencer_add.c:98
static void sequencer_add_image_strip_load_files(wmOperator *op, Scene *scene, Sequence *seq, SeqLoadData *load_data, const int minframe, const int numdigits)
static int sequencer_add_movieclip_strip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void seq_load_apply_generic_options(bContext *C, wmOperator *op, Sequence *seq)
static void sequencer_add_movie_multiple_strips(bContext *C, wmOperator *op, SeqLoadData *load_data, SeqCollection *r_movie_strips)
static int sequencer_add_scene_strip_new_exec(bContext *C, wmOperator *op)
static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot)
static bool sequencer_add_draw_check_fn(PointerRNA *UNUSED(ptr), PropertyRNA *prop, void *UNUSED(user_data))
static void sequencer_add_draw(bContext *UNUSED(C), wmOperator *op)
#define SEQPROP_STARTFRAME
Definition: sequencer_add.c:82
void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
static void sequencer_add_cancel(bContext *UNUSED(C), wmOperator *op)
static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op)
void sequencer_image_seq_reserve_frames(wmOperator *op, StripElem *se, int len, int minframe, int numdigits)
#define SEQPROP_NOCHAN
Definition: sequencer_add.c:85
static bool sequencer_add_movie_single_strip(bContext *C, wmOperator *op, SeqLoadData *load_data, SeqCollection *r_movie_strips)
static void sequencer_add_movie_clamp_sound_strip_length(Scene *scene, Sequence *seq_movie, Sequence *seq_sound)
#define SEQPROP_PLAYBACK_RATE
Definition: sequencer_add.c:88
void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot)
static int sequencer_generic_invoke_xy_guess_channel(bContext *C, int type)
static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
static char * sequencer_add_effect_strip_desc(bContext *UNUSED(C), wmOperatorType *UNUSED(op), PointerRNA *ptr)
#define SEQPROP_FIT_METHOD
Definition: sequencer_add.c:86
int sequencer_image_seq_get_minmax_frame(wmOperator *op, int sfra, int *r_minframe, int *r_numdigits)
static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
static void sequencer_disable_one_time_properties(bContext *C, wmOperator *op)
static bool seq_load_apply_generic_options_only_test_overlap(bContext *C, wmOperator *op, Sequence *seq, SeqCollection *strip_col)
void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequence **r_selseq1, Sequence **r_selseq2, Sequence **r_selseq3, const char **r_error_str)
EnumPropertyItem sequencer_prop_effect_types[]
#define DEFAULT_IMG_STRIP_LENGTH
#define INT32_MAX
Definition: stdint.h:137
#define INT32_MIN
Definition: stdint.h:136
void SEQ_add_image_load_file(Scene *scene, Sequence *seq, size_t strip_frame, char *filename)
Definition: strip_add.c:194
Sequence * SEQ_add_movie_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
Definition: strip_add.c:373
Sequence * SEQ_add_sound_strip(Main *UNUSED(bmain), Scene *UNUSED(scene), ListBase *UNUSED(seqbase), SeqLoadData *UNUSED(load_data))
Definition: strip_add.c:348
Sequence * SEQ_add_mask_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Definition: strip_add.c:149
Sequence * SEQ_add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
Definition: strip_add.c:230
Sequence * SEQ_add_effect_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Definition: strip_add.c:161
Sequence * SEQ_add_movieclip_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Definition: strip_add.c:137
void SEQ_add_image_set_directory(Sequence *seq, char *path)
Definition: strip_add.c:189
void SEQ_add_image_init_alpha_mode(Sequence *seq)
Definition: strip_add.c:201
Sequence * SEQ_add_scene_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data)
Definition: strip_add.c:125
Sequence * SEQ_select_active_get(Scene *scene)
Definition: strip_select.c:18
void SEQ_select_active_set(Scene *scene, Sequence *seq)
Definition: strip_select.c:29
void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int val)
Definition: strip_time.c:539
int SEQ_time_left_handle_frame_get(const Scene *UNUSED(scene), const Sequence *seq)
Definition: strip_time.c:506
void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int val)
Definition: strip_time.c:524
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
Definition: strip_time.c:515
bool SEQ_transform_seqbase_shuffle(ListBase *seqbasep, Sequence *test, Scene *evil_scene)
bool SEQ_transform_test_overlap(const Scene *scene, ListBase *seqbasep, Sequence *test)
void SEQ_transform_handle_overlap(Scene *scene, ListBase *seqbasep, SeqCollection *transformed_strips, SeqCollection *time_dependent_strips, bool use_sync_markers)
ListBase * seqbasep
Stereo3dFormat stereo3d_format
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
ListBase masks
Definition: BKE_main.h:200
ListBase scenes
Definition: BKE_main.h:168
ListBase movieclips
Definition: BKE_main.h:199
Scene * scene
Definition: clip_ops.c:1171
struct ListBase queue
Definition: SEQ_proxy.h:45
struct Main * main
Definition: clip_ops.c:1172
struct Depsgraph * depsgraph
Definition: SEQ_proxy.h:43
struct RenderData r
struct Sequence * seq2
Definition: SEQ_add.h:43
int len
Definition: SEQ_add.h:33
char views_format
Definition: SEQ_add.h:49
bool use_multiview
Definition: SEQ_add.h:48
struct MovieClip * clip
Definition: SEQ_add.h:37
eSeqImageFitMethod fit_method
Definition: SEQ_add.h:47
struct Scene * scene
Definition: SEQ_add.h:36
int channel
Definition: SEQ_add.h:29
struct Sequence * seq3
Definition: SEQ_add.h:44
bool adjust_playback_rate
Definition: SEQ_add.h:53
struct Stereo3dFormat * stereo3d_format
Definition: SEQ_add.h:50
char path[1024]
Definition: SEQ_add.h:31
struct SeqLoadData::@1176 effect
int end_frame
Definition: SEQ_add.h:34
int start_frame
Definition: SEQ_add.h:28
struct SeqLoadData::@1175 image
char name[64]
Definition: SEQ_add.h:30
struct Mask * mask
Definition: SEQ_add.h:38
eSeqLoadFlags flags
Definition: SEQ_add.h:46
int type
Definition: SEQ_add.h:40
struct Sequence * seq1
Definition: SEQ_add.h:42
struct Scene * scene
struct Sequence * next
ImageFormatData im_format
Definition: sequencer_add.c:76
short render_size
char name[256]
short build_size_flags
StripProxy * proxy
StripElem * stripdata
char dir[768]
ListBase areabase
Definition: wm_jobs.c:57
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:919
const char * name
Definition: WM_types.h:888
const char * idname
Definition: WM_types.h:890
char *(* get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *)
Definition: WM_types.h:966
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:943
bool(* poll_property)(const struct bContext *C, struct wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:949
void(* cancel)(struct bContext *, struct wmOperator *)
Definition: WM_types.h:927
struct StructRNA * srna
Definition: WM_types.h:969
const char * description
Definition: WM_types.h:893
void(* ui)(struct bContext *, struct wmOperator *)
Definition: WM_types.h:954
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:903
PropertyRNA * prop
Definition: WM_types.h:981
struct ReportList * reports
struct uiLayout * layout
struct PointerRNA * ptr
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479
bool WM_jobs_is_running(const wmJob *wm_job)
Definition: wm_jobs.c:304
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
Definition: wm_jobs.c:437
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)
int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))