48 const View3D *v3d =
static_cast<const View3D *
>(area->spacedata.first);
57 camera->
id.
tag &= ~ID_TAG_DOIT;
74 const bool undo_grouped)
76 View3D *v3d =
static_cast<View3D *
>(area->spacedata.first);
83 camera->
id.
tag &= ~ID_TAG_DOIT;
95 const ARegion *region_camera =
nullptr;
98 bool is_interactive =
false;
105 region_camera = region;
107 is_interactive =
true;
112 if (region_camera ==
nullptr) {
119 if (is_interactive) {
130 if (is_interactive) {
213 const int smooth_viewtx,
221 "Only the 'ED_view3d_smooth_view' version of this function handles undo!");
230 if (rv3d->
sms ==
nullptr) {
279 if (sview->
ofs !=
nullptr) {
305 if (sview->
ofs !=
nullptr) {
307 ob_camera_old_eval->object_to_world().ptr(), sview->
ofs, 0.0f);
346 if (rv3d->
sms ==
nullptr) {
388 const int smooth_viewtx,
401 const bool do_undo = (sview->
undo_str !=
nullptr);
461 if (C_for_camera_lock) {
479 rv3d->
rflag &= ~RV3D_NAVIGATING;
511 if (factor >= 1.0f) {
516 factor = (3.0f * factor * factor - 2.0f * factor * factor * factor);
567 if (rv3d && rv3d->
sms) {
600 if (rv3d && rv3d->
sms) {
609 ot->
idname =
"VIEW3D_OT_smoothview";
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
MINLINE float interpf(float target, float origin, float t)
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])
MINLINE bool equals_v3v3(const float v1[3], const float v2[3]) 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)
MINLINE bool equals_v4v4(const float v1[4], const float v2[4]) ATTR_WARN_UNUSED_RESULT
typedef double(DMatrix)[4][4]
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
#define RV3D_LOCK_FLAGS(rv3d)
bool ED_operator_view3d_active(bContext *C)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
void ED_region_tag_redraw(ARegion *region)
bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d)
void ED_view3d_from_object(const Object *ob, float ofs[3], float quat[4], const float *dist, float *lens)
#define VIEW3D_DIST_FALLBACK
float ED_view3d_offset_distance(const float mat[4][4], const float ofs[3], float fallback_dist)
bool ED_view3d_camera_lock_undo_push(const char *str, const View3D *v3d, const RegionView3D *rv3d, bContext *C)
void ED_view3d_camera_lock_init(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d)
bool ED_view3d_camera_lock_autokey(View3D *v3d, RegionView3D *rv3d, bContext *C, bool do_rotate, bool do_translate)
void ED_view3d_update_viewmat(const Depsgraph *depsgraph, const Scene *scene, View3D *v3d, ARegion *region, const float viewmat[4][4], const float winmat[4][4], const rcti *rect, bool offscreen)
bool ED_view3d_camera_lock_undo_test(const View3D *v3d, const RegionView3D *rv3d, bContext *C)
bool ED_view3d_camera_lock_undo_grouped_push(const char *str, const View3D *v3d, const RegionView3D *rv3d, bContext *C)
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
draw_view in_light_buf[] float
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
struct SmoothView3DStore * sms
struct ViewRender * view_render
struct wmTimer * smooth_timer
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
void view3d_boxview_copy(ScrArea *area, ARegion *region)
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_begin(bContext *C, const ScrArea *area)
void ED_view3d_smooth_view_undo_end(bContext *C, const ScrArea *area, const char *undo_str, const bool undo_grouped)
void ED_view3d_smooth_view_force_finish_no_camera_lock(const Depsgraph *depsgraph, wmWindowManager *wm, wmWindow *win, const Scene *scene, View3D *v3d, ARegion *region)
static void view3d_smoothview_apply_and_finish_ex(wmWindowManager *wm, wmWindow *win, View3D *v3d, RegionView3D *rv3d, bContext *C_for_camera_lock)
static void view3d_smoothview_apply_from_timer(bContext *C, View3D *v3d, ARegion *region)
static void view3d_smoothview_apply_with_interp(bContext *C, View3D *v3d, RegionView3D *rv3d, const bool use_autokey, const float factor)
static void view3d_smooth_view_state_backup(SmoothView3DState *sms_state, const View3D *v3d, const RegionView3D *rv3d)
static void view3d_smooth_view_state_restore(const SmoothView3DState *sms_state, View3D *v3d, RegionView3D *rv3d)
static void view3d_smoothview_apply_and_finish(bContext *C, View3D *v3d, RegionView3D *rv3d)
void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *region, const int smooth_viewtx, const V3D_SmoothParams *sview)
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)
void ED_view3d_smooth_view_force_finish(bContext *C, View3D *v3d, ARegion *region)
static int view3d_smoothview_invoke(bContext *C, wmOperator *, const wmEvent *event)
static void view3d_smooth_view_force_finish_ex(const Depsgraph *depsgraph, wmWindowManager *wm, wmWindow *win, const Scene *scene, View3D *v3d, ARegion *region, bContext *C_for_camera_lock)
void VIEW3D_OT_smoothview(wmOperatorType *ot)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_mousemove(wmWindow *win)
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const int event_type, const double time_step)