Blender V5.0
sequencer_channels_edit.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "DNA_screen_types.h"
11
12#include "BKE_context.hh"
13
14#include "ED_screen.hh"
15
16#include "UI_view2d.hh"
17
18#include "WM_api.hh"
19
20/* Own include. */
21#include "sequencer_intern.hh"
22
23namespace blender::ed::vse {
24
26 wmOperator * /*op*/,
27 const wmEvent *event)
28{
32 float mouse_y = UI_view2d_region_to_view_y(context.timeline_region_v2d, event->mval[1]);
33
34 sseq->runtime->rename_channel_index = mouse_y;
36 return OPERATOR_FINISHED;
37}
38
40{
41 /* Identifiers. */
42 ot->name = "Rename Channel";
43 ot->idname = "SEQUENCER_OT_rename_channel";
44
45 /* API callbacks. */
48
49 /* Flags. */
51}
52
53} // namespace blender::ed::vse
SpaceSeq * CTX_wm_space_seq(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
Scene * CTX_data_sequencer_scene(const bContext *C)
@ OPERATOR_FINISHED
#define C
Definition RandGen.cpp:29
float UI_view2d_region_to_view_y(const View2D *v2d, float y)
Definition view2d.cc:1662
#define ND_SEQUENCER
Definition WM_types.hh:437
#define NC_SCENE
Definition WM_types.hh:378
@ OPTYPE_INTERNAL
Definition WM_types.hh:202
@ OPTYPE_UNDO
Definition WM_types.hh:182
@ OPTYPE_REGISTER
Definition WM_types.hh:180
void channel_draw_context_init(const bContext *C, ARegion *region, SeqChannelDrawContext *r_context)
static wmOperatorStatus sequencer_rename_channel_invoke(bContext *C, wmOperator *, const wmEvent *event)
bool sequencer_edit_with_channel_region_poll(bContext *C)
void SEQUENCER_OT_rename_channel(wmOperatorType *ot)
SpaceSeq_Runtime * runtime
int mval[2]
Definition WM_types.hh:763
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * ot
Definition wm_files.cc:4237