Blender V5.3
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#include "sequencer_intern.hh"
21
22namespace blender::ed::vse {
23
25 wmOperator * /*op*/,
26 const wmEvent *event)
27{
31 float mouse_y = ui::view2d_region_to_view_y(context.timeline_region_v2d, event->mval[1]);
32
33 sseq->runtime->rename_channel_index = mouse_y;
35 return OPERATOR_FINISHED;
36}
37
39{
40 /* Identifiers. */
41 ot->name = "Rename Channel";
42 ot->idname = "SEQUENCER_OT_rename_channel";
43
44 /* API callbacks. */
47
48 /* Flags. */
50}
51
52} // namespace blender::ed::vse
#define C
Definition RandGen.cpp:29
#define ND_SEQUENCER
Definition WM_types.hh:456
#define NC_SCENE
Definition WM_types.hh:391
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)
float view2d_region_to_view_y(const View2D *v2d, float y)
Definition view2d.cc:1645
Scene * CTX_data_sequencer_scene(const bContext *C)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
@ OPTYPE_REGISTER
Definition WM_types.hh:188
@ OPTYPE_UNDO
Definition WM_types.hh:190
@ OPTYPE_INTERNAL
Definition WM_types.hh:210
ARegion * CTX_wm_region(const bContext *C)
ed::vse::SpaceSeq_Runtime * runtime
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1165
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1141