diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-13 12:28:24 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-13 12:28:24 +0300 |
commit | 38eab96f9b725bc9d068a46fa3aa982aa0d7e726 (patch) | |
tree | c89494afad26bedc6e92fe56887d04ef9b56a396 /source/blender/editors/space_clip | |
parent | ae9e38c5adc60347e127c9f4c5ee5436b611b48f (diff) |
Fix T44683: Unable to mute movie clip when using stabilized display
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index d0210025183..ce248f1eb10 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -1694,29 +1694,29 @@ void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar) } if (sc->flag & SC_SHOW_STABLE) { + float translation[2]; + float aspect = clip->tracking.camera.pixel_aspect; float smat[4][4], ismat[4][4]; - ibuf = ED_space_clip_get_stable_buffer(sc, sc->loc, &sc->scale, &sc->angle); - - if (ibuf) { - float translation[2]; - float aspect = clip->tracking.camera.pixel_aspect; + if ((sc->flag & SC_MUTE_FOOTAGE) == 0) { + ibuf = ED_space_clip_get_stable_buffer(sc, sc->loc, + &sc->scale, &sc->angle); + } - if (width != ibuf->x) - mul_v2_v2fl(translation, sc->loc, (float)width / ibuf->x); - else - copy_v2_v2(translation, sc->loc); + if (ibuf != NULL && width != ibuf->x) + mul_v2_v2fl(translation, sc->loc, (float)width / ibuf->x); + else + copy_v2_v2(translation, sc->loc); - BKE_tracking_stabilization_data_to_mat4(width, height, aspect, - translation, sc->scale, sc->angle, sc->stabmat); + BKE_tracking_stabilization_data_to_mat4(width, height, aspect, translation, + sc->scale, sc->angle, sc->stabmat); - unit_m4(smat); - smat[0][0] = 1.0f / width; - smat[1][1] = 1.0f / height; - invert_m4_m4(ismat, smat); + unit_m4(smat); + smat[0][0] = 1.0f / width; + smat[1][1] = 1.0f / height; + invert_m4_m4(ismat, smat); - mul_m4_series(sc->unistabmat, smat, sc->stabmat, ismat); - } + mul_m4_series(sc->unistabmat, smat, sc->stabmat, ismat); } else if ((sc->flag & SC_MUTE_FOOTAGE) == 0) { ibuf = ED_space_clip_get_buffer(sc); |