Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-06 18:08:37 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-06 18:08:37 +0400
commit967b12060cb6ebda75d216e0ffbb02c5ca7340a5 (patch)
treed60a6d795f778b962047b25af7d4d63044b8f9c6 /source/blender/editors/space_clip/clip_draw.c
parent75212f4677f4e3f54168eaacdfcaad19289eca38 (diff)
Alpha channel of a plane track image works fine in MCE now
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 3ca9a9478fa..79607163913 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1101,13 +1101,15 @@ static void draw_plane_marker_image(Scene *scene,
{0.0f, 1.0f}};
float perspective_matrix[3][3];
float gl_matrix[4][4];
+ bool transparent = false;
BKE_tracking_homography_between_two_quads(frame_corners,
plane_marker->corners,
perspective_matrix);
homogeneous_2d_to_gl_matrix(perspective_matrix, gl_matrix);
- if (plane_track->image_opacity != 1.0f) {
+ if (plane_track->image_opacity != 1.0f || ibuf->planes == 32) {
+ transparent = true;
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
@@ -1142,7 +1144,7 @@ static void draw_plane_marker_image(Scene *scene,
glBindTexture(GL_TEXTURE_2D, last_texid);
glDisable(GL_TEXTURE_2D);
- if (plane_track->image_opacity != 1.0f) {
+ if (transparent) {
glDisable(GL_BLEND);
}
}