Blender V5.3
MOD_sound_echo.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "BLT_translation.hh"
10
11#include "DNA_sequence_types.h"
12
13#include "SEQ_modifier.hh"
14
15#include "RNA_access.hh"
16
17#include "UI_interface.hh"
19
20#include "modifier.hh"
21
22namespace blender::seq {
23
25{
26 EchoModifierData *emd = reinterpret_cast<EchoModifierData *>(smd);
27
28 emd->delay = 1.0f;
29 emd->feedback = 0.5f;
30 emd->mix = 0.5f;
31}
32
33static void echomodifier_draw(const bContext * /*C*/, Panel *panel)
34{
35 ui::Layout &layout = *panel->layout;
37
38 layout.use_property_split_set(true);
39
40 ui::Layout &col = layout.column(false);
41
42 col.prop(ptr, "delay", UI_ITEM_NONE, std::nullopt, ICON_NONE);
43 col.prop(ptr, "feedback", UI_ITEM_NONE, std::nullopt, ICON_NONE);
44 col.prop(ptr, "mix", UI_ITEM_NONE, std::nullopt, ICON_NONE);
45}
46
51
53 /*idname*/ "Echo",
54 /*name*/ CTX_N_(BLT_I18NCONTEXT_ID_SEQUENCE, "Echo"),
55 /*struct_name*/ "EchoModifierData",
56 /*struct_size*/ sizeof(EchoModifierData),
57 /*init_data*/ echomodifier_init_data,
58 /*free_data*/ nullptr,
59 /*copy_data*/ nullptr,
60 /*apply*/ nullptr,
61 /*panel_register*/ echomodifier_register,
62 /*blend_write*/ nullptr,
63 /*blend_read*/ nullptr,
64};
65
66}; // namespace blender::seq
#define CTX_N_(context, msgid)
#define BLT_I18NCONTEXT_ID_SEQUENCE
#define UI_ITEM_NONE
StripModifierTypeInfo seqModifierType_Echo
static void echomodifier_draw(const bContext *, Panel *panel)
static void echomodifier_init_data(StripModifierData *smd)
static void echomodifier_register(ARegionType *region_type)
PanelType * modifier_panel_register(ARegionType *region_type, const eStripModifierType type, PanelDrawFn draw)
PointerRNA * panel_custom_data_get(const Panel *panel)
ui::Layout * layout
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
Layout & column(bool align)