Blender  V3.3
view3d_navigate_smoothview.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "DNA_camera_types.h"
8 
9 #include "MEM_guardedalloc.h"
10 
11 #include "BLI_listbase.h"
12 #include "BLI_math.h"
13 
14 #include "BKE_context.h"
15 
16 #include "DEG_depsgraph_query.h"
17 
18 #include "WM_api.h"
19 
20 #include "ED_screen.h"
21 
22 #include "view3d_intern.h"
23 #include "view3d_navigate.h" /* own include */
24 
26  View3D *v3d,
27  ARegion *region,
28  bool sync_boxview,
29  bool use_autokey,
30  const float step,
31  const bool finished);
32 
33 /* -------------------------------------------------------------------- */
49 {
50  const View3D *v3d = area->spacedata.first;
51  Object *camera = v3d->camera;
52  if (!camera) {
53  return;
54  }
55 
56  /* Tag the camera object so it's known smooth-view is applied to the view-ports camera
57  * (needed to detect when a locked camera is being manipulated).
58  * NOTE: It doesn't matter if the actual object being manipulated is the camera or not. */
59  camera->id.tag &= ~LIB_TAG_DOIT;
60 
61  LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
62  if (region->regiontype != RGN_TYPE_WINDOW) {
63  continue;
64  }
65  RegionView3D *rv3d = region->regiondata;
66  if (ED_view3d_camera_lock_undo_test(v3d, rv3d, C)) {
67  camera->id.tag |= LIB_TAG_DOIT;
68  break;
69  }
70  }
71 }
72 
74  ScrArea *area,
75  const char *undo_str,
76  const bool undo_grouped)
77 {
78  View3D *v3d = area->spacedata.first;
79  Object *camera = v3d->camera;
80  if (!camera) {
81  return;
82  }
83  if (camera->id.tag & LIB_TAG_DOIT) {
84  /* Smooth view didn't touch the camera. */
85  camera->id.tag &= ~LIB_TAG_DOIT;
86  return;
87  }
88 
89  if ((U.uiflag & USER_GLOBALUNDO) == 0) {
90  return;
91  }
92 
93  /* NOTE(@campbellbarton): It is not possible that a single viewport references different cameras
94  * so even in the case there is a quad-view with multiple camera views set, these will all
95  * reference the same camera. In this case it doesn't matter which region is used.
96  * If in the future multiple cameras are supported, this logic can be extended. */
97  ARegion *region_camera = NULL;
98 
99  /* An undo push should be performed. */
100  bool is_interactive = false;
101  LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
102  if (region->regiontype != RGN_TYPE_WINDOW) {
103  continue;
104  }
105  RegionView3D *rv3d = region->regiondata;
106  if (ED_view3d_camera_lock_undo_test(v3d, rv3d, C)) {
107  region_camera = region;
108  if (rv3d->sms) {
109  is_interactive = true;
110  }
111  }
112  }
113 
114  if (region_camera == NULL) {
115  return;
116  }
117 
118  /* Arguments to #view3d_smoothview_apply_ex to temporarily apply transformation. */
119  const bool sync_boxview = false;
120  const bool use_autokey = false;
121  const bool finished = false;
122 
123  /* Fast forward, undo push, then rewind. */
124  if (is_interactive) {
125  view3d_smoothview_apply_ex(C, v3d, region_camera, sync_boxview, use_autokey, 1.0f, finished);
126  }
127 
128  RegionView3D *rv3d = region_camera->regiondata;
129  if (undo_grouped) {
130  ED_view3d_camera_lock_undo_grouped_push(undo_str, v3d, rv3d, C);
131  }
132  else {
133  ED_view3d_camera_lock_undo_push(undo_str, v3d, rv3d, C);
134  }
135 
136  if (is_interactive) {
137  view3d_smoothview_apply_ex(C, v3d, region_camera, sync_boxview, use_autokey, 0.0f, finished);
138  }
139 }
140 
143 /* -------------------------------------------------------------------- */
149 /* This operator is one of the 'timer refresh' ones like animation playback */
150 
152  float dist;
153  float lens;
154  float quat[4];
155  float ofs[3];
156 };
157 
159  /* Source. */
160  struct SmoothView3DState src; /* source */
161  struct SmoothView3DState dst; /* destination */
162  struct SmoothView3DState org; /* original */
163 
164  bool to_camera;
165 
167  float dyn_ofs[3];
168 
169  /* When smooth-view is enabled, store the 'rv3d->view' here,
170  * assign back when the view motion is completed. */
171  char org_view;
172 
173  double time_allowed;
174 };
175 
177  const View3D *v3d,
178  const RegionView3D *rv3d)
179 {
180  copy_v3_v3(sms_state->ofs, rv3d->ofs);
181  copy_qt_qt(sms_state->quat, rv3d->viewquat);
182  sms_state->dist = rv3d->dist;
183  sms_state->lens = v3d->lens;
184 }
185 
186 static void view3d_smooth_view_state_restore(const struct SmoothView3DState *sms_state,
187  View3D *v3d,
188  RegionView3D *rv3d)
189 {
190  copy_v3_v3(rv3d->ofs, sms_state->ofs);
191  copy_qt_qt(rv3d->viewquat, sms_state->quat);
192  rv3d->dist = sms_state->dist;
193  v3d->lens = sms_state->lens;
194 }
195 
196 /* will start timer if appropriate */
198  /* avoid passing in the context */
199  const Depsgraph *depsgraph,
200  wmWindowManager *wm,
201  wmWindow *win,
202  ScrArea *area,
203  View3D *v3d,
204  ARegion *region,
205  const int smooth_viewtx,
206  const V3D_SmoothParams *sview)
207 {
208  /* In this case use #ED_view3d_smooth_view_undo_begin & end functions
209  * instead of passing in undo. */
210  BLI_assert_msg(sview->undo_str == NULL,
211  "Only the 'ED_view3d_smooth_view' version of this function handles undo!");
212 
213  RegionView3D *rv3d = region->regiondata;
214  struct SmoothView3DStore sms = {{0}};
215 
216  /* initialize sms */
217  view3d_smooth_view_state_backup(&sms.dst, v3d, rv3d);
218  view3d_smooth_view_state_backup(&sms.src, v3d, rv3d);
219  /* If smooth-view runs multiple times. */
220  if (rv3d->sms == NULL) {
221  view3d_smooth_view_state_backup(&sms.org, v3d, rv3d);
222  }
223  else {
224  sms.org = rv3d->sms->org;
225  }
226  sms.org_view = rv3d->view;
227 
228  /* sms.to_camera = false; */ /* initialized to zero anyway */
229 
230  /* note on camera locking, this is a little confusing but works ok.
231  * we may be changing the view 'as if' there is no active camera, but in fact
232  * there is an active camera which is locked to the view.
233  *
234  * In the case where smooth view is moving _to_ a camera we don't want that
235  * camera to be moved or changed, so only when the camera is not being set should
236  * we allow camera option locking to initialize the view settings from the camera.
237  */
238  if (sview->camera == NULL && sview->camera_old == NULL) {
240  }
241 
242  /* store the options we want to end with */
243  if (sview->ofs) {
244  copy_v3_v3(sms.dst.ofs, sview->ofs);
245  }
246  if (sview->quat) {
247  copy_qt_qt(sms.dst.quat, sview->quat);
248  }
249  if (sview->dist) {
250  sms.dst.dist = *sview->dist;
251  }
252  if (sview->lens) {
253  sms.dst.lens = *sview->lens;
254  }
255 
256  if (sview->dyn_ofs) {
257  BLI_assert(sview->ofs == NULL);
258  BLI_assert(sview->quat != NULL);
259 
260  copy_v3_v3(sms.dyn_ofs, sview->dyn_ofs);
261  sms.use_dyn_ofs = true;
262 
263  /* calculate the final destination offset */
264  view3d_orbit_apply_dyn_ofs(sms.dst.ofs, sms.src.ofs, sms.src.quat, sms.dst.quat, sms.dyn_ofs);
265  }
266 
267  if (sview->camera) {
268  Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, sview->camera);
269  if (sview->ofs != NULL) {
271  ob_camera_eval->obmat, sview->ofs, VIEW3D_DIST_FALLBACK);
272  }
273  ED_view3d_from_object(ob_camera_eval, sms.dst.ofs, sms.dst.quat, &sms.dst.dist, &sms.dst.lens);
274  sms.to_camera = true; /* restore view3d values in end */
275  }
276 
277  if ((sview->camera_old == sview->camera) && /* Camera. */
278  (sms.dst.dist == rv3d->dist) && /* Distance. */
279  (sms.dst.lens == v3d->lens) && /* Lens. */
280  equals_v3v3(sms.dst.ofs, rv3d->ofs) && /* Offset. */
281  equals_v4v4(sms.dst.quat, rv3d->viewquat) /* Rotation. */
282  ) {
283  /* Early return if nothing changed. */
284  return;
285  }
286 
287  /* Skip smooth viewing for external render engine draw. */
288  if (smooth_viewtx && !(v3d->shading.type == OB_RENDER && rv3d->render_engine)) {
289 
290  /* original values */
291  if (sview->camera_old) {
292  Object *ob_camera_old_eval = DEG_get_evaluated_object(depsgraph, sview->camera_old);
293  if (sview->ofs != NULL) {
294  sms.src.dist = ED_view3d_offset_distance(ob_camera_old_eval->obmat, sview->ofs, 0.0f);
295  }
297  ob_camera_old_eval, sms.src.ofs, sms.src.quat, &sms.src.dist, &sms.src.lens);
298  }
299  /* grid draw as floor */
300  if ((RV3D_LOCK_FLAGS(rv3d) & RV3D_LOCK_ROTATION) == 0) {
301  /* use existing if exists, means multiple calls to smooth view
302  * won't lose the original 'view' setting */
303  rv3d->view = RV3D_VIEW_USER;
304  }
305 
306  sms.time_allowed = (double)smooth_viewtx / 1000.0;
307 
308  /* If this is view rotation only we can decrease the time allowed by the angle between quats
309  * this means small rotations won't lag. */
310  if (sview->quat && !sview->ofs && !sview->dist) {
311  /* scale the time allowed by the rotation */
312  /* 180deg == 1.0 */
314  M_PI;
315  }
316 
317  /* ensure it shows correct */
318  if (sms.to_camera) {
319  /* use ortho if we move from an ortho view to an ortho camera */
320  Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, sview->camera);
321  rv3d->persp = (((rv3d->is_persp == false) && (ob_camera_eval->type == OB_CAMERA) &&
322  (((Camera *)ob_camera_eval->data)->type == CAM_ORTHO)) ?
323  RV3D_ORTHO :
324  RV3D_PERSP);
325  }
326 
327  rv3d->rflag |= RV3D_NAVIGATING;
328 
329  /* not essential but in some cases the caller will tag the area for redraw, and in that
330  * case we can get a flicker of the 'org' user view but we want to see 'src' */
331  view3d_smooth_view_state_restore(&sms.src, v3d, rv3d);
332 
333  /* keep track of running timer! */
334  if (rv3d->sms == NULL) {
335  rv3d->sms = MEM_mallocN(sizeof(struct SmoothView3DStore), "smoothview v3d");
336  }
337  *rv3d->sms = sms;
338  if (rv3d->smooth_timer) {
339  WM_event_remove_timer(wm, win, rv3d->smooth_timer);
340  }
341  /* #TIMER1 is hard-coded in key-map. */
342  rv3d->smooth_timer = WM_event_add_timer(wm, win, TIMER1, 1.0 / 100.0);
343  }
344  else {
345  /* Animation is disabled, apply immediately. */
346  if (sms.to_camera == false) {
347  copy_v3_v3(rv3d->ofs, sms.dst.ofs);
348  copy_qt_qt(rv3d->viewquat, sms.dst.quat);
349  rv3d->dist = sms.dst.dist;
350  v3d->lens = sms.dst.lens;
351 
353  }
354 
355  if (RV3D_LOCK_FLAGS(rv3d) & RV3D_BOXVIEW) {
356  view3d_boxview_copy(area, region);
357  }
358 
359  ED_region_tag_redraw(region);
360 
362  }
363 
364  if (sms.to_camera == false) {
365  /* See comments in #ED_view3d_smooth_view_undo_begin for why this is needed. */
366  if (v3d->camera) {
367  v3d->camera->id.tag &= ~LIB_TAG_DOIT;
368  }
369  }
370 }
371 
373  View3D *v3d,
374  ARegion *region,
375  const int smooth_viewtx,
376  const struct V3D_SmoothParams *sview)
377 {
380  wmWindow *win = CTX_wm_window(C);
382 
383  /* #ED_view3d_smooth_view_ex asserts this is not set as it doesn't support undo. */
384  struct V3D_SmoothParams sview_no_undo = *sview;
385  sview_no_undo.undo_str = NULL;
386  sview_no_undo.undo_grouped = false;
387 
388  const bool do_undo = (sview->undo_str != NULL);
389  if (do_undo) {
391  }
392 
393  ED_view3d_smooth_view_ex(depsgraph, wm, win, area, v3d, region, smooth_viewtx, &sview_no_undo);
394 
395  if (do_undo) {
397  }
398 }
399 
401  View3D *v3d,
402  ARegion *region,
403  bool sync_boxview,
404  bool use_autokey,
405  const float step,
406  const bool finished)
407 {
409  RegionView3D *rv3d = region->regiondata;
410  struct SmoothView3DStore *sms = rv3d->sms;
411 
412  /* end timer */
413  if (finished) {
414  wmWindow *win = CTX_wm_window(C);
415 
416  /* if we went to camera, store the original */
417  if (sms->to_camera) {
418  rv3d->persp = RV3D_CAMOB;
419  view3d_smooth_view_state_restore(&sms->org, v3d, rv3d);
420  }
421  else {
423 
424  view3d_smooth_view_state_restore(&sms->dst, v3d, rv3d);
425 
427  ED_view3d_camera_lock_autokey(v3d, rv3d, C, true, true);
428  }
429 
430  if ((RV3D_LOCK_FLAGS(rv3d) & RV3D_LOCK_ROTATION) == 0) {
431  rv3d->view = sms->org_view;
432  }
433 
434  MEM_freeN(rv3d->sms);
435  rv3d->sms = NULL;
436 
437  WM_event_remove_timer(wm, win, rv3d->smooth_timer);
438  rv3d->smooth_timer = NULL;
439  rv3d->rflag &= ~RV3D_NAVIGATING;
440 
441  /* Event handling won't know if a UI item has been moved under the pointer. */
443  }
444  else {
445  /* ease in/out */
446  const float step_inv = 1.0f - step;
447 
448  interp_qt_qtqt(rv3d->viewquat, sms->src.quat, sms->dst.quat, step);
449 
450  if (sms->use_dyn_ofs) {
452  rv3d->ofs, sms->src.ofs, sms->src.quat, rv3d->viewquat, sms->dyn_ofs);
453  }
454  else {
455  interp_v3_v3v3(rv3d->ofs, sms->src.ofs, sms->dst.ofs, step);
456  }
457 
458  rv3d->dist = sms->dst.dist * step + sms->src.dist * step_inv;
459  v3d->lens = sms->dst.lens * step + sms->src.lens * step_inv;
460 
463  if (use_autokey && ED_screen_animation_playing(wm)) {
464  ED_view3d_camera_lock_autokey(v3d, rv3d, C, true, true);
465  }
466  }
467 
468  if (sync_boxview && (RV3D_LOCK_FLAGS(rv3d) & RV3D_BOXVIEW)) {
470  }
471 
472  /* NOTE: this doesn't work right because the v3d->lens is now used in ortho mode r51636,
473  * when switching camera in quad-view the other ortho views would zoom & reset.
474  *
475  * For now only redraw all regions when smooth-view finishes.
476  */
477  if (step >= 1.0f) {
479  }
480  else {
481  ED_region_tag_redraw(region);
482  }
483 }
484 
485 /* only meant for timer usage */
486 
487 static void view3d_smoothview_apply(bContext *C, View3D *v3d, ARegion *region, bool sync_boxview)
488 {
489  RegionView3D *rv3d = region->regiondata;
490  struct SmoothView3DStore *sms = rv3d->sms;
491  float step;
492 
493  if (sms->time_allowed != 0.0) {
494  step = (float)((rv3d->smooth_timer->duration) / sms->time_allowed);
495  }
496  else {
497  step = 1.0f;
498  }
499  const bool finished = step >= 1.0f;
500  if (!finished) {
501  step = (3.0f * step * step - 2.0f * step * step * step);
502  }
503  view3d_smoothview_apply_ex(C, v3d, region, sync_boxview, true, step, finished);
504 }
505 
506 static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
507 {
508  View3D *v3d = CTX_wm_view3d(C);
509  ARegion *region = CTX_wm_region(C);
510  RegionView3D *rv3d = region->regiondata;
511 
512  /* escape if not our timer */
513  if (rv3d->smooth_timer == NULL || rv3d->smooth_timer != event->customdata) {
514  return OPERATOR_PASS_THROUGH;
515  }
516 
517  view3d_smoothview_apply(C, v3d, region, true);
518 
519  return OPERATOR_FINISHED;
520 }
521 
523 {
524  RegionView3D *rv3d = region->regiondata;
525 
526  if (rv3d && rv3d->sms) {
527  rv3d->sms->time_allowed = 0.0; /* force finishing */
528  view3d_smoothview_apply(C, v3d, region, false);
529 
530  /* force update of view matrix so tools that run immediately after
531  * can use them without redrawing first */
534  ED_view3d_update_viewmat(depsgraph, scene, v3d, region, NULL, NULL, NULL, false);
535  }
536 }
537 
539 {
540  /* identifiers */
541  ot->name = "Smooth View";
542  ot->idname = "VIEW3D_OT_smoothview";
543 
544  /* api callbacks */
546 
547  /* flags */
549 
551 }
552 
typedef float(TangentPoint)[2]
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 wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:713
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Definition: context.c:1528
struct View3D * CTX_wm_view3d(const bContext *C)
Definition: context.c:784
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:749
struct wmWindow * CTX_wm_window(const bContext *C)
Definition: context.c:723
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define BLI_assert_msg(a, msg)
Definition: BLI_assert.h:53
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
#define M_PI
Definition: BLI_math_base.h:20
float angle_signed_normalized_qtqt(const float q1[4], const float q2[4])
void interp_qt_qtqt(float q[4], const float a[4], const float b[4], float t)
void copy_qt_qt(float q[4], const float a[4])
Definition: math_rotation.c:33
MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
Definition: math_vector.c:29
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
#define UNUSED(x)
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ LIB_TAG_DOIT
Definition: DNA_ID.h:707
@ CAM_ORTHO
@ OB_RENDER
@ OB_CAMERA
@ RGN_TYPE_WINDOW
@ USER_GLOBALUNDO
#define RV3D_LOCK_FLAGS(rv3d)
#define RV3D_CAMOB
@ RV3D_LOCK_ROTATION
@ RV3D_BOXVIEW
#define RV3D_PERSP
#define RV3D_VIEW_USER
#define RV3D_NAVIGATING
#define RV3D_ORTHO
@ OPERATOR_FINISHED
@ OPERATOR_PASS_THROUGH
bScreen * ED_screen_animation_playing(const struct wmWindowManager *wm)
void ED_region_tag_redraw(struct ARegion *region)
Definition: area.c:655
bool ED_operator_view3d_active(struct bContext *C)
Definition: screen_ops.c:225
bool ED_view3d_camera_lock_sync(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d)
#define VIEW3D_DIST_FALLBACK
Definition: ED_view3d.h:1230
float ED_view3d_offset_distance(const float mat[4][4], const float ofs[3], float fallback_dist)
void ED_view3d_from_object(const struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens)
void ED_view3d_update_viewmat(struct Depsgraph *depsgraph, const struct Scene *scene, struct View3D *v3d, struct ARegion *region, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect, bool offscreen)
bool ED_view3d_camera_lock_undo_test(const View3D *v3d, const RegionView3D *rv3d, struct bContext *C)
Definition: view3d_utils.c:692
bool ED_view3d_camera_lock_autokey(struct View3D *v3d, struct RegionView3D *rv3d, struct bContext *C, bool do_rotate, bool do_translate)
Definition: view3d_utils.c:665
bool ED_view3d_camera_lock_undo_push(const char *str, View3D *v3d, struct RegionView3D *rv3d, struct bContext *C)
Definition: view3d_utils.c:726
void ED_view3d_camera_lock_init(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d)
bool ED_view3d_camera_lock_undo_grouped_push(const char *str, View3D *v3d, struct RegionView3D *rv3d, struct bContext *C)
Definition: view3d_utils.c:731
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
#define C
Definition: RandGen.cpp:25
@ OPTYPE_INTERNAL
Definition: WM_types.h:168
#define ND_SPACE_VIEW3D
Definition: WM_types.h:471
#define NC_SPACE
Definition: WM_types.h:342
unsigned int U
Definition: btGjkEpa3.h:78
Scene scene
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:33
#define fabsf(x)
Definition: metal/compat.h:219
static void area(int d1, int d2, int e1, int e2, float weights[2])
void * regiondata
int tag
Definition: DNA_ID.h:387
float obmat[4][4]
void * data
struct RenderEngine * render_engine
struct SmoothView3DStore * sms
float viewquat[4]
struct wmTimer * smooth_timer
struct SmoothView3DState dst
struct SmoothView3DState src
struct SmoothView3DState org
const float * lens
const float * quat
const float * dist
const char * undo_str
struct Object * camera
struct Object * camera_old
const float * ofs
const float * dyn_ofs
struct Object * camera
View3DShading shading
void * customdata
Definition: WM_types.h:715
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
const char * idname
Definition: WM_types.h:890
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:943
double duration
Definition: WM_types.h:872
void view3d_boxview_copy(struct ScrArea *area, struct ARegion *region)
Definition: view3d_utils.c:914
void view3d_orbit_apply_dyn_ofs(float r_ofs[3], const float ofs_old[3], const float viewquat_old[4], const float viewquat_new[4], const float dyn_ofs[3])
void ED_view3d_smooth_view_undo_end(bContext *C, ScrArea *area, const char *undo_str, const bool undo_grouped)
static void view3d_smooth_view_state_backup(struct SmoothView3DState *sms_state, const View3D *v3d, const RegionView3D *rv3d)
static void view3d_smoothview_apply_ex(bContext *C, View3D *v3d, ARegion *region, bool sync_boxview, bool use_autokey, const float step, const bool finished)
void ED_view3d_smooth_view_ex(const Depsgraph *depsgraph, wmWindowManager *wm, wmWindow *win, ScrArea *area, View3D *v3d, ARegion *region, const int smooth_viewtx, const V3D_SmoothParams *sview)
static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *region, const int smooth_viewtx, const struct V3D_SmoothParams *sview)
void ED_view3d_smooth_view_force_finish(bContext *C, View3D *v3d, ARegion *region)
static void view3d_smooth_view_state_restore(const struct SmoothView3DState *sms_state, View3D *v3d, RegionView3D *rv3d)
void ED_view3d_smooth_view_undo_begin(bContext *C, ScrArea *area)
void VIEW3D_OT_smoothview(wmOperatorType *ot)
static void view3d_smoothview_apply(bContext *C, View3D *v3d, ARegion *region, bool sync_boxview)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_event_add_mousemove(wmWindow *win)
@ TIMER1
wmOperatorType * ot
Definition: wm_files.c:3479
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
Definition: wm_window.c:1682
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)
Definition: wm_window.c:1630