Blender V5.3
DNA_sequence_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
14
15#pragma once
16
17#include "DNA_color_types.h"
18#include "DNA_defs.h"
19#include "DNA_listBase.h"
20#include "DNA_scene_enums.h"
21#include "DNA_screen_types.h" /* for #TextboxState. */
22#include "DNA_vec_types.h" /* for #rctf */
23
24#include "BLI_enum_flags.hh"
25
26#include <optional>
27
28namespace blender {
29
30struct MovieClip;
31struct Scene;
32struct VFont;
33struct bSound;
34
35namespace seq {
36struct EditingRuntime;
37struct TextVarsRuntime;
38struct StripRuntime;
40} // namespace seq
41
44 SEQ_SELECT = (1 << 0),
45 SEQ_LEFTSEL = (1 << 1),
46 SEQ_RIGHTSEL = (1 << 2),
47 /* (1 << 3) unused, set to zero by versioning code. */
48 SEQ_DEINTERLACE = (1 << 4),
49 SEQ_MUTE = (1 << 5),
52 /* (1 << 8) unused, set to zero by versioning code. */
53 /* (1 << 9) unused, set to zero by versioning code. */
54 /* (1 << 10) unused, set to zero by versioning code. */
55 SEQ_FLIPX = (1 << 11),
56 SEQ_FLIPY = (1 << 12),
57 SEQ_MAKE_FLOAT = (1 << 13),
58 SEQ_LOCK = (1 << 14),
59 SEQ_USE_PROXY = (1 << 15),
60 /* (1 << 16) unused, set to zero by versioning code. */
63 SEQ_SHOW_RETIMING = (1 << 19),
64 /* (1 << 20) unused, set to zero by versioning code. */
65 SEQ_MULTIPLY_ALPHA = (1 << 21),
66
68 /* (1 << 23) unused, set to zero by versioning code. */
69
70 /* Flags for whether those properties are animated or not */
75
76 /* Don't include annotations in OpenGL previews of Scene strips. */
78 SEQ_USE_VIEWS = (1 << 29),
79
80 /* Access scene strips directly (like a meta-strip). */
81 SEQ_SCENE_STRIPS = (1 << 30),
82
84
85 /* Convenience flag for all selection flags. */
87};
89
92 SEQ_STORAGE_PROXY_CUSTOM_FILE = (1 << 1), /* Store proxy in custom directory. */
93 SEQ_STORAGE_PROXY_CUSTOM_DIR = (1 << 2), /* Store proxy in custom file. */
94};
96
108
114
119
156
163
196
197#define STRIP_HAS_PATH(_strip) \
198 (ELEM((_strip)->type, STRIP_TYPE_MOVIE, STRIP_TYPE_IMAGE, STRIP_TYPE_SOUND, STRIP_TYPE_SOUND_HD))
199
214
223
230
235
246
247/* -------------------------------------------------------------------- */
250
251struct StripElem {
253 char filename[/*FILE_MAXFILE*/ 256] = "";
256 float orig_fps = 0;
257};
258
259struct StripCrop {
260 int top = 0;
261 int bottom = 0;
262 int left = 0;
263 int right = 0;
264};
265
267 float xofs = 0;
268 float yofs = 0;
269 float scale_x = 0;
270 float scale_y = 0;
271 float rotation = 0;
278 float origin[2] = {};
280};
281
284 float lift[3] = {1.0, 1.0, 1.0};
285 float gamma[3] = {1.0, 1.0, 1.0};
286 float gain[3] = {1.0, 1.0, 1.0};
287 float slope[3] = {1.0, 1.0, 1.0};
288 float offset[3] = {1.0, 1.0, 1.0};
289 float power[3] = {1.0, 1.0, 1.0};
291 char _pad[4] = {};
292};
293
296 char dirpath[/*FILE_MAXDIR*/ 768] = "";
298 char filename[/*FILE_MAXFILE*/ 256] = "";
299 struct MovieReader *anim = nullptr; /* Custom proxy anim file. */
300
301 short quality = 0; /* Proxy build quality. */
302
304 SEQ_PROXY_IMAGE_SIZE_NONE; /* which proxy sizes to build. */
307 char _pad = 0;
308};
309
310struct StripData {
311 struct StripData *next = nullptr, *prev = nullptr;
318 /* The size of the `stripdata` array. */
320
321 char _pad[4] = {};
322
323 char dirpath[/*FILE_MAXDIR*/ 768] = "";
324 StripProxy *proxy = nullptr;
325 StripCrop *crop = nullptr;
327 /* Replaced by #ColorBalanceModifierData::color_balance in 2.64. */
329
330 /* Color management */
332};
333
343
347 float retiming_factor = 0; /* Value between 0-1 mapped to original content range. */
348
349 double original_strip_frame_index = 0; /* Used for transition keys only. */
350 float original_retiming_factor = 0; /* Used for transition keys only. */
351 char _pad[4] = {};
352};
353
354#define STRIP_NAME_MAXSTR 64
355
360struct Strip {
361 struct Strip *next = nullptr, *prev = nullptr;
363 char name[/*STRIP_NAME_MAXSTR*/ 64] = "";
364
369 int len = 0;
374 float start = 0;
379 float startofs = 0, endofs = 0;
384 int channel = 0;
386 int startdisp = 0, enddisp = 0;
387 float sat = 0;
388 float mul = 0;
389
391 short streamindex = 0;
392 short _pad1 = {};
396
397 StripData *data = nullptr;
398
401 /* For SCENE strips. */
402 struct Scene *scene = nullptr;
404 struct Object *scene_camera = nullptr;
407 char *scene_view_layer_name = nullptr;
409 struct MovieClip *clip = nullptr;
411 struct Mask *mask = nullptr;
412
414 float effect_fader = 0;
417
419 struct Strip *input1 = nullptr, *input2 = nullptr;
420
422 ListBaseT<Strip> seqbase = {nullptr, nullptr};
424 ListBaseT<struct SeqTimelineChannel> channels = {nullptr, nullptr};
425
426 /* List of one-way strip connections (they are required to point back to this strip). */
427 ListBaseT<struct StripConnection> connections = {nullptr, nullptr};
428
430 struct bSound *sound = nullptr;
431 float volume = 0;
432
436 float pan = 0;
437 float strobe = 0;
438
439 float sound_offset = 0;
440 char _pad4[4] = {};
441
443 void *effectdata = nullptr;
444
447
449 float blend_opacity = 0;
450
452
454 char _pad2[2] = {};
455 int _pad9 = {};
456
457 /* is sfra needed anymore? - it looks like its only used in one place */
459 int sfra = 0;
460
461 /* Multiview */
463 char _pad3[3] = {};
465
466 struct IDProperty *prop = nullptr;
468 struct IDProperty *system_properties = nullptr;
469
470 /* Modifiers */
471 ListBaseT<struct StripModifierData> modifiers = {nullptr, nullptr};
472
473 /* Playback rate of original video file in frames per second, for movie strips only. */
475 float speed_factor = 0;
476
477 struct SeqRetimingKey *retiming_keys = nullptr;
479 char _pad6[4] = {};
480
482
483#ifdef __cplusplus
484 bool is_effect() const;
485 int effect_num_inputs_get() const;
486 bool is_effect_with_inputs() const
487 {
488 return this->effect_num_inputs_get() != 0;
489 }
490
494 float content_start() const;
499 void content_start_set(const Scene *scene, int timeline_frame);
503 float content_end(const Scene *scene) const;
508 int length(const Scene *scene) const;
514 int rounded_sound_offset(float scene_fps) const;
518 int left_handle() const;
522 int right_handle(const Scene *scene) const;
526 void left_handle_set(const Scene *scene, int timeline_frame);
531 void right_handle_set(const Scene *scene, int timeline_frame);
536 void handles_set(const Scene *scene, int left_frame, int right_frame);
540 void channel_set(int channel);
548 bool intersects_frame(const Scene *scene, int timeline_frame) const;
553 float media_playback_rate_factor(float scene_fps) const;
558 float media_fps(Scene *scene);
559
563 int content_length() const;
564 void content_length_set(int new_length);
565
569 float end_offset() const;
570 void end_offset_set(float new_end_offset);
571
572#endif
573};
574
575struct MetaStack {
576 struct MetaStack *next = nullptr, *prev = nullptr;
581 Strip *old_strip = nullptr;
582 Strip *parent_strip = nullptr;
583 /* The startdisp/enddisp when entering the metastrip. */
584 int disp_range[2] = {};
585};
586
588 SeqTimelineChannel *next = nullptr, *prev = nullptr;
589 char name[64] = "";
590 int index = 0;
592
593#ifdef __cplusplus
594 bool is_locked() const
595 {
596 return (this->flag & SEQ_CHANNEL_LOCK) != 0;
597 }
598 bool is_muted() const
599 {
600 return (this->flag & SEQ_CHANNEL_MUTE) != 0;
601 }
602#endif
603};
604
606 struct StripConnection *next = nullptr, *prev = nullptr;
607 Strip *strip_ref = nullptr;
608};
609
616
622
623#define STRIP_OFSBOTTOM 0.05f
624#define STRIP_OFSTOP 0.95f
625
631
635 SEQ_CACHE_UNUSED_1 = (1 << 1), /* Was SEQ_CACHE_STORE_PREPROCESSED */
636 SEQ_CACHE_UNUSED_2 = (1 << 2), /* Was SEQ_CACHE_STORE_COMPOSITE */
638
639 /* For lookup purposes */
641
642 SEQ_CACHE_UNUSED_4 = (1 << 4), /* Was SEQ_CACHE_OVERRIDE */
648
650 SEQ_CACHE_UNUSED_11 = (1 << 11), /* Was SEQ_CACHE_DISK_CACHE_ENABLE */
651};
653
654struct Editing {
660
662 ListBaseT<Strip> seqbase = {nullptr, nullptr};
663 ListBaseT<MetaStack> metastack = {nullptr, nullptr};
664 ListBaseT<SeqTimelineChannel> channels = {nullptr, nullptr};
665
666 Strip *act_strip = nullptr;
667 char proxy_dir[/*FILE_MAX*/ 1024] = "";
668
670
674
677
679
680#if defined(__cplusplus) && !defined(DNA_NO_EXTERNAL_CONSTRUCTORS)
681 Editing();
682 ~Editing();
683#endif
684#ifdef __cplusplus
686 ListBaseT<Strip> *current_strips();
687 ListBaseT<Strip> *current_strips() const;
688
690 ListBaseT<SeqTimelineChannel> *current_channels();
691 ListBaseT<SeqTimelineChannel> *current_channels() const;
692
693 std::optional<int> edit_point() const;
694 void edit_point_set(Scene *scene, std::optional<int> frame);
695#endif
696};
697
699
700/* -------------------------------------------------------------------- */
703
710
713 SEQ_SPEED_UNUSED_2 = 1 << 0, /* Cleared. */
714 SEQ_SPEED_UNUSED_1 = 1 << 1, /* Cleared. */
715 SEQ_SPEED_UNUSED_3 = 1 << 2, /* Cleared. */
717};
719
726
737
743
749
755
760
765
771
777
778struct GlowVars {
780 float fMini = 0;
781 float fClamp = 0;
783 float fBoost = 0;
785 float dDist = 0;
786 int dQuality = 0;
788 int bNoComp = 0;
789};
790
791/* Removed in 5.0. Only used in versioning and blend reading. */
793 float ScalexIni = {};
794 float ScaleyIni = {};
795 float xIni = 0;
796 float yIni = 0;
797 float rotIni = 0;
798 int percent = 0;
802};
803
805 float col[3] = {};
806 int width;
808};
809
824
826 float size_x = 0;
827 float size_y = 0;
828};
829
830struct TextVars {
832
833 char *text_ptr = nullptr;
839 char _pad2[4] = {};
840
841 struct VFont *text_font = nullptr;
842 int text_blf_id = 0;
843 float text_size = 0;
844 float space_line = 1.0f;
845 float abs_space_line = 1.0f;
846 float color[4] = {}, shadow_color[4] = {}, box_color[4] = {}, outline_color[4] = {};
847 float loc[2] = {};
848 float wrap_width = 0;
849 float box_margin = 0;
850 float box_roundness = 0;
851 float shadow_angle = 0;
852 float shadow_offset = 0;
853 float shadow_blur = 0;
854 float outline_width = 0;
857 char _pad[2] = {};
858
863
866
869 char _pad1[1] = {};
871
872 /* Fixed size text buffer, only exists for forward/backward compatibility.
873 * #TextVars::text_ptr and #TextVars::text_len_bytes are used for full text. */
874 char text_legacy[512] = "";
875
878};
879
880#define STRIP_FONT_NOT_LOADED -2
881
887
889 struct bNodeTree *node_group = nullptr;
890 struct IDProperty *system_properties = nullptr;
891};
892
894
895/* -------------------------------------------------------------------- */
898
915
924
929
931 /* Mask animation will be remapped relative to the strip start frame. */
933 /* Global (scene) frame number will be used to access the mask. */
935};
936
942
944 struct StripModifierData *next = nullptr, *prev = nullptr;
947 char name[/*MAX_NAME*/ 64] = "";
948
949 /* Mask input, either strip or mask ID. */
952
953 struct Strip *mask_strip = nullptr;
954 struct Mask *mask_id = nullptr;
955
962
963 struct IDProperty *system_properties = nullptr;
964
966
967#ifdef __cplusplus
968 bool is_type_sound() const;
969#endif
970};
971
978
984
990
997
1001
1004
1005 float white_value[3] = {1.0f, 1.0f, 1.0f};
1006 char _pad[4] = {};
1007};
1008
1016
1025
1027
1028/* -------------------------------------------------------------------- */
1031
1033 struct EQCurveMappingData *next = nullptr, *prev = nullptr;
1035};
1036
1039 ListBaseT<EQCurveMappingData> graphics = {nullptr, nullptr};
1040};
1041
1052
1055 float delay = 0;
1056 float feedback = 0;
1057 float mix = 0;
1058 char _pad[4] = {};
1059};
1060
1062
1063} // namespace blender
#define DNA_DEFINE_CXX_METHODS(class_name)
Definition DNA_defs.h:104
#define DNA_DEPRECATED
Definition DNA_defs.h:21
These structs are the foundation for all linked lists in the library system.
float length(VecOp< float, D >) RET
ENUM_OPERATORS(Layer::Flags)
BMesh Iterators.
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
@ SEQ_EDIT_OVERLAY_FRAME_SHOW
@ SEQ_EDIT_OVERLAY_FRAME_NONE
@ SEQ_COLOR_BALANCE_INVERSE_POWER
@ SEQ_COLOR_BALANCE_INVERSE_LIFT
@ SEQ_COLOR_BALANCE_INVERSE_SLOPE
@ SEQ_COLOR_BALANCE_INVERSE_NONE
@ SEQ_COLOR_BALANCE_INVERSE_GAIN
@ SEQ_COLOR_BALANCE_INVERSE_GAMMA
@ SEQ_COLOR_BALANCE_INVERSE_OFFSET
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ STRIP_MODIFIER_FLAG_EXPANDED
@ STRIP_MODIFIER_FLAG_SHOW_PREVIEW
@ STRIP_TYPE_OVERDROP_REMOVED
@ STRIP_TYPE_TRANSFORM_LEGACY
@ SEQ_COLOR_BALANCE_METHOD_LIFTGAMMAGAIN
@ SEQ_COLOR_BALANCE_METHOD_SLOPEOFFSETPOWER
unsigned short uint16_t
Definition BKE_text.h:80
unsigned int uint32_t
Definition BKE_text.h:81
unsigned char uint8_t
Definition BKE_text.h:79
@ SEQ_FLAG_TEXT_EDITING_ACTIVE
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_AUDIO_PITCH_CORRECTION
@ SEQ_AUDIO_VOLUME_ANIMATED
@ SEQ_COMP_MOD_HIDE_DATABLOCK_SELECTOR
@ SEQ_SPEED_USE_INTERPOLATION
@ SEQ_TEXT_USE_ABSOLUTE_LINE_SPACING
@ STRIP_BLEND_OVERDROP_REMOVED
@ SEQ_EDIT_SHOW_MISSING_MEDIA
@ SEQ_MOVIECLIP_RENDER_STABILIZED
@ SEQ_MOVIECLIP_RENDER_UNDISTORTED
signed int int32_t
Definition BKE_text.h:78
@ SEQ_TRANSFORM_FILTER_CUBIC_MITCHELL
@ SEQ_TRANSFORM_FILTER_BILINEAR
@ SEQ_TRANSFORM_FILTER_CUBIC_BSPLINE
@ SEQ_TRANSFORM_FILTER_NEAREST
@ eSeqModifierType_HueCorrect
@ eSeqModifierType_SoundEqualizer
@ eSeqModifierType_WhiteBalance
@ eSeqModifierType_BrightContrast
@ eSeqModifierType_ColorBalance
@ eSeqModifierType_Compositor
signed char int8_t
Definition BKE_text.h:76
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
struct IDProperty * system_properties
struct CurveMapping curve_mapping
struct EQCurveMappingData * prev
struct EQCurveMappingData * next
eEditingOverlayFrameFlag overlay_frame_flag
eEditingProxyStorageMode proxy_storage
eEditingShowMissingMediaFlag show_missing_media_flag
seq::EditingRuntime * runtime
ListBaseT< SeqTimelineChannel > channels
eEditingCacheFlag cache_flag
ListBaseT< Strip > seqbase
ListBaseT< MetaStack > metastack
struct MetaStack * next
struct MetaStack * prev
ListBaseT< EQCurveMappingData > graphics
eEffectSpeedControlType speed_control_type
DNA_DEPRECATED float globalSpeed_legacy
eEffectSpeedControlFlags flags
eModColorBalanceMethod method
eModColorBalanceInverseFlag flag
struct StripConnection * prev
struct StripConnection * next
DNA_DEPRECATED StripColorBalance * color_balance_legacy
struct StripData * prev
ColorManagedColorspaceSettings colorspace_settings
struct StripData * next
StripTransform * transform
struct StripModifierData * prev
struct StripModifierData * next
blender::seq::StripModifierDataRuntime * runtime
struct IDProperty * system_properties
eStripProxyStorageFlag storage
eStripProxyBuildFlag build_flags
eStripProxyBuildSize build_size_flags
struct MovieReader * anim
eStripTransformFilter filter
StripBlendMode blend_mode
struct Strip * input2
ListBaseT< struct StripModifierData > modifiers
DNA_DEPRECATED float startstill_legacy
struct bSound * sound
ListBaseT< Strip > seqbase
StripColorTag color_tag
DNA_DEPRECATED float pitch_legacy
struct Strip * next
struct SeqRetimingKey * retiming_keys
seq::StripRuntime * runtime
struct Object * scene_camera
ListBaseT< struct StripConnection > connections
struct MovieClip * clip
eImageFormat_ViewsFormat views_format
eStripAlphaMode alpha_mode
DNA_DEPRECATED float speed_fader_legacy
struct Scene * scene
struct Stereo3dFormat * stereo3d_format
struct IDProperty * system_properties
struct Strip * input1
struct IDProperty * prop
eStripMovieClipFlag clip_flag
struct Strip * prev
DNA_DEPRECATED float endstill_legacy
ListBaseT< struct SeqTimelineChannel > channels
eEffectTextAlignX align
eEffectTextAnchorX anchor_x
eEffectTextFlags flag
eEffectTextAnchorY anchor_y
struct VFont * text_font
seq::TextVarsRuntime * runtime
DNA_DEPRECATED char align_y_legacy
eEffectWipeType wipetype