1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
|
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2011 Blender Foundation.
* All rights reserved.
*
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/editors/space_clip/clip_graph_ops.c
* \ingroup spclip
*/
#include "DNA_scene_types.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BKE_context.h"
#include "BKE_tracking.h"
#include "BKE_depsgraph.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_clip.h"
#include "UI_interface.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_view2d.h"
#include "clip_intern.h" // own include
/******************** common graph-editing utilities ********************/
static int ED_space_clip_graph_poll(bContext *C)
{
if (ED_space_clip_tracking_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
return sc->view == SC_VIEW_GRAPH;
}
return false;
}
static int clip_graph_knots_poll(bContext *C)
{
if (ED_space_clip_graph_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
return (sc->flag & SC_SHOW_GRAPH_TRACKS_MOTION) != 0;
}
return false;
}
typedef struct {
int action;
} SelectUserData;
static void toggle_selection_cb(void *userdata, MovieTrackingMarker *marker)
{
SelectUserData *data = (SelectUserData *)userdata;
switch (data->action) {
case SEL_SELECT:
marker->flag |= MARKER_GRAPH_SEL;
break;
case SEL_DESELECT:
marker->flag &= ~MARKER_GRAPH_SEL;
break;
case SEL_INVERT:
marker->flag ^= MARKER_GRAPH_SEL;
break;
}
}
/******************** mouse select operator ********************/
typedef struct {
int coord; /* coordinate index of found entuty (0 = X-axis, 1 = Y-axis) */
bool has_prev; /* if there's valid coordinate of previous point of curve segment */
float min_dist, /* minimal distance between mouse and currently found entuty */
mouse_co[2], /* mouse coordinate */
prev_co[2], /* coordinate of previeous point of segment */
min_co[2]; /* coordinate of entity with minimal distance */
MovieTrackingTrack *track; /* nearest found track */
MovieTrackingMarker *marker; /* nearest found marker */
} MouseSelectUserData;
static void find_nearest_tracking_segment_cb(void *userdata, MovieTrackingTrack *track,
MovieTrackingMarker *UNUSED(marker),
int coord, int scene_framenr, float val)
{
MouseSelectUserData *data = userdata;
float co[2] = {scene_framenr, val};
if (data->has_prev) {
float d = dist_to_line_segment_v2(data->mouse_co, data->prev_co, co);
if (data->track == NULL || d < data->min_dist) {
data->track = track;
data->min_dist = d;
data->coord = coord;
copy_v2_v2(data->min_co, co);
}
}
data->has_prev = true;
copy_v2_v2(data->prev_co, co);
}
static void find_nearest_tracking_segment_end_cb(void *userdata, int UNUSED(coord))
{
MouseSelectUserData *data = userdata;
data->has_prev = false;
}
static void find_nearest_tracking_knot_cb(void *userdata, MovieTrackingTrack *track,
MovieTrackingMarker *marker, int coord, int scene_framenr, float val)
{
MouseSelectUserData *data = userdata;
float dx = scene_framenr - data->mouse_co[0], dy = val - data->mouse_co[1];
float d = dx * dx + dy * dy;
if (data->marker == NULL || d < data->min_dist) {
float co[2] = {scene_framenr, val};
data->track = track;
data->marker = marker;
data->min_dist = d;
data->coord = coord;
copy_v2_v2(data->min_co, co);
}
}
static void mouse_select_init_data(MouseSelectUserData *userdata, const float co[2])
{
memset(userdata, 0, sizeof(MouseSelectUserData));
userdata->min_dist = FLT_MAX;
copy_v2_v2(userdata->mouse_co, co);
}
static bool mouse_select_knot(bContext *C, float co[2], bool extend)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
ARegion *ar = CTX_wm_region(C);
View2D *v2d = &ar->v2d;
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
static const int delta = 6;
if (act_track) {
MouseSelectUserData userdata;
mouse_select_init_data(&userdata, co);
clip_graph_tracking_values_iterate_track(sc, act_track, &userdata,
find_nearest_tracking_knot_cb, NULL, NULL);
if (userdata.marker) {
int x1, y1, x2, y2;
if (UI_view2d_view_to_region_clip(v2d, co[0], co[1], &x1, &y1) &&
UI_view2d_view_to_region_clip(v2d, userdata.min_co[0], userdata.min_co[1], &x2, &y2) &&
(abs(x2 - x1) <= delta && abs(y2 - y1) <= delta))
{
if (!extend) {
SelectUserData selectdata = {SEL_DESELECT};
clip_graph_tracking_iterate(sc,
(sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
(sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&selectdata,
toggle_selection_cb);
}
if (userdata.coord == 0)
userdata.marker->flag |= MARKER_GRAPH_SEL_X;
else
userdata.marker->flag |= MARKER_GRAPH_SEL_Y;
return true;
}
}
}
return false;
}
static bool mouse_select_curve(bContext *C, float co[2], bool extend)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
MouseSelectUserData userdata;
mouse_select_init_data(&userdata, co);
clip_graph_tracking_values_iterate(sc,
(sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
(sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&userdata, find_nearest_tracking_segment_cb,
NULL, find_nearest_tracking_segment_end_cb);
if (userdata.track) {
if (extend) {
if (act_track == userdata.track) {
/* currently only single curve can be selected (selected curve represents active track) */
act_track = NULL;
}
}
else if (act_track != userdata.track) {
SelectUserData selectdata = {SEL_DESELECT};
MovieTrackingObject *object = BKE_tracking_object_get_active(tracking);
ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, object);
tracking->act_track = userdata.track;
BKE_tracking_track_select(tracksbase, userdata.track, TRACK_AREA_ALL, true);
/* deselect all knots on newly selected curve */
clip_graph_tracking_iterate(sc,
(sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
(sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&selectdata, toggle_selection_cb);
}
return true;
}
return false;
}
static int mouse_select(bContext *C, float co[2], bool extend)
{
bool sel = false;
/* first try to select knot on selected curves */
sel = mouse_select_knot(C, co, extend);
if (!sel) {
/* if there's no close enough knot to mouse osition, select nearest curve */
sel = mouse_select_curve(C, co, extend);
}
if (sel)
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
static int select_exec(bContext *C, wmOperator *op)
{
float co[2];
bool extend = RNA_boolean_get(op->ptr, "extend");
RNA_float_get_array(op->ptr, "location", co);
return mouse_select(C, co, extend);
}
static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
float co[2];
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]);
RNA_float_set_array(op->ptr, "location", co);
return select_exec(C, op);
}
void CLIP_OT_graph_select(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select";
ot->description = "Select graph curves";
ot->idname = "CLIP_OT_graph_select";
/* api callbacks */
ot->exec = select_exec;
ot->invoke = select_invoke;
ot->poll = clip_graph_knots_poll;
/* flags */
ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
"Location", "Mouse location to select nearest entity", -100.0f, 100.0f);
RNA_def_boolean(ot->srna, "extend", 0,
"Extend", "Extend selection rather than clearing the existing selection");
}
/********************** border select operator *********************/
typedef struct BorderSelectuserData {
rctf rect;
int mode;
bool changed, extend;
} BorderSelectuserData;
static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track),
MovieTrackingMarker *marker, int coord, int scene_framenr, float val)
{
BorderSelectuserData *data = (BorderSelectuserData *) userdata;
if (BLI_rctf_isect_pt(&data->rect, scene_framenr, val)) {
int flag = 0;
if (coord == 0)
flag = MARKER_GRAPH_SEL_X;
else
flag = MARKER_GRAPH_SEL_Y;
if (data->mode == GESTURE_MODAL_SELECT)
marker->flag |= flag;
else
marker->flag &= ~flag;
data->changed = true;
}
else if (!data->extend) {
marker->flag &= ~MARKER_GRAPH_SEL;
}
}
static int border_select_graph_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
ARegion *ar = CTX_wm_region(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
BorderSelectuserData userdata;
rctf rect;
if (act_track == NULL) {
return OPERATOR_CANCELLED;
}
/* get rectangle from operator */
WM_operator_properties_border_to_rctf(op, &rect);
UI_view2d_region_to_view_rctf(&ar->v2d, &rect, &userdata.rect);
userdata.changed = false;
userdata.mode = RNA_int_get(op->ptr, "gesture_mode");
userdata.extend = RNA_boolean_get(op->ptr, "extend");
clip_graph_tracking_values_iterate_track(sc, act_track, &userdata, border_select_cb, NULL, NULL);
if (userdata.changed) {
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
return OPERATOR_CANCELLED;
}
void CLIP_OT_graph_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Border Select";
ot->description = "Select curve points using border selection";
ot->idname = "CLIP_OT_graph_select_border";
/* api callbacks */
ot->invoke = WM_border_select_invoke;
ot->exec = border_select_graph_exec;
ot->modal = WM_border_select_modal;
ot->poll = clip_graph_knots_poll;
/* flags */
ot->flag = OPTYPE_UNDO;
/* properties */
WM_operator_properties_gesture_border(ot, true);
}
/********************** select all operator *********************/
static int graph_select_all_markers_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
MovieTrackingMarker *marker;
int action = RNA_enum_get(op->ptr, "action");
int a;
if (!act_track)
return OPERATOR_CANCELLED;
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
for (a = 0; a < act_track->markersnr; a++) {
marker = &act_track->markers[a];
if (marker->flag & MARKER_GRAPH_SEL) {
action = SEL_DESELECT;
break;
}
}
}
for (a = 0; a < act_track->markersnr; a++) {
marker = &act_track->markers[a];
switch (action) {
case SEL_SELECT:
marker->flag |= MARKER_GRAPH_SEL;
break;
case SEL_DESELECT:
marker->flag &= ~MARKER_GRAPH_SEL;
break;
case SEL_INVERT:
marker->flag ^= MARKER_GRAPH_SEL;
break;
}
}
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
return OPERATOR_FINISHED;
}
void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
{
/* identifiers */
ot->name = "(De)select All Markers";
ot->description = "Change selection of all markers of active track";
ot->idname = "CLIP_OT_graph_select_all_markers";
/* api callbacks */
ot->exec = graph_select_all_markers_exec;
ot->poll = clip_graph_knots_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
/******************** delete curve operator ********************/
static int delete_curve_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
if (!act_track)
return OPERATOR_CANCELLED;
clip_delete_track(C, clip, act_track);
return OPERATOR_FINISHED;
}
void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Curve";
ot->description = "Delete track corresponding to the selected curve";
ot->idname = "CLIP_OT_graph_delete_curve";
/* api callbacks */
ot->invoke = WM_operator_confirm;
ot->exec = delete_curve_exec;
ot->poll = clip_graph_knots_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************** delete knot operator ********************/
static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
if (act_track) {
int a = 0;
while (a < act_track->markersnr) {
MovieTrackingMarker *marker = &act_track->markers[a];
if (marker->flag & MARKER_GRAPH_SEL)
clip_delete_marker(C, clip, act_track, marker);
else
a++;
}
}
return OPERATOR_FINISHED;
}
void CLIP_OT_graph_delete_knot(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Knot";
ot->description = "Delete curve knots";
ot->idname = "CLIP_OT_graph_delete_knot";
/* api callbacks */
ot->exec = delete_knot_exec;
ot->poll = clip_graph_knots_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/******************** view all operator ********************/
typedef struct {
float min, max;
} ViewAllUserData;
static void view_all_cb(void *userdata, MovieTrackingTrack *UNUSED(track), MovieTrackingMarker *UNUSED(marker),
int UNUSED(coord), int UNUSED(scene_framenr), float val)
{
ViewAllUserData *data = (ViewAllUserData *) userdata;
if (val < data->min)
data->min = val;
if (val > data->max)
data->max = val;
}
static int view_all_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
ARegion *ar = CTX_wm_region(C);
SpaceClip *sc = CTX_wm_space_clip(C);
View2D *v2d = &ar->v2d;
ViewAllUserData userdata;
float extra;
userdata.max = -FLT_MAX;
userdata.min = FLT_MAX;
clip_graph_tracking_values_iterate(sc,
(sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
(sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&userdata, view_all_cb, NULL, NULL);
/* set extents of view to start/end frames */
v2d->cur.xmin = (float) SFRA;
v2d->cur.xmax = (float) EFRA;
if (userdata.min < userdata.max) {
v2d->cur.ymin = userdata.min;
v2d->cur.ymax = userdata.max;
}
else {
v2d->cur.ymin = -10;
v2d->cur.ymax = 10;
}
/* we need an extra "buffer" factor on either side so that the endpoints are visible */
extra = 0.01f * BLI_rctf_size_x(&v2d->cur);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
extra = 0.01f * BLI_rctf_size_y(&v2d->cur);
v2d->cur.ymin -= extra;
v2d->cur.ymax += extra;
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
}
void CLIP_OT_graph_view_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "View All";
ot->description = "View all curves in editor";
ot->idname = "CLIP_OT_graph_view_all";
/* api callbacks */
ot->exec = view_all_exec;
ot->poll = ED_space_clip_graph_poll;
}
/******************** jump to current frame operator ********************/
void ED_clip_graph_center_current_frame(Scene *scene, ARegion *ar)
{
View2D *v2d = &ar->v2d;
float extra = BLI_rctf_size_x(&v2d->cur) / 2.0f;
/* set extents of view to start/end frames */
v2d->cur.xmin = (float)CFRA - extra;
v2d->cur.xmax = (float)CFRA + extra;
}
static int center_current_frame_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
ARegion *ar = CTX_wm_region(C);
ED_clip_graph_center_current_frame(scene, ar);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
}
void CLIP_OT_graph_center_current_frame(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Center Current Frame";
ot->description = "Scroll view so current frame would be centered";
ot->idname = "CLIP_OT_graph_center_current_frame";
/* api callbacks */
ot->exec = center_current_frame_exec;
ot->poll = ED_space_clip_graph_poll;
}
/********************** disable markers operator *********************/
static int graph_disable_markers_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
MovieTrackingMarker *marker;
int action = RNA_enum_get(op->ptr, "action");
int a;
if (!act_track || (act_track->flag & TRACK_LOCKED))
return OPERATOR_CANCELLED;
for (a = 0; a < act_track->markersnr; a++) {
marker = &act_track->markers[a];
if (marker->flag & MARKER_GRAPH_SEL) {
if (action == 0)
marker->flag |= MARKER_DISABLED;
else if (action == 1)
marker->flag &= ~MARKER_DISABLED;
else
marker->flag ^= MARKER_DISABLED;
}
}
DAG_id_tag_update(&clip->id, 0);
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
return OPERATOR_FINISHED;
}
void CLIP_OT_graph_disable_markers(wmOperatorType *ot)
{
static EnumPropertyItem actions_items[] = {
{0, "DISABLE", 0, "Disable", "Disable selected markers"},
{1, "ENABLE", 0, "Enable", "Enable selected markers"},
{2, "TOGGLE", 0, "Toggle", "Toggle disabled flag for selected markers"},
{0, NULL, 0, NULL, NULL}
};
/* identifiers */
ot->name = "Disable Markers";
ot->description = "Disable/enable selected markers";
ot->idname = "CLIP_OT_graph_disable_markers";
/* api callbacks */
ot->exec = graph_disable_markers_exec;
ot->poll = ED_space_clip_graph_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Disable action to execute");
}
|