Blender  V3.3
anim_ops.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #include <math.h>
9 #include <stdlib.h>
10 
11 #include "BLI_sys_types.h"
12 
13 #include "BLI_math_base.h"
14 #include "BLI_utildefines.h"
15 
16 #include "DNA_scene_types.h"
17 
18 #include "BKE_context.h"
19 #include "BKE_global.h"
20 #include "BKE_report.h"
21 #include "BKE_scene.h"
22 
23 #include "UI_view2d.h"
24 
25 #include "RNA_access.h"
26 #include "RNA_define.h"
27 
28 #include "WM_api.h"
29 #include "WM_types.h"
30 
31 #include "ED_anim_api.h"
32 #include "ED_screen.h"
33 #include "ED_sequencer.h"
34 #include "ED_time_scrub_ui.h"
35 
36 #include "DEG_depsgraph.h"
37 
38 #include "SEQ_iterator.h"
39 #include "SEQ_sequencer.h"
40 #include "SEQ_time.h"
41 
42 #include "anim_intern.h"
43 
44 /* ********************** frame change operator ***************************/
45 
46 /* Check if the operator can be run from the current context */
48 {
50 
51  /* XXX temp? prevent changes during render */
52  if (G.is_rendering) {
53  return false;
54  }
55 
56  /* although it's only included in keymaps for regions using ED_KEYMAP_ANIMATION,
57  * this shouldn't show up in 3D editor (or others without 2D timeline view) via search
58  */
59  if (area) {
60  if (ELEM(area->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_CLIP)) {
61  return true;
62  }
63  if (area->spacetype == SPACE_SEQ) {
64  /* Check the region type so tools (which are shared between preview/strip view)
65  * don't conflict with actions which can have the same key bound (2D cursor for example). */
66  const ARegion *region = CTX_wm_region(C);
67  if (region && region->regiontype == RGN_TYPE_WINDOW) {
68  return true;
69  }
70  }
71  if (area->spacetype == SPACE_GRAPH) {
72  const SpaceGraph *sipo = area->spacedata.first;
73  /* Driver Editor's X axis is not time. */
74  if (sipo->mode != SIPO_MODE_DRIVERS) {
75  return true;
76  }
77  }
78  }
79 
80  CTX_wm_operator_poll_msg_set(C, "Expected an animation area to be active");
81  return false;
82 }
83 
85 {
86  const int snap_distance = SEQ_tool_settings_snap_distance_get(CTX_data_scene(C));
87  const ARegion *region = CTX_wm_region(C);
88  return round_fl_to_int(UI_view2d_region_to_view_x(&region->v2d, snap_distance) -
89  UI_view2d_region_to_view_x(&region->v2d, 0));
90 }
91 
92 static void seq_frame_snap_update_best(const int position,
93  const int timeline_frame,
94  int *r_best_frame,
95  int *r_best_distance)
96 {
97  if (abs(position - timeline_frame) < *r_best_distance) {
98  *r_best_distance = abs(position - timeline_frame);
99  *r_best_frame = position;
100  }
101 }
102 
103 static int seq_frame_apply_snap(bContext *C, Scene *scene, const int timeline_frame)
104 {
105 
107  SeqCollection *strips = SEQ_query_all_strips(seqbase);
108 
109  int best_frame = 0;
110  int best_distance = MAXFRAME;
111  Sequence *seq;
112  SEQ_ITERATOR_FOREACH (seq, strips) {
114  SEQ_time_left_handle_frame_get(scene, seq), timeline_frame, &best_frame, &best_distance);
116  SEQ_time_right_handle_frame_get(scene, seq), timeline_frame, &best_frame, &best_distance);
117  }
118  SEQ_collection_free(strips);
119 
120  if (best_distance < seq_snap_threshold_get_frame_distance(C)) {
121  return best_frame;
122  }
123 
124  return timeline_frame;
125 }
126 
127 /* Set the new frame number */
129 {
131  float frame = RNA_float_get(op->ptr, "frame");
132  bool do_snap = RNA_boolean_get(op->ptr, "snap");
133 
134  if (do_snap) {
136  frame = seq_frame_apply_snap(C, scene, frame);
137  }
138  else {
139  frame = BKE_scene_frame_snap_by_seconds(scene, 1.0, frame);
140  }
141  }
142 
143  /* set the new frame number */
144  if (scene->r.flag & SCER_SHOW_SUBFRAME) {
145  scene->r.cfra = (int)frame;
146  scene->r.subframe = frame - (int)frame;
147  }
148  else {
149  scene->r.cfra = round_fl_to_int(frame);
150  scene->r.subframe = 0.0f;
151  }
153 
154  /* do updates */
157 }
158 
159 /* ---- */
160 
161 /* Non-modal callback for running operator without user input */
163 {
164  change_frame_apply(C, op);
165 
166  return OPERATOR_FINISHED;
167 }
168 
169 /* ---- */
170 
171 /* Get frame from mouse coordinates */
172 static float frame_from_event(bContext *C, const wmEvent *event)
173 {
174  ARegion *region = CTX_wm_region(C);
176  float frame;
177 
178  /* convert from region coordinates to View2D 'tot' space */
179  frame = UI_view2d_region_to_view_x(&region->v2d, event->mval[0]);
180 
181  /* respect preview range restrictions (if only allowed to move around within that range) */
183  CLAMP(frame, PSFRA, PEFRA);
184  }
185 
186  return frame;
187 }
188 
190 {
192  bScreen *screen = CTX_wm_screen(C);
193  if (area && area->spacetype == SPACE_SEQ) {
194  SpaceSeq *sseq = area->spacedata.first;
195  ARegion *region = CTX_wm_region(C);
197  !ED_time_scrub_event_in_region(region, event)) {
199  }
200  }
201  if (screen) {
202  screen->scrubbing = true;
203  }
204 }
205 
207 {
208  bScreen *screen = CTX_wm_screen(C);
209  bool notify = false;
210 
211  if (screen->scrubbing) {
212  screen->scrubbing = false;
213  notify = true;
214  }
215 
218  notify = true;
219  }
220 
221  if (notify) {
224  }
225 }
226 
228 {
229  if (!CTX_wm_space_seq(C)) {
230  return false;
231  }
232 
234  short snap_flag = SEQ_tool_settings_snap_flag_get(scene);
235  return (scene->toolsettings->snap_flag_seq & SCE_SNAP) &&
236  (snap_flag & SEQ_SNAP_CURRENT_FRAME_TO_STRIPS);
237 }
238 
239 /* Modal Operator init */
240 static int change_frame_invoke(bContext *C, wmOperator *op, const wmEvent *event)
241 {
242  ARegion *region = CTX_wm_region(C);
243  if (CTX_wm_space_seq(C) != NULL && region->regiontype == RGN_TYPE_PREVIEW) {
244  return OPERATOR_CANCELLED;
245  }
246 
247  /* Change to frame that mouse is over before adding modal handler,
248  * as user could click on a single frame (jump to frame) as well as
249  * click-dragging over a range (modal scrubbing).
250  */
251  RNA_float_set(op->ptr, "frame", frame_from_event(C, event));
252 
253  if (use_sequencer_snapping(C)) {
254  RNA_boolean_set(op->ptr, "snap", true);
255  }
256 
258 
259  change_frame_apply(C, op);
260 
261  /* add temp handler */
263 
264  return OPERATOR_RUNNING_MODAL;
265 }
266 
268 {
270 }
271 
272 /* Modal event handling of frame changing */
273 static int change_frame_modal(bContext *C, wmOperator *op, const wmEvent *event)
274 {
276  /* execute the events */
277  switch (event->type) {
278  case EVT_ESCKEY:
280  break;
281 
282  case MOUSEMOVE:
283  RNA_float_set(op->ptr, "frame", frame_from_event(C, event));
284  change_frame_apply(C, op);
285  break;
286 
287  case LEFTMOUSE:
288  case RIGHTMOUSE:
289  case MIDDLEMOUSE:
290  /* We check for either mouse-button to end, to work with all user keymaps. */
291  if (event->val == KM_RELEASE) {
293  }
294  break;
295 
296  case EVT_LEFTCTRLKEY:
297  case EVT_RIGHTCTRLKEY:
298  /* Use Ctrl key to invert snapping in sequencer. */
299  if (use_sequencer_snapping(C)) {
300  if (event->val == KM_RELEASE) {
301  RNA_boolean_set(op->ptr, "snap", true);
302  }
303  else if (event->val == KM_PRESS) {
304  RNA_boolean_set(op->ptr, "snap", false);
305  }
306  }
307  else {
308  if (event->val == KM_RELEASE) {
309  RNA_boolean_set(op->ptr, "snap", false);
310  }
311  else if (event->val == KM_PRESS) {
312  RNA_boolean_set(op->ptr, "snap", true);
313  }
314  }
315  break;
316  }
317 
318  if (ret != OPERATOR_RUNNING_MODAL) {
320  }
321 
322  return ret;
323 }
324 
326 {
327  PropertyRNA *prop;
328 
329  /* identifiers */
330  ot->name = "Change Frame";
331  ot->idname = "ANIM_OT_change_frame";
332  ot->description = "Interactively change the current frame number";
333 
334  /* api callbacks */
340 
341  /* flags */
343  ot->undo_group = "Frame Change";
344 
345  /* rna */
346  ot->prop = RNA_def_float(
347  ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
348  prop = RNA_def_boolean(ot->srna, "snap", false, "Snap", "");
350 }
351 
352 /* ****************** Start/End Frame Operators *******************************/
353 
355 {
357 
358  /* XXX temp? prevent changes during render */
359  if (G.is_rendering) {
360  return false;
361  }
362 
363  /* although it's only included in keymaps for regions using ED_KEYMAP_ANIMATION,
364  * this shouldn't show up in 3D editor (or others without 2D timeline view) via search
365  */
366  if (area) {
368  return true;
369  }
370  }
371 
372  CTX_wm_operator_poll_msg_set(C, "Expected an animation area to be active");
373  return false;
374 }
375 
377 {
379  int frame;
380 
381  if (scene == NULL) {
382  return OPERATOR_CANCELLED;
383  }
384 
385  frame = scene->r.cfra;
386 
387  /* if Preview Range is defined, set the 'start' frame for that */
388  if (PRVRANGEON) {
389  scene->r.psfra = frame;
390  }
391  else {
392  /* Clamping should be in sync with 'rna_Scene_start_frame_set()'. */
393  int frame_clamped = frame;
394  CLAMP(frame_clamped, MINFRAME, MAXFRAME);
395  if (frame_clamped != frame) {
396  BKE_report(op->reports, RPT_WARNING, "Start frame clamped to valid rendering range");
397  }
398  frame = frame_clamped;
399  scene->r.sfra = frame;
400  }
401 
402  if (PEFRA < frame) {
403  if (PRVRANGEON) {
404  scene->r.pefra = frame;
405  }
406  else {
407  scene->r.efra = frame;
408  }
409  }
410 
412 
413  return OPERATOR_FINISHED;
414 }
415 
417 {
418  /* identifiers */
419  ot->name = "Set Start Frame";
420  ot->idname = "ANIM_OT_start_frame_set";
421  ot->description = "Set the current frame as the preview or scene start frame";
422 
423  /* api callbacks */
426 
427  /* flags */
429 }
430 
432 {
434  int frame;
435 
436  if (scene == NULL) {
437  return OPERATOR_CANCELLED;
438  }
439 
440  frame = scene->r.cfra;
441 
442  /* if Preview Range is defined, set the 'end' frame for that */
443  if (PRVRANGEON) {
444  scene->r.pefra = frame;
445  }
446  else {
447  /* Clamping should be in sync with 'rna_Scene_end_frame_set()'. */
448  int frame_clamped = frame;
449  CLAMP(frame_clamped, MINFRAME, MAXFRAME);
450  if (frame_clamped != frame) {
451  BKE_report(op->reports, RPT_WARNING, "End frame clamped to valid rendering range");
452  }
453  frame = frame_clamped;
454  scene->r.efra = frame;
455  }
456 
457  if (PSFRA > frame) {
458  if (PRVRANGEON) {
459  scene->r.psfra = frame;
460  }
461  else {
462  scene->r.sfra = frame;
463  }
464  }
465 
467 
468  return OPERATOR_FINISHED;
469 }
470 
472 {
473  /* identifiers */
474  ot->name = "Set End Frame";
475  ot->idname = "ANIM_OT_end_frame_set";
476  ot->description = "Set the current frame as the preview or scene end frame";
477 
478  /* api callbacks */
481 
482  /* flags */
484 }
485 
486 /* ****************** set preview range operator ****************************/
487 
489 {
491  ARegion *region = CTX_wm_region(C);
492  float sfra, efra;
493  rcti rect;
494 
495  /* get min/max values from box select rect (already in region coordinates, not screen) */
497 
498  /* convert min/max values to frames (i.e. region to 'tot' rect) */
499  sfra = UI_view2d_region_to_view_x(&region->v2d, rect.xmin);
500  efra = UI_view2d_region_to_view_x(&region->v2d, rect.xmax);
501 
502  /* set start/end frames for preview-range
503  * - must clamp within allowable limits
504  * - end must not be before start (though this won't occur most of the time)
505  */
506  FRAMENUMBER_MIN_CLAMP(sfra);
507  FRAMENUMBER_MIN_CLAMP(efra);
508  if (efra < sfra) {
509  efra = sfra;
510  }
511 
513  scene->r.psfra = round_fl_to_int(sfra);
514  scene->r.pefra = round_fl_to_int(efra);
515 
516  /* send notifiers */
518 
519  return OPERATOR_FINISHED;
520 }
521 
523 {
524  /* identifiers */
525  ot->name = "Set Preview Range";
526  ot->idname = "ANIM_OT_previewrange_set";
527  ot->description = "Interactively define frame range used for playback";
528 
529  /* api callbacks */
534 
536 
537  /* flags */
539 
540  /* rna */
541  /* used to define frame range.
542  *
543  * NOTE: border Y values are not used,
544  * but are needed by box_select gesture operator stuff */
546 }
547 
548 /* ****************** clear preview range operator ****************************/
549 
551 {
553  ScrArea *curarea = CTX_wm_area(C);
554 
555  /* sanity checks */
556  if (ELEM(NULL, scene, curarea)) {
557  return OPERATOR_CANCELLED;
558  }
559 
560  /* simply clear values */
561  scene->r.flag &= ~SCER_PRV_RANGE;
562  scene->r.psfra = 0;
563  scene->r.pefra = 0;
564 
565  ED_area_tag_redraw(curarea);
566 
567  /* send notifiers */
569 
570  return OPERATOR_FINISHED;
571 }
572 
574 {
575  /* identifiers */
576  ot->name = "Clear Preview Range";
577  ot->idname = "ANIM_OT_previewrange_clear";
578  ot->description = "Clear preview range";
579 
580  /* api callbacks */
582 
584 
585  /* flags */
587 }
588 
589 /* ************************** registration **********************************/
590 
592 {
593  /* Animation Editors only -------------------------- */
595 
598 
601 
602  /* Entire UI --------------------------------------- */
613 
619 
622 
627 
629 }
630 
632 {
633  WM_keymap_ensure(keyconf, "Animation", 0, 0);
634 }
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:738
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1090
struct SpaceSeq * CTX_wm_space_seq(const bContext *C)
Definition: context.c:851
struct bScreen * CTX_wm_screen(const bContext *C)
Definition: context.c:733
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:749
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
Definition: context.c:1042
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition: report.c:83
int BKE_scene_frame_snap_by_seconds(struct Scene *scene, double interval_in_seconds, int frame)
Definition: scene.cc:2354
MINLINE int round_fl_to_int(float a)
#define UNUSED(x)
#define ELEM(...)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_FRAME_CHANGE
Definition: DNA_ID.h:841
#define SCER_LOCK_FRAME_SELECTION
#define SEQ_SNAP_CURRENT_FRAME_TO_STRIPS
#define MINFRAME
#define MINAFRAME
#define PSFRA
#define SCER_PRV_RANGE
#define SCER_SHOW_SUBFRAME
@ SCE_SNAP
#define PRVRANGEON
#define PEFRA
#define MAXFRAME
@ RGN_TYPE_WINDOW
@ RGN_TYPE_PREVIEW
@ SPACE_CLIP
@ SPACE_ACTION
@ SPACE_NLA
@ SPACE_SEQ
@ SPACE_GRAPH
@ SIPO_MODE_DRIVERS
#define FRAMENUMBER_MIN_CLAMP(cfra)
@ OPERATOR_CANCELLED
@ OPERATOR_FINISHED
@ OPERATOR_RUNNING_MODAL
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:729
bool ED_operator_animview_active(struct bContext *C)
Definition: screen_ops.c:240
Sequence * ED_sequencer_special_preview_get(void)
bool ED_space_sequencer_check_show_strip(struct SpaceSeq *sseq)
void ED_sequencer_special_preview_set(struct bContext *C, const int mval[2])
void ED_sequencer_special_preview_clear(void)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
@ PROP_SKIP_SAVE
Definition: RNA_types.h:218
#define C
Definition: RandGen.cpp:25
#define SEQ_ITERATOR_FOREACH(var, collection)
Definition: SEQ_iterator.h:35
float UI_view2d_region_to_view_x(const struct View2D *v2d, float x)
Definition: view2d.cc:1655
@ KM_PRESS
Definition: WM_types.h:267
@ KM_RELEASE
Definition: WM_types.h:268
@ OPTYPE_BLOCKING
Definition: WM_types.h:150
@ OPTYPE_UNDO_GROUPED
Definition: WM_types.h:173
@ OPTYPE_UNDO
Definition: WM_types.h:148
@ OPTYPE_REGISTER
Definition: WM_types.h:146
@ OPTYPE_GRAB_CURSOR_X
Definition: WM_types.h:156
#define NC_SCENE
Definition: WM_types.h:328
#define ND_FRAME
Definition: WM_types.h:382
void ANIM_OT_keyframe_delete_button(struct wmOperatorType *ot)
Definition: keyframing.c:2762
void ANIM_OT_keyframe_delete_by_name(struct wmOperatorType *ot)
Definition: keyframing.c:2244
void ANIM_OT_keyframe_insert_button(struct wmOperatorType *ot)
Definition: keyframing.c:2651
void ANIM_OT_keying_set_add(struct wmOperatorType *ot)
Definition: keyingsets.c:118
void ANIM_OT_paste_driver_button(struct wmOperatorType *ot)
Definition: drivers.c:1255
void ANIM_OT_copy_driver_button(struct wmOperatorType *ot)
Definition: drivers.c:1205
void ANIM_OT_driver_button_remove(struct wmOperatorType *ot)
Definition: drivers.c:1123
void ANIM_OT_keyingset_button_remove(struct wmOperatorType *ot)
Definition: keyingsets.c:437
void ANIM_OT_keyframe_clear_v3d(struct wmOperatorType *ot)
Definition: keyframing.c:2339
void ANIM_OT_keyingset_button_add(struct wmOperatorType *ot)
Definition: keyingsets.c:356
void ANIM_OT_keying_set_path_remove(struct wmOperatorType *ot)
Definition: keyingsets.c:252
void ANIM_OT_keyframe_insert(struct wmOperatorType *ot)
Definition: keyframing.c:2021
void ANIM_OT_keyframe_clear_button(struct wmOperatorType *ot)
Definition: keyframing.c:2829
void ANIM_OT_driver_button_edit(struct wmOperatorType *ot)
Definition: drivers.c:1160
void ANIM_OT_driver_button_add(struct wmOperatorType *ot)
Definition: drivers.c:1070
void ANIM_OT_keying_set_path_add(struct wmOperatorType *ot)
Definition: keyingsets.c:209
void ANIM_OT_keying_set_active_set(struct wmOperatorType *ot)
Definition: keyingsets.c:486
void ANIM_OT_keyframe_delete_v3d(struct wmOperatorType *ot)
Definition: keyframing.c:2480
void ANIM_OT_keyframe_delete(struct wmOperatorType *ot)
Definition: keyframing.c:2219
void ANIM_OT_keyframe_insert_menu(struct wmOperatorType *ot)
Definition: keyframing.c:2133
void ANIM_OT_keying_set_remove(struct wmOperatorType *ot)
Definition: keyingsets.c:166
void ANIM_OT_keyframe_insert_by_name(struct wmOperatorType *ot)
Definition: keyframing.c:2046
static int change_frame_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Definition: anim_ops.c:240
static int seq_frame_apply_snap(bContext *C, Scene *scene, const int timeline_frame)
Definition: anim_ops.c:103
static void ANIM_OT_previewrange_set(wmOperatorType *ot)
Definition: anim_ops.c:522
static bool anim_set_end_frames_poll(bContext *C)
Definition: anim_ops.c:354
static void ANIM_OT_previewrange_clear(wmOperatorType *ot)
Definition: anim_ops.c:573
static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op))
Definition: anim_ops.c:550
static bool use_sequencer_snapping(bContext *C)
Definition: anim_ops.c:227
static int anim_set_sfra_exec(bContext *C, wmOperator *op)
Definition: anim_ops.c:376
static void seq_frame_snap_update_best(const int position, const int timeline_frame, int *r_best_frame, int *r_best_distance)
Definition: anim_ops.c:92
static void ANIM_OT_start_frame_set(wmOperatorType *ot)
Definition: anim_ops.c:416
static int change_frame_exec(bContext *C, wmOperator *op)
Definition: anim_ops.c:162
static int anim_set_efra_exec(bContext *C, wmOperator *op)
Definition: anim_ops.c:431
static void ANIM_OT_end_frame_set(wmOperatorType *ot)
Definition: anim_ops.c:471
static void change_frame_cancel(bContext *C, wmOperator *UNUSED(op))
Definition: anim_ops.c:267
static int previewrange_define_exec(bContext *C, wmOperator *op)
Definition: anim_ops.c:488
static float frame_from_event(bContext *C, const wmEvent *event)
Definition: anim_ops.c:172
void ED_operatortypes_anim(void)
Definition: anim_ops.c:591
static int change_frame_modal(bContext *C, wmOperator *op, const wmEvent *event)
Definition: anim_ops.c:273
void ED_keymap_anim(wmKeyConfig *keyconf)
Definition: anim_ops.c:631
static bool change_frame_poll(bContext *C)
Definition: anim_ops.c:47
static void ANIM_OT_change_frame(wmOperatorType *ot)
Definition: anim_ops.c:325
static void change_frame_seq_preview_end(bContext *C)
Definition: anim_ops.c:206
static int seq_snap_threshold_get_frame_distance(bContext *C)
Definition: anim_ops.c:84
static void change_frame_apply(bContext *C, wmOperator *op)
Definition: anim_ops.c:128
static void change_frame_seq_preview_begin(bContext *C, const wmEvent *event)
Definition: anim_ops.c:189
Scene scene
SeqCollection * SEQ_query_all_strips(ListBase *seqbase)
Definition: iterator.c:206
void SEQ_collection_free(SeqCollection *collection)
Definition: iterator.c:81
#define G(x, y, z)
static void area(int d1, int d2, int e1, int e2, float weights[2])
T abs(const T &a)
return ret
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
Definition: rna_access.c:4874
float RNA_float_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4957
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
Definition: rna_access.c:4968
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4863
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:3836
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Definition: sequencer.c:388
int SEQ_tool_settings_snap_distance_get(Scene *scene)
Definition: sequencer.c:364
short SEQ_tool_settings_snap_flag_get(Scene *scene)
Definition: sequencer.c:358
Editing * SEQ_editing_get(const Scene *scene)
Definition: sequencer.c:241
int SEQ_time_left_handle_frame_get(const Scene *UNUSED(scene), const Sequence *seq)
Definition: strip_time.c:506
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
Definition: strip_time.c:515
short regiontype
struct ToolSettings * toolsettings
struct RenderData r
char scrubbing
int xmin
Definition: DNA_vec_types.h:63
int xmax
Definition: DNA_vec_types.h:63
short val
Definition: WM_types.h:680
int mval[2]
Definition: WM_types.h:684
short type
Definition: WM_types.h:678
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:919
const char * name
Definition: WM_types.h:888
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:935
const char * idname
Definition: WM_types.h:890
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:943
void(* cancel)(struct bContext *, struct wmOperator *)
Definition: WM_types.h:927
struct StructRNA * srna
Definition: WM_types.h:969
const char * description
Definition: WM_types.h:893
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:903
PropertyRNA * prop
Definition: WM_types.h:981
const char * undo_group
Definition: WM_types.h:895
struct ReportList * reports
struct PointerRNA * ptr
bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
@ RIGHTMOUSE
@ EVT_RIGHTCTRLKEY
@ EVT_LEFTCTRLKEY
@ MOUSEMOVE
@ LEFTMOUSE
@ MIDDLEMOUSE
@ EVT_ESCKEY
wmOperatorType * ot
Definition: wm_files.c:3479
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
void WM_operator_properties_border(wmOperatorType *ot)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))