diff options
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops_orient.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index 315c17a6d74..c6d4a6ad104 100644 --- a/source/blender/editors/space_clip/tracking_ops_orient.c +++ b/source/blender/editors/space_clip/tracking_ops_orient.c @@ -72,6 +72,7 @@ static Object *get_orientation_object(bContext *C) object = get_camera_with_movieclip(scene, clip); } else { + BKE_view_layer_synced_ensure(scene, view_layer); object = BKE_view_layer_active_object_get(view_layer); } @@ -86,6 +87,7 @@ static bool set_orientation_poll(bContext *C) { SpaceClip *sc = CTX_wm_space_clip(C); if (sc != NULL) { + const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); MovieClip *clip = ED_space_clip_get_clip(sc); if (clip != NULL) { @@ -94,6 +96,7 @@ static bool set_orientation_poll(bContext *C) if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { return true; } + BKE_view_layer_synced_ensure(scene, view_layer); return BKE_view_layer_active_object_get(view_layer) != NULL; } } |