Commit: 2c84c23a074e315581f374c93039c2ebfa56a947
Author: Campbell Barton
Date: Tue Feb 5 10:29:19 2019 +1100
Branches: master
https://developer.blender.org/rB2c84c23a074e315581f374c93039c2ebfa56a947
Fix T61163: Single sided images show when viewed from side
===================================================================
M source/blender/blenkernel/intern/object.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object.c
b/source/blender/blenkernel/intern/object.c
index 39972fa84c2..d8bc27fa596 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2608,15 +2608,16 @@ bool BKE_object_empty_image_is_visible_in_view3d(const
Object *ob, const RegionV
char visibility_flag = ob->empty_image_visibility_flag;
if ((visibility_flag & (OB_EMPTY_IMAGE_HIDE_BACK |
OB_EMPTY_IMAGE_HIDE_FRONT)) != 0) {
+ const float eps = 1e-5f;
/* TODO: this isn't correct with perspective projection. */
const float dot = dot_v3v3((float *)&ob->obmat[2], (float
*)&rv3d->viewinv[2]);
if (visibility_flag & OB_EMPTY_IMAGE_HIDE_BACK) {
- if (dot < 0.0f) {
+ if (dot < eps) {
return false;
}
}
if (visibility_flag & OB_EMPTY_IMAGE_HIDE_FRONT) {
- if (dot > 0.0f) {
+ if (dot > -eps) {
return false;
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs