3D View: option only to show axis aligned image empties
Useful for using reference images that only make sense to see in aligned axis-views. This restores functionality possible with 2.7x background images. See: T52668.
This commit is contained in:
@@ -2985,6 +2985,15 @@ bool BKE_object_empty_image_data_is_visible_in_view3d(const Object *ob, const Re
|
||||
}
|
||||
}
|
||||
|
||||
if (visibility_flag & OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED) {
|
||||
float proj[3];
|
||||
project_plane_v3_v3v3(proj, ob->obmat[2], rv3d->viewinv[2]);
|
||||
const float proj_length_sq = len_squared_v3(proj);
|
||||
if (proj_length_sq > 1e-5f) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user