Blender  V2.93
graph_ops.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <math.h>
25 #include <stdlib.h>
26 
27 #include "DNA_scene_types.h"
28 
29 #include "BLI_blenlib.h"
30 #include "BLI_math_base.h"
31 #include "BLI_utildefines.h"
32 
33 #include "BKE_context.h"
34 #include "BKE_global.h"
35 
36 #include "UI_view2d.h"
37 
38 #include "ED_anim_api.h"
39 #include "ED_screen.h"
40 #include "ED_transform.h"
41 
42 #include "graph_intern.h"
43 
44 #include "RNA_access.h"
45 #include "RNA_define.h"
46 
47 #include "DEG_depsgraph.h"
48 
49 #include "WM_api.h"
50 #include "WM_types.h"
51 
52 /* ************************** view-based operators **********************************/
53 /* XXX should these really be here? */
54 
55 /* Set Cursor --------------------------------------------------------------------- */
56 /* The 'cursor' in the Graph Editor consists of two parts:
57  * 1) Current Frame Indicator (as per ANIM_OT_change_frame)
58  * 2) Value Indicator (stored per Graph Editor instance)
59  */
60 
62 {
63  /* prevent changes during render */
64  if (G.is_rendering) {
65  return false;
66  }
67 
69 }
70 
71 /* Set the new frame number */
73 {
76  /* this isn't technically "frame", but it'll do... */
77  float frame = RNA_float_get(op->ptr, "frame");
78 
79  /* adjust the frame or the cursor x-value */
80  if (sipo->mode == SIPO_MODE_DRIVERS) {
81  /* adjust cursor x-value */
82  sipo->cursorTime = frame;
83  }
84  else {
85  /* adjust the frame
86  * NOTE: sync this part of the code with ANIM_OT_change_frame
87  */
88  /* 1) frame is rounded to the nearest int, since frames are ints */
89  CFRA = round_fl_to_int(frame);
90 
92  /* Clip to preview range
93  * NOTE: Preview range won't go into negative values,
94  * so only clamping once should be fine.
95  */
96  CLAMP(CFRA, PSFRA, PEFRA);
97  }
98  else {
99  /* Prevent negative frames */
101  }
102 
103  SUBFRA = 0.0f;
105  }
106 
107  /* set the cursor value */
108  sipo->cursorVal = RNA_float_get(op->ptr, "value");
109 
110  /* send notifiers - notifiers for frame should force an update for both vars ok... */
112 }
113 
114 /* ... */
115 
116 /* Non-modal callback for running operator without user input */
118 {
120  return OPERATOR_FINISHED;
121 }
122 
123 /* ... */
124 
125 /* set the operator properties from the initial event */
126 static void graphview_cursor_setprops(bContext *C, wmOperator *op, const wmEvent *event)
127 {
128  ARegion *region = CTX_wm_region(C);
129  float viewx, viewy;
130 
131  /* abort if not active region (should not really be possible) */
132  if (region == NULL) {
133  return;
134  }
135 
136  /* convert from region coordinates to View2D 'tot' space */
137  UI_view2d_region_to_view(&region->v2d, event->mval[0], event->mval[1], &viewx, &viewy);
138 
139  /* store the values in the operator properties */
140  /* NOTE: we don't clamp frame here, as it might be used for the drivers cursor */
141  RNA_float_set(op->ptr, "frame", viewx);
142  RNA_float_set(op->ptr, "value", viewy);
143 }
144 
145 /* Modal Operator init */
146 static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
147 {
148  bScreen *screen = CTX_wm_screen(C);
149 
150  /* Change to frame that mouse is over before adding modal handler,
151  * as user could click on a single frame (jump to frame) as well as
152  * click-dragging over a range (modal scrubbing). Apply this change.
153  */
154  graphview_cursor_setprops(C, op, event);
156 
157  /* Signal that a scrubbing operating is starting */
158  if (screen) {
159  screen->scrubbing = true;
160  }
161 
162  /* add temp handler */
164  return OPERATOR_RUNNING_MODAL;
165 }
166 
167 /* Modal event handling of cursor changing */
168 static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *event)
169 {
170  bScreen *screen = CTX_wm_screen(C);
172 
173  /* execute the events */
174  switch (event->type) {
175  case EVT_ESCKEY:
176  if (screen) {
177  screen->scrubbing = false;
178  }
179 
181  return OPERATOR_FINISHED;
182 
183  case MOUSEMOVE:
184  /* set the new values */
185  graphview_cursor_setprops(C, op, event);
187  break;
188 
189  case LEFTMOUSE:
190  case RIGHTMOUSE:
191  case MIDDLEMOUSE:
192  /* We check for either mouse-button to end, to work with all user keymaps. */
193  if (event->val == KM_RELEASE) {
194  if (screen) {
195  screen->scrubbing = false;
196  }
197 
199  return OPERATOR_FINISHED;
200  }
201  break;
202  }
203 
204  return OPERATOR_RUNNING_MODAL;
205 }
206 
208 {
209  /* identifiers */
210  ot->name = "Set Cursor";
211  ot->idname = "GRAPH_OT_cursor_set";
212  ot->description = "Interactively set the current frame and value cursor";
213 
214  /* api callbacks */
219 
220  /* flags */
222 
223  /* rna */
224  RNA_def_float(ot->srna, "frame", 0, MINAFRAMEF, MAXFRAMEF, "Frame", "", MINAFRAMEF, MAXFRAMEF);
225  RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Value", "", -100.0f, 100.0f);
226 }
227 
228 /* Hide/Reveal ------------------------------------------------------------ */
229 
231 {
232  bAnimContext ac;
233  ListBase anim_data = {NULL, NULL};
234  ListBase all_data = {NULL, NULL};
235  bAnimListElem *ale;
236  int filter;
237  const bool unselected = RNA_boolean_get(op->ptr, "unselected");
238 
239  /* get editor data */
240  if (ANIM_animdata_get_context(C, &ac) == 0) {
241  return OPERATOR_CANCELLED;
242  }
243 
244  /* get list of all channels that selection may need to be flushed to
245  * - hierarchy must not affect what we have access to here...
246  */
248  ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
249 
250  /* filter data
251  * - of the remaining visible curves, we want to hide the ones that are
252  * selected/unselected (depending on "unselected" prop)
253  */
255  if (unselected) {
257  }
258  else {
260  }
261 
262  ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
263 
264  for (ale = anim_data.first; ale; ale = ale->next) {
265  /* hack: skip object channels for now, since flushing those will always flush everything,
266  * but they are always included */
267  /* TODO: find out why this is the case, and fix that */
268  if (ale->type == ANIMTYPE_OBJECT) {
269  continue;
270  }
271 
272  /* change the hide setting, and unselect it... */
275 
276  /* now, also flush selection status up/down as appropriate */
278  &ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_CLEAR);
279  }
280 
281  /* cleanup */
282  ANIM_animdata_freelist(&anim_data);
283  BLI_freelistN(&all_data);
284 
285  /* unhide selected */
286  if (unselected) {
287  /* turn off requirement for visible */
289 
290  /* flushing has been done */
291  ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
292 
293  for (ale = anim_data.first; ale; ale = ale->next) {
294  /* hack: skip object channels for now, since flushing those
295  * will always flush everything, but they are always included */
296 
297  /* TODO: find out why this is the case, and fix that */
298  if (ale->type == ANIMTYPE_OBJECT) {
299  continue;
300  }
301 
302  /* change the hide setting, and unselect it... */
305 
306  /* now, also flush selection status up/down as appropriate */
308  &ac, &anim_data, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD);
309  }
310  ANIM_animdata_freelist(&anim_data);
311  }
312 
313  /* send notifier that things have changed */
315 
316  return OPERATOR_FINISHED;
317 }
318 
320 {
321  /* identifiers */
322  ot->name = "Hide Curves";
323  ot->idname = "GRAPH_OT_hide";
324  ot->description = "Hide selected curves from Graph Editor view";
325 
326  /* api callbacks */
329 
330  /* flags */
332 
333  /* props */
335  ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected curves");
336 }
337 
338 /* ........ */
339 
341 {
342  bAnimContext ac;
343  ListBase anim_data = {NULL, NULL};
344  ListBase all_data = {NULL, NULL};
345  bAnimListElem *ale;
346  int filter;
347  const bool select = RNA_boolean_get(op->ptr, "select");
348 
349  /* get editor data */
350  if (ANIM_animdata_get_context(C, &ac) == 0) {
351  return OPERATOR_CANCELLED;
352  }
353 
354  /* get list of all channels that selection may need to be flushed to
355  * - hierarchy must not affect what we have access to here...
356  */
358  ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
359 
360  /* filter data
361  * - just go through all visible channels, ensuring that everything is set to be curve-visible
362  */
364  ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
365 
366  for (ale = anim_data.first; ale; ale = ale->next) {
367  /* hack: skip object channels for now, since flushing those will always flush everything,
368  * but they are always included. */
369  /* TODO: find out why this is the case, and fix that */
370  if (ale->type == ANIMTYPE_OBJECT) {
371  continue;
372  }
373 
374  /* select if it is not visible */
377  ale,
380  }
381 
382  /* change the visibility setting */
384 
385  /* now, also flush selection status up/down as appropriate */
387  }
388 
389  /* cleanup */
390  ANIM_animdata_freelist(&anim_data);
391  BLI_freelistN(&all_data);
392 
393  /* send notifier that things have changed */
395 
396  return OPERATOR_FINISHED;
397 }
398 
400 {
401  /* identifiers */
402  ot->name = "Reveal Curves";
403  ot->idname = "GRAPH_OT_reveal";
404  ot->description = "Make previously hidden curves visible again in Graph Editor view";
405 
406  /* api callbacks */
409 
410  /* flags */
412 
413  RNA_def_boolean(ot->srna, "select", true, "Select", "");
414 }
415 
416 /* ************************** registration - operator types **********************************/
417 
419 {
420  /* view */
422 
427 
430 
433 
434  /* keyframes */
435  /* selection */
446 
447  /* editing */
466 
469 
472 
473  /* F-Curve Modifiers */
477 
478  /* Drivers */
482 }
483 
485 {
487  wmOperatorTypeMacro *otmacro;
488 
489  ot = WM_operatortype_append_macro("GRAPH_OT_duplicate_move",
490  "Duplicate",
491  "Make a copy of all selected keyframes and move them",
493  WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
494  otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
495  RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
496  RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
497 }
498 
499 /* ************************** registration - keymaps **********************************/
500 
502 {
503  /* keymap for all regions */
504  WM_keymap_ensure(keyconf, "Graph Editor Generic", SPACE_GRAPH, 0);
505 
506  /* channels */
507  /* Channels are not directly handled by the Graph Editor module,
508  * but are inherited from the Animation module.
509  * All the relevant operations, keymaps, drawing, etc.
510  * can therefore all be found in that module instead,
511  * as these are all used for the Graph Editor too.
512  */
513 
514  /* keyframes */
515  WM_keymap_ensure(keyconf, "Graph Editor", SPACE_GRAPH, 0);
516 }
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
struct SpaceGraph * CTX_wm_space_graph(const bContext *C)
Definition: context.c:863
struct bScreen * CTX_wm_screen(const bContext *C)
Definition: context.c:709
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:725
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:547
MINLINE int round_fl_to_int(float a)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_AUDIO_SEEK
Definition: DNA_ID.h:660
#define SCER_LOCK_FRAME_SELECTION
#define SUBFRA
#define CFRA
#define PSFRA
#define MAXFRAMEF
#define MINAFRAMEF
#define PEFRA
@ SPACE_GRAPH
@ SIPO_MODE_DRIVERS
#define FRAMENUMBER_MIN_CLAMP(cfra)
@ OPERATOR_CANCELLED
@ OPERATOR_FINISHED
@ OPERATOR_RUNNING_MODAL
@ ACHANNEL_SETFLAG_ADD
Definition: ED_anim_api.h:510
@ ACHANNEL_SETFLAG_CLEAR
Definition: ED_anim_api.h:508
@ ANIMTYPE_OBJECT
Definition: ED_anim_api.h:205
@ ACHANNEL_SETTING_VISIBLE
Definition: ED_anim_api.h:525
@ ACHANNEL_SETTING_SELECT
Definition: ED_anim_api.h:519
@ ANIMFILTER_UNSEL
Definition: ED_anim_api.h:312
@ ANIMFILTER_DATA_VISIBLE
Definition: ED_anim_api.h:295
@ ANIMFILTER_CURVE_VISIBLE
Definition: ED_anim_api.h:300
@ ANIMFILTER_LIST_VISIBLE
Definition: ED_anim_api.h:298
@ ANIMFILTER_LIST_CHANNELS
Definition: ED_anim_api.h:303
@ ANIMFILTER_NODUPLIS
Definition: ED_anim_api.h:328
@ ANIMFILTER_SEL
Definition: ED_anim_api.h:311
bool ED_operator_graphedit_active(struct bContext *C)
Definition: screen_ops.c:314
@ TFM_TIME_DUPLICATE
Definition: ED_transform.h:69
Group RGB to Bright Vector Camera CLAMP
#define C
Definition: RandGen.cpp:39
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
@ OPTYPE_BLOCKING
Definition: WM_types.h:157
@ OPTYPE_UNDO
Definition: WM_types.h:155
@ OPTYPE_REGISTER
Definition: WM_types.h:153
@ OPTYPE_GRAB_CURSOR_X
Definition: WM_types.h:163
#define NC_ANIMATION
Definition: WM_types.h:289
#define NC_SCENE
Definition: WM_types.h:279
#define NA_EDITED
Definition: WM_types.h:462
#define ND_FRAME
Definition: WM_types.h:334
#define ND_ANIMCHAN
Definition: WM_types.h:396
#define KM_RELEASE
Definition: WM_types.h:243
void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting)
void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
void ANIM_animdata_freelist(ListBase *anim_data)
Definition: anim_deps.c:425
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
Definition: anim_filter.c:405
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
Definition: anim_filter.c:3442
Scene scene
void GRAPH_OT_delete(wmOperatorType *ot)
Definition: graph_edit.c:766
void GRAPH_OT_click_insert(wmOperatorType *ot)
Definition: graph_edit.c:418
void GRAPH_OT_fmodifier_paste(wmOperatorType *ot)
Definition: graph_edit.c:2829
void GRAPH_OT_smooth(wmOperatorType *ot)
Definition: graph_edit.c:2556
void GRAPH_OT_snap_cursor_value(wmOperatorType *ot)
Definition: graph_edit.c:2179
void GRAPH_OT_mirror(wmOperatorType *ot)
Definition: graph_edit.c:2494
void GRAPH_OT_sample(wmOperatorType *ot)
Definition: graph_edit.c:1312
void GRAPH_OT_bake(wmOperatorType *ot)
Definition: graph_edit.c:927
void GRAPH_OT_fmodifier_copy(wmOperatorType *ot)
Definition: graph_edit.c:2738
void GRAPH_OT_handle_type(wmOperatorType *ot)
Definition: graph_edit.c:1681
void GRAPH_OT_frame_jump(wmOperatorType *ot)
Definition: graph_edit.c:2139
void GRAPH_OT_driver_variables_copy(wmOperatorType *ot)
Definition: graph_edit.c:2883
void GRAPH_OT_extrapolation_type(wmOperatorType *ot)
Definition: graph_edit.c:1445
void GRAPH_OT_unbake(wmOperatorType *ot)
Definition: graph_edit.c:1004
void GRAPH_OT_driver_variables_paste(wmOperatorType *ot)
Definition: graph_edit.c:2931
void GRAPH_OT_interpolation_type(wmOperatorType *ot)
Definition: graph_edit.c:1521
void GRAPH_OT_easing_type(wmOperatorType *ot)
Definition: graph_edit.c:1596
void GRAPH_OT_copy(wmOperatorType *ot)
Definition: graph_edit.c:539
void GRAPH_OT_driver_delete_invalid(wmOperatorType *ot)
Definition: graph_edit.c:3032
void GRAPH_OT_keyframe_insert(wmOperatorType *ot)
Definition: graph_edit.c:276
void GRAPH_OT_sound_bake(wmOperatorType *ot)
Definition: graph_edit.c:1160
void GRAPH_OT_duplicate(wmOperatorType *ot)
Definition: graph_edit.c:681
void GRAPH_OT_euler_filter(wmOperatorType *ot)
Definition: graph_edit.c:2017
void GRAPH_OT_clean(wmOperatorType *ot)
Definition: graph_edit.c:836
void GRAPH_OT_snap(wmOperatorType *ot)
Definition: graph_edit.c:2331
void GRAPH_OT_fmodifier_add(wmOperatorType *ot)
Definition: graph_edit.c:2669
void GRAPH_OT_paste(wmOperatorType *ot)
Definition: graph_edit.c:594
void GRAPH_OT_select_linked(struct wmOperatorType *ot)
void GRAPH_OT_select_box(struct wmOperatorType *ot)
Definition: graph_select.c:736
void GRAPH_OT_decimate(struct wmOperatorType *ot)
void GRAPH_OT_select_column(struct wmOperatorType *ot)
void GRAPH_OT_ghost_curves_create(struct wmOperatorType *ot)
Definition: graph_view.c:478
void GRAPH_OT_select_lasso(struct wmOperatorType *ot)
Definition: graph_select.c:828
void GRAPH_OT_previewrange_set(struct wmOperatorType *ot)
Definition: graph_view.c:228
void GRAPH_OT_select_more(struct wmOperatorType *ot)
void GRAPH_OT_select_circle(struct wmOperatorType *ot)
Definition: graph_select.c:905
void GRAPH_OT_clickselect(struct wmOperatorType *ot)
void GRAPH_OT_select_less(struct wmOperatorType *ot)
void GRAPH_OT_view_frame(struct wmOperatorType *ot)
Definition: graph_view.c:359
void GRAPH_OT_view_selected(struct wmOperatorType *ot)
Definition: graph_view.c:327
void GRAPH_OT_select_leftright(struct wmOperatorType *ot)
void GRAPH_OT_view_all(struct wmOperatorType *ot)
Definition: graph_view.c:304
void GRAPH_OT_ghost_curves_clear(struct wmOperatorType *ot)
Definition: graph_view.c:523
void GRAPH_OT_select_all(struct wmOperatorType *ot)
Definition: graph_select.c:475
void ED_operatormacros_graph(void)
Definition: graph_ops.c:484
void graphedit_keymap(wmKeyConfig *keyconf)
Definition: graph_ops.c:501
static int graphview_curves_hide_exec(bContext *C, wmOperator *op)
Definition: graph_ops.c:230
static void graphview_cursor_apply(bContext *C, wmOperator *op)
Definition: graph_ops.c:72
static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *event)
Definition: graph_ops.c:168
static int graphview_cursor_exec(bContext *C, wmOperator *op)
Definition: graph_ops.c:117
static void graphview_cursor_setprops(bContext *C, wmOperator *op, const wmEvent *event)
Definition: graph_ops.c:126
static void GRAPH_OT_cursor_set(wmOperatorType *ot)
Definition: graph_ops.c:207
static void GRAPH_OT_hide(wmOperatorType *ot)
Definition: graph_ops.c:319
void graphedit_operatortypes(void)
Definition: graph_ops.c:418
static void GRAPH_OT_reveal(wmOperatorType *ot)
Definition: graph_ops.c:399
static int graphview_curves_reveal_exec(bContext *C, wmOperator *op)
Definition: graph_ops.c:340
static bool graphview_cursor_poll(bContext *C)
Definition: graph_ops.c:61
static int graphview_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Definition: graph_ops.c:146
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
Definition: rna_access.c:6272
float RNA_float_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6355
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
Definition: rna_access.c:6366
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
Definition: rna_access.c:6413
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:3825
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3481
void * first
Definition: DNA_listBase.h:47
struct RenderData r
short datatype
Definition: ED_anim_api.h:75
void * data
Definition: ED_anim_api.h:73
struct bAnimListElem * next
Definition: ED_anim_api.h:135
char scrubbing
short val
Definition: WM_types.h:579
int mval[2]
Definition: WM_types.h:583
short type
Definition: WM_types.h:577
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:752
const char * name
Definition: WM_types.h:721
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:768
const char * idname
Definition: WM_types.h:723
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:776
struct StructRNA * srna
Definition: WM_types.h:802
const char * description
Definition: WM_types.h:726
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:736
struct PointerRNA * ptr
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: util_avxb.h:167
#define G(x, y, z)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
@ RIGHTMOUSE
@ MOUSEMOVE
@ LEFTMOUSE
@ MIDDLEMOUSE
@ EVT_ESCKEY
wmOperatorType * ot
Definition: wm_files.c:3156
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))