diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-18 17:58:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-19 13:12:22 +0300 |
commit | e46c49ff3dd67c7d759b581b677b4ab90cee3c46 (patch) | |
tree | 30164c0344ba42ca408d3b66a3a7bedccb50a150 /source/blender/editors/space_view3d/view3d_intern.h | |
parent | 9cac97fb3cb2c737266bc3c8b34494fbea5ff7f2 (diff) |
Fix T53788: Camera animation not working
Both object level and camera datablock properties animation did not work with
copy on write enabled.
The root of the issue is going to the fact, that all interface elements are
referencing original datablock. For example, View3D has pointer to camera it's
using, and all areas which does access v3d->camera should in fact query for
the evaluated version of that camera, within the current context.
Annoying part of this change is that we now need to pass depsgraph in lots
of places. Which is rather annoying.
Alternative would be to cache evaluated camera in viewport itself, but then
it makes it annoying to keep things in sync.
Not sure if there is nicer solution here.
Reviewers: dfelinto, campbellbarton, mont29
Subscribers: dragoneex
Differential Revision: https://developer.blender.org/D3007
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_intern.h')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index ee0b628fdad..8897b473b98 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -233,8 +233,9 @@ void ED_view3d_draw_select_loop( void ED_view3d_draw_depth_loop( const struct EvaluationContext *eval_ctx, Scene *scene, ARegion *ar, View3D *v3d); -void view3d_draw_bgpic_test(Scene *scene, ARegion *ar, View3D *v3d, - const bool do_foreground, const bool do_camera_frame); +void view3d_draw_bgpic_test(Scene *scene, const struct Depsgraph *depsgraph, + ARegion *ar, View3D *v3d, + const bool do_foreground, const bool do_camera_frame); void ED_view3d_after_add(ListBase *lb, Base *base, const short dflag); @@ -279,7 +280,7 @@ void ED_view3d_smooth_view_force_finish( struct bContext *C, struct View3D *v3d, struct ARegion *ar); -void view3d_winmatrix_set(ARegion *ar, const View3D *v3d, const rcti *rect); +void view3d_winmatrix_set(const struct Depsgraph *depsgraph, ARegion *ar, const View3D *v3d, const rcti *rect); void view3d_viewmatrix_set(const struct EvaluationContext *eval_ctx, Scene *scene, const View3D *v3d, RegionView3D *rv3d); void fly_modal_keymap(struct wmKeyConfig *keyconf); @@ -376,7 +377,7 @@ bool VP_legacy_view3d_stereo3d_active(struct wmWindow *win, Scene *scene, View3D void VP_legacy_view3d_stereo3d_setup(const struct EvaluationContext *eval_ctx, Scene *scene, View3D *v3d, ARegion *ar); void draw_dupli_objects(const struct EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, ARegion *ar, View3D *v3d, Base *base); bool VP_legacy_use_depth(Scene *scene, View3D *v3d); -void VP_drawviewborder(Scene *scene, ARegion *ar, View3D *v3d); +void VP_drawviewborder(Scene *scene, const struct Depsgraph *depsgraph, ARegion *ar, View3D *v3d); void VP_drawrenderborder(ARegion *ar, View3D *v3d); void VP_view3d_draw_background_none(void); void VP_view3d_draw_background_world(Scene *scene, RegionView3D *rv3d); |